Skip to content

feat(positron): serving glass box — the beat-WASTE control loop on screen (#141 slice 1) - #2076

Merged
joelteply merged 2 commits into
canaryfrom
feat/serving-glass-box-widget
Aug 1, 2026
Merged

feat(positron): serving glass box — the beat-WASTE control loop on screen (#141 slice 1)#2076
joelteply merged 2 commits into
canaryfrom
feat/serving-glass-box-widget

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Joel's greenlight: the pager campaign's telemetry becomes a live positron widget — the self-improving serving stack visible in the rail, run by run.

What renders

  • Header: model · ready/warming · lanes×ctx, degraded reason verbatim (from the daemon's own ServingSnapshot via current_serving() — zero new plumbing).
  • Pager sparklines: hit % / tok/s / fetch MB/s from the GGML_MOE_CAPTURE_FILE per-token JSONL the serving binary already appends (the comment literally says "Positron tails it" — this is that consumer).
  • Bandit arms: per-arm reward bars, chosen arm highlighted, labels from the leaf crate's DECAY_ARMS ladder.
  • Event cards: serve-start / decay-switch / residency-shift — the control loop's discrete moments as activity cards.

How (the proven spine, no new transport)

ServingViewState (kind="serving") in continuum-positron → positron_serving_source emitter (2s, cloned from the metrics-gauge shape, offset-tail with raw-length truncation detection + torn-tail guard) → StateEnvelope → SERVING_KIND seam → servingWidget() projection → <serving-panel> (light-DOM Lit) + TUI parity case. 4 view types vendored through the SDK barrels.

Honest-absence contract throughout: no capture feed → header-only serving-health widget; no snapshot → awaiting line; never a fabricated gauge.

Validation

  • New projector tests 3/3 (fold event-card rules; raw perf-only feed folds without fabricated arms; tailer truncation/torn-tail) + view kind test; crate suites green.
  • cargo check -p continuum-core --features metal,accelerate clean; vendor-views in sync.
  • Lint: zero new errors (61 pre-existing baseline untouched; my files clean). Typecheck clean except the pre-existing renderChat.spec.ts process error. Client tests 36/36.

Part of #141 (first slice) riding #282. Follow-ups named, not built: WatchPagerCaptureSink for the in-process ServingExpertPager feed (lands with the controller wiring), and positron_arena_source to light the client-complete arena leaderboard as the ratchet-trends companion.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

joelteply and others added 2 commits August 1, 2026 04:44
… ahead of decode (#282)

Joel's steer: predict which experts will be hot BEFORE the inference
needs them. Measured on the RUN-1 fixture, the strongest signal is not
a prediction at all — prefill routing IS the decode hot set, extracted
early: the prefill union covers 66% of every decode token's experts
(vs 58% for full decode recency), and the prefill TAIL alone covers
47% at a third of the size. Stability selectors lose badly ("in all
prefill batches" = 1.4%) — recency-of-context dominates even within
one prompt, the same law RUN-1/RUN-2 measured across prompts. The
cache-dynamics problem is the big prefill batches (8637 experts vs
~4416 slots) churning out decode-relevant experts before decode
starts — so the moment to act is the boundary.

- segment::PrefillBoundaryDetector — classifies the first decode-sized
  segment (size < 0.8× min seen) from segment sizes alone; fires once;
  decode-only serves never fire. Pinned against the fixture's exact
  sizes.
- Driver publishes the plan IMMEDIATELY at the boundary (bandit is
  already seeded by the prefill batches) instead of waiting
  rewrite_every decode tokens — the warm-start window opens at decode
  token 1.

Fixture replay verified live: boundary fires between the 3854 prefill
tail and the first 1472 decode token; published plan carries 256
tier-0 pins + default_tier for the cold tail. 16/16 tests, clippy
clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…reen (#141 slice 1)

Joel's greenlight ("Take it. We are sota now"): the pager campaign's live
telemetry becomes a positron widget on the proven metrics-gauge spine —
one new view kind, one projector, one Lit panel, no new transport.

Rust:
- ServingViewState (kind="serving") in continuum-positron: header folded
  from the daemon's ServingSnapshot (model/ready/lanes/ctx/degraded — the
  process's own truth via current_serving(), zero new plumbing), pager
  series reusing MetricSeriesView (hit % / tok/s / fetch MB/s), bandit
  arm beliefs, and event cards for the discrete control-loop moments.
- positron_serving_source: 2s emitter cloned from the metrics-gauge
  shape; tails the GGML_MOE_CAPTURE_FILE JSONL the serving binary
  already appends ("Positron tails it" — the only live feed today),
  offset-tail with raw-length truncation detection (consumed-offset
  alone misses a new serve that outgrows it — pinned by test), torn-tail
  guard, PagerCaptureEvent's serde(default)s decoding both the raw C++
  perf feed and the future Rust decision feed. Event cards: serve-start,
  decay-switch, residency-shift (>1/8 jump). Arms labeled from the leaf
  crate's DECAY_ARMS ladder — data-driven, never invented.
- Honest absence throughout: no capture env → header-only serving-health
  widget; no snapshot → awaiting line; never a fabricated gauge.

TypeScript (the SysPanel spine end to end):
- ServingPanelView in patterns; SERVING_KIND seam; servingWidget()
  projection + WorkspaceLive.serving + left-rail stack slot;
  <serving-panel> light-DOM Lit renderer (header line, renderGaugeBody
  sparklines, arm chips with reward bars, newest-first event cards);
  registry + host subscribe + ChatWidget property; TUI parity case;
  4 view types vendored through the SDK barrels.

Validation: 3/3 new projector tests + view kind test green; crate suites
green; vendor-views in sync; typecheck clean except the pre-existing
renderChat.spec process error; lint adds ZERO errors (baseline 61
pre-existing, my files clean); client test suites 36/36.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply enabled auto-merge (squash) August 1, 2026 10:00
@joelteply
joelteply merged commit 3748966 into canary Aug 1, 2026
@joelteply
joelteply deleted the feat/serving-glass-box-widget branch August 1, 2026 10:00
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