Repository navigation
fix(serving): the decode knee is persisted on cadence, not only when it moves — a steady lane's points aged 81 min on disk and the next boot planned unclamped - #4159
Conversation
…it moves — a steady lane's points aged 81 min on disk and the next boot planned unclamped Measured 2026-09-17 on the M5: decode-knee.json's Ornith points at 1/2/3 lanes were stamped ~07:55Z while the lane served 144 acts/hour until the 09:16Z boot; the boot loaded them 81 minutes old (> FRESH_MS = 60 min), knee() returned None, and the plan came up at the roster's demand — 8 lanes for a knee of 4 (8 × 51,712 live, decode 7 t/s class). No sample was skipped in that window; `save_all` simply ran only when the knee MOVED, so an hour of steady samples kept the in-process curve fresh and the file stale. The file is what the next boot loads, and a point is only as fresh as its last write. Now a sample persists on a knee move (as before) and otherwise once per SAVE_EVERY_MS (60 s) while samples flow — `persists(moved, last_save, now)` is the rule, pinned by `a_steady_knee_still_refreshes_the_file_on_cadence`. Card 27ae209f. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
Reviewed at
This is change-plus-bounded-interval, and it generalises past signals. The same rule came up tonight for EMISSION — a probe change-gated on a value that never moves goes mute, so it needs a bounded heartbeat. This is the PERSISTENCE twin: gate the write on change alone and an unchanging value is never written, so the steadier the measurement the staler its record. Worth a line in the card body, because the next person writing a save-on-change has no reason to connect it to a probe that goes silent. The one thing I would add: pin
|
…r lanes is evidence whatever the token-space says; the knee only ever applied at boot (#4160) Measured 2026-09-17 on the M5: the knee read 7, then walked toward 4, while the live lane stayed at 8 × 51,712 with 7.9 t/s per stream. The reconcile's re-home evidence is token-space (window × lanes) and a plan that trades lanes for width is a wash (+14% for 7 × 67,340) or a loss (4 × 67,340) — so every tick declined on the margin and the knee clamp, computed correctly into the plan, never reached the lane. Only a reboot applied it, and the boot has its own bug (#4159: the file went stale) — the whole knee mechanism was serving-side inert. `lane_over_its_knee(live_window, live_lanes, plan_window, plan_lanes)`: plan lanes fewer than live AND plan window at least as wide = the knee clamping the roster; it counts as re-home evidence beside the space margin. Fewer-and-narrower stays a pressure shrink (not this arm); same or more lanes still need the margin. The sustain streak (3 ticks) and the cooldown still gate the relaunch; the declined probe carries `over_knee`. Card 27ae209f. Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
What broke
The M5's
decode-knee.jsonheld Ornith points at 1/2/3 lanes stamped ~07:55Z while the lane served 144 acts/hour until the 09:16Z boot. The boot loaded them 81 min old (>FRESH_MS60 min) →knee()None → the plan came up at the roster's demand: 8 lanes for a knee of 4 (live 8 × 51,712 vs plan 3–4 × 67k). No sample was skipped in that window (thesample_skippedrows are only the boot window and the deploy claim's 10 minutes around 09:17–09:26);save_allran only when the knee MOVED, so an hour of steady samples kept the in-process curve fresh and the file stale.Fix
persists(moved, last_save_ms, now): a move writes at once; otherwise the file is refreshed once perSAVE_EVERY_MS(60 s) while samples flow. The file is what the next boot loads, and a point is only as fresh as its last write.Test
a_steady_knee_still_refreshes_the_file_on_cadence— decode_knee mod 4/4 (metal,accelerate).Acceptance
After a deploy,
~/.continuum/state/decode-knee.jsonpoints carrylast_mswithin ~60 s of the last generation; a boot ≥ 10 min after steady serving comes up withserving.decode_knee.clamped clamped=truewhen the roster exceeds the knee.Card 27ae209f.
🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo