Skip to content

Commit 630bb2e

Browse files
committed
docs(handovers): address Codex P2 — value-preserving, not byte-identical layout
The original FINDING bullet claimed MailboxSoA inherits BindSpace columns "at byte-identical LE types," which overclaims. Rust does not guarantee layout equality between a newtype `pub struct CausalEdge64(pub u64)` and its underlying `u64` without `#[repr(transparent)]`, and the `crates/causal-edge/src/edge.rs:117` declaration omits that attribute. If a future S1/G6 implementation reads this handover and tries slice-reinterpretation (`&[u64] as &[CausalEdge64]` via transmute) to get zero-copy retargeting, that's UB. Fix: qualify as value-preserving (no conversion) through typed accessors, not byte-identical layout. The migration matrix in the canonical bardioc doc §5 already uses typed accessors row-by-row (`mb.set_edge(row, e)`, `mb.set_qualia(row, q)`), so this clarification is doc-precision, not behavioral change. Adding `#[repr(transparent)]` to `CausalEdge64` (and `QualiaI4_16D` / `MetaWord` similarly) is a separate concern that would unlock zero-copy slice patterns if ever wanted; flagged inline as D-MBX-LAYOUT-GUARANTEE. https://claude.ai/code/session_01VysoWJ6vsyg3wEGc5v7T5v
1 parent 8273bfc commit 630bb2e

1 file changed

Lines changed: 15 additions & 3 deletions

File tree

.claude/handovers/2026-06-05-0445-bardioc-to-lance-graph-bindspace-arch-delta.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,21 @@
3030
64 / 256 / 4096 / 16384 = AVX-512 register / AMX tile row / 4 KiB page /
3131
L1d cache). The LE contract isn't *adding* a lossless invariant — it's
3232
naming a property the columns already have.
33-
- **MailboxSoA D-MBX-A1 inherits 4 of 5 BindSpace columns at byte-identical
34-
LE types** (`edges` / `qualia` / `meta` / `entity_type`). So G5 + G6 in
35-
the engine_bridge function matrix are **1-line retargets**, not rewrites.
33+
- **MailboxSoA D-MBX-A1 inherits 4 of 5 BindSpace columns as the same
34+
LE-contract types** (`edges` / `qualia` / `meta` / `entity_type`
35+
same `CausalEdge64` / `QualiaI4_16D` / `MetaWord` / `u16`). G5 + G6
36+
in the engine_bridge function matrix are **1-line retargets through
37+
typed accessors**, not rewrites. **The migration is value-preserving
38+
(no conversion), NOT layout-guaranteed byte-identical**
39+
`CausalEdge64` is `pub struct CausalEdge64(pub u64)` *without*
40+
`#[repr(transparent)]` in `crates/causal-edge/src/edge.rs:117`, so a
41+
slice-reinterpretation pattern (`&[u64] as &[CausalEdge64]` via
42+
`transmute`) is **NOT** supported. Use typed accessors throughout
43+
(`mb.set_edge(row, e)`, `mb.set_qualia(row, q)`, etc.); the function
44+
matrix in the canonical doc §5 already does this. Adding
45+
`#[repr(transparent)]` to `CausalEdge64` is a separate concern in
46+
`crates/causal-edge/` and would unlock zero-copy slice patterns if
47+
ever wanted later.
3648
- **The 2026-05-27 plan is still authoritative.** Its §3 column map and §6
3749
gated steps are correct; this delta narrows scope and adds context.
3850

0 commit comments

Comments
 (0)