Repository navigation
fix(boot): module init no longer cascades or hangs — per-module timeout + loud aggregate (reliability audit #2/#3) - #1859
Merged
Conversation
…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
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.
runtime.initialize()
return Err'd on the FIRST module that failed init — which skipped EVERY module afterit, 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):
✗ X initialization FAILED) and the loopkeeps going, so the rest of the substrate still comes up.
initialize()is wrapped in a 60s per-module deadline (tokio::time::timeout) — a wedged init isskipped + named (
✗ X init TIMED OUT), not left to stall boot. 60s is a backstop, not a budget (inits aremeant to be fast; heavy work is detached/tick-driven).
N/M modules FAILED … [list]) — the caller logs itloud, so a degraded boot is fully visible instead of first-failure-only-then-silent.
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