Skip to content

fix(sprint-12/wave-F): codex P2 — AttentionMaskBackend impl for Atten…#394

Merged
AdaWorldAPI merged 1 commit into
mainfrom
claude/sprint-12-wave-f-fleet
May 16, 2026
Merged

fix(sprint-12/wave-F): codex P2 — AttentionMaskBackend impl for Atten…#394
AdaWorldAPI merged 1 commit into
mainfrom
claude/sprint-12-wave-f-fleet

Conversation

@AdaWorldAPI
Copy link
Copy Markdown
Owner

…tionMaskSoA + 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_01UwJuKqP828qyX1VkLgGJFS

…tionMaskSoA + 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_01UwJuKqP828qyX1VkLgGJFS
@AdaWorldAPI AdaWorldAPI merged commit 59693aa into main May 16, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants