Repository navigation
fix(serving): a self-heal must say WHY — the wedge reason reaches the snapshot, not just the log - #3725
Merged
Conversation
… snapshot, not just the log `declare_lane_wedged` TAKES the failure reason as a parameter, logs it, and then published `ServingSnapshot::empty()` — which hardcodes `degraded_reason: None`. So for the whole kill+respawn window `serving/status` read `ready:false, active_model:null, lanes:0, degraded_reason:null`: absence with no stated cause, byte-identical to a node that never had a brain. Measured live on BigMama 2026-09-04 (core bb7141f). The daemon declared a wedge at 03:01:14Z, knew the reason, published an empty snapshot, and brought a healthy successor up at 03:02:36Z. In between, the surface said nothing — and I read that same state three times across the night as a possibly-dead serving lane, twice getting as far as drafting a defect for a system that was correctly healing itself in front of me. The pre-flight guard already reserves a `degraded=` field on its probe for exactly this string (added 2026-08-15: "every turn of a round waited here for 120s each while serving/status knew the exact cause and nothing surfaced it") and was being handed "" on every wait. Three sites had the reason in hand and threw it away: - `declare_lane_wedged` — the reason is a PARAMETER; now publishes `degraded(reason)` - model-resolver failure — the probe named the unresolvable id, the snapshot did not - no servable model on disk — the state a fresh install sits in before any weights are pulled, previously indistinguishable from a broken daemon; now names itself and points at `models/pull` Behaviour is unchanged: `ServingSnapshot::degraded(r)` is `{degraded_reason: Some(r), ..empty()}`, so `ready` stays false, `active_model` stays None, the `force_relaunch` self-heal still arms, and `wedge_heal_floor` / the `last_healthy_*` latch (which gate on `ready && window > 0`) are untouched. Verified no consumer branches on `degraded_reason.is_some()` — `serving_guard.rs:196` only stamps it on a probe, `positron_serving_source.rs:316` clones it into the ViewState. This is additive to the surface only. Test asserts both halves: the reason reaches the snapshot verbatim AND the relaunch control path is unchanged, so a future refactor cannot buy the message back by breaking the heal. [[absence-rendered-as-positive-fact]] [[fallbacks-are-illegal-fail-loud]] Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc
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.
What
Three sites in
serving_daemonhad a failure reason in hand and publishedServingSnapshot::empty()— which hardcodesdegraded_reason: None. They now publishServingSnapshot::degraded(reason).The worst is
declare_lane_wedged: it takes the reason as a parameter, logs it, andthen drops it from the surface.
declare_lane_wedgedreason: &str→ log onlyempty()— a fresh install looks brokenmodels/pullWhy — measured, not inferred
BigMama, core
bb7141f83, 2026-09-04:Throughout that window
serving/statusreportedready:false, active_model:null, lanes:0, degraded_reason:null— absence with no stated cause, byte-identical to a nodethat never had a brain. I hit that state three times in one night and twice got as far as
drafting a defect against a system that was correctly healing itself in front of me.
The pre-flight guard already reserves a
degraded=field on its probe for exactly thisstring — added 2026-08-15 with the note "every turn of a round waited here for 120s each
while serving/status knew the exact cause and nothing surfaced it" — and was being handed
""on every wait. The field's own doc carries the same lesson from a 2026-07-24 Windowsrepro. This is the third time the same defect has been written up; the reason was simply
never wired at these three call sites.
Safety
ServingSnapshot::degraded(r)is{degraded_reason: Some(r), ..empty()}, so this isadditive to the surface only:
readystays false,active_modelstaysNone→is_live()unchangedforce_relaunchstill arms → the self-heal is untouchedwedge_heal_floorreadslive_ready(still false) → unchangedlast_healthy_*latch gates onready && window > 0→ unchangedChecked every consumer of
degraded_reason— none branch onis_some():serving_guard.rs:196only stamps it onto a probe string;positron_serving_source.rs:316clones it into the ViewState. So populating it cannot suppress a respawn.
Existing
a_reported_wedge_flips_the_lane_not_ready(regression for the 4.1-hour /172 GB-log outage) asserts
ready == falseandforce_relaunch == true— both still hold.Test
One test, in the existing
mod tests, asserting both halves: the reason reaches thesnapshot verbatim AND the relaunch control path is unchanged — so a future refactor can't
buy the message back by breaking the heal.
Validation status — please let CI be the gate
Locally verified: clean compile, and the new test passes by name (not filtered away).
I also read the tests covering the changed path rather than assuming.
The full
--libsuite did not complete locally and I am not claiming it green. Thisbox is 64.9 GB with the citizens' llama-server resident at 39.3 GB; rustc's codegen peaks
around 7–10 GB, and runs were killed at that peak with no stated cause (
[killed]) untilI dropped debug info. No test failures appeared before the stop — but "no failures
observed" is not "suite green", so CI should be trusted over me here.
Filed separately from this branch, both measured on the same node:
dbebed58—serving/statuspublishedlanes:2on areadysnapshot while argv said--parallel 3for ~2.7 mina3d5421a— the#363floor probe announcing a guarded successor on ticks where no process is spawned🤖 Generated with Claude Code
https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc