Repository navigation
feat(dag): plan-driven fan-out of parallel writers - #861
Merged
Merged
Conversation
A coding block (or implementation node) may declare fan_out: <plan>. The plan then returns work packages; when the writer becomes ready the scheduler reshapes it through the durable extend path: two or more provably disjoint packages run as parallel writers and the writer id becomes their ADR-0002 aggregator, so downstream verify/review bindings are unchanged. Fewer packages, or a shape the engine cannot prove safe, run the writer serially with the reason in its prompt.
LeXwDeX
marked this pull request as ready for review
October 22, 2026 01:40
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c5d346547c
ℹ️ 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".
- Dag.extend takes an optional attempt fence checked under the workflow lock; fan-out expansion and its serial fallback are dropped when a parent replan or cancel reshaped the writer after the snapshot. - Package writers get their own recovery identity; the aggregator keeps the writer's, so recovering two packages no longer collides. - Write-set paths drop empty and '.' segments before overlap checks. - The runtime test waits on a bounded admission predicate, not a sleep.
This was referenced Oct 22, 2026
LeXwDeX
enabled auto-merge
October 22, 2026 02:26
This was referenced Oct 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The number of parallel writers was fixed before the plan that decides the work packages had run. Templates either guessed a count or collapsed implementation into one writer and relied on the parent remembering a later
extend. The trigger for expansion should be data, not timing.What changed
codingblocks (and implementation nodes) acceptfan_out: <plan>; the compiler gives that plan apackages: [{ id, instruction, write_set }]schema and a contract explaining concurrent writers.extendpath (DagFanOut.planFanOut): two or more provably disjoint packages run as writers<writer>--<package>, and the writer id is replaced in place by the ADR-0002 aggregator, so verify/review bindings are unchanged.fan_out, ADR-0004, CONTEXT glossary, and the block guide.Evidence
test/dag/fan-out.test.ts(21) andtest/dag/dag-fan-out-runtime.test.ts(4, real scheduler loop: expand, single package, overlap decline, ceiling decline).bun test test/dag test/tool1457 pass (one intended schema snapshot update),bun run typecheck, lint 4673 (no new warnings),bun run test:dag-corepass.bun testin the target repo 3/3.--no-verifyby owner authorization, so CI on the pinned toolchain is authoritative.Checklist
fan_out(snapshot updated).fan_outcompile and run unchanged.🤖 Generated with Claude Code
Closes #859