Skip to content

fix(boot): start-server starts airc through airc's lifecycle, never airc stop - #4675

Merged
joelteply merged 2 commits into
canaryfrom
fix/boot-uses-airc-lifecycle
Oct 3, 2026
Merged

joelteply merged 2 commits into
canaryfrom
fix/boot-uses-airc-lifecycle

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Review of airc #1508 (operator stop intent): continuum's boot handled a stale or
wedged airc daemon with the public airc stop and then a raw airc daemon. Once
#1508 lands, that airc stop records a durable OPERATOR stop intent; the raw
daemon still came up, but every ensure_daemon_running caller (msg, inbox, status,
monitor attach) is then refused against a live daemon, and the next airc update
stops it for good. Any continuum boot that met a stale daemon would cut the
node's CLI off the mesh.

  • A stale (answering, non-current) daemon is left to airc: its own ensure stops a
    non-current daemon over IPC and starts the installed one. Not reaped here.
  • A wedged holder (answers nothing) is reaped by pid as before, without the
    airc stop first; it could not take an IPC stop anyway.
  • The start is airc's gated autostart (airc events list --limit 0 from $HOME),
    not a raw airc daemon: it honors the maintenance lock and the operator stop
    intent and provisions the daemon's token. Switches to airc join --ensure once
    feat(persona): spawn_persona_service helper (#133 slice 12) #1508 lands.

Verified: bash -n; no other continuum script or core path calls the public airc stop (the core's raw spawn is replaced in #4672). Not exercised live: the M5's
daemon is current, so boot adopts it without reaching these branches.

Must land before airc #1508 rolls to the fleet.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

…airc stop`

Review of airc #1508 (operator stop intent): continuum's boot handled a stale or
wedged airc daemon with the public `airc stop` and then a raw `airc daemon`. Once
#1508 lands, that `airc stop` records a durable OPERATOR stop intent; the raw
daemon still came up, but every ensure_daemon_running caller (msg, inbox, status,
monitor attach) is then refused against a live daemon, and the next `airc update`
stops it for good. Any continuum boot that met a stale daemon would cut the
node's CLI off the mesh.

- A stale (answering, non-current) daemon is left to airc: its own ensure stops a
  non-current daemon over IPC and starts the installed one. Not reaped here.
- A wedged holder (answers nothing) is reaped by pid as before, without the
  `airc stop` first; it could not take an IPC stop anyway.
- The start is airc's gated autostart (`airc events list --limit 0` from $HOME),
  not a raw `airc daemon`: it honors the maintenance lock and the operator stop
  intent and provisions the daemon's token. Switches to `airc join --ensure` once
  #1508 lands.

Verified: bash -n; no other continuum script or core path calls the public `airc
stop` (the core's raw spawn is replaced in #4672). Not exercised live: the M5's
daemon is current, so boot adopts it without reaching these branches.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
Review of #4675 (BIGGIEDESK): any failed `airc ping` (denied, timed out, protocol
mismatch) entered the wedged branch, which globbed the newest socket and `kill`ed
then `kill -9`ed every lsof holder, clients included. A failed ping does not prove
a wedged owner, and the shell cannot name the canonical endpoint's holder.

- machine_daemon_pids and the reap are removed. Recovery and refusal are airc's:
  its gated autostart replaces a stale daemon over IPC and refuses, with its
  reason, what it cannot recover.
- The autostart's failure is no longer swallowed: boot prints airc's own words
  from the daemon-boot log and fails.

Test (new, folded into the existing launcher step of continuum-rust-tests):
start-server-airc-recovery.test.sh runs the real ensure_airc_daemon against a fake
airc with a machine socket present. A failed ping never calls kill, pkill or
lsof; the start is `airc events list`; no public stop and no raw daemon; and an
operator-stopped refusal is shown and fails boot. It fails against canary's
launcher.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply

Copy link
Copy Markdown
Contributor Author

Addressed at 2d4de42.

  • Reap removed. The shell-owned reap is gone entirely: machine_daemon_pids, the glob, lsof, kill and kill -9. Recovery and refusal are airc's.
  • Refusals surfaced. The autostart's failure is no longer || true'd. Boot prints airc's own words and fails. The start switches to airc join --ensure once airc feat(persona): spawn_persona_service helper (#133 slice 12) #1508 is released.

Negative fixture: tools/scripts/tests/start-server-airc-recovery.test.sh, folded into the existing launcher step. It runs the real ensure_airc_daemon against a fake airc, with a machine socket present, and checks that:

  • a failed ping never calls kill, pkill or lsof;
  • the start is airc's gated autostart;
  • there is no public stop and no raw daemon;
  • an operator-stopped refusal is shown and fails boot.

It fails against canary's launcher.

@joelteply

Copy link
Copy Markdown
Contributor Author

Scoped source APPROVE at 2d4de42 for the shell recovery correction. The prior newest-socket glob/lsof/kill paths are removed; startup delegates to AIRC gated admission and returns its refusal instead of swallowing it. The extracted actual-function fixture covers successful admission and refusal without signals, public stop, or raw daemon invocation. I inspected the fixture but did not execute it locally.

Required CI and supported deployment remain separate evidence. Coordinate fleet rollout with AIRC #1508 admission fix; this review does not close the outstanding #4672 bounded-process findings or claim quiet reconnect acceptance.

@joelteply
joelteply merged commit b5de779 into canary Oct 3, 2026
8 checks passed
@joelteply
joelteply deleted the fix/boot-uses-airc-lifecycle branch October 3, 2026 03:54
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