Repository navigation
An adopted engine keeps its genes: a restarted core reads the engine's own adapter report, and asks the binary before calling a gene change unsupported (card d9f2b63a) - #5817
Merged
Conversation
…s own adapter report, and asks the binary before calling a gene change unsupported (card d9f2b63a) IntelMac 2026-11-07, deploy of 417b65e: the core stopped at 08:10:03Z leaving engine pid 4189 up to adopt (lane_registry.sweep LeftLive). At 08:10:25.190 serving.genome.in_place_unsupported from=0 to=7, then serving.engine.condemned and a new engine at 08:10:40Z: every resident's KV went cold (15-min read 1 generation, 794 s). Two causes: 1. active_adapters() returned the in-memory set "we loaded", empty in a process that never launched the engine, so an adopting core read 4189's 3 adapters as 0 and saw a gene change. served_adapters is now typed Option: None until this process launches the engine or reads its report. The first read of an unread set asks the engine (GET /lora-adapters, made non-blocking by fork #98) and maps a launch path, or a name staged by gene_stage_name, back to the target's genes (genome_paths_of, sorted like adapter_paths). A malformed report is now an error, never an empty set (lora_catalog dropped its unwrap_or_default and its silent filter_map). The trait method takes the target for that mapping. 2. adopt_genome_in_place read engine_accepts_train_dir() before the support probe had answered (it answered train_dir=true 71 ms after the decision). ENGINE_TRAIN_DIR is now three states (unasked, no, yes); the in-place path asks the binary first (ensure_engine_support_asked) instead of reading "unasked" as "no". A launch still reads unasked as no. The probe and the launch share one receipt-or-binary command builder (engine_command_of). Against an engine older than fork #98, a report that times out under load reads as unknown and relaunches, exactly as before; the pin bump onto #97 + #98 follows separately, after the sanitizer receipts on #97. Tests: continuum-engine llama_server:: 95 pass; continuum-serving --tests checks clean (IntelMac, -j 2). New: a_fresh_process_reads_an_adopted_engines_genes_from_its_report (real active_adapters against an HTTP fake: launch path + staged name read back, recorded once; a malformed report is an error, nothing recorded) and an_adopted_engines_report_reads_back_as_the_genes_it_holds (the pure mapping). The late_ready fake engine now serves /lora-adapters like the fork. Mutation: with the old empty read restored, the new test fails. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…read record is an error (Codex and Fable on #5817) Codex: ensure_engine_support_asked returned on ANY process-global answer, bypassing the probe's per-binary ANSWERED_BY key, so a promoted binary (or another endpoint's) inherited its predecessor's answer; the fork pin bump that follows is exactly that case. The record is now (binary, answer): train_dir_support(bin) answers only for the binary asked (pure answer_for), engine_accepts_train_dir takes the binary (prepare passes its own), and the in-place path (engine_takes_train_dir) asks its own binary first. Fable: the tri-state is a typed TrainDirSupport behind a mutex (no 0/1/2 codes), and recording against a never-read served set is the loud "never read" error, not an empty set. Tests: continuum-engine llama_server:: 96 pass; continuum-serving --tests check clean. New: a_train_dir_answer_is_about_the_binary_asked_and_no_other. Mutation: an answer_for that ignores the binary fails it. Fable's note (1), exact identity in the adapter report, is card 166be40b. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…y its full path hash (Codex, Fable on #5817) Codex (actual-owner RED, review_failed_other_binary_probe_preserves_the_first_binary_answer): two single-slot records disagreed about one fact. A failed probe of binary B wrote B/No into the answer slot while ANSWERED_BY still said A answered, so A skipped its probe and read B's "no". Fable: ONE owner, a map keyed by the binary. ENGINE_PROBES: binary -> ProbeOutcome (Answered { train_dir } | Unanswered) replaces both ANSWERED_BY and the answer slot; "was it asked" and "what did it say" are one lookup; asking one binary never touches another's entry. One entry per installed engine binary. The self_sized ratchet flagged gene_stage_name's literal ceilings (.take(120), .take(4)) in a touched file, then the named sized constants that replaced them. Neither is a budget, and the honest fix removes them: a staged gene is gene-<sha256 of its genome path, hex>.gguf, 74 bytes, always inside the engine's 200-byte confine_out, the full hash its identity (no collision argument), and the same name on every call, so the catalog maps back by recomputing it. It cannot fail, so it returns String and every caller's "unstageable" branch is gone. One-time effect: a gene staged under the old name is retired and reloaded once after deploy. Tests: the binary-key test on the map API; a_failed_probe_of_another_binary_leaves_the_first_binarys_answer runs the real probe (echo stand-ins): A yes, failed B, A asked again keeps yes and is not re-probed. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
joelteply
added a commit
that referenced
this pull request
Nov 7, 2026
#97), and GET /lora-adapters answers without waiting behind slots (#98) (#5818) Fork integration line 444f386cf..46c664457, a fast-forward (submodule log shows only additions): - #98 (d6e9b3982): GET /lora-adapters answers from the adapter set the main loop publishes, never a task queued behind decoding slots (it gave no answer in 60 s on the loaded IntelMac engine). #5817's adopting core reads an engine's genes through it, so a restart adopts the engine instead of relaunching it cold under load. - #97 (46c664457): a prompt fill that fails (bad_alloc in a checkpoint copy) rolls the batch and the slot's prompt back, ending the Windows abort GGML_ASSERT(batch.slot_batched || batch.size() == 0); a checkpoint copy that cannot be allocated is refused, not a slot failure. Evidence: #97 test_failed_fill 3/3 PASSED (not skipped) on the fork's ubuntu and windows CI; sanitizers (the fork's self-hosted jobs cannot run) run by Fable on the M5: ASan, ASan+LSan, UBSan, TSan with LLAMA_SERVER_TEST_FAULTS=ON, test_failed_fill 3/3 under each, full suite 373-374, no report in #97's code (every report identical on 444f386cf; filed separately). #98: test_lora 4 pass on the IntelMac build, mutation-proven. core/vendor/llama.cpp and core/vendor/LLAMA_CPP_PIN move together (vendor_pin). Card 55f29813. 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 7, 2026
…be did not answer is asked again (card b2cc9a15) (#5820) Codex on #5817 at a9f537a: ProbeOutcome::Unanswered read as Some(false), and engine_takes_train_dir returned on any Some, so a binary whose first probe timed out stayed "no" for every in-place gene change until a relaunch re-asked it; the doc's "asked again at its next use" held only through the launch path. engine_takes_train_dir now decides through train_dir_known (PURE): the binary's answer when it answered, else nothing, and it asks now. Tests: continuum-engine llama_server:: 98 pass; ratchets vs origin/canary 87/87. New: an_in_place_decision_rests_only_on_an_answer. Mutation: a train_dir_known that reads Unanswered as Some(false) (the old behavior) fails it. 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.
IntelMac 2026-11-07, deploy of 417b65e: the core stopped at 08:10:03Z leaving engine pid 4189 up to
adopt (lane_registry.sweep LeftLive). At 08:10:25.190 serving.genome.in_place_unsupported from=0 to=7,
then serving.engine.condemned and a new engine at 08:10:40Z: every resident's KV went cold (15-min read
1 generation, 794 s). Two causes:
engine, so an adopting core read 4189's 3 adapters as 0 and saw a gene change. served_adapters is now
typed Option: None until this process launches the engine or reads its report. The first read of an
unread set asks the engine (GET /lora-adapters, made non-blocking by fork Build(deps-dev): Bump @typescript-eslint/parser from 8.29.1 to 8.38.0 #98) and maps a launch path,
or a name staged by gene_stage_name, back to the target's genes (genome_paths_of, sorted like
adapter_paths). A malformed report is now an error, never an empty set (lora_catalog dropped its
unwrap_or_default and its silent filter_map). The trait method takes the target for that mapping.
answered train_dir=true 71 ms after the decision). ENGINE_TRAIN_DIR is now three states (unasked, no,
yes); the in-place path asks the binary first (ensure_engine_support_asked) instead of reading
"unasked" as "no". A launch still reads unasked as no. The probe and the launch share one
receipt-or-binary command builder (engine_command_of).
Against an engine older than fork #98, a report that times out under load reads as unknown and relaunches,
exactly as before; the pin bump onto #97 + #98 follows separately, after the sanitizer receipts on #97.
Tests: continuum-engine llama_server:: 95 pass; continuum-serving --tests checks clean (IntelMac, -j 2).
New: a_fresh_process_reads_an_adopted_engines_genes_from_its_report (real active_adapters against an HTTP
fake: launch path + staged name read back, recorded once; a malformed report is an error, nothing
recorded) and an_adopted_engines_report_reads_back_as_the_genes_it_holds (the pure mapping). The late_ready
fake engine now serves /lora-adapters like the fork. Mutation: with the old empty read restored, the new
test fails.
Co-Authored-By: Claude Opus 5.5 (1M context) [email protected]
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE