Commit ea8c20d
committed
fix(sprint-11/wave-D): D-CSV-7 — last_emission_cycle u32::MAX sentinel + lib re-export + ndarray hpc-extras
W-D1 worker completion notification (after the prior commit window)
landed three improvements:
1. **MailboxSoA cycle-0 same-cycle false positive (real bug)** — the
prior commit initialized `last_emission_cycle: [0u32; N]`, but
`current_cycle` also starts at 0. The `last_emission_cycle[row]
== self.current_cycle` guard in `emit()` would then incorrectly
suppress emissions during cycle 0 (the first cycle of any
MailboxSoA's lifetime). Fixed by initializing the array to
`u32::MAX` (the "never-emitted" sentinel — distinct from any
valid cycle stamp during normal operation). `reset_row()` also
restores the sentinel; `test_mailbox_soa_new_zero` updated to
assert `u32::MAX`.
2. **`lib.rs` re-export missing** — added `pub mod mailbox_soa;` and
`pub use mailbox_soa::{MailboxSoA, DefaultMailboxSoA};` next to
the existing bindspace re-exports. The prior commit had the file
but didn't expose the types to downstream consumers.
3. **`Cargo.toml` ndarray hpc-extras feature** — adds `"hpc-extras"`
to the ndarray feature list. Resolves the pre-existing blake3
compile failure that blocked `cargo test --manifest-path
crates/cognitive-shader-driver/Cargo.toml` in this environment.
Same fix W-C1 applied to PR #385's branch.
Cross-spec inconsistency noted by W-D1 (no action needed):
`CollapseGateEmission::new()` signature is `(source, chain_position,
merge_mode)`, not `(source, current_cycle, merge_mode)` as the W-D1
prompt documented. The `chain_position` field semantically maps to
`current_cycle` (per plan §8.1 "no explicit cycle_id field —
provenance via (source_mailbox, chain_position)"); emit() correctly
passes `self.current_cycle` as the `chain_position` arg. Naming
mismatch is a doc-comment polish for a future iteration.
Test status: **9/9 mailbox_soa tests pass; 65/65 lib tests pass total.**
https://claude.ai/code/session_01UwJuKqP828qyX1VkLgGJFS1 parent 19a650e commit ea8c20d
3 files changed
Lines changed: 17 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| 98 | + | |
98 | 99 | | |
99 | 100 | | |
100 | 101 | | |
| |||
195 | 196 | | |
196 | 197 | | |
197 | 198 | | |
| 199 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
84 | 88 | | |
85 | 89 | | |
86 | 90 | | |
| |||
173 | 177 | | |
174 | 178 | | |
175 | 179 | | |
176 | | - | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
177 | 183 | | |
178 | 184 | | |
179 | 185 | | |
| |||
232 | 238 | | |
233 | 239 | | |
234 | 240 | | |
235 | | - | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
236 | 245 | | |
237 | 246 | | |
238 | 247 | | |
| |||
249 | 258 | | |
250 | 259 | | |
251 | 260 | | |
252 | | - | |
253 | | - | |
| 261 | + | |
| 262 | + | |
254 | 263 | | |
255 | 264 | | |
256 | 265 | | |
| |||
0 commit comments