Repository navigation
feat(reliability): system-scope service (LaunchDaemon / systemd system) — survives LOGOUT; airc REQUIRED not disabled - #1854
Merged
Conversation
…m) — survives LOGOUT; airc REQUIRED not disabled Follows #1853. Two corrections from Joel's review: 1. --system scope (the real BIGMAMA fix — logout/boot-without-login). `install-service.sh install --system` (npm run service:install:system): macOS LaunchDaemon in /Library/LaunchDaemons (runs AS the installing user via UserName + HOME so it still uses ~/.continuum, but system-managed so it survives that user's logout); Linux systemd SYSTEM unit (User=, WantedBy=multi-user.target). Default (no flag) stays the no-sudo user LaunchAgent / --user unit from #1853. 2. airc is the nervous system — we do NOT operate without it. Dropped the #1853 AIRC_DISABLE_AUTOINSTALL=1 band-aid (which traded a boot hang for a node with no substrate). Instead: REQUIRE airc (fail loud at install if absent, pointing at its installer) and keep it on the service PATH so the core finds it via `which airc` at boot — no install, no 120s hang, full grid citizen. Verified on this Mac (no sudo needed): the reworked USER LaunchAgent boots the core in ~12s with airc found via PATH and NO disable, KeepAlive restart works (killed pid → relaunched), clean uninstall. The --system daemon plist is well-formed (plutil-lint of the same wrapper passes) — its only extra step is the sudo `launchctl bootstrap system`, which Joel runs to load it (I can't sudo non-interactively). Test the daemon: npm run service:install:system (prompts for sudo; then `cu ping`, and it survives logout) 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
…fast (speed is paramount) (#1855) 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. Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo Co-authored-by: Claude Opus 4.8 <[email protected]>
joelteply
added a commit
that referenced
this pull request
Jul 6, 2026
…ud + exit, let the supervisor restart (task #82) (#1858) A parallel reliability audit confirmed the #82 zombie-park is worse than assumed: `IPC_READY` is a process-global `watch::Sender` that is NOT dropped when the IPC thread panics/hangs before binding the socket. So `main`'s `ipc_ready_rx.changed()` never errors → it parks FOREVER with no socket, no exit, no nonzero code — the "clean exit" the old comment promised never happens. Concrete triggers already in-tree: a pre-bind `panic!("failed to load model_registry")`, or ANY hung module `initialize()` (inits run serially with no per-module timeout — the airc-120s-hang class, generalized). Fix: bound the ready-wait with a BOOT DEADLINE (`tokio::time::timeout`, default 300s — generous for a cold model load, override via CONTINUUM_BOOT_DEADLINE_SECS). If the socket isn't bound in time, boot is wedged → fail loud + `libc::_exit(1)` so the supervisor (launchd/systemd KeepAlive from #1853/#1854) restarts us instead of an alive-but-deaf zombie. The changed()-err path now `_exit(1)`s too (was `return Ok(())`, which masked a boot failure). Both paths `eprintln!` alongside `tracing::error!` because `_exit` skips the async appender flush — the raw stderr write is what the operator actually sees. LIVE-verified on this Mac: normal boot ready in ~36s (default 300s deadline, no false-positive); a 2s deadline against the real boot exits(1) at ~2s with the fail-loud message visible. Reliability spine: fail loud, never park. Credit: parallel reliability-audit agent. 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.
Follows #1853. Two corrections from Joel's review:
--system scope (the real BIGMAMA fix — logout/boot-without-login).
install-service.sh install --system(npm run service:install:system): macOS LaunchDaemon in /Library/LaunchDaemons (runs AS the installing
user via UserName + HOME so it still uses ~/.continuum, but system-managed so it survives that user's
logout); Linux systemd SYSTEM unit (User=, WantedBy=multi-user.target). Default (no flag) stays the
no-sudo user LaunchAgent / --user unit from feat(reliability): reboot-surviving core service (launchd/systemd) — upstart spine #2, live-proven on Mac #1853.
airc is the nervous system — we do NOT operate without it. Dropped the feat(reliability): reboot-surviving core service (launchd/systemd) — upstart spine #2, live-proven on Mac #1853 AIRC_DISABLE_AUTOINSTALL=1
band-aid (which traded a boot hang for a node with no substrate). Instead: REQUIRE airc (fail loud at
install if absent, pointing at its installer) and keep it on the service PATH so the core finds it via
which aircat boot — no install, no 120s hang, full grid citizen.Verified on this Mac (no sudo needed): the reworked USER LaunchAgent boots the core in ~12s with airc found
via PATH and NO disable, KeepAlive restart works (killed pid → relaunched), clean uninstall. The --system
daemon plist is well-formed (plutil-lint of the same wrapper passes) — its only extra step is the sudo
launchctl bootstrap system, which Joel runs to load it (I can't sudo non-interactively).Test the daemon: npm run service:install:system (prompts for sudo; then
cu ping, and it survives logout)Co-Authored-By: Claude Opus 4.8 [email protected]
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo