Commit graph

16 commits

Author SHA1 Message Date
Shay
9ba87e25b2
docs(audit): ratchet v5 — quick-wins lane cleared (W-011/W-012/W-015/W-016) (#260)
Five W-* closures since v4:

- W-004 — vault E2 re-thaw                  (#251)
- W-015 — _slerp_toward → rotor-geodesic    (#255)
- W-016 — vault probe in discovery loop     (#257)
- W-011 — propagate recognition refusal     (#258, paired with W-012)
- W-012 — catch InnerLoopExhaustion         (#258, paired with W-011)

v5 promotes W-005 (energy-modulated surface readback) to top of queue
as the only remaining mechanical-independent item. After W-005, the
ratchet is operator-decision-bound on W-006/W-010/W-013/W-014/W-019
and L10-bound on the bigger units.

W-016's process note flags the wrong-branch pattern that hit #256
(opened on the W-015 branch). Logged for future agent briefs to
emphasize the rebase-onto-current-main step before PR creation.
2026-05-24 20:55:13 -07:00
Shay
bf3baa8bfa
docs(audit): ratchet v4 — audit complete (9/9), W-004 closed, W-015 (#253)
investigated, four new entries from L8

Audit milestone: all 9 substrate layers audited. L8 (PR #250) and
L9 (PR #249) merged to close the audit phase. The ratchet transitions
from "audit-driven entry addition" to "wiring-progress driven
closure."

Status updates:

- W-004  CLOSED via PR #251 (first non-trivial wiring closure from
  the audit). Vault recall now stamps E2 EnergyProfile per ADR-0006.
  Unlocks W-005 (energy-modulated readback now meaningful).
- W-015  INVESTIGATED via PR #252 (Sonnet). Verdict (c) confirmed
  with bimodal-distribution evidence across 4,138 samples. Root cause:
  _slerp_toward interpolates on S^31 but versor manifold is a proper
  subset. Fix in flight (rotor geodesic via Lie group exponential).

Four new W-NNN entries from L8 audit:

- W-016 — Contemplation operates without vault probe. Independent
  mechanical fix at ChatRuntime._emit_discovery_candidates call site.
- W-017 — Automated T1/T2 → T3 promotion absent (ADR-0055's own
  "what is missing"). Chained: needs W-009 (HITL async queue) +
  W-016 (vault probe) first.
- W-018 — ADR-0080 contemplation not autonomous. Chained: needs W-008
  (L10 runtime model) first.
- W-019 — from_miner.py / from_curriculum.py test-live only. Operator
  decision: CLI wiring (smallest), runtime invocation (via W-017), or
  document as offline-library-only.

L9 audit added no new W-NNN entries; the refusal-reason
materialization matrix consolidates prior findings (W-011, W-012)
from the verdict-surface side. Safety, opt-in ethics, default-audit
ethics, and hedge injection all CLOSED in the matrix per design.

Updated:
- Title v3 → v4
- Subtitle "L0-L7 + L10 scope" → "L0-L9 + L10 scope"
- Dependency graph: W-004 marked FIXED, W-015 marked INVESTIGATED,
  new entries placed in their dependency lanes
- Suggested next-ADR sequence reordered: W-015 fix leads (in flight),
  followed by W-011, W-012, W-016 as the quick-wins lane
- Items-deferred section transitioned from "L8-L9 pending" to "audit
  complete; future revisions are wiring-progress driven"

Tally so far: 5 of 19 W-NNN entries closed (W-001, W-002, W-004
fully closed; W-015 investigated and fix in flight; the rest of the
quick-wins lane is now safely dispatchable post-L9).
2026-05-24 19:52:49 -07:00
Shay
cad24f12b1
audit(W-015): investigate session/context.py unitize root cause (#252)
Instruments _anchor_pull to measure versor_condition(pulled_F) before
unitize_versor across 4,138 samples from session/chat test suites.

Verdict: (c) upstream construction violation. _slerp_toward operates on
S^31 (the 32D unit sphere) rather than the Spin sub-manifold, producing
off-manifold state with vc up to 38.58 for non-negligible field-to-anchor
angles. Distribution is strictly bimodal: vc < 1e-6 when theta ≈ 0 (slerp
is near-identity), otherwise vc >> 1e-3 — confirming the slerp is the
sole source.

Recommended fix (separate PR): replace _slerp_toward with rotor geodesic
interpolation via the Lie group exponential map (same principle as
rotor_power used in generate/stream.py:220), eliminating the post-slerp
unitize by construction.
2026-05-24 19:41:41 -07:00
Shay
085bfe0895
audit(L9): epistemic state + verdicts - PARTIAL (#249) 2026-05-24 19:40:33 -07:00
Shay
fadf3ca3b6
audit(L8): inter-session memory and contemplation (#250) 2026-05-24 19:35:22 -07:00
Shay
186620a99c
docs(audit): ratchet v3 — add W-015 from L6 finding (#248)
W-015: session/context.py:207-246 post-generation unitize is
test-covered but not ADR-documented as an allowed normalization
boundary. Surfaced by L6 audit (#246) answering L1's forward note
(#237).

Per CLAUDE.md normalization rules, sanctioned unitize sites are
ingest/gate.py, language_packs/compiler.py, and algebra/versor.py.
The session/context.py site is not in that list — either an
undocumented allowed boundary or a discipline violation.

Recommended resolution path: investigate root cause first; if
unitize is masking an upstream construction violation, fix upstream.
If it's a legitimate boundary, write ADR sanctioning it. If it's
pure drift repair, refactor to remove (per CLAUDE.md "do not add
drift repair").

Updated dependency graph and suggested-sequence list to include
W-015 as a discipline-question entry.

Progress note updated: L0-L7 audited (7 of 9 layers); L8-L9 pending.
2026-05-24 19:21:10 -07:00
Shay
95c9d854cf
audit(L7): teaching loop — PARTIAL (#247) 2026-05-24 19:14:44 -07:00
Shay
9a0ee78956
audit(L6): chat runtime surface composition (#246) 2026-05-24 19:06:42 -07:00
Shay
3e50899306
docs(audit): ratchet v2 — add W-010..W-014 from L4 and L5 findings (#245)
Five new wiring-debt entries from L4 (recognition) and L5
(cognition pipeline) audits:

- W-010 — L4 recognition bypasses L3 vocabulary (operator decision:
  intentional token-level or wire VocabManifold consumption).
- W-011 — Typed recognition refusals dropped at pipeline boundary
  (mechanical fix, small; closes recognition audit-trail gap).
- W-012 — InnerLoopExhaustion not caught in ChatRuntime.chat()
  (mechanical fix, small; sibling of W-011; closes ADR-0142 debt #3).
- W-013 — core/cognition/explain.py dormant (operator decision:
  wire, relocate, or delete).
- W-014 — core/cognition/provenance.py partially live, evals-only
  (operator decision: lighter version of W-013).

Reordered suggested next-ADR sequence to lead with mechanical quick
wins (W-011, W-012, W-004) before operator-decision items (W-006,
W-013/14, W-010), before second-order changes (W-005), before the
big L10 unit (W-008). Reasoning documented inline: early measurable
progress, no architectural risk, demonstrates audit-to-fix loop
closes.

Updated dependency graph to show the three independent groups
(mechanical, operator-decision, L10-gated chain).

L0-L5 audited; L6-L9 pending. Ratchet stays append-only; v2 marker
in title and "L0-L5 + L10 scope" in subtitle.
2026-05-24 18:46:26 -07:00
Shay
050b2f9222
audit(L5): cognition pipeline — PARTIAL (#244) 2026-05-24 18:40:52 -07:00
Shay
72cede071f
audit(L4): recognition liveness (#243) 2026-05-24 18:29:14 -07:00
Shay
32612c5741
docs(audit): substrate-liveness ratchet v1 (partial; L0-L3 + L10 informed) (#242)
Derives the wiring-debt sequence from audit findings landed so far.
Companion to substrate-liveness-registry.md per the audit-scope.

Nine W-NNN entries:
- W-001  versor-condition threshold rot (fixed via #239)
- W-002  ADR-0097 ledger test orphan (fixed via #240)
- W-003  VaultPromotionPolicy dormant (depends on L10)
- W-004  vault re-thaw path specified-not-verified-live (independent)
- W-005  E0/E2 readback modulation absent (depends on W-004)
- W-006  local pack readback rules dormant (operator decision: wire or delete)
- W-007  DerivedRecognizer integration absent (depends on W-003 + recognizer-storage ADR)
- W-008  L10 runtime model ADR (scope landed #236; spike/ADR pending)
- W-009  HITL async queue surface (depends on W-008)

Suggested next-ADR sequence:
W-004 → W-006 → W-008 → W-005 → W-003 → recognizer-storage ADR
→ W-007 → W-009. Operator decides; ratchet records.

Includes a dependency-graph ASCII diagram, explicit deferral list
(EngineIdentity shelved, L4-L9 findings pending, recognizer-drop-off
ADR derived from named items), and a "how the ratchet evolves"
section codifying append-only revision discipline.

Will be revised as L4-L9 audits land. New audit findings add new
W-NNN entries; resolved entries get  in place rather than removed
(history is the value).
2026-05-24 18:27:40 -07:00
Shay
b1906a49a0
audit(L3): language packs - PARTIAL (#241) 2026-05-24 18:16:13 -07:00
Shay
c1a1b7a0b6
audit(L2): vault — PARTIAL (#238) 2026-05-24 16:35:47 -07:00
Shay
da139bb30e
docs(audit): add L1 field substrate audit (#237)
Verdict: PARTIAL.

Updates the substrate liveness registry with the L1 field substrate audit, including ADR enumeration, module/caller mapping, suite lane evidence, cross-layer contract findings, and downstream notes.

Cleanup: none; no unambiguously dead L1 code was found. Test-only helpers and pulse-only field operators are documented for review instead of deleted.

Verification: python3 -m core.cli test --suite smoke -q; python3 -m core.cli test --suite algebra -q; python3 -m core.cli test --suite pulse -q; python3 scripts/verify_lane_shas.py.
2026-05-24 16:27:30 -07:00
Shay
bdde8b4c2a
audit(L0): algebra primitives — CLOSED (#235)
First per-layer audit of the substrate-liveness program. Establishes the
registry shape and standard of evidence for subsequent layers.

L0 (algebra primitives) is foundation; verdict CLOSED:

- 4 ADRs in scope (ADR-0001 versor invariant, ADR-0003 coordinate
  dissolution, ADR-0004 rotor as operator, ADR-0009 compositional
  physics).
- 6 modules (versor, rotor, cga, cl41, holonomy, backend); every
  module has at least 2 live-import sites outside the package and
  outside tests (38 distinct caller files overall).
- core test --suite algebra exercises every L0 module: 82 passed, 50
  skipped (Rust-parity tests, Python-only env — not a closure gap).
- Cross-layer contract pass 1 (mechanical): every exposed symbol has
  at least one downstream consumer.
- Cross-layer contract pass 2 (semantic): versor_condition < 1e-6
  invariant is measured per turn (core/cognition/trace.py:34), folded
  into deterministic trace payload, surfaced to operator via CLI, and
  gated at the eval boundary (evals/cognition/runner.py:60). Matches
  CLAUDE.md discipline of "measure and surface, don't weaken."

No cleanup performed — no dead code, no redundant modules, no
orphaned tests found at L0. Foundation is honest.

One scope-hypothesis correction: layering table cited "algebra/backend/"
(directory); reality is "algebra/backend.py" (file). Hypothesis drift,
recorded for amendment if it matters elsewhere.

Three forward-pointing notes left for downstream auditors:
- L1 should verify field propagation correctness is tested
  independently of L5's downstream versor_condition measurement.
- L2 should verify vault honors exact-CGA-recall end-to-end, not just
  at the algebra layer.
- ADR-0020 (Rust parity) is cross-cutting; audit when Rust integration
  is live rather than at any single layer.

Format established for subsequent per-layer commits. Audit progress
table in registry root tracks pending layers; resume-after-interruption
is "look at the progress table, start with the first pending layer."
2026-05-24 16:14:57 -07:00