From 9bf939900b540bf2e3649e5dfd5faf88fe646f91 Mon Sep 17 00:00:00 2001 From: conductor Date: Thu, 24 Sep 2026 22:27:25 +0100 Subject: [PATCH] =?UTF-8?q?docs(t24):=20GATE=20D=20parity=20audit=20record?= =?UTF-8?q?ed=20=E2=80=94=20PARTIAL,=20with=20the=20gaps=20reframed=20as?= =?UTF-8?q?=20shared?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit explore-7 verified by reading code. Headline: the earlier 'unreachable machinery' diagnosis is confirmed WRONG — both consumers converge on ConstructionInterface.submit_need -> construction_decision. 17 items SAME_CANONICAL_PATH. 4 SAME_CANONICAL_STATE_DIFFERENT_ADAPTER. 11 MISSING_ADAPTER, of which 21/22/23/25 (invalidation, retest obligations, post-change obligations, Behaviour Ledger writers) are ONE composed family whose natural activation point is contract close — the seam GATE B opened. That family has ZERO runtime callers in EITHER consumer. GATE E: Build Basis = NO_EXECUTOR. research_route honestly reports RECORDED_NOT_EXECUTED; build_basis.py has no runtime importer; no bridge from decision -> router -> pipeline -> basis. Shared gap, not a MiMo regression. GATE F: Capability Ledger is close-gated (now reached from MiMo after GATE B, proved by a test asserting material_revision changed) but nothing ever DEFINES a capability at runtime. The Behaviour Ledger is written by NOTHING in either consumer. GATE G: _auto_structural_awareness writes a blanket 'manages' edge and never consults the canonical three-way owner (rune_relationship / declare_relationship in construction_authority). (A) ordinary external vs (B) external dependency is not distinguished automatically. BYPASSED (shared, recorded NOT repaired per the §0 hard boundary): TUI '/build start' mints via scaffold.new_contract directly with empty scope and no decision trace — the exact defect the MiMo seam already had repaired. VERDICT: FULL_SCAFFOLDING_HARNESS_PARTIAL. Six of nine PROVEN requirements hold; three do not (ledger updates, Spine semantics, fresh-process discovery). Not BLOCKED: nothing is architecturally wrong, and no item is worse in MiMo than in the TUI. Parity is largely achieved; completeness is not. TUI_SPECIFIC_CODE_CHANGED = NO · TUI_OBSERVABLE_BEHAVIOUR_CHANGED = NO --- ...24_FULL_SCAFFOLDING_HARNESS_CONFORMANCE.md | 134 ++++++++++++++++++ 1 file changed, 134 insertions(+) diff --git a/docs/T24_FULL_SCAFFOLDING_HARNESS_CONFORMANCE.md b/docs/T24_FULL_SCAFFOLDING_HARNESS_CONFORMANCE.md index 56da804e..ad23d920 100644 --- a/docs/T24_FULL_SCAFFOLDING_HARNESS_CONFORMANCE.md +++ b/docs/T24_FULL_SCAFFOLDING_HARNESS_CONFORMANCE.md @@ -335,3 +335,137 @@ it. The gap is pre-existing and shared with the TUI path — it is not created b the adapter, and closing it is a user-authority workstream, not a bridge workstream. What the adapter must not do is *claim* provenance it does not have, which is now explicitly labelled at the check site. + +--- + +# GATE D — ORIGINAL V1 RUNTIME PARITY AUDIT (explore-7, verified by reading code) + +**Headline: the earlier "unreachable machinery" diagnosis is confirmed WRONG.** +Both consumers converge on `ConstructionInterface.submit_need` → +`construction_decision`. The decision half of Scaffolding V1 was always +composed; MiMo was bypassing it, and that is now repaired. + +## Converged — SAME_CANONICAL_PATH (17 items) + +contextual intent · classification · Build Basis **routing** · Project Registry · +Project Scaffold · structural discovery · fit/capability resolution · toolchain +decision · Layout obligations · completeness · DecisionTrace · auto-derived +obligations · Construction Contract · mutation enforcement · verification · +Scaffold update · contextual Project↔Spine **registration**. + +## SAME_CANONICAL_STATE_DIFFERENT_ADAPTER (4) + +observed/descriptive impact · Capability Ledger update · continuation/resume · +governed completion. In each case the canonical state exists and the MiMo CLI +exposes the operation; the difference is which wiring invokes it. GATE B closed +two of these (completion now delegates, so the Capability Ledger revision is +reached). + +## MISSING_ADAPTER (the actionable shortlist) + +| # | Item | Canonical owner | Note | +|---|---|---|---| +| 4 | Build Basis **execution** | `build_basis.py` | **NO_EXECUTOR** — see Gate E | +| 11 | bounded context packet | `iteration.context_packet` | no runtime caller in EITHER path | +| 12b | impact **closure** predictor | `iteration.predictive_impact` | surface resolution works; the graph predictor does not run | +| 17 | worktree isolation for MiMo | `build_mode.BuildManager` | MiMo mutates in-repo under guard | +| 21 | selective behaviour invalidation | `BehaviourLedger.invalidate_for_change` | **zero runtime callers** | +| 22 | retest obligations | `behaviour_ledger.retest_history` | fed only by 21 | +| 23 | post-change obligations | `iteration.post_change_obligations` | zero runtime callers | +| 25 | Behaviour Ledger **writers** | `behaviour_ledger.define/_transition` | **nothing writes it at runtime** | +| 27 | structural drift handling | `drift_resume.py` | imported only by tests/scripts | +| 28 | schema-change consent | `structural_migration.py` | tests only | +| 32 | fresh-context discovery | `ConstructionInterface.discover_active_contract` | consumed only by a script | + +**21 / 22 / 23 / 25 are ONE composed family** (`iteration.py` + +`behaviour_ledger.py`) whose natural activation point is **contract close / +checkpoint** — the seam GATE B just opened. That makes it the highest-value +remaining adapter, and it is a *shared* gap, not a MiMo gap. + +## GATE E — Build Basis: `NO_EXECUTOR` + +`research_route` honestly reports `RECORDED_NOT_EXECUTED` and says the top +level "is not yet wired for direct invocation" (construction_decision.py:421, +427). `build_basis.py` is imported by **no runtime module** — only tests and one +evidence script. `scripts/research_*` never references it: there is no bridge +from decision → router → pipeline → basis. The research that actually runs is +`build_mode.BuildManager`'s own internal step, which produces no qualified +Build Basis. + +**Verdict: ROUTED_ONLY. The canonical Build Basis machinery has no executor in +either consumer.** This is not a MiMo regression — it is a shared gap. + +## GATE F — ledgers + +* **Capability Ledger** — written ONLY by `_auto_material_change`, which fires + on **close**. MiMo previously never closed (parallel path), so it updated + nothing; after GATE B a MiMo completion reaches it (proved by a test asserting + `material_revision` changed). `define`/`attach_spec`/`revise_spec` have ZERO + runtime callers — no capability is ever newly defined at runtime. +* **Behaviour/Test Ledger** — writers exist (`define`, `_transition`, + `testing_mode.record`, `iteration.invalidate_behaviours`) but **grep finds + zero callers** in the TUI, operator, build_mode or any construction path. The + TUI `/testing` command only READS. **The Behaviour Ledger is currently written + by nothing, in either consumer.** +* `iteration.py` is imported only by tests — so it is not the entrypoint, and + neither is anything else. + +## GATE G — Project↔Spine: two-part, not three-way + +`_auto_structural_awareness` unconditionally registers the project and writes a +blanket `manages` edge: + +```python +registry.register(project_id=project, scaffold_location=..., repo_identity="") +spine_mod.add_relationship(sdoc, type="manages", + from_id="project:rune", to_id=f"project:{project}", ...) +``` + +The genuine three-way distinction **does exist canonically** — in +`construction_authority.rune_relationship` (CORE / recorded declaration / +UNRELATED, with `declare_relationship` mapping CORE→`manages`, +EXTERNAL→`depends_on`) — but **activation never consults it**. So (A) ordinary +external vs (B) external dependency is not distinguished automatically; only +the manual `declare` op reaches it. + +## BYPASSED — shared, in the TUI (recorded, NOT repaired) + +**TUI `/build start` mints its contract via `scaffold.new_contract` directly** +(rune_tui.py:3306-3315) — empty scope, no `make_decision` trace. That is the +**exact defect the MiMo seam already had repaired**. The TUI uses the canonical +phase machine but not the canonical decision path. + +Per the tranche's §0 hard boundary, **no TUI change was made.** This is recorded +as a shared canonical defect with a named owner, for a future authorised change. + +## GATE L — VERDICT + +``` +FULL_SCAFFOLDING_HARNESS_PARTIAL +``` + +**Why not PROVEN.** Six of the nine PROVEN requirements hold: normal MiMo +construction enters Scaffolding automatically, uses the canonical +decision/impact/contract machinery, obeys the hardened mutation authority, +reports observed consequences canonically, uses canonical verification, and +persists the Scaffold. **Three do not:** + +1. **ledger updates** — the Behaviour Ledger has no writer at all, in either + consumer; the Capability Ledger is close-gated only (now reached, but + nothing ever defines a capability at runtime); +2. **Spine semantics** — activation writes a blanket `manages` edge and never + consults the canonical three-way relationship owner; +3. **fresh-process discovery** — `discover_active_contract` is not wired into + either consumer's runtime path. + +**Why not BLOCKED.** Nothing is architecturally wrong. Seventeen items are +already SAME_CANONICAL_PATH; the gaps are *composition* gaps in the shared +canonical layer, and the seam for the largest of them (the +invalidation/obligations/behaviour-ledger family) is the contract-close point +GATE B just opened. + +**Critical reframing: parity is largely achieved; completeness is not.** The +audit found no item where MiMo is worse than the TUI, and no DUPLICATE in the +MiMo path. The remaining gaps are **shared** — they exist in the reference +consumer too. Judging MiMo against the TUI, the integration is done; judging +Scaffolding V1 against its own accepted design, V1 itself is not fully wired.