fix: workflow incorrectly marked as completed while nodes are still executing#13
Conversation
There was a problem hiding this comment.
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}") |
There was a problem hiding this comment.
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.
| 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) |
There was a problem hiding this comment.
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.
Benchmark PR from agentic-review-benchmarks#13
Note
Refines skip propagation and execution triggering in graph traversal.
has_takenis true, callstart_executionand thenenqueue_nodefor the downstream node_propagate_skip_to_node, recursepropagate_skip_from_edgebefore marking each outgoing edge as skippedSkipPropagatorcovering unknown/taken/all-skipped cases, recursive propagation, and branch path skippingWritten by Cursor Bugbot for commit c7172e3. Configure here.