Skip to content

A node that succeeds on retry makes the graph PartialSucceeded #403

Open

Description

@asukaminato0721

NodeEventProcessor calls graph_execution.record_node_failure() for every NodeRunFailedEvent before the failure handler decides whether to retry. A node that fails once and then succeeds on retry therefore increments exceptions_count, and the graph ends with GraphRunPartialSucceededEvent instead of GraphRunSucceededEvent.

Minimal reproduction

Tested on main at 069cd55.

import json, time
from graphon.dsl import loads
from graphon.enums import WorkflowNodeExecutionStatus
from graphon.node_events.base import NodeRunResult
from graphon.node_events.node import StreamCompletedEvent
from graphon.nodes.template_transform.template_transform_node import TemplateTransformNode

attempts = 0

def fake_run(self):
    global attempts
    attempts += 1
    if attempts == 1:
        raise ValueError("transient")
    yield StreamCompletedEvent(node_run_result=NodeRunResult(
        status=WorkflowNodeExecutionStatus.SUCCEEDED, outputs={"output": "ok"}))

TemplateTransformNode._run = fake_run
TemplateTransformNode.retry = property(lambda _: True)

engine = loads(json.dumps({"kind": "graph", "graph": {
    "nodes": [{"id": "start", "data": {"type": "start", "variables": []}},
              {"id": "a", "data": {"type": "template-transform", "template": "x", "variables": [],
                                   "retry_config": {"retry_enabled": True, "max_retries": 1, "retry_interval": 0}}}],
    "edges": [{"source": "start", "target": "a"}]}}), workers=1)

terminal = [e for e in engine.run() if type(e).__name__.startswith("GraphRun")][-1]
print(type(terminal).__name__, "exceptions_count =", terminal.exceptions_count)

Output:

GraphRunPartialSucceededEvent exceptions_count = 1

Expected

GraphRunSucceededEvent: the only node succeeded after its configured retry, and no error strategy was applied.

Actual

GraphRunPartialSucceededEvent exceptions_count = 1.

Possible direction

Count a failure only when it is not retried, i.e. when it resolves to an error-strategy exception or a terminal failure.

Activity

  1. self-assigned this
    on Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions