You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(mailbox): THE LE contract is one SoA end-to-end; ontology lazylock-as-is; DTO/p64 vertical audit
Sharpen the migration spec per the ruling that there is ONE little-endian
contract, the same SoA layout from cognitive-shader-driver down to
lance-graph storage with no boundary re-encode:
- plan §2.5: THE LE contract is uniform shader SoA → contract LE types
(CausalEdge64/QualiaI4_16D/MetaWord/SoaColumns/entity_type) → lance storage;
persisted_row is a pointer to the same SoA row, not a re-encode
- plan §4: Ontology is NOT in the SoA — stays AS IS, lazylock
(registry.rs:39 LazyLock) + ontology_dictionary Lance cache
(lance_cache.rs, TTL-sourced, drop-and-rebuild)
- plan §2.6: DTO vertical audit — p64-bridge already conforms (LE types →
palette, no re-encode = the template); engine_bridge bind/unbind_busdto is
the legacy re-encode seam to collapse (S2); thinking-engine StreamDto/
ResonanceDto/BusDto/ThoughtStruct survive only as ingress adapter + read
projections; ResonanceDto.energy IS MailboxSoA.energy
- EPIPHANIES: E-MAILBOX-IS-BINDSPACE refinement (end-to-end + ontology + DTO)
- TECH_DEBT: TD-RESONANCEDTO-DUP-1 (two ResonanceDto structs, same name)
Design/spec only.
https://claude.ai/code/session_017GFLBnDy23AWBqvkbHHC41
Copy file name to clipboardExpand all lines: .claude/board/EPIPHANIES.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,9 @@
12
12
13
13
**Gated staging (plan §6):** S1 add columns behind `mailbox-thoughtspace` feature → S2 move `engine_bridge` surface onto mailbox rows → S3 driver holds a sea-star of mailboxes (kill the 4096 singleton in `serve.rs`) → S4 death→SPO+Lance tombstone-witness → S5 delete `BindSpace`+`cycle` plane. Gated on `D-CE64-MB-1-impl` (par-tile) + `PR-NDARRAY-MIRI-COMPLETE`; S5 blocked on the CLAUDE.md "The Click" / `Vsa16kF32` doctrinal update (OQ-4, already flagged in `surreal/RECONCILIATION`).
14
14
15
-
**Cross-ref:**`E-BATON-1`, `E-CE64-MB-4`, `E-LADDER-SERVES-MAILBOX` (§6 tombstone-witness), `I-VSA-IDENTITIES`, `I-LEGACY-API-FEATURE-GATED` (feature-gate the v1 accessors during S1–S4), `causaledge64-mailbox-rename-soa-v1` (§5 MailboxSoA), `cognitive-substrate-convergence-v1` (D-CSV-7 shipped accumulator).
15
+
**Refinement (same session, 2026-05-27):** the per-mailbox SoA *is* **THE little-endian contract** — singular, and the **same SoA layout runs the whole vertical with no boundary re-encode**: cognitive-shader-driver `MailboxSoA` → `lance-graph-contract` LE types (`CausalEdge64`/`QualiaI4_16D`/`MetaWord`/`SoaColumns`/`entity_type`) → lance-graph storage (Lance columns / tombstone-witness); `ShaderCrystal.persisted_row` is a pointer to the same SoA row, not a serialized copy (plan §2.5). **The Ontology is NOT in the SoA and stays AS IS** — lazylock (`registry.rs:39 LazyLock<NamespaceRegistry>`) + the `ontology_dictionary` Lance **cache** (`lance_cache.rs`, TTL-sourced, drop-and-rebuild; its own header already says "BindSpace … never lands here") (plan §4). **DTO audit (plan §2.6):** `p64-bridge` already conforms (maps `CausalEdge64`/`ThinkingStyle` straight to palette, no re-encode — the template); the legacy re-encode seam is `engine_bridge.rs` `bind_busdto`/`unbind_busdto`/`busdto_to_binary16k` (collapse in S2); `thinking-engine` DTOs survive only as the `StreamDto` ingress adapter + thin read-projections (`BusDto`/`ThoughtStruct`) over the mailbox SoA; `ResonanceDto.energy` *is* `MailboxSoA.energy` (the two `ResonanceDto` defs are `TD-RESONANCEDTO-DUP-1`).
16
+
17
+
**Cross-ref:**`E-BATON-1`, `E-CE64-MB-4`, `E-LADDER-SERVES-MAILBOX` (§6 tombstone-witness), `I-VSA-IDENTITIES`, `I-LEGACY-API-FEATURE-GATED` (feature-gate the v1 accessors during S1–S4), `E-CONTRACT-NO-SERIALIZE` (compile-time handshake, no membrane serialize — same byte layout to disk), `causaledge64-mailbox-rename-soa-v1` (§5 MailboxSoA), `cognitive-substrate-convergence-v1` (D-CSV-7 shipped accumulator), `TD-RESONANCEDTO-DUP-1`.
-**What:**`crates/thinking-engine/src/dto.rs:59` defines `ResonanceDto { energy: Vec<f32>, top_k, cycle_count, converged }` (the Ψ ripple field); `crates/thinking-engine/src/awareness_dto.rs:21` defines a *different*`ResonanceDto { hdr: HdrResonance, dominant_perspective, gate, dissonance, total_energy, … }` (multi-perspective S/P/O). Same name, different shape, same crate.
21
+
-**Owed:** dedup under `bindspace-singleton-to-mailbox-soa-v1` — the `dto.rs` energy field unifies into `MailboxSoA.energy: [f32; N]`; the `awareness_dto.rs` scalars map to SoA `meta`/`edge` columns and `HdrResonance` becomes the S/P/O read over the SoA. Rename/merge so one canonical resonance read remains.
22
+
-**Status:** Open
23
+
16
24
### TD-GHOST-ECHO-DUP-1 (D-PERSONA-1)
17
25
18
26
-**Severity:** P3 (cosmetic type-dup; no runtime correctness risk — the two enums are not exchanged across a crate boundary today)
These are heap `Vec`-based representations bridged into `BindSpace` rows by a **translation
179
+
membrane** in `crates/cognitive-shader-driver/src/engine_bridge.rs`
180
+
(`bind_busdto` / `unbind_busdto:310` / `busdto_to_binary16k:199`). That bind/unbind seam is
181
+
exactly the re-encode the ruling forbids for the thoughtspace. Fates:
182
+
183
+
| DTO (`thinking-engine`) | Shape today | Fate under THE SoA |
184
+
|---|---|---|
185
+
|`StreamDto` (Φ ingress) |`source`, `codebook_indices: Vec<u16>`, `timestamp`|**Thin ingress adapter only** — a sensor-membrane boundary (like the ontology); codebook indices (identity refs, `I-VSA-IDENTITIES`-clean) hand straight into the mailbox SoA. Does NOT carry a parallel `Vec` through the hot path. |
186
+
|`ResonanceDto` (Ψ, `dto.rs`) |`energy: Vec<f32>` (the 4096 ripple field) + `top_k`/`cycle_count`/`converged`|**Already IS `MailboxSoA.energy: [f32; N]`.** The ripple field is the mailbox's energy column — unify, don't keep a separate heap `Vec` DTO. `top_k`/`converged` are derived reads. |
187
+
|`ResonanceDto` (`awareness_dto.rs`) | richer multi-perspective: `hdr: HdrResonance`, `dominant_perspective`, `gate`, `dissonance`, `total_energy`, inferred user state |**NAME-COLLISION (two `ResonanceDto`) — dedup.** Scalars (`dissonance`/`total_energy`/`gate`) → SoA `meta`/`edge` columns; `HdrResonance` = the S/P/O 3-perspective read over the SoA. Rename or merge (tech-debt entry filed). |
188
+
|`BusDto` (B consequence) |`codebook_index: u16`, `energy: f32`, `top_k`, `cycle_count`, `converged`|**Becomes a view/projection over the SoA row** (read `edges`/`qualia`/`meta` + `persisted_row`), not a bound/unbound separate struct. `unbind_busdto` collapses to a column read; `bind_busdto`/`busdto_to_binary16k` collapse (the SoA row's content-ref IS the binary16k identity). |
189
+
|`ThoughtStruct` (Γ collapse) |`bus`, lazy `text`, `sensor_contributions`, `tension_history: Vec<Vec<f32>>`, `style_trajectory`|**Γ projection of the persisted SoA row** (text stays lazy). `tension_history`/`style_trajectory` become witness columns / tombstone fields (`E-LADDER-SERVES-MAILBOX` §6), not parallel `Vec`s. |
190
+
191
+
**Ruling:**`engine_bridge`'s `bind_busdto`/`unbind_busdto`/`busdto_to_binary16k` are the
192
+
re-encode boundary to dissolve (migration step S2). The thinking-engine DTOs survive only as
193
+
(a) the `StreamDto` ingress adapter at the sensor membrane and (b) thin *read projections*
194
+
(`BusDto`/`ThoughtStruct`) over the mailbox SoA — never as a parallel owned representation the
195
+
hot path translates to/from. p64-bridge is the conformance template for the storage-ward half.
196
+
197
+
---
198
+
121
199
## 3. Column-by-column migration map
122
200
123
201
|`BindSpace` column | → Destination | How |
@@ -139,20 +217,36 @@ content_ref ≤ 6). That is the whole point: the mailbox thoughtspace is L1/L2-r
139
217
140
218
---
141
219
142
-
## 4. What STAYS shared (does not migrate)
143
-
144
-
-**`Arc<OntologyRegistry>`** — the OGIT/DOLCE/FIBO calcified ontology. Immutable at read
145
-
time, hydrated/mutated on its own owner (`OntologyRegistry::append_mapping`), shared by
146
-
`Arc` to every mailbox. This is cold Zone-2, not ephemeral thinking. Mailboxes hold
147
-
`&OntologyRegistry` (or a cloned `Arc`), never a copy of its tables.
148
-
-**Codebooks / CAM-PQ centroids** — the cleanup codebook the content references resolve
149
-
against (`I-VSA-IDENTITIES` Test 3). Shared, immutable, cold.
150
-
-**AriGraph SPO-G cold store + Lance dataset** — where the mailbox's witness calcifies on
151
-
death (`E-LADDER-SERVES-MAILBOX` §6). Shared persistence, not per-mailbox.
152
-
153
-
Rule of thumb: **ephemeral per-think state → into the mailbox; calcified/immutable shared
154
-
knowledge → stays a shared `Arc`.** The singleton's sin was conflating the two in one
155
-
`BindSpace`.
220
+
## 4. What STAYS shared (does not migrate) — the Ontology is lazylock-via-cache, AS IS
221
+
222
+
The **Ontology is explicitly NOT part of THE SoA contract** and does **not** migrate. It stays
223
+
exactly as it is today — a lazily-initialised, cache-backed, read-only shared resource:
224
+
225
+
-**`LazyLock<NamespaceRegistry>`** — the seed registry is `static SEED_NAMESPACE_REGISTRY:
226
+
LazyLock<NamespaceRegistry>` (`crates/lance-graph-ontology/src/registry.rs:39`), built once,
227
+
read-only thereafter. Mailboxes consult it by reference; never own or copy it.
0 commit comments