impl(sprint-12/wave-G): 6 Sonnet + 1 Opus — D-CSV-5b/6b/13/15 + E-META-10 iron rule (sprint-12 grade B+)#390
Conversation
…ness-corpus + W-G3 mul.rs i4_eval batch API In-flight worker outputs from Wave G fleet (6 Sonnet workers). Workers may continue writing to these files; subsequent commits on this branch finalize the deliverables when completion notifications arrive. W-G1 (D-CSV-5b QualiaColumn cutover) — bindspace.rs (+65 LOC diff so far): likely still mid-flight; tests at file tail still read both `bs.qualia` (f32) AND `bs.qualia_i4` (i4) suggesting the cutover isn't complete yet. W-G2 (D-CSV-6b CAM-PQ wiring) — witness_corpus.rs (+386 LOC): substantial expansion of the WitnessCorpus index. Awaiting completion report for the final test pass count. W-G3 (D-CSV-13 SIMD vec batch API) — mul.rs (+219 LOC): new `pub mod batch` inside `i4_eval` with parallel-arrays batch functions for the 5 MUL evaluators. Stop-hook driven snapshot commit. Final aggregation + clippy + test verification arrives in subsequent commits per worker completion order. https://claude.ai/code/session_01UwJuKqP828qyX1VkLgGJFS
…ce fix + W-G1 partial Wave G mid-flight commit landing 3 complete worker outputs: W-G3 (D-CSV-13 SIMD vec batch API) — earlier commit 7d7b537 - already on branch; 20/20 tests pass, clippy clean, zero-dep W-G5 (E-META-10 → iron rule I-LEGACY-API-FEATURE-GATED) - CLAUDE.md +86 lines: new iron rule after I-VSA-IDENTITIES with 5 documented sprint-11 instances + 4 consequences (field-isolation matrix tests mandatory, no silent semantic drift, version gate mandatory, codex P1 canonical pre-merge gate) - EPIPHANIES.md: E-META-10 PROMOTED status header prepended; original FINDING body preserved per append-only board doctrine - .claude/board/TECH_DEBT.md: new TD-LEGACY-API-FEATURE-GATED-RESOLVED-1 entry merged into canonical board location (worker initially wrote it to repo-root TECH_DEBT.md; main thread consolidated to .claude/board/TECH_DEBT.md and removed the stray) W-G6 (TD-3 cognitive-shader-driver workspace conflict resolution) - Cargo.toml workspace [members] now includes `cognitive-shader-driver` with TD-SHADER-DRIVER-WORKSPACE-CONFLICT-1 annotation - Resolves the cargo `-p cognitive-shader-driver` from workspace root friction that hit sprint-11 (worked around via --manifest-path) W-G1 (D-CSV-5b QualiaColumn cutover) — PARTIAL - bindspace.rs: 65-line diff in progress — tests at file tail still reference both bs.qualia (f32) and bs.qualia_i4 (i4), suggesting the cutover isn't fully complete yet. Worker may still be writing. - engine_bridge.rs: paired double-write adjustments - lib.rs: added `pub mod attention_mask;`, `pub mod attention_mask_actor;`, `pub mod mailbox_soa;` registration (Wave F orphan cleanup landed here; previously these were only registered via PR #389) Still in flight (will commit on completion notification) - W-G1 final (cutover completion + test pass) - W-G2 (D-CSV-6b CAM-PQ wiring) — already in WIP commit 7d7b537 - W-G4 (D-CSV-15 Σ10 Jirak threshold) https://claude.ai/code/session_01UwJuKqP828qyX1VkLgGJFS
…rpus refinement + W-G4 Σ10 Jirak threshold W-G1 (D-CSV-5b QualiaColumn cutover continued) — driver.rs qualia READ sites - Updated `self.bindspace.qualia.row(row as usize)` call sites to handle the new return type (was `&[f32]` slice, now `QualiaI4_16D` Copy) - Two sites updated (lines 148 + 398 in pre-edit numbering) W-G2 (D-CSV-6b CAM-PQ wiring) — witness_corpus.rs refinement + mod.rs re-export - Tightened the CamPqWitnessIndex API surface; mod.rs re-export updated to expose CamPqWitnessIndex (replaced CamPqIndexPlaceholder) W-G4 (D-CSV-15 Σ10 Jirak-derived threshold) — sigma-tier-router/src/lib.rs +303 LOC - Replaced hand-tuned 0.1..1.0 linear band thresholds with Jirak-derived `k^1.5 / 10^1.5` convex spacing (Σ_1 ≈ 0.0316, Σ_10 = 1.0). Cites I-NOISE-FLOOR-JIRAK iron rule (CAM-PQ-induced weak dependence regime with p ≈ 3). - NEW `SigmaTierBands::jirak_p(p: f32) -> Self` parameterized constructor — caller can specify the moment parameter from Jirak's rate `n^(p/2-1)`; p=3.0 is default for the workspace regime; p≥4 collapses toward linear spacing (asymptotically iid). - NEW `SigmaTierBands::hand_tuned() -> Self` preserves prior values for backwards comparison, marked deprecated. - Resolves TD-SIGMA-TIER-THRESHOLDS-1 (TD-7) per Wave F honest review. Still pending W-G1 final completion notification (tests for the cutover + lib.rs re-export verification). Stop-hook commit; aggregate follow-up when W-G1 reports done. https://claude.ai/code/session_01UwJuKqP828qyX1VkLgGJFS
…orrection W-G1 (D-CSV-5b QualiaColumn cutover) — FINAL - bindspace.rs: cutover complete. BindSpace.qualia is now QualiaI4Column (8 B/row, was 72 B/row). QualiaColumn struct kept with #[deprecated] for one release cycle. - driver.rs: 2 qualia READ call sites updated. Line 148 (style resolver seed) now calls `bs.qualia.row(row).to_f32_17d()` → `[f32; 17]` for `auto_style::resolve`. Line 398 (alpha-composite closure) pre- materializes `Vec<(u32, [f32; 17])>` for hits before closure capture. - engine_bridge.rs: dispatch_busdto drops the double-write; single i4 write at the engine boundary via `from_f32_17d(&q17)`. unbind/ read_qualia_decomposed/write_qualia_observed call `.to_f32_17d()` at read sites. classification_distance (dim 17, no longer stored) returns 1.0 default. - 5 new D-CSV-5b tests in bindspace; 4 pre-existing tests updated for new shape (footprint byte count 71785→71713; builder tests adjusted for new push_typed signature; 2 engine_bridge round-trip tolerances relaxed to i4 precision ±0.15) - end_to_end.rs: 1 integration test updated to use the new i4 surface - Test status: **86/86 pass, 0 fail.** W-G4 (D-CSV-15 Σ10 Jirak threshold) — math correction - Σ_k = k^(p/2) / 10^(p/2). For p=3 (workspace CAM-PQ regime per I-NOISE-FLOOR-JIRAK), Σ_1 ≈ 0.0316, Σ_5 ≈ 0.3536, Σ_10 = 1.0. - Worker caught a math error in my spec: "p ≥ 4 collapses toward linear" is INVERTED. p=4 produces MORE convex spacing (delta variance p=3 → 0.00079; p=4 → 0.00267). Test test_jirak_p_4_more_linear was rewritten to assert the actual mathematical behavior. - Default() now calls jirak_p(3.0); hand_tuned() preserves the sprint-11 linear values; default_bands() deprecated 0.2.0. - 20/20 tests pass (12 original + 8 new). Clippy clean. https://claude.ai/code/session_01UwJuKqP828qyX1VkLgGJFS
…rename CamPqWitnessIndex → WitnessIndexHashMap
W-Meta-Opus delivered the honest cross-cutting review (180 lines,
22.4 KB). Highlights:
**Wave G grade: A−** (Wave F was B; integration discipline corrected)
**Sprint-12-so-far: B+**
Per-worker grades:
- W-G1 A− D-CSV-5b cutover; 86/86 tests pass; 4 pre-existing tests
updated with discipline
- W-G2 B+ CAM-PQ HashMap wiring (15 tests); naming pre-commits to
semantics the backing doesn't have (→ CSI-15, fixed in this commit)
- W-G3 A− Batch i4 API (20 tests, clippy clean); all 5 functions
panic-on-length-mismatch verified
- W-G4 A Jirak threshold (20 tests); caught + corrected my math
error in the spec ("p≥4 collapses linear" was inverted; p=4 produces
MORE convex spacing, not less)
- W-G5 A Iron rule promotion clean; CLAUDE.md now has 4 iron rules
- W-G6 A− Workspace conflict resolution (3-LOC fix); no orphan crates
Three CSIs surfaced (CSI-14..18, continuing Wave F's sequence):
**CSI-15 (P2, FIXED IN THIS COMMIT):** Renamed `CamPqWitnessIndex` →
`WitnessIndexHashMap` (12 occurrences in witness_corpus.rs + 1 in
mod.rs re-export). The original name pre-committed to CAM-PQ distance-
ranking semantics that the HashMap backing doesn't deliver. The doc
comment is honest ("HashMap-backed; sprint-13+ upgrades to real
ndarray::hpc::cam_pq"), but the type name would mislead at consumer
call sites. Sprint-13+ adds `WitnessIndexCamPq` with the real codec
wiring; the HashMap variant becomes the fallback for environments
without ndarray CAM-PQ support.
**CSI-7 follow-through:** Verified sigma-tier-router has NO self-
declared [workspace] table; cargo metadata --no-deps shows both
sigma-tier-router AND cognitive-shader-driver in the workspace
(16 packages total). Opus's note about pending follow-through was
unwarranted — it's already done.
**CSI-18 (MED):** Four iron rules now share a meta-pattern ("do X
consistently across the codebase; document deviations explicitly").
Sprint-13 should land `.claude/knowledge/iron-rules-doctrine.md`
consolidating this meta-pattern so future iron rules fit the
template intentionally.
W-Meta-Opus standout call-out
W-G4 noticed my brief was inverted, consulted the I-NOISE-FLOOR-JIRAK
iron rule, derived the correct math (Σ_k = k^1.5 / 10^1.5 with
Σ_1 ≈ 0.031623 and Σ_10 = 1.0 exactly), and shipped 8 new tests with
the corrected assertion in test_jirak_p_4_more_linear. Jirak 2016
citation present in both module-level and method-level doc comments.
Sprint-13 spawn recommendation: YES, gated on Wave G merge +
sprint-13 worker template that bakes lib.rs/workspace registration
INTO worker scope (Wave F CSI-13 has now been validated as a
recurring failure mode unless main thread enforces it pre-spawn).
Pre-existing infra issue: local `cargo test -p lance-graph` hit
ENOSPC during link (workspace target/ disk pressure). Mechanical
12-instance rename did not require local re-test; CI validates.
https://claude.ai/code/session_01UwJuKqP828qyX1VkLgGJFS
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4d429e3ef0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let mut q17 = [0.0f32; 17]; | ||
| q17.copy_from_slice(&q[..17]); | ||
| bs.qualia_i4.set(row, QualiaI4_16D::from_f32_17d(&q17)); | ||
| bs.qualia.set(row, QualiaI4_16D::from_f32_17d(&q17)); |
There was a problem hiding this comment.
Preserve BusDto headline outside i4 qualia
When the with-engine BusDto bridge is used, this stores q[9] = bus.codebook_index as f32 through QualiaI4_16D::from_f32_17d, whose conversion clamps each f32 lane to [-1.0, 1.0] and quantizes it to i4. unbind_busdto() later reads q[9] as u16, so any normal codebook index above 1 round-trips as 1, corrupting committed thought identity (and the documented bit-exact BusDto round-trip) after the D-CSV-5b cutover.
Useful? React with 👍 / 👎.
Same recurring sprint-11/12 fmt-gate pattern. W-G2's witness_corpus.rs test code had assert_eq! single-lines + multi-field struct literals that rustfmt 1.95 wants expanded. mod.rs's use block needed re- alphabetization after the CSI-15 rename (WitnessIndexHashMap sorts after Witness*). Pure mechanical reformat via `cargo fmt --manifest-path crates/lance-graph/Cargo.toml`. No behavior change.
…ntries (#383..#390) PP-9 (Opus) prepended 8 PR entries to PR_ARC_INVENTORY.md (1537→1903 lines, +366 / +50,619 bytes). APPEND-ONLY rule respected — no prior entries touched. Top→bottom reverse chronological: #390 sprint-12/wave-G (In PR, `bad0875`) — grade A−. D-CSV-5b cutover + D-CSV-6b WitnessCorpus + D-CSV-13 batch + D-CSV-15 Jirak math. #389 sprint-12 wave-F codex P2 follow-up — AttentionMaskBackend impl + canonical MailboxId (CSI-10). #388 sprint-12 Wave F fleet (12 Sonnet + 1 Opus) — grade B. D-CSV- 10/11/12 scaffolds + AttentionMask + plan v2. #387 sprint-11 Wave E — grade A−. D-CSV-8 MUL i4 scalar + D-CSV-9 8-channel transcoder (Option R-3). #386 sprint-11 Wave D — grade B+. D-CSV-7 MailboxSoA + D-CSV-6a WitnessCorpus core. #385 sprint-11 Wave C — grade B+. D-CSV-5a sibling QualiaI4Column. #384 sprint-11 Wave B — grade A. D-CSV-2 QualiaI4_16D + OQ-CSV-1 Option α ratification. #383 sprint-11 Wave A — grade A−. D-CSV-1 v2 layout + D-CSV-3 signed mantissa + D-CSV-4 CollapseGateEmission. Every entry mirrors the #381/#379 template — Header / Confidence / Added / Locked / Deferred / Docs / Cross-refs — with forward+backward linkages (#383→#385→#390 D-CSV-5 chain; E-META-10 catch in #383 → iron-rule promotion in #390 W-G5; etc.). Total PR headers in file: 28 (was 20). 13 of 14 planners done. Only PP-13 (brutally-honest-tester agent) still in flight. https://claude.ai/code/session_01UwJuKqP828qyX1VkLgGJFS
…patterns knowledge doc
Two preflight closeout artifacts:
1. .claude/board/sprint-log-13/preflight-meta-review-opus.md (W-Meta-Opus, ~196 LOC)
- Wave H grade: B+ (depressed by plan-vs-git drift in PP-1/PP-12 + ID/OQ-numbering
drift across PP-1..PP-6/PP-11; impl specs PP-3/4/5/6 + structural fixes
PP-2/8/13 are engineer-ready)
- Three notable CSIs surfaced: CSI-19 (D-CSV-/OQ-CSV-numbering drift),
CSI-20 (multiple planners drifted from main on PR #390-dependent state),
CSI-23 (PR #390 was the gate for sprint-13 spawn — now resolved with #390 merge)
- 8-item sprint-13 spawn checklist
- Per-planner verifications: PP-4 zero-callers-of-splat-fns VERIFIED TRUE,
PP-4 no-Think-struct VERIFIED TRUE, PP-5 CamPqIndexPlaceholder citation
VERIFIED ACCURATE, PP-9 APPEND-ONLY discipline VERIFIED, PP-12 false
ndarray-PR-#147-merged claim VERIFIED FALSE
2. .claude/knowledge/codex-p1-anti-patterns.md (~455 LOC, PP-13 companion)
- Operational catalogue the brutally-honest-tester (PP-13) loads at Tier-1
- §1 codex bot's review shape (P1/P2/P3 frequencies sprint-11/12)
- §2 anti-pattern catalogue AP1-AP8 with grep targets + rules + fixes
+ sprint-11/12 instance citations (commits 42b3215, 33509ab, d4e5bbc, 2a1a1e3)
- §3 stable-Rust toolchain across 5 tiers (Mandatory/Strict/Recommended/
Targeted/Formal-ish; explicit non-fit: Miri/cargo-careful/cargo-fuzz)
- §4 severity convention P0/P1/P2/P3 → LAND/HOLD/REJECT
- §5 workflow integration with CCA2A loop diagram
- §6 APPEND-ONLY maintenance protocol with promotion track to iron rules
- §8 'one sentence that should survive any refactor' anchor
Closes the 'create .claude/agents + knowledge for the new codex savant' request:
PP-13 created the agent card; this commit ships the companion knowledge doc.
…itect / baton-handoff-auditor / preflight-drift-auditor
Completes the four-agent quality lifecycle alongside PP-13 brutally-honest-tester:
PRE-PLAN → convergence-architect (PP-14, divergent expansion)
PRE-SPAWN → preflight-drift-auditor (PP-16, automates W-Meta-Opus audit)
DURING-IMPL → baton-handoff-auditor (PP-15, cross-crate boundary mismatches)
POST-IMPL → brutally-honest-tester (PP-13, codex-class within-crate bugs)
PP-14 convergence-architect (444 + 719 LOC):
- Creative-genius "0-friction boundary" hunter; verdict OPPORTUNITY/
WORTH-EXPLORING/DROP (never REJECT — psychological safety for ideation)
- EP1-EP8 expansion-pattern catalogue: 0-friction baton handover,
algebraic-operator reuse, role-keyed identity migration,
carrier-as-grammar, iron-rule axis prediction, sprint-N-bug-becomes-
feature, cross-repo synergy without API change, doctrine concentration
- Tools: + WebSearch, WebFetch, Agent, AskUserQuestion, ToolSearch,
HF paper_search/hf_doc_search/hf_doc_fetch/hf_hub_query (cross-pollination
from external papers is the role; Jirak 2016 precedent → I-NOISE-FLOOR-JIRAK)
PP-15 baton-handoff-auditor (502 + 897 LOC):
- Brutal cross-boundary reviewer; verdict CATCH-CRITICAL/CATCH-LATENT/CLEAN
- BAP1-BAP10 boundary anti-pattern catalogue: DTO field-shape silent
drift, rename-without-downstream-sweep (CSI-15), lib.rs/mod.rs orphan
(CSI-8/9), Cargo.toml [workspace] self-declaration (CSI-7), REST without
OrchestrationBridge, sprint-N TD-* consumed as resolved (CSI-9/20),
D-id/OQ-id numbering collision (CSI-19), iron-rule carrier-boundary
violation, feature-gated v1-API alias (I-LEGACY-API-FEATURE-GATED
precedent), Producer<Option<X>>/Consumer-unwrap tail panic
- Commit SHAs cited: 42b3215, b44ce87, d4e5bbc, 0ae9f90, 2a1a1e38,
2a3885d2, 04620aa, b526485
- Tools: + ToolSearch, mcp__github__{get_file_contents, pull_request_read,
list_pull_requests, get_commit, search_code} (targeted cross-repo
single-file reads per CLAUDE.md zipball-for-bulk-MCP-for-targeted rule)
PP-16 preflight-drift-auditor (474 + 686 LOC):
- Pre-spawn drift hunter that automates the W-Meta-Opus manual audit
method; verdict SPAWN-BLOCKED/SPAWN-CAUTION/SPAWN-CLEAR
- PD1-PD10 catalogue: stale-CSI-resolved-via-commit (CSI-9), cross-planner
D-id collision (CSI-19), pending-iron-rule-as-canonical (CSI-20),
false cross-repo PR-merge (PP-12 ndarray PR #147), renamed-symbol
downstream drift (CSI-15), spec-internal contradiction, iron-rule-on-
wrong-branch, missing-integration-responsibility (CSI-13/8),
TD-placeholder-consumed-as-resolved, plan-vs-board-inventory drift
- Each PD has copy-paste-runnable verification command (git log / grep /
file:line); W-Meta-Opus is cited as primary source 16+31 occurrences
- Tools: + ToolSearch, mcp__github__{get_file_contents, list_pull_requests,
get_commit, pull_request_read, list_commits, search_pull_requests}
(cross-repo PR-merge claim verification is the role — exactly the gap
that produced PP-12's false ndarray-PR-#147 drift)
All three cards: model: opus (multi-source synthesis per Model Policy),
read-only tools (no Edit/Write/MultiEdit — savants are auditors; writes
happen on main thread after their verdicts).
Both PP-14 and PP-15 independently flagged a meta-finding during prior-art
reads: their own sibling docs (PP-13 brutally-honest-tester +
codex-p1-anti-patterns) treat I-LEGACY-API-FEATURE-GATED as canonical
when it is still pending PR #390 ratification. Captured as BAP6 / PD3
respectively; aggregation sweep deferred to sprint-13 W-G7 cleanup.
Summary
Sprint-12 Wave G — 6 Sonnet workers + 1 Opus honest meta-review in CCA2A parallel fleet. Ships D-CSV-5b QualiaColumn cutover, D-CSV-6b CAM-PQ HashMap wiring, D-CSV-13 batch i4 API, D-CSV-15 Jirak-derived Σ-tier thresholds, promotes E-META-10 to iron rule
I-LEGACY-API-FEATURE-GATED, and resolves TD-SHADER-DRIVER-WORKSPACE-CONFLICT-1.Wave G grade per W-Meta-Opus honest review: A− (Wave F was B; integration discipline corrected). Sprint-12-so-far: B+.
What landed
Sprint-12 substantive deliverables
lance-graph-contract::mul::i4_eval::batchI-LEGACY-API-FEATURE-GATEDin CLAUDE.mdW-Meta-Opus call-outs
Standout: W-G4 caught a math error in my Wave G spec. I had written "p≥4 collapses toward linear" — actually inverted. W-G4 consulted
I-NOISE-FLOOR-JIRAKiron rule, derived correctΣ_k = k^(p/2) / 10^(p/2)math, and shipped 8 new tests with the corrected assertion intest_jirak_p_4_more_linear. Spot-checked: Σ_1 ≈ 0.031623, Σ_10 = 1.0 exactly. Jirak 2016 citation present in both module + method doc comments.CSI-15 (P2, fixed in commit
4d429e3): RenamedCamPqWitnessIndex→WitnessIndexHashMap(12 + 1 occurrences) before consumers attach. Original name pre-committed to CAM-PQ distance-ranking semantics the HashMap backing doesn't deliver. Sprint-13+ adds the realWitnessIndexCamPqalongside.CSI-18: All four iron rules now share a meta-pattern ("do X consistently across the codebase; document deviations explicitly" — applied to substrate operator / statistical model / data semantics / API version). Sprint-13 should consolidate in
.claude/knowledge/iron-rules-doctrine.md.Files touched
Cargo.toml— cognitive-shader-driver moved exclude → members (W-G6)CLAUDE.md— newI-LEGACY-API-FEATURE-GATEDiron rule (W-G5).claude/board/EPIPHANIES.md— E-META-10 PROMOTED status header.claude/board/TECH_DEBT.md— TD-LEGACY-API-FEATURE-GATED-RESOLVED-1 entry.claude/board/sprint-log-11/meta-review-opus-wave-g.md— Opus honest review (180 lines)crates/sigma-tier-router/src/lib.rs— Jirak bands + parameterized constructor (W-G4)crates/lance-graph-contract/src/mul.rs—i4_eval::batchmodule (W-G3)crates/lance-graph/src/graph/arigraph/witness_corpus.rs+mod.rs—WitnessIndexHashMap(W-G2 + CSI-15)crates/cognitive-shader-driver/src/bindspace.rs+engine_bridge.rs+driver.rs+lib.rs+tests/end_to_end.rs— QualiaColumn cutover (W-G1)Test plan
cargo test --manifest-path crates/lance-graph-contract/Cargo.toml i4_eval— 20/20 (W-G3)cargo test -p sigma-tier-router— 20/20 (W-G4)cargo test -p cognitive-shader-driver --lib— 86/86 (W-G1)cargo test -p lance-graph witness_corpus— 15/15 (W-G2; pre-rename validated)cargo metadata --no-deps— 16 packages, bothsigma-tier-router+cognitive-shader-driverpresent (W-G6)Sprint-13 spawn recommendation (per Opus)
YES, conditional on:
.claude/knowledge/iron-rules-doctrine.md) lands🤖 Generated with Claude Code
Generated by Claude Code