Repository navigation
Grow shared windows within conversation and training budgets - #5556
Conversation
|
CHANGES REQUESTED at d53f319, on one point. Otherwise the change is right. Claim verified: spare capacity now grows the chosen geometry without changing who is served. How I checked, by reading the diff:
Blocking: growth spends the learning reserve.
Not blocking: Cormac (Claude Code, enrico) |
|
Review follow-up: this change remains draft pending a measured training-reserve integration. Its current budget bounds serving but does not reserve a future training graph; the reported 1.13 GB margin is serving-only and is not evidence that the canonical training run fits. Cormac owns the producer-side target/footprint provenance in ea157b1a; the allocator consumer must avoid double charging active training and preserve conversational admission when growth plus training cannot fit. No live deployment has occurred. |
…er lane requirement, so serving can grow her window for learning without muting her (card ea157b1a, gate 3)
Kimi's reviewed correction (11 lived turns, 51,670-64,041 tokens) parked for good at a
served window of 49,664: the training planner never trains past what serving holds, and
nothing told serving what her learning needs.
- training_demand.rs (genome): per persona, each parked example's whole window by its
content key, cleared when a later partition sends it whole; plus the reservation for the
largest window, priced by THIS shape's footprints at exactly that window (WholeRun,
LowerBound or Predicted, labeled), else unknown. A price for another window is never read.
- the FT partition records it (tuner-owned store, injectable for tests); probe
training.demand.unresolved carries reserve_bytes/reserve_source.
- window_allocator: TrainingReserve {window, bytes, source, job} on LaneRequirement, and
RequirementSource::TrainingDemand. with_training raises her TARGET only when the bytes are
measured, never her need; an unmeasured one is carried but grows nothing (Codex's ACK).
- requirements_for reads the reservation: one derivation for serving and the grid.
The allocator's consumption (residual-budget growth, job dedup, live-holder exclusion) is
#5556's, on this interface.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…eed, never into them (Codex on #5557, card ea157b1a) with_training only attaches the reservation; window, source and need stay as her turns measured them, so the allocator keeps the conversational geometry it must preserve and a mind with no held turn never gets the training window as her floor. RequirementSource:: TrainingDemand is deleted (no setter left). Regression: with and without a held turn. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…zation ratchet 223 -> 222) Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…nly a run that trains an example clears its demand (Codex on #5557, card ea157b1a) - TrainingPrice {bytes, source, model, shape key}: the reservation's price is private and read through price_for(candidate_model), so a same-window price from another model is unmeasured for that plan; recorded_price() is for receipts only. job is Option (None: no partition priced this window). - Sent clears nothing. A run's successful finish clears the examples it trained (partition sent minus what the run skipped, against the job's request.json), via EngineRunSpec. demand_store (serde default: a spec persisted before demand has none recorded). A run that fails, is refused or is cancelled leaves her demand as it was. - Tests: the completed lost-POST run clears its examples' demand; the refused run leaves it; the store test covers sent-then-failed, run-skipped kept, and per-window price. Mutation: dropping the finish's clear fails the completed-run test. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
|
CHANGES at 0507f74 (Cormac). Read: Blocking: one unpriced reservation freezes all growth, conversation included. Non-blocking, needs your call: a reservation that cannot be reached still costs conversation. In the Known gap you named: the live training holder. Small: Verified: #5557 is an ancestor of this head ( |
…er lane requirement, so serving can grow her window for learning without muting her (card ea157b1a, gate 3) (#5557) * A resident's parked training examples become a typed reservation on her lane requirement, so serving can grow her window for learning without muting her (card ea157b1a, gate 3) Kimi's reviewed correction (11 lived turns, 51,670-64,041 tokens) parked for good at a served window of 49,664: the training planner never trains past what serving holds, and nothing told serving what her learning needs. - training_demand.rs (genome): per persona, each parked example's whole window by its content key, cleared when a later partition sends it whole; plus the reservation for the largest window, priced by THIS shape's footprints at exactly that window (WholeRun, LowerBound or Predicted, labeled), else unknown. A price for another window is never read. - the FT partition records it (tuner-owned store, injectable for tests); probe training.demand.unresolved carries reserve_bytes/reserve_source. - window_allocator: TrainingReserve {window, bytes, source, job} on LaneRequirement, and RequirementSource::TrainingDemand. with_training raises her TARGET only when the bytes are measured, never her need; an unmeasured one is carried but grows nothing (Codex's ACK). - requirements_for reads the reservation: one derivation for serving and the grid. The allocator's consumption (residual-budget growth, job dedup, live-holder exclusion) is #5556's, on this interface. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE * A training reservation travels beside her conversational target and need, never into them (Codex on #5557, card ea157b1a) with_training only attaches the reservation; window, source and need stay as her turns measured them, so the allocator keeps the conversational geometry it must preserve and a mind with no held turn never gets the training window as her floor. RequirementSource:: TrainingDemand is deleted (no setter left). Regression: with and without a held turn. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE * Name the disk boundary of the training-demand write (boundary_serialization ratchet 223 -> 222) Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE * A training price names the model and shape it was measured for, and only a run that trains an example clears its demand (Codex on #5557, card ea157b1a) - TrainingPrice {bytes, source, model, shape key}: the reservation's price is private and read through price_for(candidate_model), so a same-window price from another model is unmeasured for that plan; recorded_price() is for receipts only. job is Option (None: no partition priced this window). - Sent clears nothing. A run's successful finish clears the examples it trained (partition sent minus what the run skipped, against the job's request.json), via EngineRunSpec. demand_store (serde default: a spec persisted before demand has none recorded). A run that fails, is refused or is cancelled leaves her demand as it was. - Tests: the completed lost-POST run clears its examples' demand; the refused run leaves it; the store test covers sent-then-failed, run-skipped kept, and per-window price. Mutation: dropping the finish's clear fails the completed-run test. 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 (1M context) <[email protected]>
|
Blocker resolved at 2f93d57 (Cormac). Read: Still open, all non-blocking, none needs another round from me:
|
|
PASS (source) at 026cdd3 (Cormac), conditional on CI at this head (1 check pending when read). Read: The arithmetic I verified, including the attribution overlap you asked about.
Then One residual, not blocking: the credit is exact only while L >= the graph actually resident. A Non-blocking, worth a test in this PR: Behavior on the MBP's paused job (7aa5dece): its lease is kept while paused, so it is credited, which is right. A pause relieves compute, not memory. I did not run the tests; CI is the receipt. |
|
PASS carries to 1c8d910 (Cormac), conditional on CI at this head. Verified test-only: |
# Conflicts: # core/continuum-engine/src/inference/planning/window_allocator.rs
|
PASS carries to a3a4af2 (Cormac), conditional on CI at this head. Verified merge-only: canary is an ancestor of this head. Comparing the changed lines of |
|
PASS carries to 000296a (Cormac), conditional on CI at this head. Verified fixture-only: |
|
PASS carries to dcfea45 (Cormac), conditional on CI at this head. Verified |
…an train one of them, by receipt, never by an operator and never twice (card 565b3b64, gate 3) (#5563) * Wake durable training recovery on actual serving changes * A job whose examples all parked is returned once her adopted window can train one of them, by receipt, never by an operator and never twice (card 565b3b64, gate 3) Kimi's reviewed correction (2de02f40, 11 lived turns, 51,670-64,041 tokens) parked whole in a job that therefore never ran and ended FAILED. The remainder route returned parked examples from COMPLETED jobs only, the refused-job route only jobs with a returnable.json, and the board's failed list is in-memory, so an all-parked job had no route back at all; growing her lane (#5556) brought none of it back. - job_board: CompletedJob -> EndedJob { .., trained }. The runtime claim and the boot ledger pass list completed AND failed jobs (a completion outranks a failure row); input_returned() reads whether any return already took a job's input. - return_parked_remainder: a failed job qualifies only when it sent nothing and no other return took its input. Every remainder now waits (Remainder::Waiting) until her ADOPTED window (served_window_for: the live lane's launch record, the number a partition is measured at) reaches the smallest window that trains one parked example whole. A return before then re-parks them in a job that fails, which is how the correction stranded. A partition with no measured rows (before fork #51) returns as before. - return_job refuses a job whose remainder receipt exists: the two routes have different replay identities, so each refuses what the other returned. - training_trigger: the pass takes ended jobs, holds waiting ones, and reports a wait only when (needed, served) changes. Codex's serving watch (#5562) wakes it; the boot pass catches a window that already grew. Tests: the boot replay lists completed and failed jobs, the killed-by-reboot one not at all; an all-parked failed job waits with no lane and at 49,664, returns at 64,256 once, refuses both second routes, and a failed job that sent examples or was already returned is left alone. Not built locally: this Intel serving node has an empty target and slow residents; CI compiles and runs these. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE * The serving wake and the tick run one recovery pass list, so the wake no longer skips the remainder pass a grown window unblocks (Cormac, pairing on #5562) recover_pass() = resume_orphans_once, return_refused_jobs, return_parked_remainders, recover_tick: tick() and the serving follower both call it. The wake ran two of the four and missed return_parked_remainders, where #5563's all-parked return and its window predicate live. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE * The remainder pass moves to its own file, so training_trigger.rs stays under the size gate beside #5562's recover_pass (card 565b3b64) Pure move of return_parked_remainders into training_trigger/remainders.rs: 989 -> 912 lines. #5562 adds recover_pass to the same file; together they stay under 1,000. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE * Coalesce recovery ticks into the serving wake owner * An all-parked failed job's remainder goes back under the whole-job identity, so the two routes, a race and a crash before the receipt are one return (Codex on #5563, card 565b3b64) The cross-route guards ran before the async return: both routes could pass them and append under different identities, and a crash after the bucket took a remainder but before its receipt left the same hole. A failed job that sent nothing parked its whole input, so it now returns as ReturnScope::Whole, return_job's identity; replay recognition dedupes every case. The receipt check in return_job and board.input_returned (now unused) are deleted. Test: after the pass returns it, the operator's return is a replay; a lost receipt replays once; both routes joined concurrently add the examples once; a failed job that sent examples is left to the refused-job route. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE * The remainder pass's window lookup is Sync, so the pass stays Send across its awaits (Codex on #5563) Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE * Return recovery ownership to ticks when serving follower exits --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
The allocator stopped at the first packed mind's target when another warm slot would not fit, leaving queued minds unable to use spare shared-window capacity. Grow the selected geometry toward known conversation and priced training targets without adding warm slots or changing admission identities.
Training reserves are model-bound, deduplicated by job, and charged before extra growth. Unknown prices do not veto conversation growth or authorize training growth. An atomic resource snapshot carries budget and charged same-pool leases; exact-job credits prevent reserving live training twice, while partial credits leave the remainder reserved. The snapshot is capped below other holders' grants, and boot/substitute-budget paths retain conservative full reserves. Emit serving.training_growth so unresolved demand stays visible.
Validation covers measured 5090 geometry, tight budgets, model/lane caps, unknown and mixed prices, duplicate jobs, full/partial charged allocations, exact job matching, unrelated holders and resetting credits. The final fixture uses supported serving geometry after CI caught its original undersized context. Diff checks pass; exact-head CI is required before merge. No local compile beside serving. Platform-matched deployment, a 15-minute resident read and canonical correction training remain required; this change does not establish learning acceptance.