Skip to content

fix(orchestration): add circuit breaker and parallel step execution (#2168, #2172)#2197

Merged
mrveiss merged 1 commit intoDev_new_guifrom
fix/issue-2168-2172
Mar 23, 2026
Merged

fix(orchestration): add circuit breaker and parallel step execution (#2168, #2172)#2197
mrveiss merged 1 commit intoDev_new_guifrom
fix/issue-2168-2172

Conversation

@mrveiss
Copy link
Owner

@mrveiss mrveiss commented Mar 23, 2026

Summary

Changes

  • _group_steps_by_dependency(): Groups steps by dependency order; independent steps form a parallel group
  • _execute_step_group(): Runs single-step groups sequentially, multi-step groups via asyncio.gather
  • execute_coordinated_workflow(): Now processes step groups instead of individual steps
  • _execute_coordinated_step(): Protected by circuit breaker (workflow_step_execution, 3 failures → open) and retry (2 attempts, exponential backoff)
  • Falls back to sequential execution on circular dependencies with error log

Test plan

  • Workflow with sequential steps (A→B→C) executes in order
  • Workflow with independent steps (A, B, C no deps) runs in parallel
  • Mixed: A runs first, B+C run parallel (both depend on A only)
  • Circuit breaker: after 3 step failures, subsequent steps fast-fail
  • Circular dependency: logs error and falls back to sequential

Closes #2168
Closes #2172

…2168, #2172)

#2168: Add @circuit_breaker_async + @retry_async decorators to
_execute_coordinated_step, mirroring enhanced_orchestrator.py pattern
that was lost during #381 extraction.

#2172: Add _group_steps_by_dependency() topological sort and
_execute_step_group() with asyncio.gather for concurrent independent
steps. Falls back to sequential on circular dependencies.
@github-actions
Copy link

✅ SSOT Configuration Compliance: Passing

🎉 No hardcoded values detected that have SSOT config equivalents!

@mrveiss mrveiss merged commit 414ad3a into Dev_new_gui Mar 23, 2026
2 of 3 checks passed
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