Skip to content

fix(boot): airc auto-install never blocks boot — background it, fail fast (speed is paramount) - #1855

Merged
joelteply merged 1 commit into
canaryfrom
fix/airc-bootstrap-never-blocks-boot
Jul 6, 2026
Merged

joelteply merged 1 commit into
canaryfrom
fix/airc-bootstrap-never-blocks-boot

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

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

…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
joelteply merged commit ea34896 into canary Jul 6, 2026
@joelteply
joelteply deleted the fix/airc-bootstrap-never-blocks-boot branch July 6, 2026 04:41
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]>
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