carlos / platform Public

census: rootfs-root-image overlay (rootIsImage body, instanceexec re-pin)

make census-propose NAME=rootfs-root-image: rootIsImage is a body change
(the same one read, Lstat of the probe marker) re-frozen at its existing
accepted-legacy disposition with the claim appended, and the
internal/instanceexec envelope re-pinned. An approval, not a decision:
the reviewer's verdict goes on #280 before the merge. Card:
docs/superpowers/notes/census-proposal-rootfs-root-image.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev ab87dfec50581365e01242478bf83055eb55929d parent 4c2114a
3 files changed, +25 −0
  • docs/superpowers/notes/census-proposal-rootfs-root-image.md +19 −0
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −0
  • internal/provision/testdata/plan14-root-reads-rootfs-root-image.tsv +5 −0
diff --git a/docs/superpowers/notes/census-proposal-rootfs-root-image.md b/docs/superpowers/notes/census-proposal-rootfs-root-image.md
new file mode 100644
index 000000000..4bc5bfee0
--- /dev/null
+++ b/docs/superpowers/notes/census-proposal-rootfs-root-image.md
@@ -0,0 +1,19 @@
+# Census approval: rootfs-root-image
+
+Ruling `census-ruling-rootfs-root-image`. Every change below keeps the disposition it already has, so it needs an approval, not a decision.
+
+| unit | change | read sites | what changed |
+|---|---|---|---|
+| `internal/instanceexec/probe_rootfs.go` `rootIsImage` | body | unchanged (1) | body only: the same one read (Lstat of the probe marker); the mountinfo verdict now judges the root mount by its device (MAJ:MIN must be the loop major 7, which parseMountinfo now parses and refuses when malformed), squashfs and per-mount ro, and accepts only the sources /dev/loopN or /proc/self/fd/N (systemd 257 mounts RootImage= through the loop fd) where it took any /dev/loop prefix; a device-mapper root is refused; no read added, nothing a tenant names is opened |
+
+Envelopes re-pinned: `internal/instanceexec`.
+
+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. Escalate 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. An escalation goes to the census owner as a decision.
+
+Recorded dispositions, which each change must still satisfy:
+
+- `internal/instanceexec/probe_rootfs.go` `rootIsImage`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-rootfs-apps-2;identity=the rootfs probe (/opt/carlos/carlos instance-probe --rootfs, carlos-instance-rootfs-probe.service, started by instance control; user carlos inside the probe image's namespace; no tenant code runs there);basis=root-input (J4): new (rootfs Plan 2 Task 7): the root-image line: the mount at / is a squashfs on a loop device, and Lstat of the marker root wrote into the probe image is a regular file; no root process runs it; decides nothing for root
+
+Seal: `9cef5e93a1e3520e02efe66455bf70c1170d380b6d6a72ede02036ce3dd41924` → `ac676c74685962fce5f78c54469615af0a00973e4a8cd256ac56c153f62a21f3`.
+
+Overlay: `internal/provision/testdata/plan14-root-reads-rootfs-root-image.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 00311d81b..25bd20196 100644
--- a/internal/provision/testdata/plan14-root-reads-chain.tsv
+++ b/internal/provision/testdata/plan14-root-reads-chain.tsv
@@ -45,3 +45,4 @@ plan14-root-reads-edge-protection-2.tsv a864cf31b6bf2c30b5aa8c2647835efdc456f34f
plan14-root-reads-offline-move-trim-t1.tsv a864cf31b6bf2c30b5aa8c2647835efdc456f34f4945eea12751daab2457728e
plan14-root-reads-claims-cleanup-r1.tsv 9cef5e93a1e3520e02efe66455bf70c1170d380b6d6a72ede02036ce3dd41924
plan14-root-reads-claims-cleanup-r2.tsv 9cef5e93a1e3520e02efe66455bf70c1170d380b6d6a72ede02036ce3dd41924
+plan14-root-reads-rootfs-root-image.tsv ac676c74685962fce5f78c54469615af0a00973e4a8cd256ac56c153f62a21f3
diff --git a/internal/provision/testdata/plan14-root-reads-rootfs-root-image.tsv b/internal/provision/testdata/plan14-root-reads-rootfs-root-image.tsv
new file mode 100644
index 000000000..e5caaa8a1
--- /dev/null
+++ b/internal/provision/testdata/plan14-root-reads-rootfs-root-image.tsv
@@ -0,0 +1,5 @@
+# Census overlay rootfs-root-image, written by census-propose (#369). census-ruling-rootfs-root-image, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-rootfs-root-image.md.
+# 1 body, 0 sites, 1 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
+@legacy 2949b1ed103eca1dc2d43f35144653a4bf6da88a05ddaa1593a282ec0d60170f internal/instanceexec/probe_rootfs.go rootIsImage legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-2;identity=the rootfs probe (/opt/carlos/carlos instance-probe --rootfs, carlos-instance-rootfs-probe.service, started by instance control; user carlos inside the probe image's namespace; no tenant code runs there);basis=root-input (J4): new (rootfs Plan 2 Task 7): the root-image line: the mount at / is a squashfs on a loop device, and Lstat of the marker root wrote into the probe image is a regular file; no root process runs it; decides nothing for root;rev3=census-ruling-rootfs-root-image;basis=body only: the same one read (Lstat of the probe marker); the mountinfo verdict now judges the root mount by its device (MAJ:MIN must be the loop major 7, which parseMountinfo now parses and refuses when malformed), squashfs and per-mount ro, and accepts only the sources /dev/loopN or /proc/self/fd/N (systemd 257 mounts RootImage= through the loop fd) where it took any /dev/loop prefix; a device-mapper root is refused; no read added, nothing a tenant names is opened file:Lstat@643 15d3fe1256801ee8ce04d1859e3db35422e4b979ecd85c8316f54d43be6183eb
+internal/instanceexec/probe_rootfs.go rootIsImage legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-2;identity=the rootfs probe (/opt/carlos/carlos instance-probe --rootfs, carlos-instance-rootfs-probe.service, started by instance control; user carlos inside the probe image's namespace; no tenant code runs there);basis=root-input (J4): new (rootfs Plan 2 Task 7): the root-image line: the mount at / is a squashfs on a loop device, and Lstat of the marker root wrote into the probe image is a regular file; no root process runs it; decides nothing for root;rev3=census-ruling-rootfs-root-image;basis=body only: the same one read (Lstat of the probe marker); the mountinfo verdict now judges the root mount by its device (MAJ:MIN must be the loop major 7, which parseMountinfo now parses and refuses when malformed), squashfs and per-mount ro, and accepts only the sources /dev/loopN or /proc/self/fd/N (systemd 257 mounts RootImage= through the loop fd) where it took any /dev/loop prefix; a device-mapper root is refused; no read added, nothing a tenant names is opened file:Lstat@643 15d3fe1256801ee8ce04d1859e3db35422e4b979ecd85c8316f54d43be6183eb
+@coverage internal/instanceexec aa3f65008ba687732396ef719ae6476904f899984098c979c0dba2f96858774c