diff --git a/docs/audit/substrate-liveness-ratchet.md b/docs/audit/substrate-liveness-ratchet.md index 1cf4412e..5f52bbf9 100644 --- a/docs/audit/substrate-liveness-ratchet.md +++ b/docs/audit/substrate-liveness-ratchet.md @@ -1,4 +1,4 @@ -# Substrate Liveness Ratchet — v3 (partial; informed by L0-L7 + L10 scope) +# Substrate Liveness Ratchet — v4 (audit complete; informed by L0-L9 + L10 scope) **Scope:** [substrate-liveness-audit-scope](../decisions/substrate-liveness-audit-scope.md) (v2) **Companion:** [substrate-liveness-registry](./substrate-liveness-registry.md) @@ -72,24 +72,24 @@ home (ADR-XXXX or new). if the lattice's promotion gate isn't running). - **Status:** ⏳ OPEN — audit-dependency on L10. -### W-004 — Vault re-thaw path specified-not-verified-live +### W-004 — Vault re-thaw path specified-not-verified-live (FIXED) - **Surfaced by:** L2 audit (PR #238); L1 audit (PR #237) forward-noted the same concern. - **Gap:** ADR-0006 §"Integration Points" specifies "Vault recall transiently raises region to E2, then lets it cool again." L2 audit - traced `vault.recall` callers and found that recall does NOT update - or re-raise the energy class/profile of recalled entries. The - re-thaw is design-only; nothing in code does it. -- **Dependency:** L1 (energy operator, live) — already in place. The - wiring is at L2's recall path, not at L1. -- **Cross-layer consequence:** L3 audit (PR #241) confirmed that - downstream language readback receives recalled-as-E0 regions and - silently treats them as if E2 — a load-bearing inconsistency - (W-005). -- **Proposed home:** new ADR — *"wire vault-recall energy re-thaw per - ADR-0006 integration spec"*. Small focused ADR; doesn't require L10. -- **Status:** ⏳ OPEN — can land independently of L10. + traced `vault.recall` callers and found that recall did NOT update + or re-raise the energy class/profile of recalled entries. +- **Resolution:** PR #251. `vault/store.py` now stamps each + `recall()` / `recall_batch()` result with a module-level + `_VAULT_RECALL_RETHAW_ENERGY` singleton (raw=0.50, E2 mid-band). + Cool-down remains downstream propagation's responsibility. 6 new + tests in `tests/test_vault_recall_rethaw.py` pin the contract; lane + SHAs preserved (byte-identity intact). +- **Unlocks:** W-005 — E0/E2 distinction now exists at the runtime + data shape, so energy-modulated surface readback becomes + meaningful. +- **Status:** ✅ CLOSED. ### W-005 — E0/E2 readback modulation absent @@ -278,7 +278,27 @@ home (ADR-XXXX or new). consumer (evals); the question is whether it should be promoted to runtime use. -### W-015 — `session/context.py` post-generation unitize undocumented +### W-015 — `session/context.py` post-generation unitize undocumented (INVESTIGATED → fix in flight) + +**Investigation closed (PR #252).** Sonnet's investigation produced +verdict **(c) — upstream construction violation**, with mechanical +evidence: bimodal distribution across 4,138 samples (either +`vc < 1e-6` for near-identity slerp, or `vc >> 1e-3` with median 0.19 +and max 38.58; nothing in `[1e-6, 1e-5)`). The `unitize_versor` at +`session/context.py:236` was repairing off-manifold state produced +by `_slerp_toward` (lines 38-64). Slerp interpolates on **S³¹** +(the 32D unit sphere) but the versor manifold (Spin group embedded +in Cl(4,1)) is a **proper subset** of S³¹ — the geodesic doesn't +stay on it. + +**Recommended fix (in flight via Sonnet):** replace `_slerp_toward` +with proper rotor geodesic interpolation via the Lie group +exponential map — same approach `rotor_power` already uses at +`generate/stream.py:220`. That stays on the versor manifold by +construction; `unitize_versor` in `_anchor_pull` becomes unnecessary +and can be removed. + +**Original ratchet entry (preserved for history):** - **Surfaced by:** L6 audit (PR #246), answering L1 audit's forward note (PR #237). @@ -309,6 +329,81 @@ home (ADR-XXXX or new). - **Status:** ⏳ OPEN — discipline question; small ADR or small refactor depending on investigation outcome. +### W-016 — Contemplation operates without vault probe + +- **Surfaced by:** L8 audit (PR #250). +- **Gap:** `teaching.contemplation.contemplate` accepts an + `injectable vault_probe` parameter, and tests prove coherent vault + evidence can contribute to discovery candidate enrichment. But + `ChatRuntime._emit_discovery_candidates` calls `contemplate(c)` + with **no probe**. Inline contemplation therefore operates on pack + + reviewed corpus only, ignoring the session vault — exactly the + Tier 1 evidence the four-tier model intends contemplation to + consume. +- **Dependency:** light — wire a vault probe at the + `ChatRuntime._emit_discovery_candidates` call site. +- **Proposed home:** small fix-PR. May benefit from a brief ADR note + documenting the probe contract. +- **Status:** ⏳ OPEN — independent, can land soon. + +### W-017 — Automated T1/T2 → T3 promotion absent + +- **Surfaced by:** L8 audit (PR #250); ADR-0055's own "what is + missing" section names this gap explicitly. +- **Gap:** The four-tier memory model (ADR-0055) specifies discovery + evidence from T1 (session vault) and T2 (turn-event audit) should + feed into proposed promotions to T3 (reviewed teaching corpus). + Today, discovery candidates ARE emitted (W-016 caveat aside) and + ARE written to disk via `DiscoveryMonthlyFileSink`, but no + automated path turns them into proposals. Promotion to T3 still + requires L7's synchronous operator `core teaching propose` command. +- **Dependency:** chained — depends on W-009 (HITL async queue) to + give automated promotion a place to deposit candidates without + blocking the engine, AND on W-016 (vault probe wired so candidates + carry T1 evidence). +- **Proposed home:** new ADR — *"automated T1/T2 → T3 promotion + pipeline"*. Sized after W-009 and W-016 commit. +- **Status:** ⏳ OPEN — chained: W-009 + W-016 → W-017. + +### W-018 — ADR-0080 contemplation not autonomous + +- **Surfaced by:** L8 audit (PR #250). +- **Gap:** ADR-0080 contemplation runs as a CLI operator command + (`core contemplation`) over explicit report files, not as an + autonomous runtime loop. Live plan contemplation exists in + `ChatRuntime` but is opt-in via + `RuntimeConfig.discourse_contemplation=True` (default off). + "Autonomous" contemplation that runs without operator invocation + doesn't exist. +- **Dependency:** chained — autonomous contemplation needs a runtime + shape to live in (W-008 — L10 runtime model), and an event source + (likely tied to W-017 promotion triggers). +- **Proposed home:** ADR amendment to ADR-0080 or new ADR — *"runtime- + resident autonomous contemplation"*. Sized after W-008 commits. +- **Status:** ⏳ OPEN — chained: W-008 → W-018. + +### W-019 — `from_miner.py` / `from_curriculum.py` test-live only + +- **Surfaced by:** L8 audit (PR #250). +- **Gap:** `teaching/from_miner.py` (370 lines) and + `teaching/from_curriculum.py` (275 lines) correctly build + source-stamped proposals per ADR-0094 / ADR-0095 / ADR-0104, but + no CLI command or live runtime path invokes them. Test-live + only — the miner and curriculum candidate-conversion paths exist + but produce nothing in production. +- **Dependency:** operator decision — wire to a CLI command (small), + invoke from a runtime path (medium, depends on W-008 / W-017), or + document as offline-only library code for evals. +- **Resolution paths:** + - **(a)** Wire CLI: `core teaching propose --from-miner