Skip to content

feat(capacity): BanditPlanController — observations → bandit → hot-routed pins → plan file (#276 final glue) - #2070

Merged
joelteply merged 1 commit into
canaryfrom
feat/bandit-plan-controller
Aug 1, 2026
Merged

joelteply merged 1 commit into
canaryfrom
feat/bandit-plan-controller

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

The last #276 slice: BanditPlanController closes observations → DecayBandit → top-N hot routed pins (real (layer,expert) coordinates, packed losslessly through the bandit's opaque scoreboards) → the atomic GGML_MOE_PLAN_FILE document her ResidencyCache consumer (f44ba7848) polls. Shexp stays out by design (trunk-resident, pinning is a no-op — the correction from her null run). Capture projections (chosen_decay, per_arm_reward, serving hit) exposed for PagerCaptureEvent.

3 tests: lossless identity round-trip, hot-set-over-noise pin surfacing with deterministic order, end-to-end observe→write→parse.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

… hot-routed pins -> plan file (#276 final glue)

Closes the rung-2 policy loop: fold per-token routed-expert activations
into the bandit (ExpertId packed losslessly layer<<32|expert — hashed
uids never reach the wire), emit the chosen arm's top-N as REAL
(layer,expert) pins in deterministic order, publish atomically through
the GGML_MOE_PLAN_FILE writer her ResidencyCache consumer polls.

Post-null-run model correction encoded: shexp tensors are
trunk-resident and never appear here — pins are hot ROUTED experts
only, sized as a meaningful cache fraction.

Tests: lossless pack/unpack across the u32 range (wrong-expert pins
with green bandit tests is the failure this kills), hot-set surfacing
over one-shot noise with deterministic ordering, and the end-to-end
observe -> write -> on-disk document her consumer parses.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply merged commit 18235c9 into canary Aug 1, 2026
4 checks passed
@joelteply
joelteply deleted the feat/bandit-plan-controller branch August 1, 2026 05:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant