Skip to content

fix(serving): a measurement gap resets the decode knee's trust, never its evidence - #4269

Merged
joelteply merged 2 commits into
canaryfrom
fix/a-gap-resets-trust-never-the-evidence
Sep 20, 2026
Merged

joelteply merged 2 commits into
canaryfrom
fix/a-gap-resets-trust-never-the-evidence

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

What happened (the M5, 17:16Z boot today)

serving.decode_knee.clamped knee=17 for the 27B — no knee — on a box whose record held a 35-sample 2-lane point at 6.25 t/s. observe() zeroed that point's samples because more than an hour had passed since its last sample (the afternoon's builds skipped every decode as a deploy transient), and the first sample after the gap — 3.3 t/s, taken during the swap-heavy 8-lane hour — restarted it at 1 sample. Untrusted → knee None → the roster's 17 minds unclamped → a 6-lane × 5.5k plan → 12 minds drawn → the engine at 4 lanes. The same evidence, on disk, would have said 2.

Fix

CurvePoint.fresh_samples (serde default 0) is what fresh trust is built from and what a gap resets. samples and tps_ema are the point's lifetime evidence and stand as the stale answer meanwhile; the first post-gap sample moves the EMA by half (GAP_ALPHA), not all the way. A gap resets trust, never the evidence.

Pinned

a_gap_resets_trust_never_the_evidence: a 35-sample point survives a two-hour gap and one bad sample (36 samples, 1 fresh, EMA 4.78, knee still 2), re-earns trust after MIN_SAMPLES fresh samples; a pre-field record loads as stale evidence, not fresh trust.

Related

#4266 (merged) covers the case where the remembered model has NO curve; this covers the curve being wiped by its own reset. Follow-up card: own_transient skips every decode sample for the whole length of a tracker build (30+ min on a merge day), which is how the gap formed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

joelteply and others added 2 commits September 20, 2026 12:01
… its evidence

The M5, 2026-09-20 17:16Z boot: serving.decode_knee.clamped knee=17 for the 27B — no knee
— on a box whose record held a 35-sample 2-lane point at 6.25 t/s. observe() zeroed that
point's samples because more than an hour had passed since its last sample (the afternoon's
builds had skipped every decode as a deploy transient), and the first sample after the gap
(3.3 t/s, taken in the swap-heavy 8-lane hour) restarted it at 1 sample: untrusted, knee
None, the roster's 17 minds unclamped, a 6-lane 5.5k plan, 12 minds drawn, the engine at 4
lanes. CurvePoint.fresh_samples (serde default 0) is what trust is built from and what a
gap resets; samples and the rate stand as stale evidence, the first post-gap sample moves
the EMA by half. Pinned: the 35-sample point survives a two-hour gap and one bad sample,
still answers 2, and re-earns trust after MIN_SAMPLES fresh samples.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply

Copy link
Copy Markdown
Contributor Author

APPROVE — reviewed at exact head 68e8c0b (lib test and windows check running at read time).

The gap law is right and it is the mirror rule applied where it was missing: the old samples = 0 on a stale point threw away the evidence AND the trust in one move, so one transient sample after an hour's gap left the point at 1 — untrusted for the trusted branch, and below MIN_SAMPLES for the stale branch too, which is why knee() answered None and the plan went unclamped. Now fresh_samples is what trust is built from and samples is the lifetime evidence the stale branch reads (p.samples >= MIN_SAMPLES && tps_ema > 0), so a gap can only move the answer from "trusted" to "stale, still answers", never to nothing. GAP_ALPHA at half is a bounded first step that names its reason; #[serde(default)] makes every record on disk today a "stale evidence, earn trust" point, which the test pins. The scenario is the M5's own afternoon and it is pinned at both ends (stale answers before the gap sample, still answers after, trust rebuilt at MIN_SAMPLES).

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