Skip to content

feat(dag): run unordered workspace writers in parallel with an implementation aggregator - #299

Merged
LeXwDeX merged 2 commits into
devfrom
feat/parallel-writers
Aug 16, 2026
Merged

feat(dag): run unordered workspace writers in parallel with an implementation aggregator#299
LeXwDeX merged 2 commits into
devfrom
feat/parallel-writers

Conversation

@LeXwDeX

@LeXwDeX LeXwDeX commented Aug 16, 2026

Copy link
Copy Markdown
Owner

Closes #293

Summary

The block compiler chained every unordered coding/prototype writer into one serial lane, so saved routes advertised parallel implementation slices that never overlapped — the runtime concurrency budget bought nothing for the phase under the most time pressure. Root cause of the old serialization: the diff review gate binds one implementation reference and one fingerprint, and parallel writers have no single canonical evidence source.

Change (see ADR-0002, included)

  • Serialization removed; writer ordering exists only where the author declared it.
  • When an implementation review covers writers with no total order, the compiler injects one read-only <review>--aggregate node between the writers and the verification gate: it receives each writer's declared changed_files, fails loudly on any write-set intersection, and otherwise publishes the union plus one fingerprint computed at the convergence point.
  • The verify block is rewired onto the aggregator and receives the implementation fingerprint binding (fixes the verify contract's empty promise).
  • Total-ordered writer chains compile byte-identically (canonical-writer behavior preserved).

Runtime, review lifecycle, settlement, and recovery are untouched; the aggregator is an ordinary durable node with the ordinary implementation schema.

Verification

  • 3 existing tests that pinned forced serialization rewritten to the new contract; new test/dag/blocks-parallel-writers.test.ts covers the issue's acceptance list (aggregator shape, partial order, chain byte-identity, collision, rewire preservation, verify binding).
  • 558 DAG/authoring tests green; bun typecheck clean from packages/opencode and packages/core.
  • Guide wording updated in workflow-blocks.md (triple-disjoint write-set criterion).

Follow-ups (separate repos/PRs)

  • opencode-dag-config#feat/parallel-writers-contract (prepared, commit 20698f3) lands after this merge; its runtime-compat.json bump keys off this merge SHA (incompatible block rule).

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