-
Notifications
You must be signed in to change notification settings - Fork 0
ARCH-008: dependency.py workflow completion check rejects completed_with_failures #90
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Summary
workflow/parallel/dependency.py:167 checks upstream workflow completion using strict equality:
return all(details.get("status") == "completed" for details in status_data.values())This returns False when any upstream action has completed_with_failures status, blocking downstream execution. Since batch actions never reach completed_with_failures (see ARCH-007), this creates an asymmetry: online workflows with partial failures are blocked, batch workflows with the same failures proceed freely.
Impact
- Online: An upstream action that processes 99/100 items successfully gets
completed_with_failures. Downstream workflows that depend on it are blocked — even though 99 good records are available. - Batch: The same scenario gets
completed, and downstream proceeds. - Net effect: Online workflows are more fragile than batch for the same failure rate. This is backwards — online should have the advantage of immediate visibility, not be penalized for it.
Suggested Fix
return all(
details.get("status") in {"completed", "completed_with_failures"}
for details in status_data.values()
)This matches the pattern already used in state.py:128-133 (is_workflow_complete()) and state.py:136-138 (is_workflow_done()).
Related
- ARCH-007 (ARCH-007: Batch completion path never detects partial item failures (completed_with_failures is online-only) #89) — batch path never sets
completed_with_failures(masks this bug for batch) - ARCH-004 (ARCH-004: Formalize action state machine to prevent mode-specific state leaks #86) — formalized state machine would make terminal/complete sets consistent
Files Affected
agent_actions/workflow/parallel/dependency.py:167
Acceptance Criteria
- Upstream actions with
completed_with_failuresdo not block downstream workflow execution - Behavior is symmetric between online and batch for the same failure pattern
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working