Repository navigation
feat(cli): macOS — launchd owns the launch; continuum install registers it in our own binary (card a1bd8b58, audit #4223 row D-mac) - #4228
Conversation
…ters it in our own binary (card a1bd8b58, audit #4223 row D-mac) Measured 2026-09-19 on IntelMac: the core ran as ppid 1 with NO launchd job — an orphan of start-server.sh, dark on the first crash. Installing the LaunchAgent did not close it: `continuum reboot` stopped the core (clean exit, KeepAlive{Crashed} stays down) and SPAWNED a new one outside launchd. Registration is not supervision. What is true now (bin/continuum/launchd.rs, new): - when a launchd job for the core exists, `start`/`reboot` do not spawn: they STAGE the artifact into the slot the plist execs (rename-aside, copy, sha re-read) and `launchctl kickstart -k` the job, then `wait_owned` refuses the receipt unless launchd's pid for the job IS the pid serving the socket. CONTINUUM_FROM_SOURCE opts out; explicit `--service` is accepted on macOS (the parse-time refusal named Windows only). - `continuum supervisor-status [--crash-test]`: the verdict as a verb — UNSUPERVISED / ORPHANED / OWNED-CANNOT-HEAL / SUPERVISED (structurally); `--crash-test` is kill -9 and a 60 s heal receipt, refused on any core launchd does not own. - `continuum install [--user] [--no-start]` / `continuum uninstall` (Joel: "it needs to be in our own binary"): the mac arm of the one verb. Writes the plist with the BINARY as the command (no bash -lc wrapper — audit item 7); the launch environment is launchd's own EnvironmentVariables dict computed by the same code a direct launch uses (config.env, ORT, runtime library dirs) plus the operator's PATH. Default is the system LaunchDaemon (sudo, once — the consent macOS requires, the same class as the 5090's UAC, card 7b56a84b); `--user` is the agent, accepted and PROVEN before success. Stops any core on the socket through the save rail first, kickstarts, and refuses an unowned core. The dispatch line is a placeholder for the verb skeleton's platform trait (BigMama) — a one-line fold when it lands. Receipts on IntelMac (debug build of this branch, core 1a2865c): - supervisor-status: the first live run read ORPHANED because core_pid came from the CLI's `<socket>.pid` file, which a launchd-launched core never writes. The socket's holder (pgrep on the exact argv) is the truth; re-run: SUPERVISED (structurally), job_pid == core_pid == 96595. - install --user: 54 s end to end — stopped 96595 through the rail, wrote the binary-form plist, bootstrapped gui/501, kickstarted, core 45292 up and owned. Then supervisor-status read OWNED, CANNOT HEAL: launchd logged "pending spawn, domain in on-demand-only mode" at bootstrap — on this Mac the user agent cannot heal, exactly the measurement that makes the daemon the default. The system arm needs one sudo. - 4 unit tests (bin continuum, launchd::tests): slot read from both plist forms, job pid from launchctl print, the four verdicts + daemon-outranks-agent, and the rendered plist round-trips its slot through slot_from_plist with the binary as the command and the operator as UserName. REAL_EXIT 0. Found by the receipt, fixed here: install's stop line said "outside launchd" of a core the job owned — the job's pid is read first now and the line says which. Noted, not fixed (rail, not this lane): that stop reported 1 of 63 modules unsaved (cognition drain Incomplete { in_flight: 6 }); like reboot, install prints it and continues. Not in this PR: the install-service.sh acceptance I had drafted — the shell shrinks to bootstrap under the converge, it does not grow. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
|
CHANGES REQUESTED (Fable, read in full at b667436 — the pure parts, the verdict, the round-trip plist test and
Everything else: agree with the daemon default over the agent, and with |
…and its wake — three things the M5 would have paid for (#4228 review) Fable's review of b667436, each proven live on IntelMac before the fix and after: 1. AbandonProcessGroup. The lanes (llama-server) share the core's process group, and launchd's default on a job exit is to SIGKILL the rest of the group — every kickstart and every heal a cold model load, adoption dead. Measured: lane 51552 in pgid 45292 (the core). The plist now carries <AbandonProcessGroup/>true, asserted in the round-trip test. Receipt, the contrast pair from the lane-registry sweep: 16:42Z first transition, OLD plist: RemovedDead { pid: 51552 } 16:43Z kickstart -k, NEW plist: LeftLive { pid: 10017 } — the new core serves on it, ready=true, the lane pid unchanged across the restart. 2. config.env is the core's to apply, not the launcher's. The direct path re-applied it to the child every start; the plist froze it into EnvironmentVariables at install, so "edit, reboot" ran the old values under launchd until a re-install. Now `config_env::apply_to_process()` runs first thing in a sync `main`, before the tokio runtime exists (set_var must not race a reader — the one place that holds), and the plist carries only PATH and the runtime library env. Unit test: a key in the file and absent from the launcher env reaches the process, last assignment wins. Receipt: service.err.log "applied 2 assignment(s)" → append a key → kickstart → "applied 3" — no install between. 3. No caffeinate under launchd. start-server.sh wraps the core in `caffeinate -s -i` (card 94a95a98: the M5 slept while hosting); the binary-as-command plist dropped it. The core holds the same pair itself now — IOKit PreventSystemSleep + PreventUserIdleSystemSleep for its lifetime (`system_resources/power_assertion.rs`, macOS only, one call, no task; probes power.assertion.held/refused). Receipt: `pmset -g assertions` lists both under pid 9633(continuum-core-server); the script's wrapper is now redundant and can go with Kimi's script lane. 4. serving_core_pid anchored: `^([^ ]*/)?continuum-core-server <socket>$` with the socket regex-escaped, so a caffeinate parent on a script-path node no longer answers first. Also from the live run: install's stop line said "outside launchd" of a core the job owned — it reads the job's pid first now and says which; install names the artifact it registered (the slot's own binary, or the one it staged — `resolve_core_artifact` prefers the slot, so a new build reaches it through `reboot` or CONTINUUM_CORE_BIN); `reboot --service` typed explicitly on macOS no longer refuses at parse. Tests: launchd 4/4, config_env 1/1, REAL_EXIT 0; cargo check lib + both bins clean in the touched files. Canary 7b69109 merged. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
|
#4228 all four landed at 1ce87de (canary 7b69109 merged in), each with the live receipt in the PR body: (1) AbandonProcessGroup — the contrast pair from the lane-registry sweep, RemovedDead { 51552 } under the old plist, LeftLive { 10017 } across a kickstart under the new one, the new core serving on it; (2) the core applies config.env to itself in a sync main before tokio exists, plist carries only PATH + lib env — "applied 2" then "applied 3" across a kickstart with no install between; (3) the core holds the caffeinate pair itself via IOKit, both rows in pmset -g assertions under its pid; (4) pgrep anchored. Your word at the new head; the M5 receipt (install system, kickstart-with-lane, kill -9, unattended hour) is yours after. |
…was given for — its SHA-256 rides the RunAs argv; a read of the ACL mask as bits Fable's condition on #4232: the plan in %TEMP% is rewritable by any same-user process between the parent's write and the consent, and the elevated child registered whatever it read — a boot task as ANY account, through our own registrar. The parent now hashes the bytes it WROTE and passes `--plan-sha` in the RunAs argument list (argv cannot be altered once spawned); the child re-derives the digest from what it reads and refuses before touching schtasks. `InstallOptions` pairs `--plan-sha` with `--plan`; `read_bound_plan` is the one gate, pinned: a rewritten plan (another principal) is refused with the reason. Cormac's note: a hex ACE mask is read as BITS (RX = 0x1200a9 contained), so a pre-existing full-control mask (0x1f01ff) no longer reads as drift and costs an elevation. The non-Windows message names the macOS arm as #4228. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc
…d bytes — no user-writable file is read after the sudo consent Fable on #4232, the same window here: the system-domain install wrote a draft plist under ~/.continuum and then ran `sudo install`/`sudo launchctl bootstrap` on that path — root copying whatever the file said at that moment. Any same-user process could rewrite the draft between the write and the consent (UserName, ProgramArguments), and root would register it: a local escalation through our own registrar. "Same user" was the wrong frame; the consenting human is not every process wearing their token. Now the unelevated half hashes the exact bytes it wrote and runs ONE consent: `sudo <self> install --elevated --plan <draft> --plan-sha <sha256>`. The elevated half (`launchd::live::register_elevated`, refuses unless euid 0) reads the draft once, refuses if the digest differs from the argv's ("changed between the consent and this read; nothing was registered"), refuses a plan naming no artifact, writes the plist itself under /Library/LaunchDaemons (root:wheel 0644, the constant path — never one from the plan), boots out the invoking user's agent (SUDO_UID) and any prior daemon, bootstraps (RunAtLoad starts the core) and enables. The parent then waits for ownership; it no longer kickstarts a system job (root-only, and not owed after bootstrap) — kickstart stays for the gui domain, where bootstrap does not start it. Flag spelling matches #4232 (--plan-sha) so the one verb has one grammar. Tests: launchd 5/5 (new: the digest moves with any byte; the daemon path is the constant). Live negative controls on IntelMac: `install --elevated …` typed as the user → "runs as root under sudo; it is not a verb to type", exit 1; `--elevated` without its pair → refused, exit 1. Not covered without sudo: the digest-mismatch refusal on the root path (unit-tested; unreachable unprivileged by construction). Follow-up carded, 267dc270: under a system daemon `reboot` still kickstarts (root); the root-free deploy is a restart exit after the save rail + KeepAlive SuccessfulExit=false. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
|
#4228 head is 7c119a0: the same window you found on #4232 existed in my system arm (sudo install on a draft under ~/.continuum) and is closed the same way — the draft's sha256 rides the sudo argv, the elevated self reads once, refuses on mismatch, writes the plist itself at the constant path. 5/5 tests; live negative controls on IntelMac (elevated half typed as the user → refused; flags without their pair → refused). Word at the new head when you have it; I hold the fold onto #4232's skeleton until the post-18:20Z batch lands. |
|
APPROVE — reviewed at exact head 7c119a0 (Fable). All four fix-ups are in and each carries its receipt: |
…ine (supervisor, core, CLI on PATH); each arm reads, changes only what drifted, says so (#4232) * feat(cli): `continuum install --supervisor` — the OS supervisor is converged from the binary, one elevation, verified by re-reading the scheduler Joel, 2026-09-18: "What's the repeatable process or inside an install? … Are all concerns wired into the same location? Same strategy. Do NOT hand jack." and "it needs to be in our own binary here." The contract (card 7b56a84b, audit §5 D): the core is a service, not a session child. On Windows: ContinuumCore as an S4U principal at boot, and its sibling ContinuumDeploy (the consumer) every 10 min, same principal. The 5090 ran Interactive + AtLogOn and went dark 2 h 42 m when the logon session tore down. `supervisor_install.rs` (new module under bin/continuum/): - pure, tested: the Task Scheduler XML each task is registered from (S4U, LeastPrivilege, BootTrigger / TimeTrigger PT10M, RestartOnFailure PT1M×999, PT0S limit), the drift verdict (LogonType / Triggers / Action / Principal / Disabled / CallerAccess / Absent), the SDDL read for the caller's RX (deny fails closed), CLIXML stderr → its message line, the option pairing. - the boundary: `--check` reads both tasks and exits non-zero on drift; without it, the plan (the registered release's own descriptor — the slot's single source, never re-chosen here) goes to ONE `Start-Process -Verb RunAs` of this same binary with `--elevated --plan`, which runs `schtasks /Create /XML` + `icacls … /grant *SID:RX` and leaves a receipt file; the parent reads the receipt, then re-reads the scheduler and demands zero drift. A refused consent says so and changes nothing. - macOS / Linux arms name their owners (Fable / Cormac), never "unsupported". `deploy-consume --install/--uninstall` are gone: the consumer's task has one registrar now (the unelevated schtasks path made an Interactive task that died with the session, measured 2026-09-19). `PreparedCoreService::powershell` delegates to the module's one helper. Measured on the 5090 through the product's path: `--check` reports `ContinuumCore: LogonType("Interactive"), Triggers(["MSFT_TaskLogonTrigger"])` and `ContinuumDeploy: LogonType("Interactive"), Action` — the outage's cause, as data. The write half awaits the operator's consent. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc * fix(install): the elevated child registers only the plan the consent was given for — its SHA-256 rides the RunAs argv; a read of the ACL mask as bits Fable's condition on #4232: the plan in %TEMP% is rewritable by any same-user process between the parent's write and the consent, and the elevated child registered whatever it read — a boot task as ANY account, through our own registrar. The parent now hashes the bytes it WROTE and passes `--plan-sha` in the RunAs argument list (argv cannot be altered once spawned); the child re-derives the digest from what it reads and refuses before touching schtasks. `InstallOptions` pairs `--plan-sha` with `--plan`; `read_bound_plan` is the one gate, pinned: a rewritten plan (another principal) is refused with the reason. Cormac's note: a hex ACE mask is read as BITS (RX = 0x1200a9 contained), so a pre-existing full-control mask (0x1f01ff) no longer reads as drift and costs an elevation. The non-Windows message names the macOS arm as #4228. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc * feat(cli): bare `continuum install` converges the whole machine — supervisor, core, CLI on PATH — each arm reads, changes only what drifted, says so Joel, 2026-09-19: "Why wouldn't it be like `uu update`" / "Or install" / "You want users to remember almost nothing." ONE verb, idempotent: on a bare box it is an install, on a live node an update, run twice it says nothing changed. - `Arm { Supervisor, Core, Cli }` in run order (a core is handed only to a prepared supervisor; the slot's CLI is fresh only after a stage). Bare `install` runs every arm; `--supervisor/--core/--cli` restrict; `--check` reads only. Each arm returns an `ArmReport { drift_before, drift_after }`; the orchestrator sums them and exits non-zero only when drift REMAINS. - core arm: running build vs the checkout's HEAD (`same_commit`); drifted → `reboot --service` (build, stage into the slot, hand off — the same path the unattended consumer takes), then re-read the running sha. - cli arm (`install_cli.rs`): `~/.local/bin/{continuum,uu}.exe` must be the slot's CLI byte-for-byte (SHA-256), and the dir on the USER PATH. Missing / Stale / NotOnPath named; write = copy with the installer's 10 s contention retry (old image moved aside, never deleted under a running process) and a user-PATH prepend, then re-read. Both names carry `.exe` so PowerShell and cmd resolve `uu`, not only Git bash (the installer's bare `uu` copy). This is the stale-CLI seam (#422): the 07:32 CLI on this box could not build for a day because nothing refreshed it. Measured on the 5090, bare `install --check`: 7 ways drifted across 3 arms — supervisor Interactive + LogonTrigger ×2 tasks, core 40b4126 vs HEAD, CLI Stale("continuum") + Missing("uu") — the machine's true state in one read. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc * fix(install): the core arm's unwrap_or carries its same-line reason (the unwrap ratchet) Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc --------- Co-authored-by: Claude Opus 5 <[email protected]>
-#4235) — textual resolution only; the two install verbs are reconciled in the next commit
…ntinuum install` (Joel: users remember almost nothing) #4232 made `install` one verb with arms that read, change only what drifted, and say so. This folds the mac arm (a1bd8b58) into that shape instead of a verb beside it: - `launchd::mac_drift` — the READ half, pure: Absent / Domain{have,want} / WrapperCommand (the script's bash -lc plist) / KillsLanes (no AbandonProcessGroup) / NotOwned{job_pid,core_pid} / CannotHeal (agent on an on-demand-only gui domain). Test: a rendered daemon plist with the job owning the socket's pid reads as NOTHING (twice = nothing changed); the script-installed agent read against the daemon contract names four drifts at once; an agent beside an orphan names the pid. - `install_supervisor_macos(check, user) -> ArmReport` — the WRITE half is the existing register + hand-off (save-rail stop, hash-bound elevated register for the daemon, kickstart for the agent, `wait_owned` refusing an unowned core), gated on drift; then the read runs again and the report is what remains. - `InstallOptions` gains `--user` (macOS: the agent instead of the daemon — the explicit other choice; refused on Windows). `--no-start` is gone: the core arm decides the hand-off. The old macOS-only `InstallOptions`/`install` are removed. - `install_core` runs on macOS too: `reboot` there implies the supervisor when a launchd job exists, so `service: cfg!(windows)`. - The CLI arm on macOS is declared owed (the slot carries no CLI descriptor on this OS): `--cli` refuses by name; bare `install` says "skipped, not counted" — never a converged it did not read. - `finish_install` is the one verdict for both platforms. Receipts on IntelMac (debug CLI of this branch, core b667436, agent registered): `install --check` → supervisor: Domain{have: Gui(501), want: System}; core: running b667436, HEAD 7c119a0 → "2 way(s) drifted across 2 arm(s)", exit 1 `install --user --check` → supervisor converged; core drifted → 1 way, exit 1 `install --user --supervisor`→ "✓ install: 1 arm(s) converged — nothing changed", exit 0 (the idempotent write on a converged arm) Tests: launchd 7/7 + the skeleton's 7 on macOS, REAL_EXIT 0. Noted for #4232's file, not changed here: its Windows-only pure helpers (CLI_NAMES, cli_dir, plan_digest, same_path, …) warn dead on macOS now that the verb compiles here — 14 warnings that belong with the skeleton (cfg_attr on the Windows-only items, or a `windows` submodule). Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
|
#4228 folded onto the one verb at b1e544e (a textual merge commit of canary 8eab259, then the fold as its own commit): the mac supervisor arm is launchd::mac_drift (read: Absent / Domain / WrapperCommand / KillsLanes / NotOwned / CannotHeal) + install_supervisor_macos (write = the register + hand-off, gated on drift, re-read after) behind the same install(); --user joins InstallOptions, --no-start is gone, install_core runs on macOS, the CLI arm is declared owed there rather than counted. Receipts on IntelMac: install --check reads exactly the two true drifts (agent where daemon wanted; b667436 vs HEAD), --user --check reads one, --user --supervisor on the converged arm says "nothing changed" exit 0. 14/14 tests. The dispatch is not the only delta from Fable's APPROVE at 7c119a0, so a word at the new head please. BigMama: #4232's Windows-only pure helpers warn dead on macOS (14) — your file, noted in the commit, not touched. Also carded b18c237f (P1): the cargo-target eviction is a scheduled cargo clean on the 465 GiB tier — 6 sweeps / 159 GB on IntelMac today, every lib build cold. |
…e core arm converges the tracked checkout; #4237) — the mac orchestrator takes the same take/failed shape; one finish_install for both platforms
|
#4228 head is 5cd4ad7: canary 6defc31 (#4236, #4237) merged in; the mac orchestrator now takes #4236's take/failed shape and both platforms share one finish_install (an arm that cannot run is one reported drift). Receipt of #4236's fix on macOS: |
|
APPROVE — reviewed at exact head 5cd4ad7 (Fable). The delta from 7c119a0 is the fold onto the one verb (b1e544e): the mac supervisor arm is |
…ines justified, SupervisionVerdict named at its use site
CI (cargo test --lib) at the previous head: unjustified unwraps rose 2264 → 2266 and
unwired public machinery rose 107 → 108. Both mine:
- `slot_from_plist`'s `strip_prefix('\\').unwrap_or(rest)` and
`config_env::apply_to_process`'s `.unwrap_or(0)` had no same-line reason. They do
now (no backslash = an unescaped quote, the same slice; no home dir = no file =
zero assignments, the honest count).
- `SupervisionVerdict` read as constructed nowhere outside its file because I had
removed the one `use` that named it (an unused-import warning) and the call site
bound `supervision_verdict(...)` without the type. The scan is right that a `use`
is not a use; the binding is now annotated `launchd::SupervisionVerdict`, which is
the production mention the type actually has.
Both ratchets green locally (6 passed in source_hygiene), bin check clean.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
|
#4228 head f848c1c: CI at the previous heads had failed on two hygiene ratchets, both mine — two unwrap_or lines without a same-line reason (now justified) and SupervisionVerdict reading as unwired because I had dropped the only mention of the type outside its file when clearing an unused import (now named at its binding). Both ratchets green locally. The delta from your APPROVE at 5cd4ad7 is those three lines; I take the word as carrying and merge on green via airc work merge. |
…ck — a core built in a lease worktree tracked the lease and read "git fetch absent" for 4.5 h after the merge pruned it (card 790c6bcb) (#4248) The checkout the deploy decision tracks had two resolvers (`modules/deploy_tracker.rs:: from_env`, `bin/continuum.rs::tracked_repo_dir`), both `CONTINUUM_TRACK_REPO_DIR` else the repo root of `CARGO_MANIFEST_DIR` — wherever the binary was BUILT — and the tracker's copy resolved it once at construction. IntelMac, 2026-09-19 21:38Z → 02:0xZ: the running core had been built in the #4228 lease worktree; `airc work merge` pruned it; for 55 ticks the tracker read `SourceUnavailable { "git fetch canary absent" }` — a git failure, not the truth ("the checkout I track is gone") — while canary moved four tips past it. Every lease build on every node carries the same pointer. - `runtime::tracked_checkout` is THE resolver, both owners call it. The candidate (the recorded fact, else the build-time root) resolves to the DURABLE main working tree of its repo (`git rev-parse --path-format=absolute --git-common-dir`'s parent): a worktree resolves to the clone it came from, a plain checkout to itself. A candidate that is gone is `CheckoutError::Gone(path)`, a directory that is no checkout is `NotARepo`; both Display the fix (`set CONTINUUM_TRACK_REPO_DIR`). - `DeployTrackerModule` resolves on EVERY tick (one `is_dir` + one bounded git call) — the source no longer holds a dir; a vanished checkout is named by path in the tick's `SourceUnavailable`, on the first tick after. `tree_dirty` reads the same resolution. - `continuum install`'s core arm RECORDS the durable checkout it deployed from as `CONTINUUM_TRACK_REPO_DIR` (once; read mode records nothing), so the core built by an install from a lease tracks the clone, not the lease. - Test: a temp repo + worktree — the worktree resolves to main, main to itself, the pruned worktree is `Gone` by path, a plain dir is `NotARepo`. Receipt on IntelMac: with the key pinned by hand and the core rebooted onto fd1960e, the first tick read the tip (`deploy.track.request_written` tip 6d43075, running fd1960e) — the read this change makes automatic. Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
…wd — supervised nodes judged their hour every hour and never said it (card 11b66313) (#4254) Two call sites derived the org room (`#cambriantech` for github.com/CambrianTech/…) from the core PROCESS'S cwd via `airc_lib::JoinContext::from_cwd(current_dir())`. That holds only under the script launcher, which runs the core from the repo root. A supervised core does not: launchd runs it with `WorkingDirectory ~/.continuum` (the #4228 plist; lsof confirms), the Windows S4U task from its own directory. No remote there → the org was `None` → `grid::say_in_org_room` returned silently (three legs, no probe) → the 5090 posted no [health] line since it came up and IntelMac's hour (`citizen.health.hour` at 06:08/07:08/09:08Z) never reached the room. The operator peer took the same read and subscribed no org room on those nodes either. The M5 posted because its launcher's cwd happened to be the checkout. - `persona::org_room` is THE resolver: the org channel is the TRACKED CHECKOUT's origin owner (`runtime::tracked_checkout`, the durable clone the deploy already stands on), by the same `JoinContext` rule `airc join` applies to a directory. No checkout, an unresolvable one, or no remote owner is a named `OrgRoomAbsence`, never a silent `None`. Resolved through the durable checkout so a lease worktree names the same room — airc-lib reads no org off a worktree at all (its gitdir carries no config; `airc join` from a lease lands in the lobby), which the test now pins. - `say_in_org_room` probes `fleet.node.line_not_posted` on EVERY leg it can lose the line (`leg = no_operator_airc | no_org_room | subscriptions_unreadable | not_subscribed | publish`), each with what was missing. - The operator peer subscribes the org room through the same resolver; its absence probe carries the why. - Test: a temp clone with a remote is named "acmeorg" from a process whose cwd is elsewhere; its worktree names the same; no remote / not a checkout name nothing. Receipt: 23 passed / 0 failed (org_room + source_hygiene, ratchets green) on IntelMac; the live receipt is the next [health] hour from a supervised node in the org room. Faster or slower: neither for a citizen — one resolution per hourly line and per operator-peer boot. Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
…web client and pins CONTINUUM_UI_DIST in config.env (#4403) The M5 has served no desktop since 2026-09-24. Under the launchd supervisor, continuum reboot runs start-server.sh with CONTINUUM_BUILD_ONLY=1, which exits before the desktop block, and then kickstarts the slot binary bare. Two consequences: the web client was never rebuilt (apps/web/dist froze at Sep 24), and the block's export of CONTINUUM_UI_DIST could never reach a launchd-launched core. Every deploy booted desktop.dm.unconfigured while the CLI printed 'the web build lands in the background' (eight consecutive deploys on 2026-09-26). Port 8975 refused connections. Script: the desktop block now runs before the build-only exit, so the warm-build pass also builds the web client (in the background, output to ~/.continuum/logs/desktop-build.log instead of /dev/null). It pins CONTINUUM_UI_DIST into ~/.continuum/config.env, replace-or-append, single-quoted, the same shape as bin/continuum's config_set. The core applies config.env to itself on every boot, so that file is the one durable home the supervisor path can reach; the plist deliberately does not carry source-tree values (#4228 review). CLI: the start/reboot receipt is pure over what it observed. Answering prints the URL; a configured dist not yet answering is a build in flight; no configured dist is named as such with the verb that fixes it. It never promises a build the launch path is not making. Test: the receipt names the unconfigured case and reserves the promise for a configured dist. Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo Co-authored-by: Claude Fable 5.1 <[email protected]>
Card a1bd8b58 · audit #4223 row D-mac · the mac arm of
continuum install(Joel: "it needs to be in our own binary").The defect, measured
IntelMac's core ran as
ppid 1, sess 0with no launchd job — an orphan ofstart-server.sh, dark on the first crash. Installing the LaunchAgent did not close it:continuum rebootstopped the core (clean exit;KeepAlive{Crashed}stays down) and spawned a new one through the script, outside launchd. Registration is not supervision.What this makes true
core/continuum-core/src/bin/continuum/launchd.rs(new) — pure parts (plist parse, verdict, plist render) compile and test everywhere; only what toucheslaunchctl, the slot and signals iscfg(target_os = "macos").start/rebootstage the artifact into the slot the plist execs andlaunchctl kickstart -kthe job;wait_ownedrefuses the receipt unless launchd's pid for the job is the pid serving the socket.CONTINUUM_FROM_SOURCEopts out.continuum supervisor-status [--crash-test]— the verdict as a verb: UNSUPERVISED / ORPHANED / OWNED-CANNOT-HEAL / SUPERVISED (structurally).--crash-test=kill -9+ a 60 s heal receipt, refused on any core launchd does not own.continuum install [--user] [--no-start]/continuum uninstall— the plist with the binary as the command (nobash -lcwrapper, audit item 7); the launch environment is launchd'sEnvironmentVariablescomputed by the same code a direct launch uses (config.env, ORT, runtime library dirs) + the operator's PATH. Default = system LaunchDaemon (one sudo — macOS's consent, the class of the 5090's UAC, card 7b56a84b);--user= the agent, accepted and proven before success. Stops any core on the socket through the save rail, kickstarts, refuses an unowned core. The dispatch line is a placeholder for the verb skeleton's platform trait (BigMama's) — a one-line fold when it lands.Receipts (IntelMac, debug build of this branch, core 1a2865c)
supervisor-status, first live run<socket>.pid, which a launchd-launched core never writes. Instrument fixed: the socket's holder (pgrep on the exact argv) is the truth. Re-run:SUPERVISED (structurally),job_pid == core_pid == 96595.install --usergui/501, kickstarted, core 45292 up and owned (launchctl printpid == socket holder).supervisor-statusafterOWNED, CANNOT HEAL— launchd loggedpending spawn, domain in on-demand-only modeat bootstrap. On this Mac the user agent cannot heal; that measurement is why the daemon is the default.healthy: false, exit 1 — the verb refuses to call it done.--bin continuum launchd)launchctl print; the four verdicts + daemon outranks agent; the rendered plist round-trips its slot with the binary as the command and the operator asUserName.Revision 1ce87de — the three things the M5 would have paid for (Fable's review)
AbandonProcessGroup=truein the plist, asserted in the round-trip testRemovedDead { pid: 51552 };kickstart -kunder the NEW plist →LeftLive { pid: 10017 }, the new core serving on it,ready=true, lane pid unchangedconfig.envto itself in a syncmainbefore the runtime exists (config_env::apply_to_process); the plist carries only PATH + runtime library env; unit test: a key absent from the launcher env reaches the process, last assignment winsservice.err.log: "applied 2 assignment(s)" → append a key →kickstart→ "applied 3", no install betweencaffeinate -s -igone)PreventSystemSleep+PreventUserIdleSystemSleepitself for its lifetime (system_resources/power_assertion.rs, IOKit, macOS only; probespower.assertion.held/refused)pmset -g assertions: both rows underpid 9633(continuum-core-server); twopower.assertion.heldprobes at bootserving_core_pidunanchored (a caffeinate parent answers first)^([^ ]*/)?continuum-core-server <socket>$, socket regex-escapedAlso: install's stop line reads the job's pid first ("under the existing launchd job" / "outside launchd"); install names the artifact it registered (
resolve_core_artifactprefers the slot — a new build reaches it throughrebootorCONTINUUM_CORE_BIN);reboot --servicetyped explicitly on macOS no longer refuses at parse. Second liveinstall --useron this node: 43 s, core 9633 owned; then a kickstart round-trip in 25 s, core 10703 owned. Canary 7b69109 merged in.What the receipt does NOT cover: the heal itself (
--crash-test) and the system-domain install — both needsudo continuum installon this node, which is Joel's step; the verb is built to run it and the crash-test to prove it. Correction to my pre-registered receipt:ps -o ppid=on a launchd-owned core reads 1 (launchd is pid 1) — the discriminating fact islaunchctl print's pid equalling the socket holder, which is whatwait_ownedchecks.Found by the receipt, fixed here: install's stop line said "outside launchd" of a core the job owned; the job's pid is read first now and the line says which.
Noted, not fixed (the stop rail, not this lane): that stop reported
1 of 63 modules did NOT save: cognition (drain Incomplete { in_flight: 6 }); likereboot, install prints it and continues.Dropped from the lane: the
install-service.shacceptance I had drafted — under the converge the shell shrinks to bootstrap; it does not grow.Refs: docs/planning audit #4223 (rows B/D), card 79faf35d (reboot's 1800 s ceiling), card 7b56a84b (Windows S4U).
🤖 Generated with Claude Code
https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE