Skip to content

Commit f0f02d4

Browse files
authored
Merge pull request #487 from AdaWorldAPI/claude/splat3d-cpu-simd-renderer-MAOO0
refactor(contract): outer-boundary tombstone — emission DTO removed; SoA↔Lance is the one ORM seam
2 parents 0ae45b0 + 93d15c0 commit f0f02d4

12 files changed

Lines changed: 285 additions & 434 deletions

File tree

.claude/board/AGENT_LOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2026-06-11 — tombstone commit: emission artifacts removed per PR #477 follow-up
2+
3+
**Main thread (Fable, session splat3d-cpu-simd-renderer).** Executed the PR #477 documented follow-up (the "what does NOT exist" table → source reality): removed `CollapseGateEmission` from `lance-graph-contract::collapse_gate` (+ lib.rs re-export; `MailboxId`/`MergeMode`/`GateDecision` survive), removed `MailboxSoA::emit()`, renamed `last_emission_cycle` → `last_active_cycle`, added in-place `consume_firing(row)` successor (same threshold + same-cycle-idempotency semantics, no carrier object), reworded 4 stale doc references (kanban/episodic_edges/witness_tombstone/mailbox_soa header), superseded the CLAUDE.md Baton-scoping block, fixed cycle-coherent-soa-snapshot-v1 D-SOA-SNAP-1/2 to generic `SnapshotProvider::Column` (closes #477 CodeRabbit Critical — contract stays zero-dep), closed TD-COLLAPSE-GATE-SMALLVEC-1 as moot. Verified #477 codex P2 (`verify_layout` ColumnOutOfBounds) already fixed on main with regression test. Tests: contract 594 (−8 emission, +2 gate/merge), driver 85 (emit tests → consume tests, +1 OOB), clippy clean, workspace check clean. Commit: in PR.
4+
15
## 2026-06-09 — plan addendum: left-prefix parsing confirmed + D-PG-7 deterministic foveated tree-builder
26

37
**Main thread (Fable).** User direction validated against identity.rs octets: GUID left half (class+tree) is order-preserving plain bytes ⇒ Cypher label/subtree patterns = byte-prefix predicates on FixedSizeBinary(16) via Lance zone-maps; similarity leg (RaBitQ/CAM-PQ/Binary16K) rides the same row. Two caveats recorded (namespace-first ordering; ≤4-nibble GUID prefix). New M6 + D-PG-7: NiblePath assignment computable by deterministic hierarchical partition ("deterministic Louvain" → concretely ndarray CLAM pole-split, 16-way, capacity-bounded ⇒ foveation), with the iron requirement APPEND-STABLE (bootstrap once; minted paths never move; layout_version gates changes). Query-time twin noted (cascade / bgz-tensor HHTL cache). Plan §8 + STATUS_BOARD row. Commit: this.

