Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .claude/board/AGENT_LOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
## 2026-09-05 — D-NXG-4 → D-BLW-5 payload: two Sonnet workers on disjoint files, orchestrator-gated

- **Why:** operator: "go ahead with D-NXG-4 into D-BLW-5". A Sonnet census first (`exec-runs/d-blw-5-design-main-thread.md`, doctrine §2, STATUS_BOARD): D-BLW-5 has NO shipped code and is PAUSED (operator 2026-08-05); its designed home is a `cycle-driver`-gated supervisor test where the planner is reachable and `ndarray` is not. That fixed the membrane split: DTO in the zero-dep contract, producer in the planner, transform in jc.
- **W1 (Sonnet, contract):** `shape_rank.rs` + one `lib.rs` line from a 62-line spec; verified the 144-byte layout by field arithmetic. 6/6, clippy clean — committed first as `75f87646` with its LATEST_STATE delta in-commit.
- **W2 (Sonnet, jc + planner):** `fisher_2z`/`fisher_2z_inv`/`FISHER_CLAMP_EPS` in `jc::stats` with a transcribed-formula parity test against helix (live cross-crate parity blocked: helix pins a git `ndarray`, jc a path one); `Z2_SCALE`, `quantize_2z`, `calibrate_equal_width`, `shape_rank` + 5 tests in the planner. W2 flagged its one guess (`RemeasureKey::new`) — correct call, it did not exist; fixed to a struct literal at the gate.
- **Falsification kept:** the can-it-fire arm ("saturated vs quiet first frame land in different buckets") could not fire — both recordings open with silence and both whole-file statistics sit below the prior's support. Restated inside the support (prior min → 0, prior max → 15) and the out-of-support saturation pinned as E-NXG-22.
- **Gates:** planner 428/428 + clippy clean, contract 1315/1315 + clippy clean, jc 141/141 (via `--manifest-path`, workspace-excluded), fmt clean on all three; jc clippy is red on `origin/main` in eight files none of which this arc touched, CI runs no jc clippy — TD row, not a fix here. Append-only + citation-decay gates local; supersession index last.
- **Board:** E-NXG-22, STATUS_BOARD D-NXG-4 + D-BLW-5 rows, TECH_DEBT TD-JC-CLIPPY-RED-ON-BASE-1, LATEST_STATE delta (planner + jc half), plan §6.

## 2026-09-05 — D-NXG-1 `NestedBands`: one Sonnet worker from spec, orchestrator-gated

- **Why:** operator "Go ahead autoattended" + "Sonnet agents for grindwork" after the three probes merged. D-NXG-1 is a write-this-file-from-spec unit: bounded input (a 134-line spec naming every type, method and test), known output shape.
- **Split:** orchestrator wrote the spec (types, signatures verified against `ndarray/src/simd_int_ops.rs` + `bitwise.rs` + `contract/src/thought_atoms.rs`, twelve named tests on the three real recordings); one Sonnet `general-purpose` worker wrote the 711-line file, edit-only, no cargo, and corrected the spec's `include_bytes!` path (three levels up, not four — verified with `ls`, reported). Orchestrator registered the module in `lib.rs` and ran every gate in the shared `target/`.
- **Gates:** first run 10/12 — both failures were SPEC errors the worker faithfully reproduced (a pinned floor value one row over the target; a sign-assumed σ assertion). Both fixed in the tests to the strict definitions, recorded in E-NXG-21. One clippy `-D warnings` (test-only import) moved into the tests module. Final: `nested_bands` 12/12, planner lib suite green, clippy clean, fmt clean, append-only + citation-decay + plan-dids gates local, supersession index regenerated last.
- **Board:** E-NXG-21; STATUS_BOARD D-NXG-1/3/5 rows; plan §6 rows.

## 2026-09-05 — PROBE-NXG-ROLL-1 + PROBE-NXG-FLOOR-1: orchestrator-only, three falsifications kept

- **Why:** operator "fast forward" after #1178 merged. Plan §5 steps 3 and 4, the last two gates before rooms 4–8 may leave PROPOSAL.
Expand Down
75 changes: 75 additions & 0 deletions .claude/board/EPIPHANIES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,78 @@
## 2026-09-05 — E-NXG-22 — `shape × rank` is bounded by the prior's support: an out-of-support statistic saturates at the edge bucket

**Status:** FINDING (pinned by `nested_bands::tests::shape_rank_from_real_lag1_autocorrelations`); D-NXG-4 SHIPPED into the D-BLW-5 payload.
**Confidence:** High on the mechanism; the consequence for the D-BLW-5 loop is a design question left open on purpose.

