Skip to content

Commit fc7849c

Browse files
committed
fix(#517 review): align doc A2 status markers + add reset_row A2 test
CodeRabbit review on #517, both valid: - doc: sigma/temporal/expert were marked **GAP** in the §0 mapping table while the W1 DONE section said shipped — contradiction. Updated the three rows to **SHIPPED (W1)** and the "remaining D-MBX-A2 gap" line to content/topic/angle only (the W1b heap planes). - test: added test_mailbox_soa_reset_row_clears_a2_columns — reset_row() must clear the new temporal/expert/sigma columns (migration-invariant regression guard). 14 mailbox_soa tests green. Also rebased onto post-#515 main (e063416) so W1b will wire against the merged driver (which now carries the MaterializeProvenance provenance wire). Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 22f5120 commit fc7849c

2 files changed

Lines changed: 27 additions & 8 deletions

File tree

.claude/plans/bindspace-mailbox-soa-dependency-map-v1.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@
2424
| `fingerprints.topic` | `Box<[u64]>` (256/row) | 2 KB | own, dense, hot | **GAP** |
2525
| `fingerprints.angle` | `Box<[u64]>` (256/row) | 2 KB | own, dense, hot | **GAP** |
2626
| `fingerprints.cycle` | `Box<[f32]>` (16 384/row, `Vsa16kF32`) | **64 KB** | **DROP** — transient local, never a column | n/a |
27-
| `fingerprints.sigma` | `Box<[u8]>` (1/row) | 1 B | own `[u8; N]` (Σ-codebook ref) | **GAP** |
27+
| `fingerprints.sigma` | `Box<[u8]>` (1/row) | 1 B | own `[u8; N]` (Σ-codebook ref) | **SHIPPED (W1)** |
2828
| `edges` | `EdgeColumn(Box<[u64]>)` (**raw u64**) | 8 B | own `[CausalEdge64; N]` (typed) | **SHIPPED** |
2929
| `qualia` | `QualiaI4Column` | 8 B | own `[QualiaI4_16D; N]` | **SHIPPED** |
3030
| `meta` | `MetaColumn(Box<[u32]>)` | 4 B | own `[MetaWord; N]` | **SHIPPED** |
31-
| `temporal` | `Box<[u64]>` | 8 B | own `[u64; N]` (OQ-2 fallback; v2 edge can't carry it) | **GAP** |
32-
| `expert` | `Box<[u16]>` | 2 B | subsume into `mailbox_id`/`w_slot`, or `[u16; N]` | **GAP** |
31+
| `temporal` | `Box<[u64]>` | 8 B | own `[u64; N]` (OQ-2 fallback; v2 edge can't carry it) | **SHIPPED (W1)** |
32+
| `expert` | `Box<[u16]>` | 2 B | subsume into `mailbox_id`/`w_slot`, or `[u16; N]` | **SHIPPED (W1)** |
3333
| `entity_type` | `Box<[u16]>` | 2 B | own `[u16; N]` | **SHIPPED** |
3434
| `ontology` | `Option<Arc<OntologyRegistry>>` | shared | **stays shared** (cold Zone-2, by `&`/`Arc`) | n/a |
3535

@@ -40,11 +40,11 @@
4040
Implements `MailboxSoaView` + `MailboxSoaOwner` (contract), with the `repr(transparent)`
4141
`edges_raw()`/`meta_raw()` zero-copy casts (const-asserted).
4242

43-
**The D-MBX-A2 gap (what S1 still owes):** `content`/`topic`/`angle` (dense, hot — NOT a tiny
44-
ref; OQ-1 resolved), `sigma`, `temporal`, `expert`. Note the content planes are **heap**
45-
(`Box<[u64]>` of `N*256`, like BindSpace) — they cannot be `[u64; N]` stack arrays and
46-
`[u64; N*256]` is not stable; design choice is a parallel `Box<[u64]>` field or a small
47-
`FingerprintColumns`-shaped sub-struct owned by the mailbox.
43+
**The remaining D-MBX-A2 gap (post-W1):** `content`/`topic`/`angle` (dense, hot — NOT a tiny
44+
ref; OQ-1 resolved). `sigma`/`temporal`/`expert` shipped in **W1** (see the W-sequence below).
45+
Note the content planes are **heap** (`Box<[u64]>` of `N*256`, like BindSpace) — they cannot be
46+
`[u64; N]` stack arrays and `[u64; N*256]` is not stable; design choice is a parallel
47+
`Box<[u64]>` field or a small `FingerprintColumns`-shaped sub-struct owned by the mailbox (W1b).
4848

4949
---
5050

crates/cognitive-shader-driver/src/mailbox_soa.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -897,4 +897,23 @@ mod tests {
897897
);
898898
}
899899
}
900+
901+
// ── test 14: reset_row clears the W1 A2 columns ──────────────────────────
902+
903+
/// `reset_row()` must clear the new `temporal` / `expert` / `sigma` columns
904+
/// (migration-invariant regression guard — a reset that forgot a new column
905+
/// would leak stale per-row state into a reused mailbox row).
906+
#[test]
907+
fn test_mailbox_soa_reset_row_clears_a2_columns() {
908+
let mut mb: MailboxSoA<4> = MailboxSoA::new(1, 0, 1.0);
909+
mb.set_temporal(2, 123);
910+
mb.set_expert(2, 77);
911+
mb.set_sigma(2, 9);
912+
913+
mb.reset_row(2);
914+
915+
assert_eq!(mb.temporal_at(2), 0, "temporal[2] must reset to 0");
916+
assert_eq!(mb.expert_at(2), 0, "expert[2] must reset to 0");
917+
assert_eq!(mb.sigma_at(2), 0, "sigma[2] must reset to 0");
918+
}
900919
}

0 commit comments

Comments
 (0)