Repository navigation
feat(serving): engine slots with a recorded current, one resolver for every OS (card 2c5d0ec0) - #4491
Merged
Merged
Conversation
… every OS (card 2c5d0ec0, core half) An engine update overwrote the one installed binary in place: POSIX-only by accident, impossible on Windows (a running exe is locked), so #4464 skipped the engine there, and the Windows service-host injected its slot as LLAMA_SERVER_BIN, which the core reads as an operator's pin and never converges. Windows with CUDA may be someone's first and only machine. - inference/engine_slots: the Windows layout for every OS (<continuum_home>/bin/engine-{a,b,c}) plus `current` and `previous` pointers, each replaced atomically. idle_slot reads the lane records, never the process table, and fails closed on a lane recorded before lanes named their engine. promote needs the binary and the exact stamp; rollback is compare-and-swap on the failed slot (Codex) onto an intact previous (Fable). - server_bin: an override is always the operator's (provenance, not path: Codex), then the current slot (a missing binary fails loud at spawn), then the pre-slot install. Resolved PER LAUNCH: the process no longer caches the path, so a relaunch after a promote takes the new slot. - LaneRecord.engine_bin: the exe each lane launched from. - service-host: registers its release's slot as current (the Windows promotion) instead of injecting LLAMA_SERVER_BIN. - `continuum engine idle-slot | promote | rollback`: one implementation for the bash and PowerShell installers (exit 3: none idle, skip the build). Behaviour is unchanged until an installer calls promote: Macs resolve the pre-slot install as today, Windows resolves the registered slot as today. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
… the previous one (card 2c5d0ec0) Fable on #4491: rollback was only a verb, so a promoted CUDA engine that passed its stamp and then failed at launch left a first-and-only machine dark until a human ran it. A spawn or readiness failure from the current slot now restores the previous engine (never under an operator override, never while a deploy holds the claim), probes serving.engine.rolled_back with both slots, and relaunches once; the engine is resolved per launch, so the relaunch takes the restored slot. Once only: the restored engine failing too is not rolled back onto the failed one, which would swap two bad engines forever. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…(card 2c5d0ec0) Fable on #4491: NotReady also comes from memory (the M5's swap and headroom refusals), a model load or a wedge. Rolling back on any of those demoted a good new engine and silently ran the node on the older one, without pause or top_layers, until the next deploy. A slot now carries a `.verified` marker, written at the first launch from it that comes up ready (the exact program the launch ran, not a fresh resolution), and cleared whenever the slot is promoted or registered anew. Automatic rollback applies only while current has no marker: a proven engine that later fails takes the ordinary launch-failure path. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
joelteply
added a commit
that referenced
this pull request
Sep 28, 2026
…ever over a live lane (card 7a6a033a) (#4495) The installer half of #4491 for macOS and Linux. install-llama-server.sh asks the core for the idle slot (`continuum engine idle-slot`), builds or installs there, verifies and stamps as before, and only then promotes it (`continuum engine promote <slot> <commit:backend>`). The core resolves current at every launch and #4464's convergence relaunches lanes onto it. - Current slot already at the pin: a no-op, as the stamp check was. - A slot holding the pin whose promote failed: promoted, not rebuilt. - Migration: a pre-slot engine already verified at the pin is copied into the slot and promoted, with no rebuild (hours on a CPU-served node). - Exit 3 (no slot idle) skips the engine build this deploy and says so; any other idle-slot failure is fatal, never a guessed slot. - Version skew: a deployed CLI without the verbs installs the pre-slot way once, says so, and the next deploy uses the slots. - start-server takes the engine path from the installer's stdout, and the installer's placement lines now go to stderr (they polluted stdout). Windows keeps its PowerShell slot arm; its move onto these verbs is the other half. Test: tools/scripts/tests/install-llama-server-slots.test.sh, 5 cases, run in CI beside the warm-build test; mutation-checked (dropping the promote and breaking exit 3 each fail it). Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE Co-authored-by: Claude Opus 5.5 <[email protected]>
This was referenced Sep 28, 2026
Merged
joelteply
added a commit
that referenced
this pull request
Sep 28, 2026
…e slot (card 0a3ea433) (#4499) The Windows half of card 2c5d0ec0 (#4491 core, #4495 macOS/Linux). Select-CoreEngineSlot picked a slot by reading llama-server processes, and a lane the supervisor started runs in the service session, where its path is unreadable from the operator's session: the picker then had to guess it was the registered engine. It now asks `continuum engine idle-slot`, which reads the lane records (each names the exe it launched), the one implementation the bash installer uses too. - Exit 3 (every slot current or run by a live lane) refuses, as before. - An answer that is not engine-a/b/c under the install root refuses. - A readable live engine inside the answered slot refuses (belt and braces against a stale record). - A CLI that predates the verb keeps the process-table choice for that one deploy, with a warning; the next deploy asks the core. - Native stderr under 'Stop' is terminating in Windows PowerShell 5.1, so the call reads exit codes under 'Continue'. Promotion on Windows stays the service registration: #4491's service host records the registered slot as current (and #4497 degrades a refusal to the pinned engine). Not run locally (no PowerShell on this node): windows-service.test.ps1 gains a case with a fake CLI, and CI's installer job runs it. Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE Co-authored-by: Claude Opus 5.5 <[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.
Card 2c5d0ec0, core half. The interface was agreed in cambriantech with Fable's three holes and Codex's four inputs, all taken.
What lands
inference/engine_slots.rsadopts the Windows layout (Converge Windows engine receipts through continuum install #4382,<continuum_home>/bin/engine-{a,b,c}) for every OS, and addscurrentandpreviouspointers, each written atomically with tmp+rename.idle_slotexcludes three slots: the onecurrentnames, any slot a live lane's recordedengine_binnames, and, while another slot is free, the onepreviousnames (the rollback).promoterequires the slot's binary and its exact<commit>:<backend>stamp. The live-lane check is repeated in the verb.rollbackis compare-and-swap on the failed slot (Codex), so a delayed failure cannot undo a newer promotion. It only lands on an intact previous engine (Fable's first-and-only-machine case).server_bin:LLAMA_SERVER_BINis always the operator's engine, wherever it points. Codex's point: a path alone can't tell an installer's injection from a deliberate pin.LlamaServerProcessused to cache the path at construction, so after a promote fix(serving,deploy): a deploy converges the ENGINE too — the warm build installs the pinned llama-server on macOS/Linux, and a lane on an older engine than the installed one is relaunched (card 7c5f139d) #4464's convergence would have relaunched onto the very binary it was leaving. Restoration of an original launch validates against that launch's own recorded program.LaneRecord.engine_binis written at spawn.service-hostnow callsengine_slots::registerfor its registered release's slot, which is the Windows promotion and keeps the replaced slot asprevious. It no longer injectsLLAMA_SERVER_BIN, so Windows converges like every other OS.continuum engine idle-slot | promote <slot> <commit:backend> | rollback <failed-slot>.Behaviour today: unchanged until an installer calls
promote. Macs resolve the pre-slot install as before, and Windows resolves its registered slot as before.Follow-ups (not in this PR)
install-llama-server.shbuilds intocontinuum engine idle-slotand then promotes. The version-skew bridge: when the deployed CLI lacks the verb, keep today's path for that one deploy and log it. This is mine.Select-CoreEngineSlotis retired in favour ofcontinuum engine idle-slot. This is BigMama's.engine.converge_failedafter a promote.Verification: 3 lib tests in
engine_slots, each with awhat this catchesnote. I did not compile locally: the IntelMac's shared cargo target is held by its deploy build right now, so the CI lib-test is the compile check.🤖 Generated with Claude Code
https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE