|
35 | 35 |
|
36 | 36 | --- |
37 | 37 |
|
| 38 | +## #512 perturbation-sim: degenerate-grid + key-cardinality guards + core-first-transcode doctrine (review #511 + #513) |
| 39 | + |
| 40 | +**Status:** MERGED 2026-06-16 20:33 UTC (merge commit `1e23c410`), branch `claude/happy-hamilton-0azlw4`. **+591/-5 across 11 files** — addresses the open review findings from #511 (which merged before they resolved) AND introduces the **core-first-transcode** doctrine + 3 new agent cards. |
| 41 | + |
| 42 | +**Added (code fixes):** |
| 43 | +- **CodeRabbit Major fix** — `examples/calibrate.rs` divide-by-zero on a degenerate grid: `k = 24.min(m)` is `0` when `m == 0` so `m / k` panics; `eigenvector(1)` / `m - 1` also break for `n < 2`. Up-front guard exits cleanly with a message. |
| 44 | +- **CodeRabbit Major fix** — `src/hhtl.rs::basin_lambda2` silent corruption: a `keys` slice whose length ≠ `grid.n` silently produced wrong basin groupings + λ₂. Added `assert_eq!(keys.len(), grid.n, …)` precondition at the API boundary (loud-fail, all profiles). |
| 45 | +- **CodeRabbit Minor fix** — `TECH_DEBT.md` MD018: reflowed the wrapped `#507` so it stops parsing as an ATX heading. |
| 46 | + |
| 47 | +**Added (doctrine — the structural delivery):** |
| 48 | +- **`.claude/knowledge/core-first-transcode-doctrine.md` (218 LOC)** — new mandatory-read knowledge doc establishing the core-first transcode posture. Likely directly aligned with the ontology-first stance the operator just locked in on `odoo-rs` (Odoo's ontology runs natively in SurrealDB, codegen is the "cut tail"). |
| 49 | +- **3 new agent cards:** `core-first-architect.md` (91 LOC), `core-gap-auditor.md` (91 LOC), `adapter-shaper.md` (80 LOC). Wired into `.claude/agents/BOOT.md` (+3) and `.claude/agents/README.md` (+33). |
| 50 | +- **`.claude/board/EPIPHANIES.md`** prepend (+24 LOC) — the originating finding. |
| 51 | +- **`CLAUDE.md`** workspace charter (+21 LOC) — assumed to wire the core-first doctrine into the top-level read list (NEW content not yet inspected this session). |
| 52 | + |
| 53 | +**Not changed (with stated reason):** |
| 54 | +- **Codex P2 (`infight` width)** already fixed before merge — `columns.rs` carries `spec("infight", 4, …)` (certified 4-bit per the §10 note), tests assert. Thread left open without code change. |
| 55 | +- **CodeRabbit Major (TECH_DEBT.md append-only governance)** — the 2026-06-16 addendum sits mid-entry instead of as a prepended dated entry. Valid governance observation; the compliant fix is a 31-line board reorganization that belongs in a focused hygiene pass, not churn inside a code-fix PR. Flagged on the thread, deferred to the entry owner. |
| 56 | + |
| 57 | +**Locked:** the core-first doctrine and its 3 specialist agents are now part of the workspace mandatory-read set (`core-first-transcode-doctrine.md`). The `assert_eq!` precondition on `basin_lambda2` formalises the key-cardinality contract — degraded silent output is now a panic. |
| 58 | + |
| 59 | +**Deferred:** TECH_DEBT.md append-only repositioning (separate hygiene PR). Cross-doctrine reconciliation between `core-first-transcode-doctrine.md` and the existing `lab-vs-canonical-surface.md` / `encoding-ecosystem.md` knowledge spine has not been inspected this session. |
| 60 | + |
| 61 | +**Docs:** see above — 218-LOC new knowledge doc, EPIPHANIES entry, CLAUDE.md wire-up, 3 new agent cards. AGENT_LOG/LATEST_STATE updated in **this** retroactive-hygiene commit. |
| 62 | + |
| 63 | +**Confidence (2026-06-16):** code-fix portion working (`fmt` + `clippy -D warnings` + `test` green; 75 lib tests on perturbation-sim). Doctrine portion **unverified this session** — the new `core-first-transcode-doctrine.md` content is unread by this thread and may impact the odoo-rs ontology-first design when next loaded. |
| 64 | + |
| 65 | +## #513 perturbation-sim: inertia §0 promotion gate + CAKES/CHAODA + witness standing-wave + H ingest |
| 66 | + |
| 67 | +**Status:** MERGED 2026-06-16 20:27 UTC (merge commit `8a3e335b`), branch `claude/perturbation-sim-inertia-clam`. **+1009/-2 across 10 files**. Disjoint files from #512 (no `calibrate.rs`, no `basin_lambda2` body, no `TECH_DEBT.md`) by design. Four additive deliverables continuing the resilience arc after #511. |
| 68 | + |
| 69 | +**Added (1) — `inertia_buffer` §0 promotion gate (`33d66ca9`):** flips the anti-invention guardrail review for the one additive SoA member (operator sign-off 2026-06-16) and makes it real: |
| 70 | +- `GuardrailVerdict { Proposed, RatifiedReuse }` + `INERTIA_PROMOTION`. **Verdict = RatifiedReuse**: `inertia_buffer` takes `ResidueEdge` slot `INERTIA_SLOT = 5`, reuses an existing value tenant, invents no new axis → **passes §0 by *reuse*, not waiver**. Topology stays the HHTL-OGAR GUID key; the buffer is one more value, orthogonal by the key/value split. |
| 71 | +- `study_slot_assignments()`: the 6 members → ResidueEdge slots 0..6, collision-free. |
| 72 | +- `buffer::inertia_buffer_column()`: the computed producer (per-bus `impulse_buffer`, normalized to [0,1], degenerate-safe). |
| 73 | + |
| 74 | +**Added (2) — Probe 1, CAKES + CHAODA over HHTL basins (`8d87ef0e`):** the CLAM-family similarity (attraction) / anomaly (repulsion) pair applied to grid resilience: |
| 75 | +- HHTL = the family basin; **CAKES** (`cakes_neighbors`) = "who are my relatives"; **CHAODA** (`chaoda_scores` / `anomaly_ranking`) = per-basin kNN-distance anomaly = the fail-first compartment (`CHAODA_FLAG = 0.75` mirrors `ndarray::clam`'s flag). |
| 76 | +- `resilience_basin_features`: per-basin `[λ₂, size, inertia]` rows (topology / scale / buffer — the three orthogonal axes). |
| 77 | +- Self-contained CHAODA-lite; `ndarray::clam`'s full `ClamTree` ensemble is the gated production path (no local ndarray sibling here). Example `chaoda` flags the planted brittle block (basin 1.1.0, score 1.000). |
| 78 | + |
| 79 | +**Added (3) — Probe 2, witness arc as standing wave (`006d2322`, METHODS §11):** proves `particle == wave`. A witness arc walked hop-by-hop (`O(hops)` pointer-chase) equals its Walsh-pyramid evaluation via **Parseval** (`Hᵀ·H = N·I`): `⟨field, arc⟩ = (1/N)·⟨Ĥ·field, Ĥ·arc⟩`. |
| 80 | +- `witness_particle` (the walk) / `field_spectrum` (transform once) / `witness_from_spectrum` (read many arcs, `O(N)` each — the amortization win) / `witness_wave` / `particle_equals_wave`. |
| 81 | +- Example `witness` runs it on the inertia-buffer field; particle vs wave agree to **0.00e0**. The contract `witness_table` evaluator remains a separate gated step (SoA spine = additive-only behind iron rules). |
| 82 | + |
| 83 | +**Added (4) — Probe 3, per-bus inertia (H) ingest path (`723472a9`):** real H is not in PyPSA/OSM topology; this PR opens the ingest path so per-bus inertia becomes observable. Source: `crates/perturbation-sim/src/inertia_data.rs` (183 LOC, new) + `examples/inertia_ingest.rs` (66 LOC, new). [PR body truncated in fetch — full payload details TBC on next session.] |
| 84 | + |
| 85 | +**Locked:** (1) **§0 RatifiedReuse precedent** — additive SoA members can be ratified by *reuse of an existing value tenant* rather than a §0 waiver, when the topology stays in the HHTL-OGAR GUID key and the new member rides an existing tenant. (2) `INERTIA_SLOT = 5` carved in `ResidueEdge`. (3) Particle/wave duality via Parseval is the canonical pattern for witness-arc evaluation at scale (read-many amortization). |
| 86 | + |
| 87 | +**Deferred:** (1) Production CHAODA/CAKES path through `ndarray::clam::ClamTree` (gated on local ndarray sibling). (2) Contract-side `witness_table` evaluator (the SoA spine surface that consumes Probe-2's math). (3) Full inertia ingest API documentation (truncated PR body). |
| 88 | + |
| 89 | +**Docs:** standalone crate, no `.claude/board/*` updates landed in this PR (the doctrine work landed separately in #512). This entry + LATEST_STATE row + AGENT_LOG entry land in **the same commit** as the #512 entry above (retroactive batch hygiene). |
| 90 | + |
| 91 | +**Confidence (2026-06-16):** working — `fmt` + `clippy -D warnings` + `test` green on the standalone perturbation-sim crate; particle-equals-wave numeric agreement at machine epsilon; CHAODA-lite correctly flags the planted brittle block. |
| 92 | + |
38 | 93 | ## #511 perturbation-sim: substrate calibration (study as ground truth) + calibrated SoA member spec |
39 | 94 |
|
40 | 95 | **Status:** MERGED 2026-06-16 19:01 UTC (merge commit `c3dddfc9`), branch `claude/perturbation-sim-calibrate-soa`. **Additive: +886/-0 across 9 files** — `examples/calibrate.rs` (new, 318 LOC), `src/columns.rs` (new, 177 LOC, spec only), `src/hhtl.rs` (new, 175 LOC), `examples/hhtl_grid.rs` (new, 81 LOC), `CLAM_CHAODA_FRAMING.md` (new, 75 LOC), small wires in `Cargo.toml`/`src/lib.rs`, plus `.claude/board/TECH_DEBT.md` (+32) and `.github/workflows/rust-test.yml` (+16). Does **NOT** touch the operator-locked `canonical_node`. |
|
0 commit comments