feat(serving): daemon-integrated pin actuator — trace tail → bandit → pins on the GOVERNED plan (#281) - #2119
Merged
Conversation
joelteply
force-pushed
the
feat/281-pin-actuator-daemon-wire
branch
from
August 2, 2026 19:29
ca1b259 to
327bd1c
Compare
… pins on the GOVERNED plan (#281) The rung-3 actuator leaves the standalone driver and becomes autonomic: the serving daemon now tails the fork's routed-expert trace (GGML_MOE_TRACE_FILE, spawned per-port beside capture/plan — system-owned, zero operator env) and carries the bandit's hot pin list on the SAME governed plan file the host-cache lease publishes. One writer, one plan, policy and budget on one document. - expert-pager-policy: TkeyTable::for_layers(n_layers) SYNTHESIZES the tkey→layer map from geometry via the fork's exact FNV-1a (canonical_name_key) — no operator JSON step. Hash parity pinned against a key from her REAL table (blk.5.ffn_up_exps.weight → 16542725649459479844, independently recomputed). - capacity/trace_tail.rs (NEW): MoeTraceTail — offset-resumed, truncation-reset (new serve = fresh state), bounded 4 MiB drains with record-aligned skip-ahead on backlog (recency is the signal), prefill→decode boundary → immediate warm-start publish, and the last-published-pins memory that gates write churn. - serving_daemon: publish_moe_host_cache_lease reworked to two axes — sticky band governs the BUDGET value; pins roll independently. Writes happen when either axis moves (or at the boundary), never otherwise: the no-mtime-churn property moved from the band to the write decision. Pin count is retention-derived (pin_ceiling: at most HALF the lease's worth of experts — the recency window keeps the rest), so an under-retention lease publishes budget-only (v1 wire shape, her validated parse). Probe now carries pins/trace_tokens/warm_start. Anti-fossil by construction: pins re-derive from the decay bandit every publish — a static pin set cannot fossilize (the RUN-1 lesson measured in [[routed-expert-hotness-is-prompt-dependent-static-pins-hurt]]). Tests: 4 new in trace_tail (each pinning a named invariant), 1 new hash parity in segment.rs; expert-pager-policy 18/18; serving_daemon + host_cache_lease + llama_server suites 56/56. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply
force-pushed
the
feat/281-pin-actuator-daemon-wire
branch
from
August 2, 2026 19:45
327bd1c to
ebdd917
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The rung-3 actuator leaves the standalone
moe-pager-driverbin and becomes autonomic: the serving daemon tails the fork's routed-expert trace and carries the bandit's hot pin list on the SAME governed plan file the host-cache lease publishes. One writer, one plan — policy and budget on one document, consumed by herResidencyCache's per-token mtime poll.What
GGML_MOE_TRACE_FILEper port beside capture/plan (moe_glass_box_paths), andTkeyTable::for_layers(n_layers)SYNTHESIZES the tkey→layer map from geometry via the fork's exact FNV-1a — no operator JSON step. Hash parity pinned against a key from her REALtkey-to-layer-matrix.json(blk.5.ffn_up_exps.weight→16542725649459479844, independently recomputed).capacity/trace_tail.rs(new):MoeTraceTail— offset-resumed, truncation-reset (fork reopens"wb"per serve), bounded 4 MiB drains with record-aligned skip-ahead on backlog, prefill→decode boundary detection → immediate warm-start publish (prefill's tail predicts ~47–66% of decode experts), and last-published-pins memory.publish_moe_host_cache_lease: the sticky band governs the BUDGET value; pins roll independently. A write happens when either axis moves (or at the boundary), never otherwise — the no-mtime-churn property moved from the band to the write decision.pin_ceiling= at most HALF the lease's worth of experts (the recency window keeps the rest); an under-retention lease publishes budget-only — exactly the v1 wire shape her parse was validated against.serving.moe_host_cache_leasenow carriespins/trace_tokens/warm_start.Anti-fossil by construction
Pins re-derive from the decay bandit every publish — a static pin set cannot fossilize (the RUN-1 lesson: routed-expert hotness is prompt-dependent; static pins hurt).
Tests
4 new in
trace_tail+ 1 hash-parity insegment.rs, each with// what this catches:. expert-pager-policy 18/18; serving_daemon + host_cache_lease + llama_server suites 56/56.Note: the ts-rs drift guard is red on canary (pre-existing) — fix is PR #2118; this branch will go green once that merges.
🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo