Skip to content

fix(serving): the pressure mode holds through a flapping memory read — Eco is left only past a 12 GiB exit band, so the plan stops flipping 6 ↔ 7 lanes once a minute - #4163

Merged
joelteply merged 1 commit into
canaryfrom
fix/the-serving-mode-holds-through-a-flapping-memory-read
Sep 17, 2026
Merged

joelteply merged 1 commit into
canaryfrom
fix/the-serving-mode-holds-through-a-flapping-memory-read

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

What broke

09:47–10:10Z on the M5 (swap 94–96%): macOS's "available" wandered across the single 8 GiB line once a minute → mode Eco ↔ Comfort → usable_gb 20 ↔ 30 → the plan 6 ↔ 7 lanes, warm-slot-oversubscribed every other tick. Every flip reset the reconcile's sustain streak (a growing plan is "not settled"), so no re-home could fire — the lane stayed at 8 × 51,712 whatever the plan said. This is the third leg under card 27ae209f (with #4159 file freshness and #4160 over-knee evidence).

Fix

serving_mode_for_pressure_from(available, previous): from Eco, stay until available clears ECO_EXIT_BYTES (12 GiB); otherwise Eco below ECO_ENTER_BYTES (8 GiB), Comfort above. The daemon keeps the previous pressure mode as the hysteresis state (a ludicrous override is not pressure history) and emits serving.mode.transition on a change. The plain serving_mode_for_pressure keeps its line for callers without history.

Test

the_serving_mode_holds_through_a_flapping_read — model_catalog 9/9; serving_daemon tests green.

Acceptance

serving.plan rows stop alternating lanes minute to minute; serving.mode.transition fires only on a real pressure move; the reconcile's streak reaches 3 and re-homing fires.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

…— Eco is left only past a 12 GiB exit band, so the plan stops flipping 6 ↔ 7 lanes once a minute

Measured 2026-09-17 09:47–10:10Z on the M5 (swap 94–96%): macOS's "available" wandered
across the single 8 GiB line once a minute → serving mode Eco ↔ Comfort → usable_gb 20 ↔ 30
→ the plan 6 ↔ 7 lanes with `warm-slot-oversubscribed` every other tick. Every flip reset
the reconcile's sustain streak (a plan that grows is "not settled"), so no re-home could
ever fire — the lane stayed at 8 × 51,712 whatever the plan said.

`serving_mode_for_pressure_from(available, previous)`: from Eco, stay until available
clears ECO_EXIT_BYTES (12 GiB); otherwise Eco below ECO_ENTER_BYTES (8 GiB), Comfort
above. The daemon keeps the previous PRESSURE mode as the hysteresis state (a ludicrous
override is not pressure history) and emits `serving.mode.transition` on a change.
Pinned by `the_serving_mode_holds_through_a_flapping_read`.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply merged commit 4aaa26d into canary Sep 17, 2026
5 checks passed
@joelteply
joelteply deleted the fix/the-serving-mode-holds-through-a-flapping-memory-read branch September 17, 2026 11:08
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