Skip to content

fix(airc): a daemon the core just started resets the discovery patience budget once per pass (BigMama's #4386 + the bounded reset) - #4404

Merged
joelteply merged 2 commits into
canaryfrom
help/4386-reset-once-per-pass
Sep 26, 2026
Merged

joelteply merged 2 commits into
canaryfrom
help/4386-reset-once-per-pass

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

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

joelteply and others added 2 commits September 26, 2026 07:26
…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
joelteply force-pushed the help/4386-reset-once-per-pass branch from ba6b9e5 to b81a52e Compare September 26, 2026 12:26
@joelteply
joelteply merged commit c37afc1 into canary Sep 26, 2026
8 checks passed
@joelteply
joelteply deleted the help/4386-reset-once-per-pass branch September 26, 2026 12:45
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