.claude/board/EPIPHANIES.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,59 @@
1+
## 2026-06-12 — E-OUTER-BOUNDARY-IS-ORM-1 — there is only one boundary, and it is ontology-mediated
2+
3+
**Status:** FINDING (PR #487 tombstone commit makes this source-true; OGAR class + `SoaEnvelope` + Lance columnar I/O is the realized triangle).
4+
**Confidence:** High — every prior candidate inner boundary has now been removed or recast as ownership transfer; no surviving call-site asserts otherwise.
5+
6+
**The reframing.** `CollapseGateEmission` looked like a wire format for an
7+
inter-mailbox seam. It was, in fact, the workspace's last hand-written DTO
8+
asserting an **inner** boundary that does not exist. Between mailboxes there is
9+
only ownership transfer (Rust move semantics — `E-CE64-MB-4` makes UB a compile
10+
error); within a mailbox there are only in-place bytes (`SoaEnvelope` geometry).
11+
The only real boundary is the **outer** one — where the SoA meets persistence
12+
and meaning — and that boundary is **ontology-mediated, not DTO-mediated**.
13+
14+
**This is exactly the ORM pattern.**
15+
16+
| ORM | This substrate |
17+
|---|---|
18+
| Table schema | OGAR class (label, fields, tools, templates) |
19+
| Column mapping | `SoaEnvelope` + `ColumnDescriptor` (byte geometry) |
20+
| Active record | register-bank slice wrapped by the class view |
21+
| SQL writer | Lance columnar I/O (writes LE bytes from the in-place store) |
22+
| Hand-rolled row DTO | `CollapseGateEmission` — **the anti-pattern** |
23+
24+
In an ORM you don't write a bespoke struct per table-crossing; the mapping
25+
derives the persisted shape from the schema. Here likewise: the OGAR class
26+
supplies the semantics, the envelope supplies the geometry, Lance does the
27+
writing — and any independent carrier struct at that seam is **schema drift by
28+
definition** (per #477's "every DTO is a derived view of an OGAR class"). The
29+
emission type was not just unused; it was a second, ontology-bypassing
30+
description of data the class layer already described.
31+
32+
**Why `MailboxId` / `MergeMode` / `GateDecision` survive.** They are vocabulary
33+
*of* the ontology side — addressing (which register bank), merge policy (how
34+
overlapping writes compose), gate decision (apply / block / hold). They are
35+
not parallel descriptions of row data; they are the operational verbs the
36+
ontology binds.
37+
38+
**Consequences (the test for any future PR):**
39+
40+
- **Inner seams are ownership transfers**, never carrier types. If a proposed
41+
type looks like "DTO crossing from mailbox A to mailbox B", it is wrong by
42+
construction — the SoA is the DTO; the move is the crossing.
43+
- **The outer seam has exactly one description.** OGAR class on one side,
44+
`SoaEnvelope` on the other, Lance in between. A new "wire format" at this
45+
seam is the same anti-pattern by a different name — propose a new column or
46+
a class-template specialization instead.
47+
- **Hand-rolled active-record structs are ORM-bypass.** If you find yourself
48+
serializing-then-deserializing fields the class already names, the class
49+
template + `ClassView` + `FieldMask` is the right reach.
50+
51+
**Cross-ref:** PR #477 (three-tier model + "what does NOT exist" table); PR
52+
#487 (tombstone commit — emission artifacts removed; `consume_firing` is the
53+
in-place ownership successor); `docs/architecture/soa-three-tier-model.md`
54+
(register-file analogy + ORM mapping); `E-OGAR-NORTHSTAR-1` (the class spine
55+
this boundary binds to); `I-LEGACY-API-FEATURE-GATED` (legacy carrier paths
56+
must route to the canonical mapping or be removed — the tombstone is removal).
157
## 2026-06-10 — E-PROBE-MANTISSA-1 — golden-mantissa centroid placement measured: beats uniform-random on coverage AND pile-up; PHASE-1 bit-exactness green
258

359
**Status:** FINDING (probes run first-hand: `crates/helix/tests/probe_mantissa_fill.rs`, 4/4 green)

.claude/board/LATEST_STATE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ Types live in `crates/cognitive-shader-driver/src/wire.rs` behind `--features se
131131

132132
**Sprint-11/12 D-CSV substrate types (2026-05-16, PRs #383-#389)**:
133133
- `lance-graph-contract::qualia`: `QualiaI4_16D` (16-dim signed-i4, 9× compression vs `[f32; 18]`), `QualiaI4Column` (sibling SoA column in cognitive-shader-driver).
134-
- `lance-graph-contract::collapse_gate`: `CollapseGateEmission` (Vec-of-`(u16 target, CausalEdge64)` wire format; zero-dep — SmallVec optimization deferred as TD-COLLAPSE-GATE-SMALLVEC-1).
134+
- `lance-graph-contract::collapse_gate`: ~~`CollapseGateEmission`~~ **REMOVED 2026-06-11** (PR #477 three-tier model tombstone commit — zero-copy SoA, no inter-mailbox handoff type; TD-COLLAPSE-GATE-SMALLVEC-1 closed as moot). `MailboxId` / `MergeMode` / `GateDecision` remain.
135135
- `lance-graph-contract::mailbox` / `attention_mask`: `MailboxId` (canonical id type), `MailboxSoA<N>` (SoA mailbox with W-slot + plasticity accumulator + `apply_edges`), `AttentionMaskSoA`, `AttentionMaskActor`, `AttentionMaskBackend` trait.
136136
- `lance-graph-contract::sigma_tier`: `SigmaTierBands`, `SigmaTierRouter` (Rubicon-resonance ΔF + threshold dispatch), `DispatchOutcome`, `RestReason` (Σ-tier crate surface).
137137
- `lance-graph-contract::witness`: `WitnessCorpus` (CAM-PQ-indexed; D-CSV-6a partial in PR #386, full 6b sprint-12), `WitnessEntry`, `WitnessId`, `WitnessIndexHashMap` (anchor + chain invariant).
@@ -212,7 +212,7 @@ Types live in `crates/cognitive-shader-driver/src/wire.rs` behind `--features se
212212

213213
**Sprint-12/13 explicit deferrals (2026-05-16):**
214214

215-
- **TD-COLLAPSE-GATE-SMALLVEC-1**SmallVec optimization for `CollapseGateEmission` (currently Vec to preserve contract zero-dep invariant). Revisit only if profiling shows the heap allocation is hot.
215+
- **TD-COLLAPSE-GATE-SMALLVEC-1**CLOSED 2026-06-11 as moot: `CollapseGateEmission` removed entirely (PR #477 tombstone commit), nothing left to optimize.
216216
- **TD-SIGMA-TIER-THRESHOLDS-1** — Σ10 VAMPE-coupled Jirak-derived threshold refinement (D-CSV-15). Hand-tuned acceptable through sprint-12 per `I-NOISE-FLOOR-JIRAK`; principled Jirak 2016 derivation forwarded to sprint-13+ VAMPE coupled-revival track.
217217
- **ndarray `parallel`-feature `par_*` rayon variants** — productized substrate ships sequentially in PR #147; rayon work-stealing wraps deferred to sprint-14+ behind an opt-in feature gate.
218218

.claude/board/TECH_DEBT.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -936,6 +936,8 @@ Cross-ref: `docs/TYPE_DUPLICATION_MAP.md`; `crates/lance-graph-contract/src/mul.
936936

937937
## 2026-05-16 — TD-COLLAPSE-GATE-SMALLVEC-1: `CollapseGateEmission` uses `Vec` instead of `SmallVec`; zero-dep constraint was the tradeoff
938938

939+
**Status: CLOSED 2026-06-11 (moot)**`CollapseGateEmission` was removed entirely per the PR #477 three-tier model (zero-copy SoA, no inter-mailbox handoff type; tombstone commit). No carrier, no Vec, nothing to optimize.
940+
939941
**Status:** Open
940942
**Priority:** P3
941943
**Scope:** crate:lance-graph-contract domain:perf

.claude/plans/cycle-coherent-soa-snapshot-v1.md

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,21 +86,46 @@ row-scale and byte-scale deinterlace use the same clock.
8686

8787
## Deliverables
8888

89-
### D-SOA-SNAP-1 — `MailboxSoaSnapshot` type in lance-graph-contract
89+
### D-SOA-SNAP-1 — `MailboxSoaSnapshot<C>` type in lance-graph-contract
9090

91-
A `MailboxSoaSnapshot` struct: `cycle: u32`, `cols: Vec<Arc<MultiLaneColumn>>`.
92-
Snapshot is `Send + Sync`. No reference to the originating `MailboxSoa`.
93-
This is a point-in-time read — immutable after creation.
91+
> **REVISED 2026-06-11 (PR #477 CodeRabbit Critical):** the original sketch
92+
> (`cols: Vec<Arc<MultiLaneColumn>>` directly in contract) would create a
93+
> `lance-graph-contract → ndarray` dependency — `MultiLaneColumn` is an
94+
> ndarray type, and the contract crate is zero-dep by iron invariant. The
95+
> snapshot type is therefore **generic over the column type**; the concrete
96+
> binding happens in lance-graph, never in contract.
97+
98+
A `MailboxSoaSnapshot<C>` struct: `cycle: u32`, `cols: Vec<Arc<C>>`.
99+
Snapshot is `Send + Sync` (when `C: Send + Sync`). No reference to the
100+
originating `MailboxSoa`. This is a point-in-time read — immutable after
101+
creation. Contract never names `MultiLaneColumn`; it only carries the
102+
generic parameter.
94103

95104
### D-SOA-SNAP-2 — `SnapshotProvider` trait in lance-graph-contract
96105

97106
```rust
107+
// In lance-graph-contract (zero-dep — no ndarray import):
108+
pub struct MailboxSoaSnapshot<C> {
109+
pub cycle: u32,
110+
pub cols: Vec<Arc<C>>,
111+
}
112+
98113
pub trait SnapshotProvider {
99-
fn snapshot(&self) -> MailboxSoaSnapshot;
114+
type Column;
115+
fn snapshot(&self) -> MailboxSoaSnapshot<Self::Column>;
100116
}
117+
118+
// In lance-graph (the binding side):
119+
// impl SnapshotProvider for MailboxSoa {
120+
// type Column = ndarray::simd::MultiLaneColumn;
121+
// fn snapshot(&self) -> MailboxSoaSnapshot<MultiLaneColumn> { … }
122+
// }
101123
```
102124

103-
Zero deps in contract. `MailboxSoa` in lance-graph implements it.
125+
Zero deps in contract — the associated type defers the column choice to the
126+
implementor. `MailboxSoa` in lance-graph binds `Column = MultiLaneColumn`;
127+
ndarray never learns the snapshot exists, contract never learns ndarray
128+
exists, lance-graph binds them (same triangulation as `SoaEnvelope`).
104129

105130
### D-SOA-SNAP-3 — Arc-swap write path in `MailboxSoa::advance_phase`
106131

CLAUDE.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,20 @@ VSA carrier).
6060
> emissions + AriGraph SPO-G quads + BindSpace SoA columns. The bundle MATH
6161
> here (§I-SUBSTRATE-MARKOV Chapman-Kolmogorov, §I-VSA-IDENTITIES) is
6262
> **untouched** — only the cross-boundary carrier is scoped out.
63+
>
64+
> **2026-06-11 supersession (PR #477 three-tier model + tombstone commit):**
65+
> the Baton/emission framing above is itself now SUPERSEDED. There is **no
66+
> inter-mailbox handoff type at all**`CollapseGateEmission`,
67+
> `MailboxSoA::emit()`, and `wire_cost_bytes() = 13 + 10·baton_count` were
68+
> removed from source (the tombstone commit). The ratified invariant: every
69+
> SoA envelope is **zero-copy from creation to Lance tombstone**; Lance's own
70+
> columnar I/O writes LE bytes from the in-place backing store described by
71+
> `SoaEnvelope`; nothing is serialized or transmitted between mailboxes.
72+
> `last_emission_cycle` was renamed `last_active_cycle` (in-place consumption
73+
> stamp). Canonical reference: `docs/architecture/soa-three-tier-model.md`.
74+
> What survives from this block: Vsa16kF32-never-crosses-boundaries, the
75+
> mailbox-as-owner compile-time safety argument (E-CE64-MB-4), and the bundle
76+
> math — all untouched.
6377
6478
```
6579
Sentence → FSM → RoleKey_fp × content_fp → vsa_bundle (Σ) with ρ^d braiding

0 commit comments

Comments
 (0)