fix: workflow incorrectly marked as completed while nodes are still executing#26
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.
| 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.
Wrong order breaks recursive skip propagation logic
High Severity
In _propagate_skip_to_node, the order of propagate_skip_from_edge and mark_edge_skipped was reversed. Now propagate_skip_from_edge is called before the edge is marked as skipped. When propagate_skip_from_edge analyzes incoming edges of the downstream node, the current edge still has state UNKNOWN, causing analyze_edge_states to return has_unknown: True and the function to return early without propagating the skip. This completely breaks recursive skip propagation through the graph.
Benchmark PR from qodo-benchmark#441
Note
Strengthens skip propagation semantics and adds test coverage.
SkipPropagator.propagate_skip_from_edge, callstart_execution(node_id)beforeenqueue_node(node_id)when any incoming edge is taken_propagate_skip_to_node, recurse viapropagate_skip_from_edgebeforemark_edge_skippedon outgoing edges (order change)skip_branch_paths, now also callspropagate_skip_from_edgeaftermark_edge_skippedfor each unselected edgeSkipPropagatorcovering unknown/taken/all_skipped cases, recursive propagation, and branch-path skippingWritten by Cursor Bugbot for commit 3a2bbf9. Configure here.