Home / Projects / Orchestrata Ultimate / Decisions / ADR index / ADR-0004

ADR-0004: Facts are keyed by (worktree, commit); merge is fact promotion

field value
Status Accepted
Date 2026-07-23
Register factory (docs/adr, 4-digit ids)
Source docs/adr/0004-facts-keyed-by-worktree-commit.md — permalink at bdafa201a (unchanged on master since that commit)
Wiki register entry ADR-0004 (wiki status: Accepted)

← ADR-0003 · ADR-0005 →

The record

Context

The build runs parallel worktrees by DAG level. AST and traceability facts are branch-dependent state: worktree A and worktree B hold different ASTs of overlapping modules at the same instant.

With a single unversioned fact space, concurrent branches poison each other's AST ≡ design checks, and the integrated-trunk re-gate cannot distinguish trunk facts from branch facts. Every downstream gate then reads a fact set that corresponds to no actual tree.

Decision

All AST/trace facts are keyed by (worktree, commit).

Alternatives rejected

Consequences

Provenance

Round-2 Fable: "AST facts are branch-dependent state… parallel branches poison each other's checks", and named merge-as-promotion as the correct construction. Round-3 Sonnet flagged the missing dependency on the integration re-gate and the abandoned-worktree GC question.

Rulings cited

None.

Specs cited