Skip to content

fix(boot): module init no longer cascades or hangs — per-module timeout + loud aggregate (reliability audit #2/#3) - #1859

Merged
joelteply merged 1 commit into
canaryfrom
fix/resilient-module-init-no-cascade
Jul 6, 2026
Merged

joelteply merged 1 commit into
canaryfrom
fix/resilient-module-init-no-cascade

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

runtime.initialize() return Err'd on the FIRST module that failed init — which skipped EVERY module after
it, then the caller (ipc/mod.rs) swallowed the error and bound the socket anyway → a silently half-booted
core where one early failure hid the rest and disabled everything downstream. And a single hung
initialize() stalled the whole loop + the socket bind (the airc-120s class, generalized).

Fix (well-thought-out, no blast-radius crash):

  • Each module inits INDEPENDENTLY — a failure is recorded LOUDLY (✗ X initialization FAILED) and the loop
    keeps going, so the rest of the substrate still comes up.
  • Each initialize() is wrapped in a 60s per-module deadline (tokio::time::timeout) — a wedged init is
    skipped + named (✗ X init TIMED OUT), not left to stall boot. 60s is a backstop, not a budget (inits are
    meant to be fast; heavy work is detached/tick-driven).
  • On any failure, return the COMPLETE aggregate summary (N/M modules FAILED … [list]) — the caller logs it
    loud, so a degraded boot is fully visible instead of first-failure-only-then-silent.
  • Not a blanket crash: the core still binds + serves (resilient to one optional module failing); the main.rs
    boot deadline (fix(boot): boot deadline kills the zombie-park-forever path — fail loud + exit, let the supervisor restart (task #82) #1858) still backstops a failure that prevents socket bind entirely.

Verified: 26 runtime tests green; normal boot ~44s with all modules clean (no false degraded-summary), core
responsive. Credit: parallel reliability-audit agent. Reliability spine: startup foolproofing.

Co-Authored-By: Claude Opus 4.8 [email protected]
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

…ut + loud aggregate (reliability audit #2/#3)

runtime.initialize() `return Err`'d on the FIRST module that failed init — which skipped EVERY module after
it, then the caller (ipc/mod.rs) swallowed the error and bound the socket anyway → a silently half-booted
core where one early failure hid the rest and disabled everything downstream. And a single hung
`initialize()` stalled the whole loop + the socket bind (the airc-120s class, generalized).

Fix (well-thought-out, no blast-radius crash):
- Each module inits INDEPENDENTLY — a failure is recorded LOUDLY (`✗ X initialization FAILED`) and the loop
  keeps going, so the rest of the substrate still comes up.
- Each `initialize()` is wrapped in a 60s per-module deadline (`tokio::time::timeout`) — a wedged init is
  skipped + named (`✗ X init TIMED OUT`), not left to stall boot. 60s is a backstop, not a budget (inits are
  meant to be fast; heavy work is detached/tick-driven).
- On any failure, return the COMPLETE aggregate summary (`N/M modules FAILED … [list]`) — the caller logs it
  loud, so a degraded boot is fully visible instead of first-failure-only-then-silent.
- Not a blanket crash: the core still binds + serves (resilient to one optional module failing); the main.rs
  boot deadline (#1858) still backstops a failure that prevents socket bind entirely.

Verified: 26 runtime tests green; normal boot ~44s with all modules clean (no false degraded-summary), core
responsive. Credit: parallel reliability-audit agent. Reliability spine: startup foolproofing.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply merged commit 4a5294f into canary Jul 6, 2026
@joelteply
joelteply deleted the fix/resilient-module-init-no-cascade branch July 6, 2026 05:15
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