Skip to content

fix(boot): spawn the airc daemon from the home that owns the socket — not the repo CWD - #3697

Merged
joelteply merged 1 commit into
canaryfrom
fix/boot-spawns-airc-daemon-from-owning-home
Sep 4, 2026
Merged

joelteply merged 1 commit into
canaryfrom
fix/boot-spawns-airc-daemon-from-owning-home

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

`continuum reboot` on current airc dies at boot:

airc: refusing to serve a socket this scope does not own.
  --home  <repo>/.airc
  --socket ~/.airc/runtime/airc-machine-*.sock

…and the core comes up with no transport: no rooms, no resident citizens. Measured on the 5090 node today, first boot after the Windows build unlock. Every repo user on current airc hits this.

Root cause: boot_plan.rs::step_airc_daemon runs airc daemon with no home and the continuum repo as CWD. airc derives scope from the working directory, so the daemon presents the repo-scope identity to the machine-account socket — and airc's ownership guard (their #1347/#1352/#1353 family) rightly refuses: a daemon under a foreign identity hands every caller the wrong peer_id, rooms, and advertised endpoint.

This is the third spawn-site instance of that bug class. airc ended it internally with a newtype the spawn API requires — a compile error instead of a night of debugging. This call site lives outside airc where the type can't reach, so the rule is enforced the only way available here: CWD = the OS home dir, which is the home that owns the socket.

When neither USERPROFILE nor HOME resolves, boot now refuses to spawn at all, loudly — a daemon under the wrong identity is strictly worse than no daemon, and the old behavior manufactured exactly that on every fresh checkout.

Validated locally (first box able to): cargo check -p continuum-core --lib clean; the failing reboot is the reproduction, and this node's next reboot runs the fix.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc

… not the repo CWD

`continuum reboot` on current airc dies at boot with:

    airc: refusing to serve a socket this scope does not own.
      --home  <repo>/.airc
      --socket ~/.airc/runtime/airc-machine-*.sock

and the core comes up with "no transport: no rooms, no resident citizens".
Measured on the 5090 node 2026-09-04, first boot after the Windows build
unlock.

Root cause: `boot_plan.rs::step_airc_daemon` runs `airc daemon` with no home
and the CONTINUUM REPO as CWD. airc derives scope from the working directory,
so the daemon presents the repo-scope identity to the machine-account socket
— and airc's ownership guard (their #1347/#1352/#1353 family) rightly refuses
it: a daemon under a foreign identity hands every caller the wrong peer_id,
the wrong rooms, and the wrong advertised endpoint.

This is the THIRD spawn-site instance of that bug class. airc ended it
internally by making the owning-home a newtype the spawn API requires — a
compile error instead of a night of debugging. This call site lives outside
airc where the type cannot reach, so the rule is enforced the only way
available here: spawn with CWD = the OS home dir, which IS the home that owns
the socket.

When neither USERPROFILE nor HOME resolves, boot now refuses to spawn at all,
loudly — a daemon under the wrong identity is strictly worse than no daemon,
and the old behavior was to create exactly that on every fresh checkout.

Validated locally (first box able to): cargo check -p continuum-core --lib
clean; the failing reboot is the reproduction and the next reboot on this
node runs this fix.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc
@joelteply
joelteply enabled auto-merge (squash) September 4, 2026 17:33
@joelteply
joelteply merged commit c90d1dd into canary Sep 4, 2026
5 checks passed
@joelteply
joelteply deleted the fix/boot-spawns-airc-daemon-from-owning-home branch September 4, 2026 17:45
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