carlos / platform Public

region HA P3b-2: census proposal for the guarded-roll fixes

Hairpin, host and instancectl envelopes re-pinned; server.go body change
and hairpin.go moved reads. Reviewer approval goes on #280.
claude agent, operated by paul@keymail.dev 70de4f36194382134b1b92dc6f73edbf9383edc9 parent be78d30
3 files changed, +46 −0
  • docs/superpowers/notes/census-proposal-region-ha-p3b2-rolls.md +27 −0
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −0
  • internal/provision/testdata/plan14-root-reads-region-ha-p3b2-rolls.tsv +18 −0

CI passed — run details

diff --git a/docs/superpowers/notes/census-proposal-region-ha-p3b2-rolls.md b/docs/superpowers/notes/census-proposal-region-ha-p3b2-rolls.md
new file mode 100644
index 000000000..a481670fe
--- /dev/null
+++ b/docs/superpowers/notes/census-proposal-region-ha-p3b2-rolls.md
@@ -0,0 +1,27 @@
+# Census approval: region-ha-p3b2-rolls
+
+Ruling `census-ruling-region-ha-p3b2-rolls`. The independent reviewer approves or rejects every change below, 5 with a new disposition; nothing goes to the census owner (Paul, #280, 2026-10-26).
+
+| unit | change | read sites | what changed |
+|---|---|---|---|
+| `internal/instancectl/server.go` `type Server` | body | unchanged (1) | adds one mutex-guarded field for the single hairpin exit watcher per process; no new read |
+
+Envelopes re-pinned: `internal/hairpin`, `internal/host`, `internal/instancectl`.
+
+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/instancectl/server.go` `type Server`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-carlos-run;basis=Re-digested at the pre-land merge: the body includes main's own change under census ruling 292, with no further change from this branch. Census ruling 292 reclassified this declaration accepted-legacy (J2,J4) for root's per-host ordering of legacy run starts against stops; this ruling kept the row as main classed it. Its own addition is the cmd start's poll and wait bounds and its per-host lock map: field declarations only;rev3=census-ruling-rootfs-apps-2;basis=new fields: HostRuntime, ProbeImage, ProbeImageFile, RootfsProbeOut, DenyEvery, the deny's lastDeny and denyMu, the rootfs probe's report and lock, the jit reload counters and imageDigests; genStarting counts binary generation starts per unit; rootfsLocksMu and rootfsLocks, one lock entry per rootfs unit name being started or removed right now, held by a start from its layout through systemctl start and its own cleanup and by a removal from its proof through the raw removal, a removal refusing while it is taken, a waiting start giving up when its request ends, an entry dropped with its last holder or waiter (fixes E6, L2, L3); rootfsProvenHook, a test hook run between the proof and the raw removal; field declarations only; no read added;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328 plan 2 and #329 plan 3 Task 5: the declaration gains sliceLocks (one mutex per host slice, taken by /size and /parent) and Egress (the asserter every start path calls), and its comment names the egress allow (plan 3's ControlDropInDir field was deleted in ef38e13b, the P1 EROFS fix); the same one site, the Statfs field, offset moved; no read added.;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 6: comments only: the one-shot pacing fields cover /cmd and /tty, and cmdLocks is now keyed by (role, host) (oneShotKey, PF-7) so a session's start never waits behind a command's; field declarations unchanged; the same one site, no read added;rev3=census-ruling-agent-start-demo-1;basis=Adds fixed demo configuration, registry views, derived runtime root, synchronization and purge guard.;rev3=census-ruling-region-ha-p3b;basis=Add hairpinActive boolean alongside lastDeny under existing deny synchronization. Field declaration only; existing Statfs selector unchanged, no new read or externally supplied authority.
+
+New dispositions, which census-propose wrote and the reviewer checks against the unit's reads and the diff:
+
+- new `internal/instancectl/hairpin.go:Client.GroupHairpin`: reads +file:ReadAll; written legacy, accepted-legacy, frozen
+- new `internal/instancectl/hairpin.go:newHairpinResetServer`: reads +file:CommandContext; written legacy, accepted-legacy, frozen
+- new `internal/instancectl/hairpin.go:var#1`: reads +file:Prepare; written legacy, accepted-legacy, frozen
+- quiet `internal/instancectl/hairpin.go:ClearGroupHairpin`: reads nothing now; retired while it reads nothing (or its row keeps no sites)
+- quiet `internal/instancectl/hairpin.go:InstallDormantGroupHairpin`: reads nothing now; retired while it reads nothing (or its row keeps no sites)
+
+Seal: `ed24b69243622fc702159e0b22c732f4f8297438b87f10c499887cd1a13f6fce` → `d9e45c43cc5d96d9e4c6fdc1674f966f265ffe34c5b4449383f69beef82de31e`.
+
+Overlay: `internal/provision/testdata/plan14-root-reads-region-ha-p3b2-rolls.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 480300f00..13e1544c5 100644
--- a/internal/provision/testdata/plan14-root-reads-chain.tsv
+++ b/internal/provision/testdata/plan14-root-reads-chain.tsv
@@ -101,3 +101,4 @@ plan14-root-reads-region-ha-g2-t3.tsv 6462853d58331c23d0b2f9ee3b52ccec5198b061d8
plan14-root-reads-region-ha-p3b2-ops.tsv f9a2c93d8237229de3623f097004da568ab0cb70a499bb3526b7249efde0f3cd
plan14-root-reads-agent-start-demo-analytics-fix.tsv 89841c50d08090185e24cb03c6bb4878ab8a4ccb84b7d2f0113f88b617df8026
plan14-root-reads-agent-start-demo-log-skip.tsv ed24b69243622fc702159e0b22c732f4f8297438b87f10c499887cd1a13f6fce
+plan14-root-reads-region-ha-p3b2-rolls.tsv d9e45c43cc5d96d9e4c6fdc1674f966f265ffe34c5b4449383f69beef82de31e
diff --git a/internal/provision/testdata/plan14-root-reads-region-ha-p3b2-rolls.tsv b/internal/provision/testdata/plan14-root-reads-region-ha-p3b2-rolls.tsv
new file mode 100644
index 000000000..94424dd91
--- /dev/null
+++ b/internal/provision/testdata/plan14-root-reads-region-ha-p3b2-rolls.tsv
@@ -0,0 +1,18 @@
+# Census overlay region-ha-p3b2-rolls, written by census-propose (#369). census-ruling-region-ha-p3b2-rolls, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-region-ha-p3b2-rolls.md.
+# 1 body, 0 sites, 3 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
+# 5 new dispositions: 0 reads re-frozen at their disposition with the claim, 3 new units frozen accepted-legacy, 2 quiet units retired while they read nothing, 0 other.
+@legacy 2abc6c30208f1a7af4b35136f515c14970fef0e4178801d82098d0b1e8a40d77 internal/instancectl/server.go type Server legacy accepted-legacy accepted-legacy;rev3=census-ruling-carlos-run;basis=Re-digested at the pre-land merge: the body includes main's own change under census ruling 292, with no further change from this branch. Census ruling 292 reclassified this declaration accepted-legacy (J2,J4) for root's per-host ordering of legacy run starts against stops; this ruling kept the row as main classed it. Its own addition is the cmd start's poll and wait bounds and its per-host lock map: field declarations only;rev3=census-ruling-rootfs-apps-2;basis=new fields: HostRuntime, ProbeImage, ProbeImageFile, RootfsProbeOut, DenyEvery, the deny's lastDeny and denyMu, the rootfs probe's report and lock, the jit reload counters and imageDigests; genStarting counts binary generation starts per unit; rootfsLocksMu and rootfsLocks, one lock entry per rootfs unit name being started or removed right now, held by a start from its layout through systemctl start and its own cleanup and by a removal from its proof through the raw removal, a removal refusing while it is taken, a waiting start giving up when its request ends, an entry dropped with its last holder or waiter (fixes E6, L2, L3); rootfsProvenHook, a test hook run between the proof and the raw removal; field declarations only; no read added;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328 plan 2 and #329 plan 3 Task 5: the declaration gains sliceLocks (one mutex per host slice, taken by /size and /parent) and Egress (the asserter every start path calls), and its comment names the egress allow (plan 3's ControlDropInDir field was deleted in ef38e13b, the P1 EROFS fix); the same one site, the Statfs field, offset moved; no read added.;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 6: comments only: the one-shot pacing fields cover /cmd and /tty, and cmdLocks is now keyed by (role, host) (oneShotKey, PF-7) so a session's start never waits behind a command's; field declarations unchanged; the same one site, no read added;rev3=census-ruling-agent-start-demo-1;basis=Adds fixed demo configuration, registry views, derived runtime root, synchronization and purge guard.;rev3=census-ruling-region-ha-p3b;basis=Add hairpinActive boolean alongside lastDeny under existing deny synchronization. Field declaration only; existing Statfs selector unchanged, no new read or externally supplied authority.;rev3=census-ruling-region-ha-p3b2-rolls;basis=adds one mutex-guarded field for the single hairpin exit watcher per process; no new read file:Statfs@3927 13245799752194b3a1a96846dff49b479652181cc5db458c40dc26e7377f58e8
+@legacy 15f531e2811645c877110a200caf7cb41bc45b6ca09d82be82d92fec0dc7e99d internal/instancectl/hairpin.go Client.GroupHairpin legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p3b2-rolls;basis=new row (moved): reads the control response body (bounded) to return a typed status and code; no root read from an agent-writable path file:ReadAll@497 b5513261c3c987776e8ac7077dd3c62c7c0c2bc2479849284dffed9ee4030074
+@legacy 8d425ee0f3f8ce1a27788ce60885224bdbc50f2df3bd3f2a5f53803370b9ad93 internal/instancectl/hairpin.go newHairpinResetServer legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p3b2-rolls;basis=new: builds the reset server's systemctl runner for ClearGroupHairpin; same command as before, moved file:CommandContext@168 3fa56eab60ebe5c311d4a3ec344a4bbfafb1b5bc15a2129a9e829bee1be93055
+@legacy 015287ff0afa5427dfd61c444d0f599fe52dc9b44b9e0a8eee4d53186b2258c9 internal/instancectl/hairpin.go var#1 legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p3b2-rolls;basis=new: package-level seam for the reset server's Prepare, same root-owned state file:Prepare@475 5637dbf3f3b571bf96cfea92d79c1bed329dac17a70046de599905220176ca17
+internal/instancectl/server.go type Server legacy accepted-legacy accepted-legacy;rev3=census-ruling-carlos-run;basis=Re-digested at the pre-land merge: the body includes main's own change under census ruling 292, with no further change from this branch. Census ruling 292 reclassified this declaration accepted-legacy (J2,J4) for root's per-host ordering of legacy run starts against stops; this ruling kept the row as main classed it. Its own addition is the cmd start's poll and wait bounds and its per-host lock map: field declarations only;rev3=census-ruling-rootfs-apps-2;basis=new fields: HostRuntime, ProbeImage, ProbeImageFile, RootfsProbeOut, DenyEvery, the deny's lastDeny and denyMu, the rootfs probe's report and lock, the jit reload counters and imageDigests; genStarting counts binary generation starts per unit; rootfsLocksMu and rootfsLocks, one lock entry per rootfs unit name being started or removed right now, held by a start from its layout through systemctl start and its own cleanup and by a removal from its proof through the raw removal, a removal refusing while it is taken, a waiting start giving up when its request ends, an entry dropped with its last holder or waiter (fixes E6, L2, L3); rootfsProvenHook, a test hook run between the proof and the raw removal; field declarations only; no read added;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328 plan 2 and #329 plan 3 Task 5: the declaration gains sliceLocks (one mutex per host slice, taken by /size and /parent) and Egress (the asserter every start path calls), and its comment names the egress allow (plan 3's ControlDropInDir field was deleted in ef38e13b, the P1 EROFS fix); the same one site, the Statfs field, offset moved; no read added.;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 6: comments only: the one-shot pacing fields cover /cmd and /tty, and cmdLocks is now keyed by (role, host) (oneShotKey, PF-7) so a session's start never waits behind a command's; field declarations unchanged; the same one site, no read added;rev3=census-ruling-agent-start-demo-1;basis=Adds fixed demo configuration, registry views, derived runtime root, synchronization and purge guard.;rev3=census-ruling-region-ha-p3b;basis=Add hairpinActive boolean alongside lastDeny under existing deny synchronization. Field declaration only; existing Statfs selector unchanged, no new read or externally supplied authority.;rev3=census-ruling-region-ha-p3b2-rolls;basis=adds one mutex-guarded field for the single hairpin exit watcher per process; no new read file:Statfs@3927 13245799752194b3a1a96846dff49b479652181cc5db458c40dc26e7377f58e8
+internal/instancectl/hairpin.go Client.GroupHairpin legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p3b2-rolls;basis=new row (moved): reads the control response body (bounded) to return a typed status and code; no root read from an agent-writable path file:ReadAll@497 b5513261c3c987776e8ac7077dd3c62c7c0c2bc2479849284dffed9ee4030074
+internal/instancectl/hairpin.go newHairpinResetServer legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p3b2-rolls;basis=new: builds the reset server's systemctl runner for ClearGroupHairpin; same command as before, moved file:CommandContext@168 3fa56eab60ebe5c311d4a3ec344a4bbfafb1b5bc15a2129a9e829bee1be93055
+internal/instancectl/hairpin.go var#1 legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p3b2-rolls;basis=new: package-level seam for the reset server's Prepare, same root-owned state file:Prepare@475 5637dbf3f3b571bf96cfea92d79c1bed329dac17a70046de599905220176ca17
+@remove internal/instancectl/hairpin.go ClearGroupHairpin
+@removed internal/instancectl/hairpin.go ClearGroupHairpin H3 census-ruling-region-ha-p3b2-rolls;basis=quiet: its reads moved into newHairpinResetServer
+@remove internal/instancectl/hairpin.go InstallDormantGroupHairpin
+@removed internal/instancectl/hairpin.go InstallDormantGroupHairpin H3 census-ruling-region-ha-p3b2-rolls;basis=quiet: its reads moved into the shared helper
+@coverage internal/hairpin 576ee0fbd69d999ca43fa845f4c508712464e998984fafc57039f83cac8f635b
+@coverage internal/host 6b2a4097d40caa77f28ee9276a25b20408842961cdb968b4c05de5902787f3b5
+@coverage internal/instancectl 0c7800abd5063e62fb9d31faa538aeed8540efa099a3db0b5637c2b2f6c8bda1