You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Workflow runs a node twice when a list of routes matches two edges to it #8072
Describe the Bug:
Since 460715b, a workflow graph may have several edges between the same two nodes as long as their routes are disjoint, for example a routing map (triage, {"billing": handle, "refund": handle}). When a node emits a list of routes that matches more than one of those edges, Graph.get_next_pending_nodes returns the target once per matched edge, so the target runs once per edge:
A plain node runs twice (handle@1 and handle@2, each in its own sub-branch, because _buffer_downstream_triggers treats the two entries as a fan-out).
A JoinNode whose only predecessor is that node fires twice, and so does everything after it.
A single edge with route=["billing", "refund"] to the same node runs it once.
Steps to Reproduce:
Install google-adk.
Run the code below.
Expected Behavior:
Each target runs once.
-- fan_in
handle ran with ticket
-- join
notify ran
Observed Behavior:
-- fan_in
handle ran with ticket
handle ran with ticket
-- join
notify ran
notify ran
Environment Details:
ADK Library Version (pip show google-adk): main at 1973796 (2.14.0)
Desktop OS: macOS
Python Version (python -V): 3.14.7
Model Information:
Are you using LiteLLM: No
Which model is being used: N/A (no model call is needed to reproduce)
🟡 Optional Information
Regression:
Yes. Before 460715b, graph validation rejected a second edge between the same two nodes.
Activity
fix: run a node once when a list of routes matches several edges to it