Repository navigation
feat(capacity): PagerCaptureEvent — pager control-loop capture contract (#276 slice 1) - #2064
Merged
Merged
Conversation
…n capture contract (#276 slice 1) The schema from BigMama's EXPERT-PAGING-CONTROL-LAW doc, landed verbatim as the Rust source of truth with ts-rs generating the Positron binding (shared/generated/pager/PagerCaptureEvent.ts + barrels). One event per decode token: performance signals (hit_rate, fault_wait_ms, tok_per_s, bytes_fetched_mb, fetch_mb_s, quality, composite reward) + decision state (chosen_decay, per_arm_reward, resident_experts, tier_counts, promotions/demotions, preference_w). PagerCaptureSink trait with Noop default — zero hot-path cost until a sink is installed (OBSERVABILITY-AS-SUBSTRATE doctrine); the JSONL drain reuses probe_file_sink facilities when wired (next slice, with the ServingExpertPager emission). Tests pin the CROSS-NODE contract: the JSONL wire shape is what BigMama's C++ emitter feeds and her capture slices must decode field-for-field (literal field-name assertions catch serde renames that round-trip locally but break her feed), plus forward tolerance for unknown fields (version skew across nodes is normal mesh weather). Field semantics already validated live: fetch_mb_s caught the 385→2458 MB/s pressure-relief jump, resident_experts pinned the 4416 working set, reward is the surface the rung-2 bandit climbs. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
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.
First slice of #276 (BigMama's pager v2 tools behind the TierPolicy seam), unblocked while her prototype sources are in transit: the capture contract both nodes bind to.
capacity/pager_capture.rs:PagerCaptureEventlanded verbatim fromEXPERT-PAGING-CONTROL-LAW.md§ CaptureEvent — one frame per decode token, performance signals + bandit decision state. Rust is the single source of truth; ts-rs generatesshared/generated/pager/PagerCaptureEvent.ts(barrels regenerated viatools/generator/generate-rust-bindings.ts).PagerCaptureSinktrait + Noop default (zero hot-path cost until a sink is installed). JSONL drain reusesprobe_file_sinkfacilities in the next slice with theServingExpertPageremission.Schema fields already validated live on the fitted-K3 run tonight (fetch_mb_s caught 385→2458 MB/s; resident_experts pinned the 4416 working set; 0.33 tok/s warm matching WASTE 0.32 at rung-1).
🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo