carlos / platform Public

census: propose rootfs-worker-exit (observe, noteWorkerExitLocked, two new units)

make census-propose NAME=rootfs-worker-exit: observe's body and
noteWorkerExitLocked's sites (+whole:Route, the member event) keep their
dispositions; systemctlUnitMainExit and ExecBackend.unitMainExitOf are new,
written legacy, accepted-legacy, frozen; envelopes ., internal/activator
and internal/rolloutwords re-pinned. Awaiting the independent reviewer's
verdict (census-ruling-rootfs-worker-exit), recorded on #280.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev 3319effa1b164ced5e398f1983ba9c95aa41ba05 parent b505b54
3 files changed, +41 −0
  • docs/superpowers/notes/census-proposal-rootfs-worker-exit.md +26 −0
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −0
  • internal/provision/testdata/plan14-root-reads-rootfs-worker-exit.tsv +14 −0
diff --git a/docs/superpowers/notes/census-proposal-rootfs-worker-exit.md b/docs/superpowers/notes/census-proposal-rootfs-worker-exit.md
new file mode 100644
index 000000000..9d63c6733
--- /dev/null
+++ b/docs/superpowers/notes/census-proposal-rootfs-worker-exit.md
@@ -0,0 +1,26 @@
+# Census approval: rootfs-worker-exit
+
+Ruling `census-ruling-rootfs-worker-exit`. The independent reviewer approves or rejects every change below, 2 with a new disposition; nothing goes to the census owner (Paul, #280, 2026-10-26).
+
+| unit | change | read sites | what changed |
+|---|---|---|---|
+| `internal/activator/unitproc.go` `ExecBackend.observe` | body | unchanged (22) | an exit record with an empty code (read and bounded as before) is filled by unitMainExitOf before it is kept for a worker or worded for the member; the termination proof (UnitState, cgroup evidence, the foreign-invocation rule) and the record's single-use removal are unchanged; the same 22 read sites, no read added |
+| `internal/activator/rootfsworkers.go` `Service.noteWorkerExitLocked` | sites | +whole:Route | an exit with no status to tell now also emits the member event RFS-3-C35 at warn (e.route, the entry's own route, as C09 and C10 already use), paced as C09; the operator log line is kept; in-memory state and the member's journal only; the new site is the route passed to emitEvent |
+
+Envelopes re-pinned: `.`, `internal/activator`, `internal/rolloutwords`.
+
+Review: a model from the other family than the author reads the branch's diff against main on the amadan.net remote (`origin` or `amadan`, whichever points at amadan.net) and gives a verdict for every unit and every re-pinned envelope above. For a unit, compare the change with its recorded disposition and basis below; for an envelope, read every changed function in the package and what it reaches. Reject if the change lets root open, run, query or follow anything it did not before from a path or input a tenant, an app or a box agent can create, write or name; if it weakens a check, refusal, validation, argument or environment the basis relies on; or if the diff cannot settle either. Otherwise approve. Record each verdict on #280 with the tip. A rejected unit goes back to the author to correct; nothing escalates to the census owner.
+
+Recorded dispositions, which each change must still satisfy:
+
+- `internal/activator/unitproc.go` `ExecBackend.observe`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-rootfs-apps-2;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=final fix I3: the process observer's termination proof for a rootfs handle (Runtime, the new kind, one site) goes through unitEvents (two more Route sites): the host slice's cgroup.events and, for a rootfs unit, the group systemd reports when that is elsewhere, so a foreign invocation root placed outside the slice and could not stop is never read as gone from the absent expected path; a failed stop of a foreign invocation leaves it unstopped, asked again next poll, completion pending; a binary handle's proof is unchanged (cgroup.events under the host slice); the agent decides only whether it keeps a handle and a launch file; no root decision; re-digested at the merge of origin/main 3c33f2eb: main's own change to the observer is in the body, this branch's rootfs-aware evidence and the rootfs-only failed-stop retry (merge prep N1: a binary handle behaves exactly as main) on top; the kinds are the union;rev3=census-ruling-rootfs-apps-3-workers;basis=rootfs Plan 3 Group W, W1: for a worker handle (p.worker != "") the observer keeps the exit record it read (workerExit, workerExitOK) for the supervisor instead of wording a member event, and says nothing for a replaced-after-stop or restarted-outside end; the termination evidence (cgroup.events via unitEvents, the foreign-invocation rule) and the record's single-use removal are unchanged and apply to a worker as to a generation; a binary or generation handle behaves exactly as before; the same 22 read sites, no read added
+- `internal/activator/rootfsworkers.go` `Service.noteWorkerExitLocked`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-rootfs-apps-3-workers;basis=rootfs Plan 3 Group W, W1.16: the backoff, restart count and member event of one worker exit (RFS-3-C09 and RFS-3-C10); in-memory and the member's journal only
+
+New dispositions, which census-propose wrote and the reviewer checks against the unit's reads and the diff:
+
+- new `internal/activator/control.go:systemctlUnitMainExit`: reads +file:CommandContext; written legacy, accepted-legacy, frozen
+- new `internal/activator/unitproc.go:ExecBackend.unitMainExitOf`: reads +registry:Host, +whole:Route; written legacy, accepted-legacy, frozen
+
+Seal: `78b7e7e30ad3ada44388a4ee16f3950ef888ae03e552477dcbfbb07c51ffb83e` → `e59180920ac4b3840a5ee520a27d6c4c2b90d61044e4b73dbca77e61ae56063c`.
+
+Overlay: `internal/provision/testdata/plan14-root-reads-rootfs-worker-exit.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`.
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv
index 172d774b2..22bda0d04 100644
--- a/internal/provision/testdata/plan14-root-reads-chain.tsv
+++ b/internal/provision/testdata/plan14-root-reads-chain.tsv
@@ -36,3 +36,4 @@ plan14-root-reads-fleet-secrets-key.tsv 9df7f5aca9a502966c9643b7062829c1c25bfbd8
plan14-root-reads-static-headers.tsv 94b8ccf921f64be24a4773f72d55a8e24ceba3acfb40eefe3b56af6f5b008138
plan14-root-reads-rootfs-check-volumes.tsv 042684bf5af6f61ce8b87f10b68a42b08d131ba4cb5bcab16320c7b032a724e6
plan14-root-reads-rootfs-fleet-followups.tsv 78b7e7e30ad3ada44388a4ee16f3950ef888ae03e552477dcbfbb07c51ffb83e
+plan14-root-reads-rootfs-worker-exit.tsv e59180920ac4b3840a5ee520a27d6c4c2b90d61044e4b73dbca77e61ae56063c
diff --git a/internal/provision/testdata/plan14-root-reads-rootfs-worker-exit.tsv b/internal/provision/testdata/plan14-root-reads-rootfs-worker-exit.tsv
new file mode 100644
index 000000000..67cc3b2a7
--- /dev/null
+++ b/internal/provision/testdata/plan14-root-reads-rootfs-worker-exit.tsv
@@ -0,0 +1,14 @@
+# Census overlay rootfs-worker-exit, written by census-propose (#369). census-ruling-rootfs-worker-exit, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-rootfs-worker-exit.md.
+# 1 body, 1 sites, 3 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
+# 2 new dispositions: 0 reads re-frozen at their disposition with the claim, 2 new units frozen accepted-legacy, 0 quiet units retired while they read nothing, 0 other.
+@legacy 654efde59dfa1b0581fdcd671633bccd26e950637a979e31e7b51dd6d7beccec internal/activator/unitproc.go ExecBackend.observe legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-rootfs-apps-2;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=final fix I3: the process observer's termination proof for a rootfs handle (Runtime, the new kind, one site) goes through unitEvents (two more Route sites): the host slice's cgroup.events and, for a rootfs unit, the group systemd reports when that is elsewhere, so a foreign invocation root placed outside the slice and could not stop is never read as gone from the absent expected path; a failed stop of a foreign invocation leaves it unstopped, asked again next poll, completion pending; a binary handle's proof is unchanged (cgroup.events under the host slice); the agent decides only whether it keeps a handle and a launch file; no root decision; re-digested at the merge of origin/main 3c33f2eb: main's own change to the observer is in the body, this branch's rootfs-aware evidence and the rootfs-only failed-stop retry (merge prep N1: a binary handle behaves exactly as main) on top; the kinds are the union;rev3=census-ruling-rootfs-apps-3-workers;basis=rootfs Plan 3 Group W, W1: for a worker handle (p.worker != "") the observer keeps the exit record it read (workerExit, workerExitOK) for the supervisor instead of wording a member event, and says nothing for a replaced-after-stop or restarted-outside end; the termination evidence (cgroup.events via unitEvents, the foreign-invocation rule) and the record's single-use removal are unchanged and apply to a worker as to a generation; a binary or generation handle behaves exactly as before; the same 22 read sites, no read added;rev3=census-ruling-rootfs-worker-exit;basis=an exit record with an empty code (read and bounded as before) is filled by unitMainExitOf before it is kept for a worker or worded for the member; the termination proof (UnitState, cgroup evidence, the foreign-invocation rule) and the record's single-use removal are unchanged; the same 22 read sites, no read added registry:Host@1222,registry:Host@3062,registry:Host@3252,registry:Host@3599,registry:Host@3825,registry:Host@4529,registry:Host@5927,registry:Runtime@2414,registry:Runtime@806,whole:Route@1224,whole:Route@2222,whole:Route@2416,whole:Route@3064,whole:Route@3254,whole:Route@3601,whole:Route@3827,whole:Route@4531,whole:Route@5001,whole:Route@5479,whole:Route@5929,whole:Route@808,whole:Route@972 0e53c43116af56ded14aa9d786eb9ba4b7b2183422b8d2bf094636c0844f8b6d
+@legacy 26519d5badff16976140677555950a75d4ef1000ff71a93fdfe3016f38e17798 internal/activator/control.go systemctlUnitMainExit legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-worker-exit;basis=new: runs `systemctl show -p InvocationID,ExecMainCode,ExecMainStatus <unit>` as the agent (no privilege), the same shape as systemctlUnitState and systemctlControlGroup; the unit name is the handle's own (unitNameFor/rootfsUnitFor), not tenant input; output parsed as three key=value strings file:CommandContext@108 74e7b49ce1a61d1602988fed295101fbc84212e7bfab1cca4d91048ee926855f
+@legacy 152429a6381484da89988583d7f2017af3962ba2706dcb17625caa391cabca55 internal/activator/unitproc.go ExecBackend.unitMainExitOf legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-worker-exit;basis=new: reads the handle's unit main exit through UnitMainExit (Route.Host only for its log line), used only when the invocation systemd reports equals the handle's own; withMainExit accepts only systemd's numeric code (1, 2, 3) and a non-negative numeric status, signal names from the fixed workerSignals table; it changes only the advisory record's code, status and result, which decide event wording and a worker's restart line, never termination, a lease or any root decision registry:Host@381,whole:Route@383 4bf2ea75dc18730c6d147a628e32c84697da8e3af263cef7d19c4378ec5918c5
+@legacy ccd423d2c0d73e4fb6aaa1f06aaaa24da95c8b51b4129443203ffc4ab52cc3aa internal/activator/rootfsworkers.go Service.noteWorkerExitLocked legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-3-workers;basis=rootfs Plan 3 Group W, W1.16: the backoff, restart count and member event of one worker exit (RFS-3-C09 and RFS-3-C10); in-memory and the member's journal only;rev3=census-ruling-rootfs-worker-exit;basis=an exit with no status to tell now also emits the member event RFS-3-C35 at warn (e.route, the entry's own route, as C09 and C10 already use), paced as C09; the operator log line is kept; in-memory state and the member's journal only; the new site is the route passed to emitEvent whole:Route@1126,whole:Route@1274,whole:Route@902 94e0513e841f9434dd33e10c51b6c50e440d569c1b6f520efc21c2b598a26ae2
+internal/activator/unitproc.go ExecBackend.observe legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-rootfs-apps-2;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=final fix I3: the process observer's termination proof for a rootfs handle (Runtime, the new kind, one site) goes through unitEvents (two more Route sites): the host slice's cgroup.events and, for a rootfs unit, the group systemd reports when that is elsewhere, so a foreign invocation root placed outside the slice and could not stop is never read as gone from the absent expected path; a failed stop of a foreign invocation leaves it unstopped, asked again next poll, completion pending; a binary handle's proof is unchanged (cgroup.events under the host slice); the agent decides only whether it keeps a handle and a launch file; no root decision; re-digested at the merge of origin/main 3c33f2eb: main's own change to the observer is in the body, this branch's rootfs-aware evidence and the rootfs-only failed-stop retry (merge prep N1: a binary handle behaves exactly as main) on top; the kinds are the union;rev3=census-ruling-rootfs-apps-3-workers;basis=rootfs Plan 3 Group W, W1: for a worker handle (p.worker != "") the observer keeps the exit record it read (workerExit, workerExitOK) for the supervisor instead of wording a member event, and says nothing for a replaced-after-stop or restarted-outside end; the termination evidence (cgroup.events via unitEvents, the foreign-invocation rule) and the record's single-use removal are unchanged and apply to a worker as to a generation; a binary or generation handle behaves exactly as before; the same 22 read sites, no read added;rev3=census-ruling-rootfs-worker-exit;basis=an exit record with an empty code (read and bounded as before) is filled by unitMainExitOf before it is kept for a worker or worded for the member; the termination proof (UnitState, cgroup evidence, the foreign-invocation rule) and the record's single-use removal are unchanged; the same 22 read sites, no read added registry:Host@1222,registry:Host@3062,registry:Host@3252,registry:Host@3599,registry:Host@3825,registry:Host@4529,registry:Host@5927,registry:Runtime@2414,registry:Runtime@806,whole:Route@1224,whole:Route@2222,whole:Route@2416,whole:Route@3064,whole:Route@3254,whole:Route@3601,whole:Route@3827,whole:Route@4531,whole:Route@5001,whole:Route@5479,whole:Route@5929,whole:Route@808,whole:Route@972 0e53c43116af56ded14aa9d786eb9ba4b7b2183422b8d2bf094636c0844f8b6d
+internal/activator/control.go systemctlUnitMainExit legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-worker-exit;basis=new: runs `systemctl show -p InvocationID,ExecMainCode,ExecMainStatus <unit>` as the agent (no privilege), the same shape as systemctlUnitState and systemctlControlGroup; the unit name is the handle's own (unitNameFor/rootfsUnitFor), not tenant input; output parsed as three key=value strings file:CommandContext@108 74e7b49ce1a61d1602988fed295101fbc84212e7bfab1cca4d91048ee926855f
+internal/activator/unitproc.go ExecBackend.unitMainExitOf legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-worker-exit;basis=new: reads the handle's unit main exit through UnitMainExit (Route.Host only for its log line), used only when the invocation systemd reports equals the handle's own; withMainExit accepts only systemd's numeric code (1, 2, 3) and a non-negative numeric status, signal names from the fixed workerSignals table; it changes only the advisory record's code, status and result, which decide event wording and a worker's restart line, never termination, a lease or any root decision registry:Host@381,whole:Route@383 4bf2ea75dc18730c6d147a628e32c84697da8e3af263cef7d19c4378ec5918c5
+internal/activator/rootfsworkers.go Service.noteWorkerExitLocked legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-3-workers;basis=rootfs Plan 3 Group W, W1.16: the backoff, restart count and member event of one worker exit (RFS-3-C09 and RFS-3-C10); in-memory and the member's journal only;rev3=census-ruling-rootfs-worker-exit;basis=an exit with no status to tell now also emits the member event RFS-3-C35 at warn (e.route, the entry's own route, as C09 and C10 already use), paced as C09; the operator log line is kept; in-memory state and the member's journal only; the new site is the route passed to emitEvent whole:Route@1126,whole:Route@1274,whole:Route@902 94e0513e841f9434dd33e10c51b6c50e440d569c1b6f520efc21c2b598a26ae2
+@coverage . 7068c680e02abdbbabc3ed4f2b166399134f4da933148b538f136bbc8a72885a
+@coverage internal/activator 7abdf8241f39566adfc7d7d5dd332b2e54d9f4817a59c561bbf978242a9004f1
+@coverage internal/rolloutwords 8e5a5e657c86fa4113803bbd6c46966ae9bd7e835c2f0fae552657a82998f32e