D-NXG-4 now has its first consumer: `NestedBands::shape_rank(observed, V₀)`
produces `lance_graph_contract::shape_rank::ShapeRankPayload` — the doctrine's
`shape₀ × rank₀`, frozen at V₀, with no `f64` field by construction. The
transform lives in `jc::stats::fisher_2z` (ruled home of calibrated math), the
ladder is `calibrate_equal_width` (the D-BLW-5 design's "equal-width in 2z"),
and the remeasure guard is `RemeasureLedger::seal` (second write ERRORS).

**The finding.** The pooled prior in the test is real: the lag-1 Pearson
autocorrelation of 92 frames of speech, `r ∈ [0.9205, 0.9917]`, i.e.
`2z ∈ [3.18, 5.48]`. The two other recordings' whole-file statistics are
`2z ≈ 1.46` (saturated) and `1.67` (quiet) — far BELOW the prior's support.
Both rank 0, and both are therefore indistinguishable from the prior's own
minimum, which also ranks 0. The first version of the test asked the two
out-of-support values to land in DIFFERENT buckets; they cannot, and the
test was restated to what is true: inside the support the ladder
discriminates (prior min → rank 0, prior max → rank 15), and outside it
saturates. **`rank` carries no "how far out".** That is partly by design —
the payload law forbids the raw scalar precisely so awareness cannot parrot
a number — but the D-BLW-5 loop's "T-silence is a reportable null" and bloom
criterion may need to know that an observation left the prior's support
entirely. The candidate fix is one bit (`out_of_support`), not a scalar; it is
a decision for the loop, which stays PAUSED, and is not made here.

**Also measured, not claimed:** first frames of both recordings are silence
(that is why the spec's "first frame" observed statistic was wrong — it
measured leading silence, not the recording); `quantize_2z` at ×1024 keeps
three decimals of 2z and the 16 equal-width boundaries over the speech prior
differ in width by at most one unit. Gates: planner 428/428, contract
1315/1315, jc 141/141, planner + contract clippy clean; jc clippy red on
base and untouched by this arc (TD-JC-CLIPPY-RED-ON-BASE-1).

## 2026-09-05 — E-NXG-21 — `NestedBands` sealed: the three probes became one type and twelve tests, and two of the probes' numbers were off by one row and by one sign

**Status:** SHIPPED (`crates/lance-graph-planner/src/nested_bands.rs`, D-NXG-1; merge arm of D-NXG-5; room 3 closed by moments).
**Confidence:** High — 12/12 tests on the same three real recordings the probes used, planner lib suite green.

`NestedBandsBuilder::{new, budget_factor, calibrate, with_boundaries}` seals a
`NestedBands` (version, boundaries, band masks, bucket masks, popcounts).
Every method is `&self`; `split` and `merge` return NEW values under a new
version and the original is asserted unchanged (data-flow rule, one writer at
build). The top band is the universe by construction (E-NXG-18 is now a type
invariant, not a probe caveat). `overflow()` is the budget test (E-NXG-19),
`collapsed()` is the merge-on-collapse arm — it fires when speech boundaries
meet the quiet recording and stays silent on the calibration epoch; `merge`
removes one boundary and the merged popcount equals the pair's sum.
`best_achievable_floor` is E-NXG-20's floor by bisection over
`gt_i32_to_mask` + popcount, no sort.

**Two corrections the type forced on the probes' numbers.** (1) The strict
floor — the SMALLEST value whose exceedance is ≤ the rate — lands at 15 077 on
speech, not the probe's 15 072: the probe's rank floor sat one row OVER the
target (473/94 572 = 0.0050015) inside its ±1/n tolerance. A floor with a row of
slack is not "never exceeds"; the type has no slack and the test pins both the
literal and a sorted-copy reference. (2) The midpoint-σ estimator is not even
sign-stable: with the stale top boundary it over-read by 12 % (E-NXG-17); with
the last boundary as the top bucket's midpoint it under-reads by 7 %
(3 525.8 vs 3 785.8). An open-ended top bucket has no midpoint, so the
estimator has no principled value at all. The regression guard is now
direction-agnostic (|Δ|/σ > 5 %), and room 3 closes the other way: σ is exact
from the seal iff the seal stores two accumulators per bucket (`BucketMoment
{count, sum, sumsq}`, 16 B/bucket) — `sigma_exact` matches the direct σ to
1e-9. "Recoverable for free" was wrong; "recoverable for 256 bytes" is right.

**Not done, on purpose.** D-NXG-3 (`bisect_column_by_mask`) lives inside
`NestedBands::split`, not as a named `ndarray::simd` primitive: it is a
memory-bound gather-and-popcount loop, not a lane op, and the W1a contract's
all-backends parity requirement would be ceremony for a scalar. Promotion, if
ever, is its own deliberate PR. No consumer is wired yet — the type exists, the
first caller (D-NXG-4's `shape × rank` payload) is the next unit.

## 2026-09-05 — E-NXG-18 — the ladder's top band must BE the universe, or the histogram loses rows silently

**Status:** FINDING (PROBE-NXG-ROLL-1 falsified its own first run).
Expand Down
14 changes: 14 additions & 0 deletions .claude/board/LATEST_STATE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
## 2026-09-05 — branch (D-NXG-4 → D-BLW-5, producer half): the payload has a producer and a transform — INVENTORY DELTA

- ADDED `lance_graph_planner::nested_bands::{Z2_SCALE, quantize_2z}`, `NestedBandsBuilder::calibrate_equal_width` (the D-BLW-5 design's equal-width-in-2z ladder, beside the equal-mass `calibrate`), `NestedBands::shape_rank(observed, V₀) -> ShapeRankPayload` (asserts 16 bands). Five tests, one on a REAL pooled prior (92 speech frames' lag-1 autocorrelation).
- ADDED `jc::stats::{FISHER_CLAMP_EPS, fisher_2z, fisher_2z_inv}` — the "2z" of plan §Stage A, forced copy of `helix::Similarity::hyperbolic_depth` with a transcribed-formula parity test (live cross-crate parity blocked by helix's git-pinned `ndarray`; recorded in the doc comment).
- FINDING E-NXG-22: `rank` saturates at the edge bucket for out-of-support statistics; the loop-level fix (one bit) is left to D-BLW-5, which stays PAUSED.
- TD-JC-CLIPPY-RED-ON-BASE-1 opened (pre-existing, untouched files, no CI clippy on jc).

## 2026-09-05 — branch (D-NXG-4 → D-BLW-5, contract half): the payload-law DTO exists — INVENTORY DELTA

- ADDED `lance_graph_contract::shape_rank` (zero-dep, std only): `SHAPE_BUCKETS = 16`; `ShapeRankPayload { shape: [u64; 16], rank: u8, version: u64 }` with `new` (asserts `rank < 16`), `mass`, `mass_below`, `prozentrang`, `rank_fraction`, `is_frozen_at`, and a `const _` guard `size_of <= 144`; `RemeasureKey { stat_id, arm, cohort, metric, dataset_version }` (`Ord`); `RemeasureError::AlreadySealed { key, sealed_version }`; `RemeasureLedger { seal (write-once, second write ERRORS, never overwrites), get, len, is_empty }`.
- WHY here and not in the planner: the doctrine's `shape₀ × rank₀` is what crosses into awareness; the type has NO `f64` field by construction, which is the Goodhart guard the payload law asks for, enforced by shape rather than discipline. `ndarray` stays unreachable supervisor-side (D-BLW-5 design §c), so the DTO is plain numbers and the producer (`NestedBands::shape_rank`, planner, next commit) does the mask work.
- STATUS: D-BLW-5 remains **PAUSED** as a loop (operator 2026-08-05); the operator relaunched ONLY the payload half on 2026-09-05 ("go ahead with D-NXG-4 into D-BLW-5"). The four arms, bloom criterion and supervisor test file are untouched.
- Gates: contract `shape_rank` 6/6, clippy `--lib --tests -D warnings` clean, fmt clean. Written by one Sonnet worker from a 62-line spec, edit-only; orchestrator-gated.

## 2026-09-04 — two mechanical board gates land, and they were shipped WITHOUT their own hygiene — INVENTORY DELTA

- ADDED `.claude/tools/append_only_gate.py` + `.github/workflows/append-only-gate.yml` (#1167) — 8 protected board files, compared against `git merge-base` (not the raw base ref, which reports a shrink whenever the base moved ahead). Absent-at-base = new, silent; deleted = FAIL; unresolvable ref = fail closed with a `fetch-depth: 0` hint. Verified at four levels: 7 self-test cases (3 fire / 4 silent), the real git path against `b67f1958`, an END-TO-END fire test (`ISSUES.md` shortened 2591 → 2541 lines → exit 1), and the fail-closed arm (`origin/main~200` → exit 1).
Expand Down
Loading
Loading