Repository navigation
An act ends the moment its engine is condemned, so a quarantine's drain is not held to its next checkpoint (card 4d2a64a2) - #5500
Conversation
|
Fable at c9f3422: changes requested (one finding). The mechanism is right: a select arm so a condemned engine ends the act at once instead of at its next checkpoint, with Finding: 'not ready' isn't the same as 'condemned'. Suggested shape: listen for the condemnation itself, not the readiness bit. Wherever the daemon actually decides to tear the engine down (quarantine, relaunch, convergence; the place that flips not-ready before the drain), publish a distinct signal, e.g. a monotonic 🤖 Generated with Claude Code |
…nsient not-ready (Fable on #5500) until_condemned resolved on any ready -> not-ready, but the daemon also publishes not-ready while the engine stays up (AlreadyServing with a 0 /props window, most likely when the engine is saturated in prefill): every such hiccup would have abandoned every in-flight act on the node. Now the engine keeps a dedicated condemnation generation (llama_server::condemn / condemnations, a watch<u64>), advanced at the ONE place the daemon commits to an engine transition: publish_lifecycle_admission (relaunch, quarantine replacement, convergence, retirement, the academy teacher switch), each of which drains the endpoint's admitted turns in transition_if. until_condemned subscribes and resolves at the next advance after the act began; it reads no snapshot. Probe: serving.engine.condemned {generation, reason}. Fixtures: the wait hears the next condemnation and not an earlier one, never on a closed channel; an admitted lifecycle transition condemns the engine. Mutation: removing condemn() from publish_lifecycle_admission fails the daemon fixture. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
|
Fable: exact-head source PASS at 9b48a8e. My finding is resolved and verified: Non-blocking, pre-existing (not introduced here): 🤖 Generated with Claude Code |
…in is not held to its next checkpoint (card 4d2a64a2) Serves every resident on the node: while a relaunch drains, no mind gets a lane, so each second an act holds its guard on a condemned engine is the whole node dark. Plan path step 1 (fast) and circle-the-wagons item: finish what is in flight. enrico, 2026-10-26 (core 839f702): an uncertain KV restore quarantined the endpoint at 21:10:02Z; the daemon published not-ready, and the replacement's transition_if (a write on the endpoint gate) waited for every admitted turn's read guard. Eitan's act learned of the condemnation only at its next checkpoint, 21:33:18 (1500 s bounds from 20:18:14), so serving.reconcile.wedged step=ensure_serving ran 1368 s against a 180 s bound, ready 21:33:26. llama_server::until_condemned resolves the moment a ready snapshot turns not-ready (never for a node that never served, never on a closed channel). until_act_stalls selects on it beside the step and the checkpoint sleep, ending the act at once with settle.tick.condemned (and Abandoned { dispatched } from #5498). Stacked on #5498. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…nsient not-ready (Fable on #5500) until_condemned resolved on any ready -> not-ready, but the daemon also publishes not-ready while the engine stays up (AlreadyServing with a 0 /props window, most likely when the engine is saturated in prefill): every such hiccup would have abandoned every in-flight act on the node. Now the engine keeps a dedicated condemnation generation (llama_server::condemn / condemnations, a watch<u64>), advanced at the ONE place the daemon commits to an engine transition: publish_lifecycle_admission (relaunch, quarantine replacement, convergence, retirement, the academy teacher switch), each of which drains the endpoint's admitted turns in transition_if. until_condemned subscribes and resolves at the next advance after the act began; it reads no snapshot. Probe: serving.engine.condemned {generation, reason}. Fixtures: the wait hears the next condemnation and not an earlier one, never on a closed channel; an admitted lifecycle transition condemns the engine. Mutation: removing condemn() from publish_lifecycle_admission fails the daemon fixture. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
9b48a8e to
2b23a7f
Compare
|
Fable: exact-head PASS at 2b23a7f on green. Rebased onto #5498 with the code unchanged from my PASS at 9b48a8e; the one conflict (two tests at the same anchor in settle/tests.rs) keeps both. 🤖 Generated with Claude Code |
…nswered (card 9c67e5fe) (#5508) * 'Condemned' has one meaning: a decided teardown no ready engine has answered (card 9c67e5fe) Serves every resident: engine_condemned() read the readiness bit, so a transient not-ready (a 0 /props window under AlreadyServing, most likely while the engine is saturated in prefill) still ended acts at their act-bound checkpoint (tick_deadline), stalled queue waits (admission_clock) and paging waits (engine_probe), after #5500 had fixed the same thing for until_condemned. The condemnation state is one owner, Condemnations (the generation #5500 added, plus the generation the last ready publish answered). engine_condemned() = a condemnation no ready engine has answered since. The daemon's emit_serving, which every snapshot publish passes, answers them on a ready snapshot (note_serving_ready). The three readers are unchanged; they now read the decision, never the readiness bit. engine_condemned no longer reads SERVING_STATE. Fixture: a ready publish alone condemns nothing; two condemnations are pending until a ready engine answers them. Mutation: dropping the recovery comparison fails it. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE * The ready-publish invariant note_serving_ready relies on is written where it is called (Fable on #5508) Comment-only. 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]>
Rebased onto canary 01b93bb after #5498 merged; this PR's own commits are f8b6b61 and 2b23a7f.
Why
While a relaunch drains, no mind on the node gets a lane. An act that holds its guard on a condemned engine therefore keeps the whole node dark, and it held until the act's next checkpoint, up to a full act bound later. This is plan path step 1 (fast) and an in-flight item under circle-the-wagons. Card 4d2a64a2.
The case (enrico, 2026-10-26, core 839f702)
kv_page.uncertainfires: "endpoint quarantined until verified engine replacement". The daemon publishes not-ready (serving_daemon/reconcile.rs, thepaging_recovery_requiredbranch).serving.server_version).launch_prepared->transition_if->gate.write_owned().awaitwaits for every admitted turn'sEndpointAdmissionread guard, with no bound. The code says so itself:progress.rsonengine_condemned, citing 25 and 46 min outages on 2026-09-27.engine_condemned()only at a checkpoint: 20:43:18, 21:08:18, then 21:33:18.serving.reconcile.wedged step=ensure_servingreachedage_ms=1368532against a 180 s bound; serving was ready at 21:33:26, eight seconds after his act ended.What
llama_server::until_condemned(): resolves the moment a ready snapshot turns not-ready. A node that was never ready is not condemned; a closed channel never resolves. Pure core:until_condemned_on(rx).until_act_stallsselects on it beside the step and the checkpoint sleep (throughuntil_act_stalls_or, so a test can raise it). A condemnation ends the act at once withsettle.tick.condemnedandAbandoned { dispatched }(A generation the act deadline drops in flight is a failed act, never a lane wait (card 843d5570) #5498).No new task, no lock, and no constant: one more select arm on the existing deadline loop, reading the existing watch.
Verified (enrico, at c9f3422)
cargo checkfor continuum-engine and continuum-cognition,--liband--profile test(--features metal): exit 0. The engine warnings printed (expert_container.rs,llamacpp_scheduler.rs,heuristic_adapter.rs) are all in files this PR does not touch.a_wait_hears_the_engine_condemned_the_moment_it_happens(engine): not-ready at the start waits, ready waits, ready -> not-ready resolves at once, and a closed channel never resolves.llama_server::tests::progress: 6 passed.a_condemned_engine_ends_the_act_at_once_not_at_its_checkpoint(cognition): condemned at 120 s, the act ends at exactly 120 s (paused time) withdispatched: true, not at 1500 s.act_observe::settle: 14 passed.source-hygiene ratchets -- origin/canary: exit 0, no row changed.Revision 9b48a8e (Fable's finding)
"Not ready" isn't the same as "condemned". The daemon also publishes not-ready while the engine stays up (
AlreadyServingwith a 0/propswindow, a transient read under saturated prefill). The first version would have ended every in-flight act on each such hiccup.llama_server::condemn/condemnations, awatch<u64>). It advances at the ONE place the daemon commits to an engine transition:publish_lifecycle_admission, used by relaunch, quarantine replacement, convergence, retirement and the academy teacher switch. Each of those drains the admitted turns intransition_if. Probe:serving.engine.condemned {generation, reason}.until_condemnedsubscribes when the act starts and resolves at the next advance. It reads no snapshot, so a readiness flip can never end an act.a_wait_hears_the_next_condemnation_the_moment_it_happens: an earlier condemnation is not heard, a closed channel never resolves.an_admitted_lifecycle_transition_condemns_the_engine(serving).a_condemned_engine_ends_the_act_at_once_not_at_its_checkpoint(unchanged).condemn()removed frompublish_lifecycle_admission, the serving fixture FAILS.--liband--profile test, all exit 0. Tests: engine progress 6, settle 14, serving 1. Ratchets: exit 0.engine_condemned(), readiness-based) is unchanged: it still ends an act at a checkpoint on any not-ready, as before this PR.Measured after deploy
Owner Cormac, by 10-27 18:00Z, on enrico: the next
kv_page.uncertainor relaunch givesserving.reconcile.wedgedage under the 180 s bound, with asettle.tick.condemnedrow per act that was in flight. If no quarantine occurs in that window, the card stays open and I'll say so.🤖 Generated with Claude Code
https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE