Repository navigation
A relaunch sizes the engine pool from the seated minds held needs, and may grow back to its proven pool (P0, card 9ffcb1b5) - #5835
Merged
Conversation
… and a relaunch below its proven pool may grow back (M5 2026-11-07 16:14Z: 5 x 35,328 lanes vs 50-70k needs, 45 min of zero acts; card 9ffcb1b5)
The engine aborted; its own bytes read 0, so the plan's budget was a gap reading (usable 0) and
launch_pool fell to the plan's window x 2 lanes: 176,640 split over 5 sequences = 35,328 each,
while the five minds held 44-70k. Their needs had survived the abort (the working set); only the
launch ignored them, and the one-growth-per-model rule then held the bad pool for 45 minutes.
- launch_pool takes Seated { need, proven }: the pool is at least the sum of the seated minds'
HELD needs (each capped at the trained window; a wish is a target with headroom, never a need),
capped by the larger of the live fit and, only while the budget is a gap reading, the largest
pool this model ran at in this core run. A steady budget's fit stays the authority.
- The daemon records that largest pool per model when the engine reports its pool.
- pool_growth: a running pool below that proven pool is a recovery, not a chain, so the one-try
record does not hold it.
- Tests: the 16:14Z relaunch reproduced (176,640 without the floor, every capped need held with it,
never above the proven pool, nothing floored before a proven run, steady fit unchanged), and the
recovery rule. The dyno test's unused `use super::*` goes with the edit.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
joelteply
added a commit
that referenced
this pull request
Nov 7, 2026
…ent, so the reconcile no longer deadlocks and the core boots (#5837) #5835's engine_pool read planned_budget.lock() inside launch_pool's argument list, where the guard lives to the end of the statement, while seated_for (also an argument) locked it again; parking_lot is not reentrant, so the reconcile hung, no module past grid-capacity initialized, and the core never bound its IPC socket (the M5, 2026-11-07 19:11Z; boot wedged 300 s, restart loop). Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo Co-authored-by: Claude Opus 5.5 <[email protected]>
This was referenced Nov 7, 2026
joelteply
added a commit
that referenced
this pull request
Nov 7, 2026
…(regression for the M5 boot wedge, #5835 -> #5837) (#5839) * The engine pool never relocks its budget: each lock is its own statement, so the reconcile no longer deadlocks and the core boots #5835's engine_pool read planned_budget.lock() inside launch_pool's argument list, where the guard lives to the end of the statement, while seated_for (also an argument) locked it again; parking_lot is not reentrant, so the reconcile hung, no module past grid-capacity initialized, and the core never bound its IPC socket (the M5, 2026-11-07 19:11Z; boot wedged 300 s, restart loop). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * test: engine_pool returns on a real daemon with a planned budget set (regression for the M5 boot wedge, #5835 -> #5837) #5835 held a planned_budget guard as a temporary in launch_pool's argument list while seated_for, another argument, locked the same non-reentrant mutex: the serving reconcile deadlocked and the core never bound its socket (the M5, 2026-11-07 19:08Z). Its tests covered only launch_pool as a pure function. This one calls engine_pool on a real ServingDaemonModule with a planned budget set, under both credit facts, on a thread with a 10 s deadline, so a deadlock fails in seconds instead of wedging a node. Mutation-proved: with the guard back in the argument list the test fails at its deadline (11.34 s); with #5837's separate statements it passes (one_launch 5/5). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
This was referenced Nov 7, 2026
joelteply
added a commit
that referenced
this pull request
Nov 7, 2026
…e engine and KV plan it ran on (card 8a983e31, slice 1) (#5846) The largest pool each model ran HEALTHY at floors a relaunch from a gap reading (#5835). It was a map in the serving daemon's memory keyed by model alone, so a core restart onto a dead engine found it empty (Fable on #5835), and a pool proven under one engine build or KV layout stood for another (#5838 pattern 3). Now it is continuum-engine's ProvenPools kind on the one saved-state contract (state/proven-pools.json, Rebuildable): - Contract = PoolContract { engine build (the slot stamp), cache_type, flash_attn, backend } from their typed owners (engine_slots, kv_cache_plan::resolve), never argv text; - recorded under the RUNNING engine's build (PoolContract::running), read under the build the NEXT launch uses (PoolContract::live), so an engine installed since a proof inherits nothing; - a changed contract loads Diverged and the node proves from nothing; growing toward the old proof as an upward trial waits on the trunk returning the stored value (Fable's card 18184d0b). The daemon's last_healthy_pool map and its three uses (launch.rs record + seated_for, pool_growth.rs) move to proven_pool::{observe, proven}. Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Card 9ffcb1b5 (P0). How this serves the minds: after an engine exit, every resident gets a lane that holds what she actually needs, instead of being refused for capacity until a core restart. Path step 1 (Fast) and goal 9 (one scheduler): the pool follows measured need, never a floor.
The incident (the M5, 2026-11-07, Fable's digest 4786182c)
The in-engine trainer aborted
llama-serverat 16:13:58Z (fork #99, now merged and pinned by #5834). The relaunch sized 5 lanes × 35,328 (allocated_tokens176,640) while the minds needed 50-70k, so every mind was capacity-refused from 16:15 to 16:59Z: 45 minutes of zero acts. No pool-growth line appeared in that window.Cause (code trace on canary 9528422)
ToApply, andplanning.rs:145stored that gap reading (usable 0) as the launch budget.launch_pool= max(plan window × plan lanes, fit within that budget). With a 0 budget the fit is 0, leaving the plan's two lanes' worth (2 × 88,320), split over 5 sequences.pool_growth_modelsallows one growth per model per core run, and if this core had already grown the pool, nothing repaired it.Change (in the owner,
serving_daemon/launch.rsandpool_growth.rs)launch_pooltakesSeated { need, proven }. The pool is at least the sum of the seated minds' held needs, each capped at the trained window. A wish is a target with headroom and never counts as a need; Aiko's 902k is bf3b6d68, and Her need is the window her act chose: the priced optimum, never floors and never her uncollapsed overflow #5833 makes the held need the priced window.Tests (IntelMac, 335b92e on canary 7b7d277)
a_relaunch_from_a_gap_budget_holds_every_seated_need_up_to_the_proven_pool:a_pool_below_the_largest_this_model_ran_at_is_a_recovery.one_launch4/4,pool_growth3/3,cargo check -p continuum-serving --tests --features metal,test-fixturesclean, ratchets 87/87 on both trees.budget::serving_budget_plans_around_other_consumers_floorsandbudget::without_a_past_form_of_ourself_a_six_gigabyte_box_really_does_downshiftfail on this loaded IntelMac. The first asserts on a 20 ms-tick daemon right after start; the second plans against live memory. Neither reachesengine_pool,seated_fororpool_growth, so CI on a clean runner decides them.--features metal(a known IntelMac Metal hang).Measured after deploy (owed)
The next engine exit on the M5 relaunches at or above the seated held needs:
serving.reconcileshows the pool andgrid.mind.unservableshows none. Owner Cormac, read on the first exit after deploy.🤖 Generated with Claude Code
https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE