carlos / platform Public

census: bounded-systemctl overlay with the temporary not-up claim

Re-proposed with NAME=bounded-systemctl after 0fa550f8.
systemdUnits.Show: bounded query; a deadline reached through temporary
observation failures is a temporary UnitNotUpError, so the rollback
restart still replaces the process and the version is not poisoned.
The other claims are as in f0e81caf.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 9b22c61fd42f09d00b86abb9a6f015c7443ccac1 parent 0fa550f
2 files changed, +3 −3
  • docs/superpowers/notes/census-proposal-bounded-systemctl.md +1 −1
  • internal/provision/testdata/plan14-root-reads-bounded-systemctl.tsv +2 −2

CI cancelled — superseded by a newer push — run details

diff --git a/docs/superpowers/notes/census-proposal-bounded-systemctl.md b/docs/superpowers/notes/census-proposal-bounded-systemctl.md
index 80a808a3b..cf3c678e1 100644
--- a/docs/superpowers/notes/census-proposal-bounded-systemctl.md
+++ b/docs/superpowers/notes/census-proposal-bounded-systemctl.md
@@ -22,7 +22,7 @@ Ruling `census-ruling-bounded-systemctl`. The independent reviewer approves or r
| `internal/host/unitops.go` `systemctlRestartUnit` | body | unchanged (1) | behaviour unchanged: the same mutating systemctl verb, arguments and output through internal/systemd.Command; a mutation gets no deadline of its own, so it runs under context.Background() exactly as exec.Command ran it; no new read, path or input |
| `internal/host/unitsettle.go` `systemctlVerb` | body | unchanged (1) | behaviour unchanged: the same mutating systemctl verb, arguments and output through internal/systemd.Command; a mutation gets no deadline of its own, so it runs under context.Background() exactly as exec.Command ran it; no new read, path or input |
| `internal/host/unitsettle.go` `systemdUnits.JournalTail` | body | unchanged (1) | bounded query: the same journalctl arguments and stdout through internal/systemd.Command(Journalctl), under QueryTimeout (30 s); a timeout gives an empty tail, as any failure did; no new read |
-| `internal/host/unitsettle.go` `systemdUnits.Show` | body | unchanged (1) | bounded query, settle verdict unchanged: the same show properties and parser through internal/systemd.Command under context.Background() and QueryTimeout (30 s); its error, a TimeoutError included, is returned as before, and settleUnit still turns a deadline reached while show kept failing into UnitNotUpError (cannot observe), so the not-up recovery replaces the process as before; no new read |
+| `internal/host/unitsettle.go` `systemdUnits.Show` | body | unchanged (1) | bounded query; a deadline reached through temporary observation failures is a temporary UnitNotUpError, so the rollback restart still replaces the process and the version is not poisoned: the same show properties and parser through internal/systemd.Command under context.Background() and QueryTimeout (30 s); its error, a TimeoutError included, is returned as before; no new read |
| `internal/instancectl/gvisorprobe.go` `Server.runGVisorProbe` | body | unchanged (4) | the failure diagnostic calls the new Server.Journal seam with the same journalctl arguments minus the program name, instead of Server.Run with "journalctl" first; nil Journal skips it as nil Run did; no new path, input or verb |
| `internal/instancectl/server.go` `type Server` | body | unchanged (1) | new field Journal, the journalctl seam for the gVisor probe's diagnostic; field declaration only; no read added |
diff --git a/internal/provision/testdata/plan14-root-reads-bounded-systemctl.tsv b/internal/provision/testdata/plan14-root-reads-bounded-systemctl.tsv
index 127c1a215..bd37b5f1f 100644
--- a/internal/provision/testdata/plan14-root-reads-bounded-systemctl.tsv
+++ b/internal/provision/testdata/plan14-root-reads-bounded-systemctl.tsv
@@ -51,7 +51,7 @@ internal/host/unitops.go probeUnits legacy accepted-legacy accepted-legacy;rev3=
internal/host/unitops.go systemctlRestartUnit legacy accepted-legacy accepted-legacy;rev3=census-ruling-named-unit-delivery-114;basis=new: exec systemctl restart <unit>, only for a unit root bound to the route through Bind after a successful reload and an exact EnvironmentFiles match;rev3=census-ruling-bounded-systemctl;basis=behaviour unchanged: the same mutating systemctl verb, arguments and output through internal/systemd.Command; a mutation gets no deadline of its own, so it runs under context.Background() exactly as exec.Command ran it; no new read, path or input file:Command@195 2022d180cf309b786208541502b510fead1d07bd4fefdccaaf273a2ab06387c5
internal/host/unitsettle.go systemctlVerb authority B3,J1,J4 root-input;rev3=census-ruling-bounded-systemctl;basis=behaviour unchanged: the same mutating systemctl verb, arguments and output through internal/systemd.Command; a mutation gets no deadline of its own, so it runs under context.Background() exactly as exec.Command ran it; no new read, path or input file:Command@187 ea9326edf452f9f15d51f1d4bcf50f8498681df9dd94716aa9ce5f306052af0c
internal/host/unitsettle.go systemdUnits.JournalTail authority B3,J1,J4 root-input;rev3=census-ruling-bounded-systemctl;basis=bounded query: the same journalctl arguments and stdout through internal/systemd.Command(Journalctl), under QueryTimeout (30 s); a timeout gives an empty tail, as any failure did; no new read file:Command@168 66c01bcdc845552c0434d85d1515426774b75f5d2b280dd67940734555fa8416
-internal/host/unitsettle.go systemdUnits.Show authority B3,J1,J4 root-input;rev3=census-ruling-bounded-systemctl;basis=bounded query, settle verdict unchanged: the same show properties and parser through internal/systemd.Command under context.Background() and QueryTimeout (30 s); its error, a TimeoutError included, is returned as before, and settleUnit still turns a deadline reached while show kept failing into UnitNotUpError (cannot observe), so the not-up recovery replaces the process as before; no new read file:Command@161 a3158f480bd14d1d964c71ca4701c730dadeef879bf6ea2ea8d797fbbd724e1f
+internal/host/unitsettle.go systemdUnits.Show authority B3,J1,J4 root-input;rev3=census-ruling-bounded-systemctl;basis=bounded query; a deadline reached through temporary observation failures is a temporary UnitNotUpError, so the rollback restart still replaces the process and the version is not poisoned: the same show properties and parser through internal/systemd.Command under context.Background() and QueryTimeout (30 s); its error, a TimeoutError included, is returned as before; no new read file:Command@161 a3158f480bd14d1d964c71ca4701c730dadeef879bf6ea2ea8d797fbbd724e1f
internal/instancectl/gvisorprobe.go Server.runGVisorProbe legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Task 6 fix round 1, applying the controller rulings: serialized probe construction uses root random nonce/fixed paths, root-only O_EXCL fixture, abstract listener, typed verified bundle/unit and context recheck. Read bounded root-owned nonce-bound output and the guest socket handshake; inspect kernel/proc runtime and limits while guest waits. Termination uses inactive/not-loaded state, no job/PIDs and empty cgroup, never per-command stop-post records. Keep the prior pass during the run and publish report plus runtime identity once, after cleanup; any failed attempt invalidates it and records the bounded diagnostic. A private package-test-only operations struct substitutes paths, executable preparation and output opening; production keeps GVisorProbePaths, fixed output/procfs, ensureExe and execsandbox.OpenRootFile. No new tenant-controlled path, launch/source/database read, or runtime-state read. CI fix: route serialized nonce fixture/output cleanup through existing pinned removeGenFiles owner with closed gVisor selectors and fixed probe paths. Existing reads and stop proof unchanged; no new raw removal owner.;rev3=census-ruling-gvisor-probe-diag;basis=Diagnostic only: the failure dump runs journalctl for the fixed probe unit only once a start was asked for, with --since=@<this attempt's start time>, so it no longer replays earlier attempts; a failure before the start logs this attempt's own fail line (taken before the start-up mount lines are prepended) instead. No new path, input or systemctl verb; probe steps unchanged.;rev3=census-ruling-bounded-systemctl;basis=the failure diagnostic calls the new Server.Journal seam with the same journalctl arguments minus the program name, instead of Server.Run with "journalctl" first; nil Journal skips it as nil Run did; no new path, input or verb file:Lstat@3275,file:OpenFile@2638,file:Read@2328,file:ReadAll@5637 90c42203b2b5bc263f0f337991e3138e54c1e4cf17f69c10fc7614cce0527255
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 field holding the current hairpin exit watcher, guarded by the root hairpin flock; no new read;rev3=census-ruling-agent-start-demo-3;basis=Retain the snapshot supervisor in instance-control state; no new request-selected path. Census read-site delta: unchanged (1).;rev3=census-ruling-gvisor-demos;basis=Retain Task 1 mode/error/readiness fields, baseline/runtime callbacks, Task 4 per-host validated staged descriptors and root-selected probe nonce. Fix round 1 adds a private writer-operation seam assigned only in package tests, after the unchanged GVisorID admission check; production defaults still call the same checked constructor, WriteRootfs, WriteBundle and verifier. No new direct read or request-controlled callback. Task 5: private injected removal seam for unprivileged tests; production default removes only root-derived bundle and skeleton after both-family proof inside existing start fence. No new request field or agent-selected unit. Task 6: Retain serialized probe nonce, runtime-set identity verifier/token, fixed claims flag, bundle discovery root, and private unprivileged identity seam. No request-controlled callback or path; existing declaration read-site classification unchanged. Task 6 fix round 1: private gvisorProbeTestOps is set only in package tests; production defaults retain all fixed paths and the checked root output opener. No externally supplied callback or new direct read. Final R1 P2: retain fixed skeleton parent and concurrent per-instance cleanup refusals; no direct read or external configuration field. Carry the root-only host.env validation callback into Ready; no agent read or caller-selected path.;rev3=census-ruling-same-box-edge-fence;basis=Field declarations only: NFT (the nft runner; nil never loads the fence), EdgeFenceOff (host.env CARLOS_EDGE_FENCE=off), and under the existing denyMu/mu: fenceAddrs, fenceReason, fenceRetry, denyApplied. No read added.;rev3=census-ruling-bounded-systemctl;basis=new field Journal, the journalctl seam for the gVisor probe's diagnostic; field declaration only; no read added file:Statfs@5239 d5c89f7179dcd67a27771c87050f340a2c9637b2b760ff322ca600ab8d3d1144
internal/systemd/command.go Cmd.run legacy accepted-legacy accepted-legacy;rev3=census-ruling-bounded-systemctl;basis=new: the exec.CommandContext for a mutation: the fixed program under the caller's context alone, no deadline or WaitDelay of its own (as exec.CommandContext before); queries go to bounded; reads nothing itself file:CommandContext@451 82e395ec0a5c8281445471b2419badb060994cc098f4a091b1ae27ee54e5f2f6
@@ -86,7 +86,7 @@ internal/ops/ops.go systemdDaemonReload legacy accepted-legacy accepted-legacy;r
@coverage internal/demobuild 34c0e3f2ce8b26e3582aaa0e1386c64fd20e5374dd628ae4462269298074bb32
@coverage internal/edge 87c5bf0df9843af3c64dca8ab8c1a598d02e37bfaeb324478b168b2dc2a6051f
@coverage internal/hairpin 1bb1d7df97aae8a909d30c98a23d4b6a2ce0f74df88f0455b67740570be2a5fc
-@coverage internal/host 2c142dd95c41ef338869048970f66ba942536ee4f430a53f945b63043ff2a7ca
+@coverage internal/host 90c9040e05de90019de6a794d74b4b161a3fb94df402ba679d521628367bc58f
@coverage internal/instancectl 63f504eaf7adaf5f27ca86fcd432f06034eb13f8df6ba1eccdc93a472f2f3020
@coverage internal/ops c8359fd403d38e8dee61510c83172554b44108db53f8f9d6a55d0ca67968267e
@coverage internal/systemd e12f9f107581ab1a52e65d345f0f43d40a024f0e25d707a113092eb94feabe25