Commit 0bc2833
committed
fix(sprint-12/wave-F): codex P2 — AttentionMaskBackend impl for AttentionMaskSoA + canonical MailboxId import
Codex P2 review on PR #388 flagged that `AttentionMaskActor` is public
but `AttentionMaskSoA` (the only production backend in the crate)
doesn't implement `AttentionMaskBackend`. Downstream consumers can't
add the impl themselves because they own neither the trait nor the
SoA (Rust orphan rules), so `AttentionMaskActor::new(AttentionMaskSoA::new(...))`
would force them to wrap in a local newtype.
Fix #1 — production-backend impl in attention_mask_actor.rs
Added `impl AttentionMaskBackend for crate::attention_mask::AttentionMaskSoA`
with the four trait methods delegating to the existing inherent
methods on AttentionMaskSoA. Now downstream consumers can wire the
two directly: `AttentionMaskActor::new(AttentionMaskSoA::new(4))`
works out of the box.
Fix #2 — collapses CSI-10 from the W-Meta-Opus honest review
The W-F2 worker had defined a local `pub type MailboxId = u32` in
attention_mask.rs (Opus CSI-10 entry: "W-F2 used local MailboxId
shadow alias"). Switched to `pub use lance_graph_contract::collapse_gate::MailboxId;`
— same underlying u32 so all method signatures stay compatible,
but now both attention_mask.rs and attention_mask_actor.rs reference
the SAME canonical type and the trait impl in fix #1 can be added
without type-mismatch concerns.
Test status: 14/14 attention_mask + attention_mask_actor tests pass.
Clean compile (modulo 2 pre-existing unused_mut warnings unrelated
to this change).
Branch rebased on main (post PR #385 merge) to pick up the ndarray
hpc-extras feature flag that W-C1 added; this resolves the blake3
unresolved-crate compile failure that hit cognitive-shader-driver
prior to rebase.
https://claude.ai/code/session_01UwJuKqP828qyX1VkLgGJFS1 parent 77f2d26 commit 0bc2833
2 files changed
Lines changed: 24 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
14 | 15 | | |
15 | | - | |
16 | | - | |
17 | | - | |
| 16 | + | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
| |||
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
36 | 55 | | |
37 | 56 | | |
38 | 57 | | |
| |||
0 commit comments