carlos / platform Public

census: managed-fleets-1c-451 proposal (three systemctl readers' error paths, new readBootID)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev c8da368d1d0459902a6beae4edff5367774c9bf7 parent 41db5d5
3 files changed, +43 −0
  • docs/superpowers/notes/census-proposal-managed-fleets-1c-451.md +27 −0
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −0
  • internal/provision/testdata/plan14-root-reads-managed-fleets-1c-451.tsv +15 −0

CI cancelled — superseded by a newer push — run details

diff --git a/docs/superpowers/notes/census-proposal-managed-fleets-1c-451.md b/docs/superpowers/notes/census-proposal-managed-fleets-1c-451.md
new file mode 100644
index 000000000..8b912a0a6
--- /dev/null
+++ b/docs/superpowers/notes/census-proposal-managed-fleets-1c-451.md
@@ -0,0 +1,27 @@
+# Census approval: managed-fleets-1c-451
+
+Ruling `census-ruling-managed-fleets-1c-451`. The independent reviewer approves or rejects every change below, 1 with a new disposition; nothing goes to the census owner (Paul, #280, 2026-10-26).
+
+| unit | change | read sites | what changed |
+|---|---|---|---|
+| `internal/activator/control.go` `systemctlControlGroup` | body | unchanged (1) | error path only: a failed systemctl show now returns unitStateError(err), appending systemctl's own stderr (<=200 bytes) to the error text for the log; the command, its arguments, the unit name and the parsing of a successful answer are unchanged |
+| `internal/activator/control.go` `systemctlUnitMainExit` | body | unchanged (1) | error path only: as systemctlControlGroup, unitStateError(err) on a failed systemctl show; command, arguments, unit name and parsing unchanged |
+| `internal/activator/control.go` `systemctlUnitState` | body | unchanged (1) | error path only: as systemctlControlGroup, unitStateError(err) on a failed systemctl show; command, arguments, unit name and parsing unchanged (#451 diagnosis: tells a lost D-Bus at shutdown from other failures) |
+
+Envelopes re-pinned: `internal/activator`, `internal/hafresh`, `internal/host`, `internal/lease`.
+
+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/control.go` `systemctlControlGroup`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-rootfs-apps-2;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=root-input (J4, as systemctlUnitState): new (rootfs Plan 2 Task 9): runs systemctl show -p ControlGroup --value <unit> as carlos, an unprivileged query of PID 1, for a unit name built by unitNameFor from the row's host; the answer is systemd's own; it starts and stops nothing; no root decision
+- `internal/activator/control.go` `systemctlUnitMainExit`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-rootfs-worker-exit;basis=new: runs `systemctl show -p InvocationID,ExecMainCode,ExecMainStatus,SuccessExitStatus <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 four key=value strings into MainExit (Astra R1 P2: SuccessExitStatus is the unit's clean-exit policy as systemd loaded it from the shipped template)
+- `internal/activator/control.go` `systemctlUnitState`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J4;basis=root-input
+
+New dispositions, which census-propose wrote and the reviewer checks against the unit's reads and the diff:
+
+- new `internal/host/haself.go:readBootID`: reads +file:ReadFile; written legacy, accepted-legacy, frozen
+
+Seal: `7ebc3871ee3c93ff168bfa62d23d6be5a970786c67a9b8aa813e8cc4e39b3d74` → `1bd430a3631ab7e77838305ce9866cbe293ec2e052fff7e3309712f84fde727b`.
+
+Overlay: `internal/provision/testdata/plan14-root-reads-managed-fleets-1c-451.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 3590b7ccc..160419f94 100644
--- a/internal/provision/testdata/plan14-root-reads-chain.tsv
+++ b/internal/provision/testdata/plan14-root-reads-chain.tsv
@@ -37,3 +37,4 @@ plan14-root-reads-static-headers.tsv 94b8ccf921f64be24a4773f72d55a8e24ceba3acfb4
plan14-root-reads-rootfs-check-volumes.tsv 042684bf5af6f61ce8b87f10b68a42b08d131ba4cb5bcab16320c7b032a724e6
plan14-root-reads-rootfs-fleet-followups.tsv 78b7e7e30ad3ada44388a4ee16f3950ef888ae03e552477dcbfbb07c51ffb83e
plan14-root-reads-rootfs-worker-exit.tsv 7ebc3871ee3c93ff168bfa62d23d6be5a970786c67a9b8aa813e8cc4e39b3d74
+plan14-root-reads-managed-fleets-1c-451.tsv 1bd430a3631ab7e77838305ce9866cbe293ec2e052fff7e3309712f84fde727b
diff --git a/internal/provision/testdata/plan14-root-reads-managed-fleets-1c-451.tsv b/internal/provision/testdata/plan14-root-reads-managed-fleets-1c-451.tsv
new file mode 100644
index 000000000..adc18d347
--- /dev/null
+++ b/internal/provision/testdata/plan14-root-reads-managed-fleets-1c-451.tsv
@@ -0,0 +1,15 @@
+# Census overlay managed-fleets-1c-451, written by census-propose (#369). census-ruling-managed-fleets-1c-451, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-managed-fleets-1c-451.md.
+# 3 body, 0 sites, 4 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
+# 1 new dispositions: 0 reads re-frozen at their disposition with the claim, 1 new units frozen accepted-legacy, 0 quiet units retired while they read nothing, 0 other.
+@legacy ad9bcce3338389507602740f11794371f7c5707753300679e3db3b36ed885f10 internal/activator/control.go systemctlControlGroup legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-2;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=root-input (J4, as systemctlUnitState): new (rootfs Plan 2 Task 9): runs systemctl show -p ControlGroup --value <unit> as carlos, an unprivileged query of PID 1, for a unit name built by unitNameFor from the row's host; the answer is systemd's own; it starts and stops nothing; no root decision;rev3=census-ruling-managed-fleets-1c-451;basis=error path only: a failed systemctl show now returns unitStateError(err), appending systemctl's own stderr (<=200 bytes) to the error text for the log; the command, its arguments, the unit name and the parsing of a successful answer are unchanged file:CommandContext@92 0bd6628708731566c788752ab638489e17f61203c9ad5682bb0591a2e047138a
+@legacy 9d32d7eba47f2efa8cd6bc0193f7bb27090d2d50ddd36eecfe652a23c19e3dbb 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,SuccessExitStatus <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 four key=value strings into MainExit (Astra R1 P2: SuccessExitStatus is the unit's clean-exit policy as systemd loaded it from the shipped template);rev3=census-ruling-managed-fleets-1c-451;basis=error path only: as systemctlControlGroup, unitStateError(err) on a failed systemctl show; command, arguments, unit name and parsing unchanged file:CommandContext@94 f6240e84056f6a594f3fcc4a942a4f0756076f875511a4582b29f7554d1193c8
+@legacy 89805171101a29ceabea1c828faba6e8833d78da52b2d057262ddc4e1cf71c06 internal/activator/control.go systemctlUnitState legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-managed-fleets-1c-451;basis=error path only: as systemctlControlGroup, unitStateError(err) on a failed systemctl show; command, arguments, unit name and parsing unchanged (#451 diagnosis: tells a lost D-Bus at shutdown from other failures) file:CommandContext@97 d94db59c4f3c92e4a72973ff30093b8e3ad869ffb6b32dc8287f09a36c0afdc8
+@legacy f2763cd6c8a4295b13ce6ac9a22887d25a50f8c1dc7af4a3edf27fda6da478e2 internal/host/haself.go readBootID legacy accepted-legacy accepted-legacy;rev3=census-ruling-managed-fleets-1c-451;basis=new: reads the fixed kernel path /proc/sys/kernel/random/boot_id (package var bootIDPath, set only by tests) as the agent (carlos), trimmed, "" on any error; the value goes only into the agent's legacy lease owner string (;boot=) and hafresh.PreviousBoot's comparison; no tenant, app or box agent names the path file:ReadFile@49 eaf14ea5c9b36e47ac5c5e642a9780e8bffe1353828864ca7c590fe3c58932f2
+internal/activator/control.go systemctlControlGroup legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-2;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=root-input (J4, as systemctlUnitState): new (rootfs Plan 2 Task 9): runs systemctl show -p ControlGroup --value <unit> as carlos, an unprivileged query of PID 1, for a unit name built by unitNameFor from the row's host; the answer is systemd's own; it starts and stops nothing; no root decision;rev3=census-ruling-managed-fleets-1c-451;basis=error path only: a failed systemctl show now returns unitStateError(err), appending systemctl's own stderr (<=200 bytes) to the error text for the log; the command, its arguments, the unit name and the parsing of a successful answer are unchanged file:CommandContext@92 0bd6628708731566c788752ab638489e17f61203c9ad5682bb0591a2e047138a
+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,SuccessExitStatus <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 four key=value strings into MainExit (Astra R1 P2: SuccessExitStatus is the unit's clean-exit policy as systemd loaded it from the shipped template);rev3=census-ruling-managed-fleets-1c-451;basis=error path only: as systemctlControlGroup, unitStateError(err) on a failed systemctl show; command, arguments, unit name and parsing unchanged file:CommandContext@94 f6240e84056f6a594f3fcc4a942a4f0756076f875511a4582b29f7554d1193c8
+internal/activator/control.go systemctlUnitState legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-managed-fleets-1c-451;basis=error path only: as systemctlControlGroup, unitStateError(err) on a failed systemctl show; command, arguments, unit name and parsing unchanged (#451 diagnosis: tells a lost D-Bus at shutdown from other failures) file:CommandContext@97 d94db59c4f3c92e4a72973ff30093b8e3ad869ffb6b32dc8287f09a36c0afdc8
+internal/host/haself.go readBootID legacy accepted-legacy accepted-legacy;rev3=census-ruling-managed-fleets-1c-451;basis=new: reads the fixed kernel path /proc/sys/kernel/random/boot_id (package var bootIDPath, set only by tests) as the agent (carlos), trimmed, "" on any error; the value goes only into the agent's legacy lease owner string (;boot=) and hafresh.PreviousBoot's comparison; no tenant, app or box agent names the path file:ReadFile@49 eaf14ea5c9b36e47ac5c5e642a9780e8bffe1353828864ca7c590fe3c58932f2
+@coverage internal/activator 99f839f5c79d38dee2344e2dbea9c6d289857073125f319bb98cf4640e5cff85
+@coverage internal/hafresh 27a69bbba984e1ad62c326da63cb68ddb332336fc96d1f8f7f5a9d8efa44fdf2
+@coverage internal/host c0a330a760956175bd038005e2a139f49d6912707e8ee7f975031b989353f36e
+@coverage internal/lease 1de7eda9c51c4309e3c8cb43e64fdbbec118e70827f36fb27a4f36ffa01fbda8