Skip to content

fix(serving): the boot geometry is the SETTLED one, not the spawned one — the store is written when a launch outlives its spawn cooldown, never at spawn - #4227

Merged
joelteply merged 1 commit into
canaryfrom
fix/the-boot-geometry-is-the-settled-one-not-the-spawned-one
Sep 19, 2026
Merged

joelteply merged 1 commit into
canaryfrom
fix/the-boot-geometry-is-the-settled-one-not-the-spawned-one

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Measured 2026-09-19 on the M5: the 12:19Z Eco-band relaunch spawned --parallel 1; the
spawn wrote lanes: 1 to served-window.json; plan_serving caps a cold boot's lanes to
the remembered count (#4207, so an 8-lane boot cannot OOM again), so every boot after
(13:2xZ on 2d55932, 13:36Z on 97f480e) planned min(fit, 1) = one lane on a box whose
fit at the header rate holds two. A shrink-only ratchet across boots: the smallest lane
count any transient ever spawned became the ceiling forever.

The boot probe already says what it means: "the first launch is the steady one". Make it
true: settles_this_tick(cooling, ready, lanes) — the tick the spawn cooldown reaches
zero with the lane serving — is the one that writes the store (serving.geometry.settled
probe); the spawn no longer writes it. A launch re-homed inside its cooldown leaves no
mark; the last settled geometry stands for the next boot. The sticky window and the
typical-prompt half of the record are untouched. Card 1c0b60a9 (term 3).

Test plan

  • CI: cargo test -p continuum-core --lib serving_daemon (new: only_the_tick_a_launch_settles_on_remembers_its_geometry)
  • Live on the M5: after a launch that settles at 2+ lanes, serving.geometry.settled fires once with that count and served-window.json shows it; a relaunch re-homed inside its cooldown leaves the file unchanged; the next cold boot plans the settled count.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

…ne — the served-window store is written on the tick a launch outlives its spawn cooldown, never at spawn

Measured 2026-09-19 on the M5: the 12:19Z Eco-band relaunch spawned `--parallel 1`; the
spawn wrote `lanes: 1` to `served-window.json`; `plan_serving` caps a cold boot's lanes to
the remembered count (#4207, so an 8-lane boot cannot OOM again), so every boot after
(13:2xZ on 2d55932, 13:36Z on 97f480e) planned `min(fit, 1)` = one lane on a box whose
fit at the header rate holds two. A shrink-only ratchet across boots: the smallest lane
count any transient ever spawned became the ceiling forever.

The boot probe already says what it means: "the first launch is the steady one". Make it
true: `settles_this_tick(cooling, ready, lanes)` — the tick the spawn cooldown reaches
zero with the lane serving — is the one that writes the store (`serving.geometry.settled`
probe); the spawn no longer writes it. A launch re-homed inside its cooldown leaves no
mark; the last settled geometry stands for the next boot. The sticky window and the
typical-prompt half of the record are untouched. Card 1c0b60a9 (term 3).

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 90b1549; merge on green.

Checked: the spawn-time served_window_store::save is gone and the only write is on the tick cooling goes 1 → 0 with the lane ready and lanes > 0 — settles_this_tick is pure and its six arms cover spawn tick / still cooling / already settled / not ready / no lanes / the one true tick, so a re-home before the cooldown ends leaves the last SETTLED geometry standing. That is exactly what the M5's 12:19Z one-lane Eco relaunch violated (it wrote lanes:1 at spawn and every boot since planned min(fit, 1)), and it is also why IntelMac's deploys 12 and 13 both booted at 1 lane and replanned to 2 a tick later — a spawn geometry remembered as a steady one. Cooling decrements one per tick, so the == 1 edge is reachable, not a coincidence.

Receipt on the M5: the next boot after a settled 2- or 3-lane serve plans that geometry first (serving.plan at boot with lanes ≥ 2), and no serving.geometry.settled row for a lane that was re-homed inside its cooldown.

@joelteply
joelteply enabled auto-merge (squash) September 19, 2026 14:16
@joelteply
joelteply merged commit 5b82e10 into canary Sep 19, 2026
6 checks passed
@joelteply
joelteply deleted the fix/the-boot-geometry-is-the-settled-one-not-the-spawned-one branch September 19, 2026 14:25
joelteply added a commit that referenced this pull request Sep 19, 2026
…budget; a roster short of warm slots is re-home evidence (the M5 could never reach two lanes) (#4230)

* fix(serving): one headroom, not three — the plan sizes to the budget the mode hands it; and a roster short of warm slots is re-home evidence whatever the token-space says (the M5 could never reach two lanes)

Measured 2026-09-19 15:4xZ on the M5 (64 GB, Comfort) on 1d994a7, right after #4226
landed the header KV rate (per_token_estimate 32,768): the board hands serving a 37 GB
budget after 18.7 GB of other holders; the plan then kept 0.80 (the mode) × 0.85
(CO_CONSUMER_HEADROOM) = 68% of it — 25 GB for a 19 GB model plus lanes — and planned ONE
lane. Physically 2 × 67,340 lanes are 27.4 GB, inside the 37 GB budget with 26% to spare.

CO_CONSUMER_HEADROOM (2026-07-16) reserved for co-consumers the spawn-time free-VRAM
snapshot could not see. Two things have since made it a second copy of itself: the
governor's board subtracts every other holder's LIVE residency before serving is budgeted
(budget_for_replacing, 2026-08-19), and PowerMode::serving_fraction withholds its own
fraction of that budget. The mode IS the headroom policy, one place. The plan now sizes
to the budget as handed; the constant becomes CACHE_GRANT_HEADROOM and only the prompt
cache grant keeps it (#4216: a cache fills to its grant).

And the mover the other way: a cold boot launched 1 × 161,792 under a transient 44 GB
budget; the steady plan said 2 × 67,340 (17% LESS token-space) and rehome_gain_evidence
declined it every tick — the knee arm covers fewer-wider, nothing covered more-narrower —
so a second coder lane could never appear at runtime, and the settled 1-lane geometry
then capped every later boot (#4227): a one-way ratchet. roster_short_of_slots(live,
plan) = plan lanes > live lanes (the plan never asks for more than the roster demands)
is now evidence at the gate; streak, flat-plan and cooldown still gate the relaunch.

Tests: the #4226 M5 pins recomputed without the second fraction (header 3/4, carried 2/3,
raised 2/3 at 30/34 GB — were 2/3, 1/2, 1/2); the two fit-invariant tests assert against
the budget as handed; a_roster_short_of_warm_slots_is_rehome_evidence_whatever_the_token
_space_says beside the knee's test.

Receipt on the M5: serving.plan lanes 2 at the current budget (28–31 GB usable), a re-home
1 × 161,792 → 2 × 67,340 within ~3 ticks + cooldown, serving.geometry.settled with lanes 2,
and the next [health] line with 2 lanes @ 67k.

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

* fix(serving): no production budget hands the plan 1.0 — Performance keeps the serving process's own overhead (BigMama's condition), and the five pins measured under the old 15% reserve keep their budgets

The plan's only headroom is now the mode's fraction, and Performance was 1.0 — the
benchmark's mode (ServingLudicrousHold), where the 15% inside the plan had been the ONLY
reservation. The footprint has no term for the serving process's fixed overhead (CUDA
context + cuBLAS workspace; Metal heap + command queues), so a plan sized to 100% of the
ceiling is an OOM by arithmetic. Performance.serving_fraction() = 0.96 (measured for scale
on the 5090: 2.3 GB of slack on a 32.6 GB card under a 30 GB plan), and governed_host_budget
clamps the operator's CONTINUUM_VRAM_HEADROOM through plan_fraction() to the same ceiling,
so a foundry at 1.0 still keeps it. Tests: the monotonic-fraction test asserts < 1.0 and
≥ 0.95; a_foundry_headroom_of_one_still_keeps_the_process_overhead.

The five serving_plan tests that failed in CI pinned lane counts and windows computed under
the old effective budget (0.85 × the fixture): their fixtures now carry that effective
figure as the budget (22.1 GB for the 26 GB cases, 51.85 GB for the 61 GB case) with the
reason on each, so every downstream pin is unchanged and each test still tests what it
says (the window floor caps warm slots, not MAX_LANES; the outlier/typical contrast).

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

* docs(serving): the Performance fraction is 0.96 in the two comments that said 1.0

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

---------

Co-authored-by: Claude Fable 5.1 <[email protected]>
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