Repository navigation
fix(boot): airc auto-install never blocks boot — background it, fail fast (speed is paramount) - #1855
Merged
Merged
Conversation
…fast (speed is paramount) The core's airc discovery synchronously awaited `auto_install_airc()` (curl|bash) on the boot path with a 120s deadline. When airc wasn't on PATH (a launchd/service boot with a minimal PATH — see #1853/#1854), the core HUNG up to 120s before binding its IPC socket: boot held hostage to a network install. Joel: "speed is paramount". Fix: when airc isn't on PATH, spawn the installer DETACHED (tokio::spawn, logged) and return the new `AutoInstallInProgress` fast. The aggregate `discover()` already degrades gracefully (returns Unreachable), so the core binds its socket + is responsive NOW; airc joins once the background install lands. The 120s AUTO_INSTALL_DEADLINE now only bounds the detached task, never boot. Still fail loud (named reason), just without hanging. - discovery.rs: background-spawn the install + return AutoInstallInProgress (was blocking await). - discovery_state.rs / discovery_aggregate.rs: mirror the AutoInstallInProgress variant + map it. LIVE-verified on this Mac: booting the core with airc OFF PATH now logs `airc: ✗ unreachable: airc not on PATH — installing in the BACKGROUND; node is up …` instead of the old `airc installer did not exit within 120s` hang. 21 airc::discovery tests green; normal boot (airc present → fast path) unaffected (~44s, model load dominated). Reliability spine: consistent fast start. Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply
added a commit
that referenced
this pull request
Jul 6, 2026
… to join (self-healing re-attach is a follow) (#1856) Follow-up to #1855. Its messages over-promised "will attach on the next discovery pass" — but AircModule has `tick_interval: None` and discovers ONCE, so there IS no next pass: on a fresh box the backgrounded airc install lands but the core doesn't re-join airc without a RESTART. Corrected the operator-facing strings (DiscoveryError + DiscoveryFailure AutoInstallInProgress + the warn/info logs) to say exactly that — the node is UP and local commands work, restart to become a grid peer once the install completes. The real self-healing re-attach (rejoin without restart) is a genuine follow, not a tick: AircModule's [[no-fallbacks-ever]] doctrine refuses partial attach, so it needs full transport reconstruction (Store→Daemon transport swap + re-propagate the socket to the persona manager), not a spawn_daemon_attach retry. Tracked in the grid-node-resilience memory. Message-only change; crate compiles. Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo Co-authored-by: Claude Opus 4.8 <[email protected]>
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.
The core's airc discovery synchronously awaited
auto_install_airc()(curl|bash) on the boot path with a120s deadline. When airc wasn't on PATH (a launchd/service boot with a minimal PATH — see #1853/#1854), the
core HUNG up to 120s before binding its IPC socket: boot held hostage to a network install. Joel: "speed is
paramount".
Fix: when airc isn't on PATH, spawn the installer DETACHED (tokio::spawn, logged) and return the new
AutoInstallInProgressfast. The aggregatediscover()already degrades gracefully (returns Unreachable),so the core binds its socket + is responsive NOW; airc joins once the background install lands. The 120s
AUTO_INSTALL_DEADLINE now only bounds the detached task, never boot. Still fail loud (named reason), just
without hanging.
LIVE-verified on this Mac: booting the core with airc OFF PATH now logs
airc: ✗ unreachable: airc not on PATH — installing in the BACKGROUND; node is up …instead of the oldairc installer did not exit within 120shang. 21 airc::discovery tests green; normal boot (airc present → fast path) unaffected (~44s, modelload dominated). Reliability spine: consistent fast start.
Co-Authored-By: Claude Opus 4.8 [email protected]
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo