Files
flowgraph/tasks/reactive-max-concurrency.md
glm-5.1 466b121f77 decompose architecture into 38 atomic tasks across 12 parallel generations
Decompose the reviewed architecture specs into taskgraph-managed tasks:
- 2 setup tasks (project init, test infrastructure)
- 4 schema tasks (enums, node attrs, edge attrs, graph schemas)
- 1 error hierarchy task
- 6 graph tasks (FlowGraph class, 3 construction paths, queries, validation)
- 5 analysis tasks (type-compat, build-type-edges, ordering, template-validation, defaults)
- 5 component tasks (Operation, Sequential, Parallel, Conditional, Map)
- 2 host config tasks (GraphologyHostConfig, ReactiveHostConfig)
- 4 reactive tasks (WorkflowRoot, node-status, max-concurrency, retry-semantics)
- 3 review tasks (foundation, reactive-and-hosts, complete-library)
- 5 meta cluster tasks (schema, graph, component, reactive, analysis layers)
- 1 API exports task

Validated with taskgraph: zero cycles, 38 tasks, 12 parallel generations.
Critical path: 12 tasks through reactive execution layer.
2026-05-21 20:24:44 +00:00

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 pending
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