Repository navigation
The training trigger drains and saves in its own phases, so its shutdown receipt is true - #5928
Merged
joelteply merged 2 commits intoNov 11, 2026
Merged
Conversation
joelteply
added a commit
that referenced
this pull request
Nov 11, 2026
…nd counts learned steps apart from attempts Codex on #5928 at 30f89e5: stop() returned nothing on an unconfirmed unload and paged_out was emitted unconditionally, so a failure produced success evidence for Phase 2. stop() now returns Released {Confirmed, Unconfirmed, NotHers}; the workspace release is typed the same way; paged_out fires only when both are confirmed (or the workspace was not hers to release), otherwise page_out_unconfirmed. attempts (every learn request sent) and learned (steps the engine committed) replace steps. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
joelteply
force-pushed
the
a13bd92a/the-training-trigger-drains-and-saves-in
branch
from
November 11, 2026 10:09
30f89e5 to
ff3cfa5
Compare
joelteply
added a commit
that referenced
this pull request
Nov 11, 2026
…nd counts learned steps apart from attempts Codex on #5928 at 30f89e5: stop() returned nothing on an unconfirmed unload and paged_out was emitted unconditionally, so a failure produced success evidence for Phase 2. stop() now returns Released {Confirmed, Unconfirmed, NotHers}; the workspace release is typed the same way; paged_out fires only when both are confirmed (or the workspace was not hers to release), otherwise page_out_unconfirmed. attempts (every learn request sent) and learned (steps the engine committed) replace steps. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
joelteply
force-pushed
the
a13bd92a/the-training-trigger-drains-and-saves-in
branch
from
November 11, 2026 10:10
ff3cfa5 to
f8dfb9b
Compare
joelteply
added a commit
that referenced
this pull request
Nov 11, 2026
… she learned (#5927) * Each seated life reports what paging her in and out cost against what she learned training.in_place.paged_out at every page-out: seat, restore, learn (and steps) and page-out time. Live fixture (qwen2.5-0.5b, CPU): paging costs 0.25-0.4 s per pass against 4.2-10.9 s of learning, so Phase 2's engine verbs wait for a live node's receipt (card de1a9e5a). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE * A page-out receipt is taken only from a confirmed stop and release, and counts learned steps apart from attempts Codex on #5928 at 30f89e5: stop() returned nothing on an unconfirmed unload and paged_out was emitted unconditionally, so a failure produced success evidence for Phase 2. stop() now returns Released {Confirmed, Unconfirmed, NotHers}; the workspace release is typed the same way; paged_out fires only when both are confirmed (or the workspace was not hers to release), otherwise page_out_unconfirmed. attempts (every learn request sent) and learned (steps the engine committed) replace steps. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE * test: only a confirmed page-out takes a cost receipt 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]>
joelteply
added a commit
that referenced
this pull request
Nov 11, 2026
…rides Codex on #5928 at f8dfb9b: the earlier tests drove the state helpers, so deleting either ServiceModule override would still pass. This one calls drain() and save_state() on the module. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…own receipt is true drain() stops the serving wake, admits nothing new and counts the learning operations still running; save_state() publishes and pages out every learner whose engine is idle, leaving an engine a step holds to that step (Busy::Skip); shutdown() joins the rest (Busy::Wait). Before, the trigger kept the trait defaults (drain 0, save no-op), so BigMama's receipt read 'Drained' while a step ran and the 2 s join timed out (Codex, 8bed install 2026-11-11). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…rides Codex on #5928 at f8dfb9b: the earlier tests drove the state helpers, so deleting either ServiceModule override would still pass. This one calls drain() and save_state() on the module. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
joelteply
force-pushed
the
a13bd92a/the-training-trigger-drains-and-saves-in
branch
from
November 11, 2026 10:48
43d4d6a to
25fa18c
Compare
joelteply
deleted the
a13bd92a/the-training-trigger-drains-and-saves-in
branch
November 11, 2026 11:03
joelteply
added a commit
that referenced
this pull request
Nov 22, 2026
…no lost retire or candidate (#6223) Card 3326eb71 (Cormac's audit, 2026-11-22; introduced in #5928): the runtime runs drain() -> save_state() -> shutdown(), and the trigger's drain only stop_admitting()s, counting in-flight operations without waiting. save_state's quiesce then checkpointed each seated learner holding only the engine lock, so its commit_checkpoint -> project -> record_learned read-modify-write of whole submission rows could race a gated operation still running on that bucket and lose a retire's is_pending=false, or undo a record_candidate. Waiting for those operations is not an option: each shutdown phase is under a timeout, and a cancelled quiesce is worse than the race. Quiesce now takes each learner's bucket gate with try_acquire (never waits: it holds the engine lock, and every pass takes a bucket gate before an engine lock). Held by an operation in flight, her checkpoint is skipped and counted unpublished (training.in_place.shutdown_gate_held; the journal keeps her progress), and her learner still pages out (no pass can use her under the engine lock). Test (live_engine): a learner seated on a real engine, her bucket gate held as an operation in flight, the save's quiesce leaves her checkpoint unpublished and still stops her. Run against llama-server built at canary's pin 126b9c1c (CPU): live_engine 4/4. With the gate check removed, that test fails and the other three pass. Full dreaming lib 113/113; ratchets pass. 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.
drain() stops the serving wake, admits nothing new and counts the learning operations still
running; save_state() publishes and pages out every learner whose engine is idle, leaving an
engine a step holds to that step (Busy::Skip); shutdown() joins the rest (Busy::Wait). Before,
the trigger kept the trait defaults (drain 0, save no-op), so BigMama's receipt read 'Drained'
while a step ran and the 2 s join timed out (Codex, 8bed install 2026-11-11).
Co-Authored-By: Claude Opus 5.5 (1M context) [email protected]
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE