Files
flowgraph/tasks/reactive-max-concurrency.md

1.6 KiB

id, name, status, depends_on, scope, risk, impact, level
id name status depends_on scope risk impact level
reactive/max-concurrency Implement maxConcurrency semaphore for Parallel groups completed
reactive/node-status
component/parallel
narrow medium component implementation

Description

Implement the reactive counting semaphore that enforces maxConcurrency on Parallel groups. When the root initializes signals for nodes in a Parallel group with maxConcurrency: N, a node's effective ready transition requires both preconditions.value === true AND runningCount < maxConcurrency.

Acceptance Criteria

  • For each node in a Parallel group with maxConcurrency, the canStart computed wraps preconditions: preconditions.value && runningSiblingCount < maxConcurrency
  • runningSiblingCount is a reactive computed derived from counting sibling nodes currently in "running" state
  • When a sibling completes and a slot opens, the next ready node transitions to ready/startable
  • Parallel groups without maxConcurrency (default): all siblings start immediately when preconditions met — no semaphore
  • maxConcurrency is a runtime scheduling hint — the DAG doesn't encode it
  • Unit tests: parallel group with maxConcurrency: 2 limits to 2 running at a time, slot opens → next node starts, no maxConcurrency → all start immediately

References

  • docs/architecture/reactive-execution.md — maxConcurrency, counting semaphore
  • docs/architecture/workflow-templates.md — Parallel.maxConcurrency prop

Notes

To be filled by implementation agent

Summary

To be filled on completion