Commit 630bb2e
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_01VysoWJ6vsyg3wEGc5v7T5v1 parent 8273bfc commit 630bb2e
1 file changed
Lines changed: 15 additions & 3 deletions
Lines changed: 15 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | | - | |
35 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
36 | 48 | | |
37 | 49 | | |
38 | 50 | | |
| |||
0 commit comments