plan: singleton-to-snapshot-nudge-v1 — nudge every shared-mutable singleton onto per-owner SoA + Arc-swap snapshot#478
Conversation
…gleton onto per-owner SoA + Arc-swap snapshot Workspace-wide audit plan (D-SNGL-1..7). The mechanical distinction: read-only LazyLock codebooks (role keys, UDFs, simd_caps) are NOT targets; only shared-mutable runtime state is. Test: mutated-after-init -> nudge; never-mutated -> codebook, keep. Ties together bindspace-singleton-to-mailbox-soa-v1 (BindSpace dissolution) and cycle-coherent-soa-snapshot-v1 (the snapshot mechanism). Names concrete targets: ShaderDriver.bindspace, AttentionMatrix.gestalt, burn matmul caches. Board hygiene: INTEGRATION_PLANS prepend + STATUS_BOARD rows in same commit. https://claude.ai/code/session_0147hSzjmWZDuy2MSQNrhEK5
|
Warning Review limit reached
More reviews will be available in 39 minutes and 10 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2e54385208
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| | Construct | Home | Nudge | Owning plan | | ||
| |---|---|---|---| | ||
| | `ShaderDriver.bindspace: Arc<BindSpace>` | cognitive-shader-driver | Dissolve into per-mailbox `MailboxSoA<N>`; driver holds a sea-star of mailboxes | `bindspace-singleton-to-mailbox-soa-v1` (D-MBX-3/5) | | ||
| | `BindSpace::zeros(4096)` in `bin/serve.rs` | cognitive-shader-driver | Delete; mailboxes allocate their own SoA | `bindspace-singleton-to-mailbox-soa-v1` (D-MBX-5) | |
There was a problem hiding this comment.
Include the gRPC debug server in the BindSpace nudge
The target list only calls out bin/serve.rs, but the same repo-wide search for BindSpace::zeros(4096) also finds crates/cognitive-shader-driver/src/bin/grpc.rs:29, which builds an identical Arc<BindSpace> for the gRPC debug server. If the migration follows this audit as written, the REST debug server would be moved to per-mailbox SoA while the gRPC server keeps the shared BindSpace singleton, leaving one of the documented singleton targets behind.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Already covered — the plan's "IS a target" table already has a dedicated row for bin/grpc.rs:29:
Arc::new(BindSpace::zeros(4096))inbin/grpc.rs:29(gRPC debug server) — Delete; same nudge asserve.rs— both debug-server entry points must move together or one singleton is left behind →bindspace-singleton-to-mailbox-soa-v1(D-MBX-5)
The thread is marked outdated because the plan was updated to include this entry after the comment was posted. Both debug-server entry points (serve.rs and grpc.rs) are explicitly listed as a pair with the note that they must move together.
Generated by Claude Code
…t list Codex P2: the repo-wide BindSpace::zeros(4096) search also finds bin/grpc.rs:29 (gRPC debug server), identical to bin/serve.rs:29 (REST). Both must move to per-mailbox SoA together; the audit previously named only serve.rs, which would leave the gRPC singleton behind. https://claude.ai/code/session_0147hSzjmWZDuy2MSQNrhEK5
What
A workspace-wide integration plan that nudges every singleton-shaped construct onto the ratified architecture: per-owner
MailboxSoA<N>read via cycle-coherent Arc-swap COW snapshots. Design-spec + audit only (D-SNGL-1..7); no code in this PR beyond the board hygiene.The mechanical distinction (the whole game)
The grep for
LazyLock/OnceLock/static/Arc<RwLock>returns two fundamentally different shapes. Only one is a target:SUBJECT_KEY…), DataFusion UDFs (VECTOR_DISTANCE_*_UDF),simd_caps(). Built once, never mutated. ALazyLockhere is a const table, blessed bydata-flow.md §2. Leave as-is.ShaderDriver.bindspace: Arc<BindSpace>,AttentionMatrix.gestalt(drifts via the deprecatedunbundle_from), burn matmul caches (pending audit). Nudge to per-owner SoA + snapshot.The test is mechanical: mutated-after-init → nudge; never-mutated → codebook, keep.
Deliverables
AttentionMatrix.gestaltcorrectness (TD-UNBUNDLE-FROM-1);unbundle_fromalready deprecated on branchclaude/stoic-turing-M0Eiqndarray/crates/burncache audit (JIT-kernel cache = keep; runtime belief = nudge)SnapshotProvideradoption checklist + no-cross-cycle-lag falsification per nudged crate (reusescycle-coherent-soa-snapshot-v1)E-SINGLETON-IS-CODEBOOK-OR-SOARelationship to other plans
Ties together
bindspace-singleton-to-mailbox-soa-v1(BindSpace dissolution — referenced, not duplicated) andcycle-coherent-soa-snapshot-v1(the snapshot mechanism reused here). Anchored epiphanies: E-MAILBOX-IS-BINDSPACE, E-BATON-1, E-DEINTERLACE-TWO-SCALES.Board hygiene (same commit)
.claude/board/INTEGRATION_PLANS.mdprepend +.claude/board/STATUS_BOARD.mdrows.https://claude.ai/code/session_0147hSzjmWZDuy2MSQNrhEK5
Generated by Claude Code