🤖 feat: add durable workflow action parallelism#3572
Conversation
Add same-workspace workflow concurrency primitives for durable action fan-out and child workflow fan-out, with tests and authoring guidance. --- _Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `$32.19`_ <!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=32.19 -->
Simplify the parallel action settlement loop and report parallelWorkflows-specific validation errors, with focused regression coverage. --- _Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `$32.19`_ <!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=32.19 -->
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 69050fdfbd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Abort sibling parallel action waits when a foreground wait backgrounds so workflow_run can hand off to the background runner without waiting for unrelated siblings to finish. --- _Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `$41.62`_ <!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=41.62 -->
|
@codex review Please take another look after the foreground-backgrounding fix. |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Adds durable same-workspace workflow concurrency primitives so workflows can fan out host actions and child workflow starts without spawning child agent workspaces.
Background
Workflow authors could previously use
parallelAgentsfor concurrent child-agent work, but same-checkout scheduled workflows needed a host-level concurrency boundary for workspace actions. NativePromise.allinside the QuickJS/Asyncify sandbox does not provide true concurrent host action execution, so this adds explicit durable primitives.Implementation
parallelActions(specs, options?)for durable host-side action fan-out with stable step IDs, duplicate-ID validation, ordered results, and optionalmaxParallel.parallelWorkflows(specs, options?)as a wrapper over built-inworkflows.start, preserving child workflow replay semantics while reporting wrapper-specific validation errors.Validation
make static-checkbun test src/node/services/workflows/WorkflowRunner.test.ts— 68 passed, 0 failedsimplifyworkflow ran and applied the cleanup commit before the Codex follow-up fix.Risks
Regression risk is moderate because this touches durable workflow replay and action execution. The changes are isolated to explicit primitives and covered by focused WorkflowRunner tests for concurrency, ordering, child workflow fan-out, foreground background handoff, validation errors, and replay-adjacent behavior.
Generated with
mux• Model:openai:gpt-5.5• Thinking:xhigh• Cost:$41.62