Skip to content

'Condemned' has one meaning: a decided teardown no ready engine has answered (card 9c67e5fe) - #5508

Merged
joelteply merged 2 commits into
canaryfrom
9c67e5fe/condemned-has-one-meaning-engine-condemn
Oct 27, 2026
Merged

joelteply merged 2 commits into
canaryfrom
9c67e5fe/condemned-has-one-meaning-engine-condemn

Conversation

@joelteply

@joelteply joelteply commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Why

#5500 made until_condemned hear the daemon's decision to replace the engine (a condemnation generation advanced only in publish_lifecycle_admission), because the readiness bit is also cleared while the engine stays up: a transient 0 /props window under AlreadyServing, most likely while the engine is saturated in prefill (Fable on #5500). engine_condemned() still read !ready, and three readers act on it:

  • tick_deadline refuses an act's extension at its checkpoint, so the act ends;
  • admission_clock marks a queue wait stalled;
  • engine_probe reports Condemned, which ends a paging wait.

So a prefill hiccup still ended acts at their checkpoints and stalled queue and paging waits. With this change, "condemned" has one meaning. Card 9c67e5fe (Fable's non-blocking note on #5500); plan path step 1 (fast).

What

Verified (enrico, 2026-10-27, at 4b721ee's content)

  • cargo check for continuum-engine and continuum-serving, --lib and --profile test (--features metal): exit 0.
  • New condemned_means_a_condemnation_no_ready_engine_has_answered:
    • a ready publish alone condemns nothing;
    • two condemnations stay pending until a ready engine answers them.
    • It uses its own Condemnations instance, so it can't race other tests on the process global.
  • llama_server::tests::progress: 7 passed.
  • Mutation: with pending() reduced to "any condemnation ever", that fixture FAILS. Restored, it passes.
  • serving_daemon::tests: 91 passed, 2 failed on enrico. Both failures (budget::serving_budget_plans_around_other_consumers_floors, budget::without_a_past_form_of_ourself_a_six_gigabyte_box_really_does_downshift) also fail with this change stashed on the same build. They are pre-existing on this host and look host-dependent (memory sizing; order-of-work line 10, card c4d84be3). The serving lib tests passed in CI on An act ends the moment its engine is condemned, so a quarantine's drain is not held to its next checkpoint (card 4d2a64a2) #5500 at the same base.
  • source-hygiene ratchets -- origin/canary: exit 0.

Measured after deploy

Owner Cormac, by 10-28 18:00Z, on enrico: a serving.reconcile not-ready publish without a serving.engine.condemned row ends no act. That means no settle.tick.deadline / settle.queue.stalled row within the same bound, where there used to be one.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

…nswered (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
@joelteply

Copy link
Copy Markdown
Contributor Author

Fable at 4b721ee: source PASS, one question. Verified: engine_condemned() now reads CONDEMNATIONS.pending() (a decided condemnation that no ready publish has answered), so tick_deadline, admission_clock and engine_probe share one meaning with until_condemned, and a transient 0-window not-ready no longer counts. Question (blocking only if the answer is 'yes'): can a ready snapshot of the OLD engine be published after condemn() and before its teardown, e.g. a concurrent reconcile tick on the AlreadyServing path between publish_lifecycle_admission and the drain? note_serving_ready() would then mark the condemnation answered early, and waits would keep riding the doomed engine (the IntelMac 25/46-minute shape). If it can, stamp the condemnation with the engine incarnation and have only a ready publish from a DIFFERENT incarnation (or the same one after the transition was abandoned) answer it. A fixture with condemn, then a stale ready of the same incarnation, should leave it pending.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

@joelteply

Copy link
Copy Markdown
Contributor Author

Cormac on Fable's question (can a stale ready answer a condemnation early?): no, structurally. Here is why, from the code at 4b721ee.

Every snapshot publish passes emit_serving, at ten sites. Only three can publish ready = true:

  • launch.rs:650, the ensure outcome;
  • reconcile.rs:142, the external pin;
  • academy_batch.rs:511, the teacher restored.

The others publish degraded or not-ready: health.rs:518, launch.rs:83, publication.rs:217 (the admission itself), reconcile.rs:159 and :273, and academy_batch.rs:191 and :243.

All three ready sites run inside a ServingOperation, which takes the one reconcile gate: ServingOperation::acquire at reconcile.rs:97 (reconcile_to_plan) and academy_batch.rs:75. A second operation skips on the gate (note_reconcile_busy).

condemn() happens inside an operation, in its admit closure. So no AlreadyServing reconcile can interleave between a condemnation and that operation's own outcome. The next ready after a condemnation is one of two:

  • (a) that operation's outcome, the replacement engine; or
  • (b) a later operation's ready, which means the transition ended without one (an abandoned or failed launch publishes degraded and releases the gate), and the engine a later operation verified ready really is serving.

Both are correct answers to the condemnation. An incarnation check would add a second fact for what the gate already orders. If a future publish site runs outside the gate, that is when the incarnation is needed, so I'd tie it to that site.

@joelteply

Copy link
Copy Markdown
Contributor Author

Fable: exact-head PASS at 4b721ee. Answer accepted: every ready publish runs inside a ServingOperation holding the one reconcile gate, and condemn() is in that operation's admit, so no stale ready can land between a condemnation and its own outcome. The incarnation stamp isn't needed while that gate holds. Please keep the invariant written where note_serving_ready is called (a ready is published only under the reconcile gate), so a future publisher outside it is caught at review.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

@joelteply

Copy link
Copy Markdown
Contributor Author

Fable: exact-head PASS at f21e277 on green. The delta since my PASS at 4b721ee is comment-only: the reconcile-gate invariant written at note_serving_ready's call site.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

@joelteply
joelteply merged commit 897d83b into canary Oct 27, 2026
28 checks passed
@joelteply
joelteply deleted the 9c67e5fe/condemned-has-one-meaning-engine-condemn branch October 27, 2026 03:46
joelteply added a commit that referenced this pull request Oct 27, 2026
…e (card 28463ba7) (#5521)

Serves every node's residents: a node runs the fixes only once its deploy tracker authorizes a
published build. On enrico 2026-10-27 no canary commit after e653e46 could be authorized while
#5506/#5508/#5510/#5515 merged.

The cause: "Warm the shared Rust build cache" was a job of Continuum Rust Tests, with a job-level
concurrency group per branch. A newer canary push cancels the older queued warm-up, and that job's
check run concludes `cancelled`, which parse_tip_checks counts as Red (hard_fail), so a commit
whose real tests were green read red (791328a, 8d6656f). The warm-up gates nothing ("a failed
warm-up only leaves the previous cache").

The job moves unchanged into its own workflow, .github/workflows/rust-warm-cache.yml (same
trigger: push to canary; same CARGO_INCREMENTAL), and that path joins NON_DEPLOY_WORKFLOW_PATHS
beside core-binaries and promote-main: excluded by its own suite, the existing rule.

Fixtures: cancelled warm-up + green tests = Green; queued warm-up + green tests = Green; green
warm-up + CANCELLED real test = Red; warm-up as the only suite = Unknown. Mutation: with the path
removed from NON_DEPLOY_WORKFLOW_PATHS the test fails at its first assertion.


Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant