Repository navigation
fix(airc): a daemon the core just started resets the discovery patience budget once per pass (BigMama's #4386 + the bounded reset) - #4404
Merged
Conversation
…ce budget — the node cannot refuse to boot on the verdict its own recovery bought The 5090, dark four days (2026-09-25). The core's boot pass: 19:28:40.940341 airc.daemon.recovered — stale socket cleared, daemon started 19:28:40.940486 airc.discovery.settled kind=degraded attempts=2 waited_ms=53469 19:28:40.956738 Refusing to boot: --mode=full-citizen requires AIRC Healthy 146 µs between healing the fault and refusing on it, then the daemon it had started died with the core — and the next restart repeated the same pass. No hand INSIDE the substrate could break it; an operator had to start a daemon out-of-band (which is what #4 in this file's own history, the M5's two dark nights, already paid for once). Two constants met a node they were not measured on: `recover_stale_daemon` waits 25 s for the daemon to answer, and DISCOVERY_PATIENCE is 45 s total — while this node's daemon needs 60–70 s to answer, because the answer waits behind a 2.4 GB event store. The recovery's own cost was charged against the window that decides whether to believe its result. - `DAEMON_STARTED_AT` records when a recovery started a daemon; the retry loop measures its budget with `effective_elapsed(started, daemon_started, now)` — the later of the loop's start and that moment. A started daemon resets the budget ONCE: still bounded, never forever, and a recovery older than this loop cannot extend it. - The recovery notes the start whether or not the daemon answered inside its own 25 s — "started, not answering yet" is the transient case the patience loop exists for. - `waited_since_daemon_start_ms` rides both probes, so a slow boot says which clock it was judged on. Pure + pinned: the incident's own numbers (53 s of a 45 s budget) settle Degraded with no recovery, and are waited out when a daemon was started. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc
… pass Review of #4386: every retry re-runs recover_stale_daemon when the socket is unheld. A daemon that keeps dying therefore moved DAEMON_STARTED_AT forward on each retry, the budget never expired, and boot would loop on daemon starts without ever settling a verdict. The origin now freezes at the first start newer than the loop's own start (frozen_reset_origin, pure), so the reset is once per pass, as the doc says. Test: a second, later start leaves the frozen origin unchanged, the budget still expires, and an older start is ignored. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply
force-pushed
the
help/4386-reset-once-per-pass
branch
from
September 26, 2026 12:26
ba6b9e5 to
b81a52e
Compare
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.
BigMama's #4386 exactly as she wrote it (
9fac30d2f), plus the one change I asked for in review, so the fix can land while she is offline: the patience-budget origin is frozen at the first daemon start of the pass. Without that, a daemon that keeps dying re-runs recovery on every retry, moves the origin forward each time, and boot loops on daemon starts without ever settling a verdict.Why now: this is the boot refusal that took the 5090 dark for four days (heal a stale socket, refuse to boot on that same verdict 146 µs later, and the daemon dies with the core). The 5090 has been dark again for 8 hours tonight. Whatever tonight's cause turns out to be, the next boot there must not die of this one.
Test: BigMama's test, extended: a second, later daemon start leaves the frozen origin unchanged, the budget still expires once, and a start older than the loop is ignored.
Supersedes #4386, which stays open for BigMama to close or fold.
🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo