Skip to content

fix(inference): a condemned engine ends every wait at its checkpoint, so a relaunch's drain cannot keep the node dark (card 7c5f0a08) - #4468

Merged
joelteply merged 1 commit into
canaryfrom
fix/condemned-engine-ends-waits
Sep 27, 2026
Merged

joelteply merged 1 commit into
canaryfrom
fix/condemned-engine-ends-waits

Conversation

@joelteply

@joelteply joelteply commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

A condemned engine ends every wait at its checkpoint, so a relaunch's drain cannot keep the node dark (card 7c5f0a08).

What happened (IntelMac, 2026-09-27, measured from the core log)

The fix

  • engine_probe answers the new EngineProbe::Condemned while the serving snapshot is not-ready (engine_condemned()). It is false before the daemon installs its state, so nothing is condemned that was never served. engine_probe_within, the tested transport half, is unchanged.
  • wait_while_engine_progresses ends on Condemned at the checkpoint, with probe inference.wait.engine_condemned. That covers both callers: the header wait (lane_send) and the KV page switch (turn_admission). On the latter it resolves to "uncertain", i.e. quarantine, which is what is already happening to that engine.
  • The act deadline (settle::until_act_stalls, fix(cognition): an act whose own generation is advancing is not stalled — the act bound extends by checkpoint on its pinned slot, up to 3x (card 6f3218ed) #4455) never extends on a condemned engine.
  • Busy is still not dead on a live engine. A dying one is just not worth waiting on: its relaunch cuts the work anyway.

Drain bound: one checkpoint (≤ 300 s header wait), not the turns' patience.

Test

a_header_wait_rides_a_moving_engine_and_ends_on_a_quiet_one gains the condemned case: a moving engine that turns condemned ends the wait at the first checkpoint. It's the same function's ending rules, so it goes in the same test.

Not built locally: this node's deploy build holds the shared target and is starving the lane. CI is the compile.

Docs: PERSONA-COGNITION-PIPELINE (act_observe), CONCURRENCY-STYLE-GUIDE. Sibling: 682a5abf (the warm build caps its jobs on a CPU-served node, which is the cause of the condemnations).

🤖 Generated with Claude Code

https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

… so a relaunch's drain cannot keep the node dark (card 7c5f0a08)

When the serving daemon condemns a lane it flips its snapshot not-ready, and the
relaunch's transition_if takes a write on the endpoint gate: it waits for every
admitted turn to drop its guard, with new admissions barred behind it. The
busy-is-not-dead waits (#4453's header wait, #4455's act extension) kept
renewing on the condemned engine because it was still prefilling, so the drain
ran as long as the turns did. On the IntelMac on 2026-09-27 that was 15:44-16:09Z,
16:33-17:19Z and again from 17:47Z: no lane and 0 acts in each window.

engine_probe now answers EngineProbe::Condemned while the snapshot is not-ready
(false before the daemon installs its state), and wait_while_engine_progresses
ends there at the checkpoint (probe inference.wait.engine_condemned). The act
deadline never extends on a condemned engine. Busy is still not dead on a live
engine; a dying one is simply not worth waiting on, since its relaunch cuts the
work anyway. The drain is now bounded by one checkpoint (<= 300 s header wait).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
@joelteply

Copy link
Copy Markdown
Contributor Author

Fable read 7141292; word follows at green. It reads right: the daemon flips the snapshot not-ready at lifecycle admission (every relaunch) and on the paging quarantine, and in both the engine is being replaced, so ending a wait at its checkpoint loses nothing the relaunch would not cut, and it lets transition_if's drain finish instead of holding the node dark. The act settle stops extending on a condemned engine for the same reason.

Non-blocking: engine_condemned() reads the node's one serving snapshot and ignores root. A wait on another local engine (an EphemeralServingLane eval on its own port) would be cut when the MAIN lane relaunches. Comparing root against the snapshot's base url before answering Condemned would scope it to the engine actually being replaced.

@joelteply

Copy link
Copy Markdown
Contributor Author

Fable: APPROVED at 7141292, 8/8 green. A condemned engine (not-ready at lifecycle admission or the paging quarantine) ends every wait at its checkpoint and the act bound never extends on one, so a relaunch's drain can finish; the test pins a moving-but-condemned engine ending at the first checkpoint. The root-scoping note stays non-blocking.

@joelteply
joelteply merged commit ecdbcf6 into canary Sep 27, 2026
8 checks passed
@joelteply
joelteply deleted the fix/condemned-engine-ends-waits branch September 27, 2026 18:33
joelteply added a commit that referenced this pull request Sep 27, 2026
… jobs instead of never running (the M5 could not deploy) (#4478)

* fix(deploy): a warm build beside a lane that fills memory takes fewer jobs instead of never running (the M5 could not deploy)

The warm build refused below a fixed 12 GiB free. The M5 serving the 27B at 4 lanes
(llama-server 29.5 GB, core 4.4 GB) sat at 10.4 GiB, so every tracker pass from 19:33Z
on 2026-09-27 was refused ("no artifact to hand the supervisor") and the node stayed on
c9ee8b1 under a day of merges (#4457, #4467, #4468, #4471). A node whose lane fills
its memory never deployed.

Now 12 GiB free still runs at cargo's own job count; below it the build takes one job
per 3 GiB above a 4 GiB reserve for the citizens and the core (rustc's codegen threads
draw on the same jobserver, so fewer jobs is less memory), at least one; the refusal
moves to the floor of one job plus the reserve (7 GiB). When a CPU-served lane also caps
the build (#4471), the smaller budget wins. The engine build reads the same
CARGO_BUILD_JOBS.

Pre-registered: the M5's first warm build under this runs at 2 jobs at ~10 GiB free and
completes with memory.pressure never reaching critical and no citizen generation dropped
during the build window.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* refactor(deploy): the warm build's memory budget lives in the lib beside the CPU budget, so CI runs its test (Codex on #4478: CLI tests run only by name)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

---------

Co-authored-by: Claude Opus 5.5 <[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