Repository navigation
Conversation
…at the served window — not every seed on disk at its unclamped peak (the M5's 27 GB grant that filled the box, card 7b01ed65) Measured 2026-09-20 on the M5: the grant's want was Σ peak_tokens × kv over every seeded mind (23 × 225k–505k tokens — the whole assembled context, not what a turn sends), i.e. hundreds of GB, so every affordability guard only carved the afford and the grant was ALWAYS "everything the box can spare": 14,396 MiB at 2 lanes, 26,806 MiB for a 1 × 2,048 lane at boot, 26,985 MiB on the fresh engine after the fix deploy. The cache filled to it, raw available fell under the Eco line, the plan shed a lane, and both deploys of the morning went dark with no room for a warm build, each reaping the lane (b57b19fd). Joel: "Measurement seems dumb or out of sync, too hacky and unstable." The law, pure and tested (`active_cache_states`): one state per ACTIVE mind — the roster bound the spawner already enforces (`bounded_by_warm_slots`: lanes × MINDS_PER_LANE_STARVED_ABOVE) — each the largest prompt that mind actually SENT (`sent_peak`; the unclamped peak only when nothing was ever sent), never more than the served window (a cached state cannot exceed the slot it was prefilled in); the largest states are kept; an unknown bound (no lanes yet) keeps the population. On the M5's shape that is four states ≤ 67k at 32.9 KB/token ≈ 5.7 GB, not 27 GB. The affordability guards (OS floor, available, Eco exit band, CACHE_GRANT_HEADROOM) stay as the net; they are no longer the whole decision. The receipt (`serving.prompt_cache.derived`) now carries `population` and `active_bound` beside `citizens`. Test: `the_cache_holds_the_active_rosters_states_not_every_seed_on_disk` — 23 seeds on 2 lanes → 4 states ≤ window, the never-sent mind clamped, the want under 8 GiB, and through `prompt_cache_decision` a demand-sized grant (< 9,000 MiB) below the afford. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
APPROVE with one small condition — reviewed at exact head c0fef34 (checks running at read time). The law is right and it is the same law as #4244/#4245 applied to the cache: the states the cache must hold are the ACTIVE roster's, one per mind, each what she actually sent ( The condition, in |
…, never the whole population (Cormac's condition on #4253) Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
APPROVE — reviewed at exact head fe17190. The condition is taken exactly: unknown keeps the floor, never everything, and the assertion now pins that direction. Merge on green. |
What broke
The grant's
wantwas Σpeak_tokens × kvover every seeded mind (23 × 225k–505k tokens — the whole assembled context, not what a turn sends): hundreds of GB. So every affordability guard only carved the afford, and the grant was always "everything the box can spare": 14,396 MiB at 2 lanes, 26,806 MiB for a 1 × 2,048 lane at boot, 26,985 MiB on the fresh engine after #4251 deployed. The cache filled to it, raw available fell under the Eco line, the plan shed a lane, and both deploys this morning went dark (no room for a warm build), each reaping the lane (#4252 / b57b19fd).The law (pure, tested):
active_cache_states(population, served_ctx, active)bounded_by_warm_slots: lanes ×MINDS_PER_LANE_STARVED_ABOVE); a mind beyond it is dormant and re-prefills when a slot wakes it;sent_peak; the unclamped peak only when nothing was ever sent), never more than the served window (a cached state cannot exceed the slot it was prefilled in);On the M5's shape: four states ≤ 67k at 32.9 KB/token ≈ 5.7 GB, not 27 GB. The affordability guards (OS floor, available, Eco exit band,
CACHE_GRANT_HEADROOM) stay as the net — they are no longer the whole decision. The receiptserving.prompt_cache.derivedcarriespopulationandactive_boundbesidecitizens.Test
the_cache_holds_the_active_rosters_states_not_every_seed_on_disk: 23 seeds on 2 lanes → 4 states ≤ window, the never-sent mind's peak clamped to the window and kept as the largest, the want under 8 GiB, and throughprompt_cache_decisiona demand-sized grant (< 9,000 MiB) below the afford.What this makes true without anyone watching
plan + grant + floorfits the box because the grant is bounded by what the active minds can actually cache, so a full cache cannot walk the box into Eco, and a deploy finds room for a warm build beside the serving core (the tracker's "no warm build: 0.0 GiB free" line is the receipt that should stop appearing).🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo