Skip to content

fix: workflow incorrectly marked as completed while nodes are still executing#13

Open
tomerqodo wants to merge 4 commits intocursor_full_base_fix_workflow_incorrectly_marked_as_completed_while_nodes_are_still_executing_pr13from
cursor_full_head_fix_workflow_incorrectly_marked_as_completed_while_nodes_are_still_executing_pr13
Open

fix: workflow incorrectly marked as completed while nodes are still executing#13
tomerqodo wants to merge 4 commits intocursor_full_base_fix_workflow_incorrectly_marked_as_completed_while_nodes_are_still_executing_pr13from
cursor_full_head_fix_workflow_incorrectly_marked_as_completed_while_nodes_are_still_executing_pr13

Conversation

@tomerqodo
Copy link
Copy Markdown

@tomerqodo tomerqodo commented Jan 25, 2026

Benchmark PR from agentic-review-benchmarks#13


Note

Refines skip propagation and execution triggering in graph traversal.

  • When has_taken is true, call start_execution and then enqueue_node for the downstream node
  • In _propagate_skip_to_node, recurse propagate_skip_from_edge before marking each outgoing edge as skipped
  • Add unit tests for SkipPropagator covering unknown/taken/all-skipped cases, recursive propagation, and branch path skipping

Written by Cursor Bugbot for commit c7172e3. Configure here.

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

if edge_states["has_taken"]:
# Enqueue node
# Start execution and enqueue node
print(f"Starting execution for node: {downstream_node_id}")
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debug print statement left in production code

Low Severity

A debug print statement logging "Starting execution for node: {downstream_node_id}" was left in the production code. This will output to logs/stdout during workflow execution, polluting logs and potentially impacting performance in high-throughput scenarios.

Fix in Cursor Fix in Web

self._state_manager.mark_edge_skipped(edge.id)
# Recursively propagate skip
self.propagate_skip_from_edge(edge.id)
self._state_manager.mark_edge_skipped(edge.id)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skip propagation fails due to incorrect operation order

High Severity

The order of propagate_skip_from_edge and mark_edge_skipped was reversed in _propagate_skip_to_node. When propagate_skip_from_edge runs before the edge is marked as skipped, the downstream node's incoming edge analysis sees the edge as UNKNOWN, causing has_unknown=True and premature termination. This breaks recursive skip propagation through multi-level graphs.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant