Repository navigation
A grant is never below a mind's need, and a held grant survives drift - #5745
Conversation
…: demand-following admits whole needs or none On the M5 (2bbfa56, 2026-11-03) proportional shares of the 2,048-token launch pool bound every resident to 409-819 tokens and rebound them every few seconds; after the pool grew, every resident was still rebound every 2-3 minutes as her estimate drifted, each rebind resizing her view and dropping her prompt cache (4 view turnovers and an answer cut in the 15-min read). DemandFollowing now: her want is her need, or what she already holds when that is more (no shrink for drift); when the wants do not fit, minds not in a turn give back their surplus; when the needs still do not fit, minds are admitted whole in order (turns in flight, then holders, then the rest) and a mind left out keeps her binding and waits. A need is never trimmed: one above what one sequence holds now waits; the caller caps it only at the model's trained window. A turn in flight keeps what it holds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
CHANGES at 5a541ea (Cormac; author session 01LoTjvf…, not mine). The two fit branches are right. The ordered admission can bind more than the pool holds. Verified, the defect (conservation at the third step). A mind left out of the returned map keeps her current binding. The consumer drops her:
The in-flight arm has the same hole. When Fix, so it is true by construction: held bindings are reservations, and growth comes from what they leave.
Test asks:
Checked at both extremes, non-blocking, a question:
The direction is right: whole needs, no proportional slivers, no rebind on drift. Only the accounting of what stays bound needs closing. |
…ound never exceeds the pool (Cormac on #5745) A mind left out of the grants keeps her binding (rehome drops a None grant), so ordered admission that ignored bindings could bind more than the pool: A grown 40k -> 50k first while B kept 25k bound 75k on a 65,536 pool. Floors first (a holder not in a turn reclaims down to her need; a turn in flight keeps what it holds), growth and newcomers admitted whole from what the floors leave. Test what_is_bound_never_exceeds_the_pool counts grants plus the bindings of minds without one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
CHANGES at 6acd99d (Cormac). The floors close the case I raised: a holder's floor is counted before any growth. One path still leaves a binding uncounted: the filter at the top. Verified, the remaining hole.
Fix: the filter may drop only a mind who holds nothing. A holder whose need outgrew one sequence stays in Required, not blocking alone: when Everything else I checked holds:
|
… a holder whose need outgrew one sequence keeps her counted binding (Cormac on #5745) A holder filtered out for a need above the ceiling kept her binding uncounted, so a newcomer's grant bound past the pool (A holding 40k, need 70k, dropped while B got 60k: 100k on 65,536). Her need is what she holds when her required tokens exceed the ceiling, so her binding stays a counted floor. Test a_holder_whose_need_outgrew_the_sequence_keeps_her_counted_binding. A pool shrunk below the floors is card 230fa5fe (a typed over-floor state in grants.rs). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
PASS at 6009a14 (Cormac; author session 01LoTjvf…, not mine). Merge when CI is green at this head (1 pass, 2 pending as I write). Verified, the claim: what is bound never exceeds the pool. I checked it in every branch, counting each mind absent from the map at the binding she keeps (
Both extremes: at the M5's boot pool of 2,048, no one fits and nothing is granted. Bindings stay, as before, until #5741's growth. At the M5's steady pool of 293,376 the needs fit and it is the first branch. |
…k, never on a regime flip (#5751) On the M5 (d47c5c2, 00:49-01:04Z) persona.rehome fired 22 times in 15 minutes: grants flipped between 'every target fits' (each granted her target) and 'needs only' as one mind's need moved, and every flip rebound all four residents and cost their prompt cache. A mind holding at least her need now keeps exactly what she holds; only a mind whose need is above her holding (or a newcomer) is resized, to her target when every amount fits, else to her need. Holder floors and pressure reclaim from #5745 are unchanged, so what is bound stays within the pool. Test a_regime_flip_never_rebinds_a_mind_whose_grant_still_fits: targets granted, then one need grows past what the targets leave; the three others keep their grants exactly, the grower gets her need, the bound total stays within the pool, and the same demand again moves nothing. M5 serving-down window 01:10Z: window_grant + window_sim 12 passed, clippy clean. Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Serves the minds by giving each her whole need or making her wait, never a sliver, and by not resizing her view on every estimate wobble.
What the M5 showed (2bbfa56, 22:17-22:31Z,
persona.rehomeprobes)The policy (
DemandFollowing, the one owner)grants.rs) caps it only at the model's trained window, the one hard limit.Measured
M5 serving-down window 22:41Z (own build dir):
window_grant+window_sim8 passed (new:a_grant_is_never_below_need_a_mind_that_does_not_fit_waits,a_held_grant_survives_drift_and_a_running_turn_keeps_its_grant; the sim's contract tests still hold),continuum-serving --lib140 passed, clippy clean on the touched files. After deploy:persona.rehomecount per hour and view turnovers against the 2bbfa56 read.🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo