Skip to content

ARCH-008: dependency.py workflow completion check rejects completed_with_failures #90

@Muizzkolapo

Description

@Muizzkolapo

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

Files Affected

  • agent_actions/workflow/parallel/dependency.py:167

Acceptance Criteria

  • Upstream actions with completed_with_failures do not block downstream workflow execution
  • Behavior is symmetric between online and batch for the same failure pattern

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions