carlos / platform Public

gvisor demos: report sandbox and logical instance size

Co-Authored-By: Astra (gpt-6-astra) via codex
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 512069c68e1be98503e754ec0b8d38c0941eb02a parent f8e4eae
20 files changed, +566 −114
  • docs/superpowers/notes/census-proposal-gvisor-demos.md +14 −4
  • internal/activator/execsandboxstatus_test.go +51 −0
  • internal/activator/size.go +15 −5
  • internal/activator/unitproc.go +12 −4
  • internal/console/apistatuslayout.go +9 −6
  • internal/console/apistatuslayout_test.go +36 −0
  • internal/host/agent.go +1 −0
  • internal/host/execsandboxstatus.go +41 −0
  • internal/host/execsandboxstatus_test.go +119 −0
  • internal/host/layoutleg.go +6 −4
  • internal/host/sizestatus.go +32 −32
  • internal/host/sizestatus_test.go +9 −8
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −1
  • internal/provision/testdata/plan14-root-reads-gvisor-demos.tsv +17 −7
  • internal/status/dryrun.go +14 −6
  • internal/status/execsandbox_test.go +73 −0
  • internal/status/snapshot.go +20 −4
  • region_labels_e2e_test.go +1 −1
  • status_instances.go +65 −20
  • status_instances_test.go +30 −12

CI failed — run details

diff --git a/docs/superpowers/notes/census-proposal-gvisor-demos.md b/docs/superpowers/notes/census-proposal-gvisor-demos.md
index 3a6258cd7..8dcf0c697 100644
--- a/docs/superpowers/notes/census-proposal-gvisor-demos.md
+++ b/docs/superpowers/notes/census-proposal-gvisor-demos.md
@@ -6,6 +6,7 @@ Ruling `census-ruling-gvisor-demos`. The independent reviewer approves or reject
|---|---|---|---|
| `internal/activator/backend_unit.go` `UnitBackend.systemctl` | body | unchanged (1) | Task 5: gate launch using startup-captured mode and existing route/role/layout before preparation or execution; migrate structured root start identity and reject mismatches. Unsupported gVisor paths refuse; native behavior and existing root authority checks retained. No new root read source. |
| `internal/activator/sidecar_ha.go` `ExecBackend.startHAWorker` | body | unchanged (13) | Task 5: migrate structured root start identity, validate binding, retain actual unit for observation/exit/stop. Unknown worker response retains only a cleanup request and listener, never a guessed observed identity. Existing route/control/cgroup inputs; no new root read. |
+| `internal/activator/size.go` `Service.SizeState` | body | unchanged (2) | Task 8: copy actual Unit and parsed execsandbox.Family from the retained process handle under the existing Service lock. No box-mode inference or added external read; logical Want unchanged. |
| `internal/activator/unitproc.go` `ExecBackend.newUnitProc` | body | unchanged (1) | Task 5: migrate structured root start identity, validate binding, retain actual unit for observation/exit/stop. Unknown worker response retains only a cleanup request and listener, never a guessed observed identity. Existing route/control/cgroup inputs; no new root read. |
| `internal/activator/unitproc.go` `unitProc.Stop` | body | unchanged (2) | Task 5 fix round 2: keep original-run owner stop proof failure latched until a successful plain fenced stop, in the owner Stop path. The foreign-invocation observer again completes from main's existing cgroup evidence after its plain stop attempt. Same control channel and retained unit kind; no new read. |
| `internal/demobuild/purge.go` `Worker.PurgeDemo` | body | unchanged (3) | Task 7: derive the selected build family for existing authenticated job retirement; cleanup proves both named families before any shared mount or bundle removal. Existing marker and scratch reads unchanged. |
@@ -14,12 +15,13 @@ Ruling `census-ruling-gvisor-demos`. The independent reviewer approves or reject
| `internal/demobuild/unit.go` `Worker.prepareUnit` | body | unchanged (1) | Task 7: derive family and ID from validated job/attempt; retain validated root extraction and warm overlay. gVisor uses cache-upper/view so mounted-root ownership cannot transfer cache-upper itself; chown only out/tmp/home and mounted cache directories through no-follow descriptors, then write shared OCI bundle/skeleton. No tenant-supplied path or command. |
| `internal/demobuild/unit.go` `emptyBuildCgroup` | body | unchanged (2) | Task 7: retain fixed derived kernel cgroup.events read; reject duplicate or malformed populated fields rather than accepting any populated 0 substring. |
| `internal/demobuild/worker.go` `NewWorker` | body | unchanged (1) | Task 7: capture only fixed policy from the supplied roleBuild callback; readiness remains per-build and during the selected-family probe. Existing root directory checks and lock unchanged. |
-| `internal/host/agent.go` `runAgent` | body | unchanged (9) | Capture sandbox resolution and refusal once; log errors once; gate route admission and BeforeExec before process launch. No new root read. Task 5: pass the once-captured sandbox effective mode/config error into ExecBackend, UnitBackend and the immutable Client expectation. Same startup environment/registry reads; swapArming declines gVisor before placement. |
+| `internal/host/agent.go` `runAgent` | body | unchanged (9) | Capture sandbox resolution and refusal once; log errors once; gate route admission and BeforeExec before process launch. No new root read. Task 5: pass the once-captured sandbox effective mode/config error into ExecBackend, UnitBackend and the immutable Client expectation. Same startup environment/registry reads; swapArming declines gVisor before placement. Task 8: arm read-only status projection with the existing Client.SandboxStatus callback. Agent status now queries the existing root /ready endpoint; no new root authority or guest-file input. |
| `internal/host/bootstrap.go` `bootstrapWithGroup` | body | unchanged (3) | Create the rootfs parent at 0700 and runtime root at 0755. Existing host.env/unit reads unchanged; workload templates remain unarmed. |
| `internal/host/claimactivation_preflight.go` `claimActivationLocalUnits` | body | unchanged (4) | Fix round 1 I2: preserve the existing native preflight skip decision in a named helper for tests; ParseUnitName now returns a distinct discovery kind for gVisor so its leftover drop-ins are not skipped. Same walks and reads, no new paths or native authority. |
| `internal/host/claimstop_run.go` `RunInstanceControl` | body | unchanged (0) | Retain Task 1 admission and claim separation; wire host-owned exact recovery baseline and pinned-set verification/retry callbacks. No new direct read. Task 6: In effective gVisor mode serve the cleanup-capable registry-view controller before claim recovery or assembly; preserve the retained Configure error so CLAIMS and invalid config still block launches. No new direct read. |
| `internal/host/claimunit.go` `claimUnitContent` | body | unchanged (1) | Mark only claim/demo renderings explicitly; common host.env remains loaded. Ordinary rendering masks CARLOS_HOST_CLAIM with UnsetEnvironment, removed only for a successfully parsed enabled claim rendering. Existing template read unchanged. Task 7: render aggregate build slice through SlicePropertiesFor using the resolved host mode, with 32 MiB and 64-task gVisor overhead per slot. Existing control permissions unchanged. |
| `internal/host/claimunit.go` `readClaimUnitSettings` | body | unchanged (3) | Task 7: parse CARLOS_EXEC_SANDBOX in the existing host.env reader and resolve fixed mode for installed build-slice budgets. No new file read; invalid values refuse rendering. |
+| `internal/host/layoutleg.go` `layoutStatusReport` | body | unchanged (18) | Task 8: add root-reported configured/effective mode, runtime pin and readiness through Client.SandboxStatus, plus observed per-row family from the activator handle. Missing/stale root builds remain unknown. Presentation only, no root decision. |
| `internal/host/systemapply.go` `systemApplier.install` | body | unchanged (0) | Check staged and previous executable awareness before unit-plan execution. Existing reads unchanged; no unaware prev executes in gvisor mode. |
| `internal/host/systemapply.go` `systemApplier.installUnits` | body | unchanged (6) | Create rootfs/runtime parent directories before controller restart. Existing staged unit and root-owned host.env reads unchanged. |
| `internal/host/systemapply.go` `systemApplier.restoreFiles` | body | unchanged (1) | Check prev awareness before quiesce/copy/restore and check the copied restore executable before rename. Existing stat unchanged. |
@@ -35,6 +37,8 @@ Ruling `census-ruling-gvisor-demos`. The independent reviewer approves or reject
| `internal/instancectl/server.go` `Server.RunProbe` | body | unchanged (1) | Select the fixed root-private probe family and delegate gVisor to its serialized root/guest proof, with no native/rootfs fallback. Task 6 fix round 1: remove mode drain from probe execution (Ready/ReadyDemo only), and let runGVisorProbe atomically publish the report/runtime identity including start lines once. Existing native report read unchanged. |
| `internal/instancectl/server.go` `runWithClaim` | body | unchanged (4) | Retain sandbox modes and error; bind host-provided baseline and runtime callbacks without importing host templates. Existing reads unchanged. Task 6: Capture HostClaims once from ControlConfig/hostwrite.Enabled and set the fixed root-owned bundle discovery directory. Existing command and configuration reads unchanged. Task 7: enable gVisor worker construction through fixed unitFamily(roleBuild); readiness proof rechecks sandbox admission and current Ready without reaching the constructor fatal path for transient refusals. Existing command/config reads unchanged. |
| `internal/instancectl/server.go` `type Server` | body | unchanged (1) | 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. |
+| `internal/status/dryrun.go` `dryRunFixtures` | body | unchanged (1) | Task 8: add private sandbox status and row fixtures plus leak needles. Fixture data only; public fleet shape unchanged. |
+| `status_instances.go` `printStatusLayout` | body | unchanged (1) | Task 8: print draft SANDBOX column and one exec-sandbox summary per reported box from the existing operator API. Missing/stale reports display unknown; no new file read or authority. |
| `system.go` `runSystem` | body | unchanged (0) | Dispatch fixed runsc-ensure and exec-sandbox-allows-prev system applets; no direct reads. |
| `system.go` `systemVerb` | body | unchanged (0) | Recognize two root sandbox applets; no direct reads. |
| `internal/activator/backend_exec.go` `ExecBackend.LegacyRunGone` | sites | +registry:Host | Task 5: after root fenced Stop succeeds, check both native and gVisor original siblings using the existing systemd/cgroup readers; rootfs retains its existing path. A failed root proof returns immediately and keeps the lease. No mode-dependent cleanup. |
@@ -68,10 +72,11 @@ Ruling `census-ruling-gvisor-demos`. The independent reviewer approves or reject
| `internal/activator/rootfs.go` `ExecBackend.spawnRootfs` | sites | +registry:Host, +whole:Route | Task 5: gate launch using startup-captured mode and existing route/role/layout before preparation or execution; migrate structured root start identity and reject mismatches. Unsupported gVisor paths refuse; native behavior and existing root authority checks retained. No new root read source. |
| `internal/activator/unitproc.go` `ExecBackend.newRootfsWorkerProc` | sites | +registry:Host, -whole:Route | Task 5: migrate structured root start identity, validate binding, retain actual unit for observation/exit/stop. Unknown worker response retains only a cleanup request and listener, never a guessed observed identity. Existing route/control/cgroup inputs; no new root read. |
| `internal/activator/unitproc.go` `ExecBackend.newUnitProcFor` | sites | -whole:Route | Task 5: migrate structured root start identity, validate binding, retain actual unit for observation/exit/stop. Unknown worker response retains only a cleanup request and listener, never a guessed observed identity. Existing route/control/cgroup inputs; no new root read. |
-| `internal/activator/unitproc.go` `ExecBackend.observe` | sites | -registry:Runtime ×2, -whole:Route ×2 | Task 5: migrate structured root start identity, validate binding, retain actual unit for observation/exit/stop. Unknown worker response retains only a cleanup request and listener, never a guessed observed identity. Existing route/control/cgroup inputs; no new root read. Fix round 2: rootfs log says stop accepted and waits for termination proof; no claim of termination from stop acceptance. Foreign observer uses plain fenced stop with main's existing cgroup evidence. |
+| `internal/activator/unitproc.go` `ExecBackend.observe` | sites | -registry:Runtime ×2, -whole:Route ×2 | Task 5: migrate structured root start identity, validate binding, retain actual unit for observation/exit/stop. Unknown worker response retains only a cleanup request and listener, never a guessed observed identity. Existing route/control/cgroup inputs; no new root read. Fix round 2: rootfs log says stop accepted and waits for termination proof; no claim of termination from stop acceptance. Foreign observer uses plain fenced stop with main's existing cgroup evidence. Task 8: move the existing gVisor advisory exit label to unitProc.exitLine, based on UnitIdentity. No changes to records, termination proof, stop, or cgroup reads. |
+| `internal/host/sizestatus.go` `readSizeInForce` | sites | -file:Stat | Task 8: remove Stat and generation-name reconstruction/parent fallback; read memory.max only under the host slice and validated retained unit name. Compare against Physical(logical tier) only for FamilyGVisor, return unchanged logical size/shares. Existing agent cgroupfs read, no root or guest-file read. |
| `internal/host/systemapply.go` `systemApplier.stageCandidate` | sites | -file:OpenFile | Pass the already-open regular file fstat size to bounded preflight. Allocate payload once at exactly that size, use ReadFull then confirm EOF; hash and scan those same bytes before staging. Root-owned staged target is still checked before execution. Preserve staging on floor refusal for apply/install-channel. |
-Envelopes re-pinned: `.`, `internal/activator`, `internal/demobuild`, `internal/execsandbox`, `internal/host`, `internal/host/units`, `internal/instancectl`, `internal/instanceexec`.
+Envelopes re-pinned: `.`, `internal/activator`, `internal/demobuild`, `internal/execsandbox`, `internal/host`, `internal/host/units`, `internal/instancectl`, `internal/instanceexec`, `internal/status`.
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.
@@ -79,6 +84,7 @@ Recorded dispositions, which each change must still satisfy:
- `internal/activator/backend_unit.go` `UnitBackend.systemctl`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J4;basis=root-input
- `internal/activator/sidecar_ha.go` `ExecBackend.startHAWorker`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-region-ha-p1b3b-s;basis=Require nested HA sidecar shape and closed worker identity environment; prepare and acknowledge sealed secrets before writing the existing run launch file. Start the previously verified staged executable through existing root StartExe, mark uncertain starts for stop proof, and observe the same run unit. No health dial or new root verb.
+- `internal/activator/size.go` `Service.SizeState`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-instance-egress-sizes-328-329;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=root-route (J1, as ExecBackend.GenTier): new (#329 plan 3 Task 6, pending column from the final review): the agent's status (internal/host sizestatus) asks for an awake non-worker entry's generation unit (genUnitOf), whether a swap holds the parent, and the size it should run at, EffectiveSize over sizedRouteLocked's route. Its two sites are the entry's in-memory route and the sized copy; it reads no registry, file or root state of its own; no root decision
- `internal/activator/unitproc.go` `ExecBackend.newUnitProc`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-rootfs-apps-2;basis=returns newUnitProcFor's error alongside the handle; the same one site, no read added
- `internal/activator/unitproc.go` `unitProc.Stop`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J1;basis=root-route
- `internal/demobuild/purge.go` `Worker.PurgeDemo`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-agent-start-demo-1;basis=Reads root-owned seen/job-ID marker and scratch existence; checks demo/box/job binding before existing stop/cgroup/unmount cleanup. Fix round 1: also requires the job marker host to match the purge host; no new file reads.
@@ -93,6 +99,7 @@ Recorded dispositions, which each change must still satisfy:
- `internal/host/claimstop_run.go` `RunInstanceControl`: authority, task C,D,G. Basis: rev3=PROPOSED-p3;run=24;identity=root claim/adopt/update controller uid 0;basis=production root startup builds authenticated execution and launch handlers then uses activateClaimRoot for recovery, the registered census launch verifier and lifecycle start;rev3=census-ruling-rootfs-apps-2;basis=the claims-off path serves through instancectl.RunWithRegistryView with HostRuntime: instanceRegistryHostRuntime beside the same instanceRegistryHostApp(nil); the new read is instanceRegistryHostRuntime's own (a decision row in rootfs-apps-2-new); no read added in this body;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328 plan 2 Tasks 4 and 6: the claims-off branch hands RunWithRegistryView the pre-claim egress asserter (newEgressAsserter over registryEgressSource and registryEgressHosts, which read the agent-written registry read-only, beside the instanceRegistryHostApp read it already had); the claims branch builds its runtime resources in instanceControlClaimResources, adding the claims asserter (claimsEgressSource writes no allow; the registry is read only to name slices), and serves through runClaimControl, which passes RunWithClaim the same handler, held-release route and host lookup plus that asserter. No read site in the unit, none added.;rev3=census-ruling-agent-start-demo-1;basis=Wires demo registry views and existing root release/adoption guard into instance control.;rev3=census-ruling-region-ha-p3b;basis=Add root hairpin identity verification, dormant install and reset CLI entries with bounded contexts. Indirect inputs are root-owned marker/identity/ingress/state and kernel/systemd process evidence; no request-controlled addresses or executable path. Existing control-service path remains.
- `internal/host/claimunit.go` `claimUnitContent`: authority, task E1,E3. Basis: rev3=PROPOSED-p3;identity=root claim/adoption controller uid 0;basis=adds write permission for exactly the public retry directory only when the root settings reader has verified a complete census and prepared that directory;rev3=census-ruling-agent-start-demo-1;basis=Demo-only ReadWritePaths for instance data/runtime, staged files and root release lock; ordinary rendering unchanged.;rev3=census-ruling-agent-start-demo-1-followups;basis=In demo box mode, declare StateDirectory=carlos-release/private with mode 0700 so systemd creates root-owned release state before namespace setup and keeps it writable. Existing ReadWritePaths and ordinary/claims rendering stay unchanged. No new read site or caller-controlled path.;rev3=census-ruling-agent-start-demo-3;basis=Declare /var/lib/carlos-demo-snapshots as root-owned StateDirectory with mode 0700 only for configured demo boxes, including recovery with admission off. Ordinary claims units retain their original directories. The shared unit template is unchanged from main; no file read is added.
- `internal/host/claimunit.go` `readClaimUnitSettings`: authority, task C,E3,G,J4. Basis: rev3=PROPOSED-p3;identity=root claim/adoption controller uid 0;basis=retains exact no-census unit settings; a claims-enabled complete census prepares the root-owned retry directory before the hardened controller starts;rev3=census-ruling-agent-start-demo-1;basis=Reads worker/concurrency/toolchain settings from the existing host.env parser; requires box mode and refuses claims coexistence.
+- `internal/host/layoutleg.go` `layoutStatusReport`: diagnostic, task H3. Basis: no-effect;rev3=census-ruling-instance-egress-sizes-328-329;basis=#329 plan 3 Task 7: each activator-managed instance row gains a Size cell, rowSizeCell(armedSizeSource.Load(), rt.Host, word) (the added registry:Host site), which for an awake nested row reads that host's cgroup memory.max through readSizeInForce (a decision row, in the agent); still a status report with no effect on any decision.;rev3=census-ruling-alias-socket-follow-338;basis=#338: a platform socket row reports alias (aliasLayout) instead of external; reads Platform;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 5: Pass.Held takes the whole route (so a row with a runtime is never reported as held); status display only
- `internal/host/systemapply.go` `systemApplier.install`: authority, task F,J4. Basis: rev3=PROPOSED-p3;identity=carlos system apply, root update unit or offline root CLI, uid 0;basis=root verifies staged signature and final locked bounds before rename, then records root accepted floor history only after health succeeds;rev3=census-ruling-region-ha-p1a;basis=root apply, uid 0: comment and error text only around the beginExecutableChange call (the wrapped error now reads "update not begun" instead of "update-begun marker"); the call, its position before the first box-changing step and the deferral on error are unchanged; no read added;rev3=census-ruling-region-ha-p3b;basis=Require groupTarget for the staged new artifact and propagate quiesce refusal before effects. Root-owned operator permit must authorize digest/action/current boot; existing signed image, floor and journal checks remain; no new direct read.
- `internal/host/systemapply.go` `systemApplier.installUnits`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-agent-start-demo-1;basis=Renders the staged build slice against live root host configuration; preserves it when settings cannot be parsed.;rev3=census-ruling-region-ha-p3b;basis=Require group apply/rollback permit, preserve root Restart=no/nftables drop-in and masks, and skip automatic update/recovery units. Existing staged unit and host.env reads remain; new indirect marker/permit reads are protected and agent receipts are excluded.
- `internal/host/systemapply.go` `systemApplier.restoreFiles`: authority, task F,J4. Basis: rev3=PROPOSED-p3;identity=carlos system apply/recover, root systemd units or offline root CLI, uid 0;basis=selects signed prev identity and checks staged restore against both root bounds before rename; version sidecar cannot authorize;rev3=census-ruling-region-ha-p3b;basis=Authorize exact previous artifact before restore, propagate quiesce refusal and remove automatic group units from enable list. Existing signature/floor and staged plan reads remain; indirect permit must be root-owned and bind old digest/current boot.
@@ -108,6 +115,8 @@ Recorded dispositions, which each change must still satisfy:
- `internal/instancectl/server.go` `Server.RunProbe`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J2,J4;basis=root-input;rev3=census-ruling-rootfs-apps-2;basis=after the resolver allow it applies the box-address deny (denyLocalAddrs: set-property IPAddressDeny on carlos-instances.slice from localPrefixes, which reads /proc/net/fib_trie and /proc/net/if_inet6 as LocalAddrs already did), writes the probe's box-addrs under its own exe layout (writeFileExcl, a decision row), and after the binary probe runs the rootfs probe (runRootfsProbe, a decision row); its own direct read, probe.out, is unchanged;rev3=census-ruling-region-ha-p3b;basis=Take shared root hairpin lease for the entire probe so deny refresh and hairpin mutation cannot race it. Indirect reads validate root boot snapshot, root state/fence and interface inventory; existing probe.out direct read remains and lock/config errors fail readiness.
- `internal/instancectl/server.go` `runWithClaim`: authority, task C,D,G. Basis: Claim instance controller adds held-release RPC dispatch within existing launch/participation execution boundary.;rev3=census-ruling-rootfs-apps-2;basis=takes a RegistryView (HostApp and HostRuntime) for the bare hostApp, and the production Server literal gains HostRuntime, ProbeImage: BuildProbeImage, ProbeImageFile: ProbeImagePath, RootfsProbeOut under /run/carlos-control and DenyEvery: 10s; this body reads nothing new itself; the readers it wires (instanceRegistryHostRuntime, BuildProbeImage, the rootfs probe's output) are decision rows;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328 plan 2 Task 4 and #329 plan 3 Task 5: takes the egress asserter as a parameter, sets it on the production Server literal (Egress) and starts its 30 s Loop beside probeLoop and diskLoop; the literal also names the fixture check ProbeFixturesOK (renamed in plan 2 Task 14). It sets no control drop-in directory: plan 3's ControlDropInDir default (/run/systemd/system.control) was deleted with removeGenControlDropIn in ef38e13b (the P1 EROFS fix), so instance control names systemd's control directory only to read it (TrustedDropinReader). The same four sites (the two exec.CommandContext closures, statfsBytes, the data literal), offsets moved; no read added.;rev3=census-ruling-agent-start-demo-1;basis=Wires root-owned demo config and existing fixed paths into the service.;rev3=census-ruling-region-ha-p3b;basis=Resume root-owned hairpin state before probes/control service work; verify current systemd agent identity and kernel fence/addresses, restore pidfd watch or revoke stale state. Same direct exec/statfs/data sites; indirect inputs are protected root snapshot/state and kernel evidence, never receipt data.;rev3=census-ruling-agent-start-demo-3;basis=Construct the demo snapshot supervisor for configured demo boxes; startup cleanup gates builder readiness. Census read-site delta: unchanged (4).
- `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.;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).
+- `internal/status/dryrun.go` `dryRunFixtures`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J1;basis=root-route
+- `status_instances.go` `printStatusLayout`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328 plan 2 Task 12 and #329 plan 3 Task 10: carlos status --layout, in the operator's carlos CLI on the operator's own machine, prints SIZE and EGRESS columns from the console's JSON (statusLayoutRow.Size and Egress), joins the egress reason into REASON and prints one note when a size is pending; the same one site (the /data literal in the mixed-box warning), no read added.;rev3=census-ruling-region-labels;basis=a REGION column (statusRegionCell) from the console's answer; no read added
- `system.go` `runSystem`: authority, task B,C,D,F,G,J4. Basis: rev3=census-ruling-self-serve-moves-1;identity=explicit operator CLI uid 0;basis=adds the lifetimes family to the system dispatch (carlos system lifetimes cutover, a console door call as the operator); every existing command branch unchanged;rev3=census-ruling-claims-cleanup-r2;basis=claims cleanup R2: drops the claims case (host.RunSystemClaims, deleted); every other branch unchanged; no read added;rev3=census-ruling-nearest-region-a;basis=adds the hosts-used family to the system dispatch (carlos system hosts-used status, one GET of a console door as the operator); every existing command branch unchanged; no read added;rev3=census-ruling-region-ha-p1a;basis=explicit operator CLI and root units, uid 0: drops the "join" case (host.RunSystemJoin, deleted with internal/host/joinroot.go, its only caller) and its line in the usage text; every other branch unchanged; no read added;rev3=census-ruling-named-unit-delivery-114;basis=the system verb dispatch gains named-units, routed to host.RunSystemNamedUnits; no read of its own;rev3=census-ruling-design-pdf-service;basis=add dispatch for carlos system pdf; no new reads;rev3=census-ruling-managed-fleets-2a;basis=Adds managed-fleets operator CLI dispatch; no direct read added; existing root command branches unchanged.;rev3=census-ruling-agent-start-demo-2;basis=system.go:62-66 adds the demos family dispatch to the console-only operator client (system_demos.go:19, system_demos_api.go:23); no direct read added and other root commands are unchanged.;rev3=census-ruling-region-ha-p3b2;basis=Dispatches carlos system group-maintenance {status|permit|revoke|prepare|apply|rollback} to internal/host; no read of its own.
- `system.go` `systemVerb`: authority, task B,C,D,F,G,J4. Basis: rev3=census-ruling-self-serve-moves-1;identity=explicit operator CLI uid 0;basis=adds the lifetimes family to the system dispatch (carlos system lifetimes cutover, a console door call as the operator); every existing command branch unchanged;rev3=census-ruling-claims-cleanup-r2;basis=claims cleanup R2: drops "claims" from the verb list, so it now falls to the unknown-verb message; no read added;rev3=census-ruling-nearest-region-a;basis=adds "hosts-used" to the verb list, routed to runSystemHostsUsedVerb; no read added;rev3=census-ruling-region-ha-p1a;basis=explicit operator CLI and root units, uid 0: drops "join" from the verb list, so `carlos system join` now falls to the unknown-verb message; no read added;rev3=census-ruling-named-unit-delivery-114;basis=the known-verb list gains named-units; no read of its own;rev3=census-ruling-design-pdf-service;basis=add recognition for carlos system pdf; no new reads;rev3=census-ruling-managed-fleets-2a;basis=Recognizes managed-fleets as a CLI family; no read added.;rev3=census-ruling-agent-start-demo-2;basis=system.go:43-57 recognizes demos; parsing only, no direct read added.;rev3=census-ruling-region-ha-p3b2;basis=Recognizes group-maintenance as a system verb; parsing only.
- `internal/activator/backend_exec.go` `ExecBackend.LegacyRunGone`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-292;basis=Census ruling 292: new unit; stops the host's original run unit through instance-control's existing /stop and proves it gone from systemctl show state and cgroup.events, as the exit observer reads. The termination proof only decides release-or-keep, and never starts, wakes or admits anything; unknown or error means keep. Boundary: agent-side shutdown gates running as carlos; they refuse or stop new work once shutdown begins, and a cancelled wake releases its lease; no new read and no root decision; plus the legacy run unit's termination proof (systemctl show state and cgroup.events, as the exit observer reads), and a retried conditional lease delete of the same record.;rev3=census-ruling-rootfs-apps-2;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=a rootfs row's original run unit is the rootfs template's: it is named by unitNameFor and stopped through stopRole (the rootfs verb), and its cgroup proven by unitEvents, which for a rootfs row also reads the control group systemd reports; the Host sites became Route sites (the route passed to those three); the proof's rule is unchanged: unknown or error keeps the lease; no root decision
@@ -142,6 +151,7 @@ Recorded dispositions, which each change must still satisfy:
- `internal/activator/unitproc.go` `ExecBackend.newRootfsWorkerProc`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-rootfs-apps-3-workers;basis=rootfs Plan 3 Group W: starts observing the named worker's unit; refused for a binary row and for a name that is no worker's before anything watches; holds no control listener
- `internal/activator/unitproc.go` `ExecBackend.newUnitProcFor`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-rootfs-apps-2;basis=the unit is named by unitNameFor(rt, role, gen), one more Route site (+whole:Route), and a role with no unit of the row's kind is refused before anything watches ""; no new read kind and no file read;rev3=census-ruling-region-ha-p1b3b-s;basis=Attach optional per-worker API closers to the existing unit observer before starting it; unit naming and systemd/cgroup proof reads unchanged.
- `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;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;rev3=census-ruling-region-ha-p1b3b-s;basis=Retain the already-read advisory exit record for native sidecars after the same systemd and cgroup termination proof; crash classification never substitutes for stop proof. No new read source.
+- `internal/host/sizestatus.go` `readSizeInForce`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-instance-egress-sizes-328-329;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=root-input (J4, as readCgroupEvents): new (#329 plan 3 Task 7): os.Stat of the generation unit's cgroup directory and one ReadFile of memory.max under /sys/fs/cgroup/<parent slices>/<SliceName(host)>[/<GenUnitName(host, gen)>] (instancectl's names; host and gen from the agent's own activator state), a kernel file, matched to a size row; called through rowSizeCell from layoutStatusReport, once per awake nested row per 5-minute status tick; runs in the agent, not root; a status cell only; no root decision
- `internal/host/systemapply.go` `systemApplier.stageCandidate`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-region-ha-p3b;basis=Require groupStageDigest before staging/candidate execution; action and new digest come from root-owned operator permit bound to boot marker. Existing signed pointer/artifact verification and two direct read sites remain.
New dispositions, which census-propose wrote and the reviewer checks against the unit's reads and the diff:
@@ -207,6 +217,6 @@ New dispositions, which census-propose wrote and the reviewer checks against the
- reads `internal/activator/cmdunit.go:cmdUnit.StopAndSettle`: +registry:Runtime ×2, +whole:Route ×2; keeps legacy, task accepted-legacy
- reads `internal/activator/unitproc.go:unitProc.stopUnit`: +registry:Runtime ×2, +whole:Route; keeps legacy, task accepted-legacy
-Seal: `b970bb28c5a633d2572a1da549030e9258cfdabb6322ddffdd0ebf41b56c464c` → `5706d5ec40dfe497b0eae7933135ef9ff9f89025c58b4721ed576516cc3ceb7a`.
+Seal: `b970bb28c5a633d2572a1da549030e9258cfdabb6322ddffdd0ebf41b56c464c` → `37512fd6f9760cb3907b945274902f8631402bd620fd16dddd60120578135a98`.
Overlay: `internal/provision/testdata/plan14-root-reads-gvisor-demos.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`.
diff --git a/internal/activator/execsandboxstatus_test.go b/internal/activator/execsandboxstatus_test.go
new file mode 100644
index 000000000..564070a1e
--- /dev/null
+++ b/internal/activator/execsandboxstatus_test.go
@@ -0,0 +1,51 @@
+package activator
+
+import (
+ "context"
+ "strings"
+ "testing"
+
+ "github.com/carlosframework/platform/internal/execsandbox"
+ "github.com/carlosframework/platform/internal/instancectl"
+ "github.com/carlosframework/platform/internal/registry"
+)
+
+func TestGVisorSizeInForceIdentity(t *testing.T) {
+ const host = "demo.example.com"
+ unit := instancectl.GVisorUnitName(host)
+ p := &unitProc{unit: unit, sandbox: execsandbox.EffectiveSystemd}
+ a := &Service{entries: map[string]*actEntry{host: {state: actAwake, route: registry.Route{Host: host, Size: "small"}, gen: Gen{N: 7}, proc: p}}}
+ st, ok := a.SizeState(host)
+ if !ok || st.Unit != unit || st.Sandbox != execsandbox.FamilyGVisor || st.Want.Name != "small" {
+ t.Fatalf("SizeState = %+v, %v", st, ok)
+ }
+ a.entries[host].proc = nil
+ if st, _ := a.SizeState(host); st.Unit != "" || st.Sandbox != "" {
+ t.Fatalf("invented identity = %+v", st)
+ }
+}
+
+func TestGVisorExitAttribution(t *testing.T) {
+ const host = "demo.example.com"
+ p := &unitProc{unit: instancectl.GVisorUnitName(host), invocation: "ours", sandbox: execsandbox.EffectiveSystemd}
+ b := &ExecBackend{UnitMainExit: func(_ context.Context, unit string) (MainExit, error) {
+ if unit != p.unit {
+ t.Fatalf("queried %q, want retained %q", unit, p.unit)
+ }
+ return MainExit{Invocation: "ours", Code: "1", Status: "42"}, nil
+ }}
+ rec := b.unitMainExitOf(p, instancectl.ExitRecord{Invocation: "ours"})
+ if rec.Code != "exited" || rec.Status != "42" {
+ t.Fatalf("advisory exit = %+v", rec)
+ }
+ for _, ok := range []bool{true, false} {
+ line := p.exitLine(rec, ok)
+ if !strings.HasSuffix(line, " (exit status via gVisor)") || strings.Contains(line, "app exited") || strings.Contains(line, "runtime exited") {
+ t.Fatalf("exit attribution: %q", line)
+ }
+ }
+ p.unit = instancectl.UnitName(instancectl.RoleRun, host)
+ if strings.Contains(p.exitLine(rec, true), "gVisor") {
+ t.Fatal("native exit attributed to gVisor")
+ }
+}
diff --git a/internal/activator/size.go b/internal/activator/size.go
index 3b7f8eece..59d10c902 100644
--- a/internal/activator/size.go
+++ b/internal/activator/size.go
@@ -8,6 +8,7 @@ import (
"time"
"github.com/carlosframework/platform/internal/cgroup"
+ "github.com/carlosframework/platform/internal/execsandbox"
"github.com/carlosframework/platform/internal/instancectl"
"github.com/carlosframework/platform/internal/registry"
)
@@ -104,7 +105,7 @@ func (a *Service) tierSource() genTierer {
// a socket of its own, so startRole started it through GenControl), else 0,
// the run template's slice alone. A canonical handle is numbered with
// generations off too, but no unit has that number (Astra plan R1-8). The
-// agent's status reads the memory in force from that unit's cgroup.
+// size controller uses this generation number for live resizing.
func genUnitOf(rt registry.Route, g Gen) uint64 {
if !g.Worker && linksCanonical(rt, g) {
return g.N
@@ -112,15 +113,19 @@ func genUnitOf(rt registry.Route, g Gen) uint64 {
return 0
}
-// SizeState is an awake instance's size (#329): Gen is the generation unit
+// SizeState is an awake instance's size (#329): Unit is the observed unit,
+// Sandbox its family, and Gen is the generation unit
// it serves from (0: the slice alone), Raised that a swap holds the parent,
// and Want the size its route and build run at now. Memory reaches Want at
// the next start or swap (spec §5.4 rev 10); until then the status shows
// the change pending.
type SizeState struct {
- Gen uint64
- Raised bool
- Want cgroup.Size
+ // Unit and Sandbox come from the retained handle, never from box policy.
+ Unit string
+ Sandbox execsandbox.Family
+ Gen uint64
+ Raised bool
+ Want cgroup.Size
}
// SizeState answers for an awake instance that is not a worker.
@@ -132,6 +137,11 @@ func (a *Service) SizeState(host string) (SizeState, bool) {
return SizeState{}, false
}
st := SizeState{Gen: genUnitOf(e.route, e.gen), Raised: e.ops.raised}
+ if p, ok := e.proc.(interface {
+ UnitIdentity() (string, execsandbox.Family)
+ }); ok {
+ st.Unit, st.Sandbox = p.UnitIdentity()
+ }
rt, build := a.sizedRouteLocked(e), e.gen.Build
a.mu.Unlock()
st.Want = EffectiveSize(a.tierSource(), rt, build)
diff --git a/internal/activator/unitproc.go b/internal/activator/unitproc.go
index 5a2f46f21..ad3f3fffd 100644
--- a/internal/activator/unitproc.go
+++ b/internal/activator/unitproc.go
@@ -505,10 +505,7 @@ func (b *ExecBackend) observe(p *unitProc) {
// the record is kept for it, never worded here.
p.workerExit, p.workerExitOK = rec, ok
} else {
- line := exitLine(rec, ok)
- if _, family := p.UnitIdentity(); family == execsandbox.FamilyGVisor {
- line += " (exit status via gVisor)"
- }
+ line := p.exitLine(rec, ok)
emitEvent(b.Logs, p.rt, exitLevel(rec, ok), line)
}
// The record is single-use (design §6.5): consumed
@@ -538,6 +535,17 @@ func (b *ExecBackend) observe(p *unitProc) {
}
}
+// exitLine attributes advisory gVisor exits without guessing whether the
+// application or runtime produced the status.
+func (p *unitProc) exitLine(rec instancectl.ExitRecord, ok bool) string {
+ line := exitLine(rec, ok)
+ if _, family := p.UnitIdentity(); family == execsandbox.FamilyGVisor {
+ // DRAFT: Paul reviews this wording before merge.
+ line += " (exit status via gVisor)"
+ }
+ return line
+}
+
// unitMainExitOf fills rec, an exit record with no code, from how systemd
// recorded the end of p's main process, when that is p's own invocation.
// On systemd 257 with PrivatePIDs a SIGKILLed unit's main process is killed
diff --git a/internal/console/apistatuslayout.go b/internal/console/apistatuslayout.go
index 63fc617e8..b52d04258 100644
--- a/internal/console/apistatuslayout.go
+++ b/internal/console/apistatuslayout.go
@@ -23,9 +23,10 @@ import (
// pass classified it — see status.RowLayout, which this mirrors on the
// wire.
type apiStatusLayoutRow struct {
- Host string `json:"host"`
- Layout string `json:"layout"`
- Reason string `json:"reason,omitempty"`
+ Sandbox string `json:"sandbox,omitempty"`
+ Host string `json:"host"`
+ Layout string `json:"layout"`
+ Reason string `json:"reason,omitempty"`
// Note is the pass's last non-refusal event for the host (what a move
// quarantined or kept aside). Additive; an old CLI ignores it.
Note string `json:"note,omitempty"`
@@ -71,8 +72,9 @@ func egressView(h status.HostEgress, ok bool, conflicts map[string]string) *apiE
// to, whether its snapshot is stale (status.BoxStale — the same rule every
// other private reader of status/boxes/ uses), and its rows.
type apiStatusLayoutBox struct {
- Box string `json:"box"`
- Mode string `json:"mode"`
+ ExecSandbox *status.ExecSandbox `json:"exec_sandbox,omitempty"`
+ Box string `json:"box"`
+ Mode string `json:"mode"`
// Region and RegionName are the box's placement code and label from
// the console's cached name map (region labels spec §4, labels 4),
// both absent for a box the map does not know.
@@ -154,12 +156,13 @@ func (s *Server) handleAPIStatusLayout(w http.ResponseWriter, r *http.Request) {
for host, rl := range b.Metrics.Layout.Rows {
eg, ok := b.Metrics.Egress[host]
rows = append(rows, apiStatusLayoutRow{Host: host, Layout: rl.Layout, Reason: rl.Reason, Note: rl.Note,
- Egress: egressView(eg, ok, conflicts), Size: rl.Size})
+ Egress: egressView(eg, ok, conflicts), Size: rl.Size, Sandbox: rl.Sandbox})
}
sort.Slice(rows, func(i, j int) bool { return rows[i].Host < rows[j].Host })
region, regionName := s.boxRegion(b.Label)
out = append(out, apiStatusLayoutBox{
Box: b.Label,
+ ExecSandbox: b.Metrics.Layout.ExecSandbox,
Region: region,
RegionName: regionName,
Mode: b.Metrics.Layout.Mode,
diff --git a/internal/console/apistatuslayout_test.go b/internal/console/apistatuslayout_test.go
index 182952547..549f97ba1 100644
--- a/internal/console/apistatuslayout_test.go
+++ b/internal/console/apistatuslayout_test.go
@@ -333,3 +333,39 @@ func TestStatusLayoutDoorCarriesSize(t *testing.T) {
}
}
}
+
+func TestStatusLayoutSandbox(t *testing.T) {
+ fx := newConsoleFixture(t)
+ token := cliToken(t, fx, "paul@keymail.dev", "code-sandbox")
+ if err := fx.st.SetOperator("paul@keymail.dev", true); err != nil {
+ t.Fatal(err)
+ }
+ report := &status.LayoutReport{Mode: "nested", ExecSandbox: &status.ExecSandbox{Configured: "auto", Effective: "gvisor", Runsc: &status.RunscStatus{Version: "release-20261102.0", SHA256: "pin"}, Ready: false, Blocked: "probe-blocked"}, Rows: map[string]status.RowLayout{"demo.example.com": {Layout: "nested", Sandbox: "gvisor"}, "sleep.example.com": {Layout: "nested"}}}
+ seedLayoutBox(t, fx.rel, "fresh", time.Now(), report)
+ seedLayoutBox(t, fx.rel, "old", time.Now(), &status.LayoutReport{Mode: "nested"})
+ seedLayoutBox(t, fx.rel, "stale", time.Now().Add(-time.Hour), report)
+ code, body := getBearer(t, fx.ts.URL+"/api/cli/status/layout", token)
+ if code != http.StatusOK {
+ t.Fatalf("status=%d: %s", code, body)
+ }
+ var out struct {
+ Boxes []apiStatusLayoutBox `json:"boxes"`
+ }
+ if err := json.Unmarshal(body, &out); err != nil {
+ t.Fatal(err)
+ }
+ if len(out.Boxes) != 3 {
+ t.Fatalf("boxes: %s", body)
+ }
+ for _, b := range out.Boxes {
+ if b.Box == "old" {
+ if b.ExecSandbox != nil {
+ t.Fatal("old box has guessed status")
+ }
+ continue
+ }
+ if b.ExecSandbox == nil || b.ExecSandbox.Ready || b.ExecSandbox.Runsc.SHA256 != "pin" || b.ExecSandbox.Blocked != "probe-blocked" || b.Rows[0].Sandbox != "gvisor" || b.Rows[1].Sandbox != "" || b.Stale != (b.Box == "stale") {
+ t.Fatalf("projection: %+v", b)
+ }
+ }
+}
diff --git a/internal/host/agent.go b/internal/host/agent.go
index 5bca5a986..982c924dd 100644
--- a/internal/host/agent.go
+++ b/internal/host/agent.go
@@ -589,6 +589,7 @@ func runAgent(args []string, buildClaims ClaimFactory) {
eb.SandboxEffective, eb.SandboxConfigErr = sandboxEffective, sandboxErr
eb.Control = ctl
egressStatus = ctl
+ armExecSandboxStatus(ctl.SandboxStatus)
// A grant or revoke the agent converged into the registry reaches
// root on the next 2 s beat rather than root's 30 s loop (#328).
go egressNudgeLoop(agentCtx, reg, ctl)
diff --git a/internal/host/execsandboxstatus.go b/internal/host/execsandboxstatus.go
new file mode 100644
index 000000000..04ad61a47
--- /dev/null
+++ b/internal/host/execsandboxstatus.go
@@ -0,0 +1,41 @@
+package host
+
+import (
+ "context"
+ "errors"
+ "sync/atomic"
+
+ "github.com/carlosframework/platform/internal/execsandbox"
+ "github.com/carlosframework/platform/internal/instancectl"
+ "github.com/carlosframework/platform/internal/status"
+)
+
+type execSandboxStatusReader func(context.Context) (execsandbox.State, error)
+
+var armedExecSandboxStatus atomic.Pointer[execSandboxStatusReader]
+
+func armExecSandboxStatus(read execSandboxStatusReader) {
+ armedExecSandboxStatus.Store(&read)
+}
+
+// execSandboxStatusReport asks the existing root client for its latest report.
+// Without a reported configuration, a transport failure or an older root is
+// unknown. A reported refusal keeps its pin and blocked reason.
+func execSandboxStatusReport() *status.ExecSandbox {
+ read := armedExecSandboxStatus.Load()
+ if read == nil {
+ return nil
+ }
+ ctx, cancel := context.WithTimeout(context.Background(), instancectl.DeadlineReady)
+ defer cancel()
+ state, err := (*read)(ctx)
+ var stale *instancectl.StaleBuildError
+ if state.Configured == "" || errors.As(err, &stale) {
+ return nil
+ }
+ report := &status.ExecSandbox{Configured: string(state.Configured), Effective: string(state.Effective), Ready: state.Ready, Blocked: state.Blocked}
+ if state.RunscVersion != "" || state.RunscSHA256 != "" {
+ report.Runsc = &status.RunscStatus{Version: state.RunscVersion, SHA256: state.RunscSHA256}
+ }
+ return report
+}
diff --git a/internal/host/execsandboxstatus_test.go b/internal/host/execsandboxstatus_test.go
new file mode 100644
index 000000000..f151d6039
--- /dev/null
+++ b/internal/host/execsandboxstatus_test.go
@@ -0,0 +1,119 @@
+package host
+
+import (
+ "context"
+ "errors"
+ "github.com/carlosframework/platform/internal/cgroup"
+ "path/filepath"
+ "reflect"
+ "strconv"
+ "testing"
+
+ "github.com/carlosframework/platform/internal/activator"
+ "github.com/carlosframework/platform/internal/execsandbox"
+ "github.com/carlosframework/platform/internal/instancectl"
+ "github.com/carlosframework/platform/internal/layout"
+ "github.com/carlosframework/platform/internal/registry"
+)
+
+func TestExecSandboxStatus(t *testing.T) {
+ resetLayoutGlobals(t)
+ old := armedExecSandboxStatus.Load()
+ oldSizes := armedSizeSource.Load()
+ t.Cleanup(func() { armedExecSandboxStatus.Store(old); armedSizeSource.Store(oldSizes) })
+ armedExecSandboxStatus.Store(nil)
+ if got := layoutStatusReport(nil).ExecSandbox; got != nil {
+ t.Fatalf("missing root report = %+v", got)
+ }
+ dd, sd := t.TempDir(), t.TempDir()
+ armedLayoutPass.Store(&layout.Pass{DataDir: dd, SocketDir: sd})
+ const host = "demo.example.com"
+ unit := instancectl.GVisorUnitName(host)
+ armedSizeSource.Store(&sizeSource{svc: &fakeSizeStater{states: map[string]activator.SizeState{
+ host: {Unit: unit, Sandbox: execsandbox.FamilyGVisor, Want: mustSizeNamed(t, "small")},
+ }}, cgroupRoot: t.TempDir()})
+ state := execsandbox.State{Configured: execsandbox.Systemd, Effective: execsandbox.EffectiveSystemd, RunscVersion: "release-20261102.0", RunscSHA256: "root-pin", Ready: true}
+ var readErr error
+ armExecSandboxStatus(func(context.Context) (execsandbox.State, error) { return state, readErr })
+ routes := []registry.Route{nestedRoute(dd, sd, host), nestedRoute(dd, sd, "sleep.example.com")}
+ got := layoutStatusReport(routes)
+ if got.ExecSandbox == nil || got.ExecSandbox.Configured != "systemd" || !got.ExecSandbox.Ready || got.ExecSandbox.Runsc.SHA256 != "root-pin" {
+ t.Fatalf("root projection = %+v", got.ExecSandbox)
+ }
+ if got.Rows[host].Sandbox != "gvisor" || got.Rows["sleep.example.com"].Sandbox != "" {
+ t.Fatalf("observed families = %+v", got.Rows)
+ }
+ state.Ready, state.Blocked = false, "EXEC-SANDBOX-RUNSC"
+ readErr = errors.New("not ready")
+ got = layoutStatusReport(routes)
+ if got.ExecSandbox == nil || got.ExecSandbox.Ready || got.ExecSandbox.Blocked != state.Blocked {
+ t.Fatalf("blocked report = %+v", got.ExecSandbox)
+ }
+ readErr = &instancectl.StaleBuildError{Running: "old", Want: "current"}
+ if got := layoutStatusReport(routes).ExecSandbox; got != nil {
+ t.Fatalf("stale root report = %+v", got)
+ }
+ state = execsandbox.State{}
+ readErr = errors.New("root unavailable")
+ if got := layoutStatusReport(routes).ExecSandbox; got != nil {
+ t.Fatalf("unavailable report = %+v", got)
+ }
+}
+
+func TestGVisorSizeInForce(t *testing.T) {
+ const host = "demo.example.com"
+ for _, tc := range []struct {
+ name, memory string
+ family execsandbox.Family
+ want string
+ }{
+ {"gvisor", "301989888", execsandbox.FamilyGVisor, "small"},
+ {"native", "268435456", execsandbox.FamilySystemd, "small"},
+ {"gvisor native bytes", "268435456", execsandbox.FamilyGVisor, ""},
+ {"native physical bytes", "301989888", execsandbox.FamilySystemd, ""},
+ {"other", "300000000", execsandbox.FamilyGVisor, ""},
+ {"unlimited", "max", execsandbox.FamilyGVisor, ""},
+ {"unreadable", "", execsandbox.FamilyGVisor, ""},
+ } {
+ t.Run(tc.name, func(t *testing.T) {
+ root := t.TempDir()
+ slice := filepath.Join(root, instancectl.SliceControlGroup(host))
+ unit := instancectl.UnitName(instancectl.RoleRun, host)
+ if tc.family == execsandbox.FamilyGVisor {
+ unit = instancectl.GVisorUnitName(host)
+ }
+ // Neither the parent nor a route-derived generation may supply this reading.
+ writeMemoryMax(t, slice, "2147483648")
+ writeMemoryMax(t, filepath.Join(slice, instancectl.GenUnitName(host, 7)), "1073741824")
+ if tc.memory != "" {
+ writeMemoryMax(t, filepath.Join(slice, unit), tc.memory)
+ }
+ got, ok := readSizeInForce(root, host, unit, tc.family)
+ if got.Name != tc.want || ok != (tc.want != "") {
+ t.Fatalf("got %+v, %v; want %q", got, ok, tc.want)
+ }
+ if ok && !reflect.DeepEqual(got, mustSizeNamed(t, tc.want)) {
+ t.Fatalf("physical size leaked into logical size: %+v", got)
+ }
+ if _, ok := readSizeInForce(root, host, "", tc.family); ok {
+ t.Fatal("missing retained identity inferred from slice")
+ }
+ })
+ }
+}
+
+func TestGVisorSizeInForceAllLogicalTiers(t *testing.T) {
+ const host = "demo.example.com"
+ root := t.TempDir()
+ unit := instancectl.GVisorUnitName(host)
+ for _, size := range cgroup.Sizes {
+ writeMemoryMax(t, filepath.Join(root, instancectl.SliceControlGroup(host), unit), strconv.FormatInt(execsandbox.Physical(size.Limit).MemoryMax, 10))
+ got, ok := readSizeInForce(root, host, unit, execsandbox.FamilyGVisor)
+ if !ok || !reflect.DeepEqual(got, size) {
+ t.Fatalf("%s: got %+v, %v", size.Name, got, ok)
+ }
+ }
+ if _, ok := readSizeInForce(root, host, unit, execsandbox.FamilySystemd); ok {
+ t.Fatal("accepted mismatched unit family")
+ }
+}
diff --git a/internal/host/layoutleg.go b/internal/host/layoutleg.go
index a36cb52bc..190eb2383 100644
--- a/internal/host/layoutleg.go
+++ b/internal/host/layoutleg.go
@@ -185,7 +185,9 @@ func noteLayoutDefault(mode, reason string) {
func layoutStatusReport(routes []registry.Route) *status.LayoutReport {
pass := armedLayoutPass.Load()
if pass == nil {
- return unmanagedLayoutReport(routes)
+ report := unmanagedLayoutReport(routes)
+ report.ExecSandbox = execSandboxStatusReport()
+ return report
}
mode := lastLayoutIntent()
if mode == "" {
@@ -212,8 +214,8 @@ func layoutStatusReport(routes []registry.Route) *status.LayoutReport {
}
// The size cell (#329, spec §5.6): the agent's own cgroupfs
// read against the activator's state, no root call.
- rows[rt.Host] = status.RowLayout{Layout: string(word), Reason: reason, Note: pass.Note(rt.Host),
- Size: rowSizeCell(sizes, rt.Host, word)}
+ size, sandbox := rowSizeCell(sizes, rt.Host, word)
+ rows[rt.Host] = status.RowLayout{Layout: string(word), Reason: reason, Note: pass.Note(rt.Host), Size: size, Sandbox: sandbox}
case rt.Platform && rt.Socket != "" && !rt.Hibernate:
rows[rt.Host] = aliasLayout(rt, liveSocket)
case rt.Socket != "" && !rt.Hibernate:
@@ -222,7 +224,7 @@ func layoutStatusReport(routes []registry.Route) *status.LayoutReport {
rows[rt.Host] = status.RowLayout{Layout: "external"}
}
}
- return &status.LayoutReport{Mode: mode, Rows: rows, Default: def.Applied, DefaultBlocked: def.Blocked}
+ return &status.LayoutReport{Mode: mode, Rows: rows, Default: def.Applied, DefaultBlocked: def.Blocked, ExecSandbox: execSandboxStatusReport()}
}
// Copy for a platform alias's row in `carlos status --layout` (#338,
diff --git a/internal/host/sizestatus.go b/internal/host/sizestatus.go
index 6d836632c..31d24003c 100644
--- a/internal/host/sizestatus.go
+++ b/internal/host/sizestatus.go
@@ -1,8 +1,6 @@
package host
import (
- "errors"
- "io/fs"
"os"
"path/filepath"
"strconv"
@@ -11,6 +9,7 @@ import (
"github.com/carlosframework/platform/internal/activator"
"github.com/carlosframework/platform/internal/cgroup"
+ "github.com/carlosframework/platform/internal/execsandbox"
"github.com/carlosframework/platform/internal/instancectl"
"github.com/carlosframework/platform/internal/registry"
)
@@ -58,23 +57,15 @@ func noteSizeChanged(host string) {
}
}
-// readSizeInForce is the size host's cgroup holds (spec §5.4 "Read-back"):
-// memory.max of generation gen's unit when gen > 0 and the unit's cgroup
-// exists, else of the host's slice, matched to a size row on memory alone.
-// It reads cgroupfs, what systemd wrote and the kernel holds, and asks
-// root nothing. No slice, an unreadable file, "max" or a value that is no
-// row: false.
-func readSizeInForce(cgroupRoot, host string, gen uint64) (cgroup.Size, bool) {
- dir := filepath.Join(cgroupRoot, instancectl.SliceControlGroup(host))
- if gen > 0 {
- unit := filepath.Join(dir, instancectl.GenUnitName(host, gen))
- switch _, err := os.Stat(unit); {
- case err == nil:
- dir = unit
- case !errors.Is(err, fs.ErrNotExist):
- return cgroup.Size{}, false
- }
+// readSizeInForce reads the retained unit's memory limit from cgroupfs.
+// Missing identity or an unreadable unit is unknown; the parent may hold a
+// swap budget. Only gVisor units include runtime overhead in their limit.
+func readSizeInForce(cgroupRoot, host, unit string, sandbox execsandbox.Family) (cgroup.Size, bool) {
+ family, valid := instancectl.UnitFamily(unit)
+ if !valid || family != sandbox {
+ return cgroup.Size{}, false
}
+ dir := filepath.Join(cgroupRoot, instancectl.SliceControlGroup(host), unit)
b, err := os.ReadFile(filepath.Join(dir, "memory.max"))
if err != nil {
return cgroup.Size{}, false
@@ -83,7 +74,16 @@ func readSizeInForce(cgroupRoot, host string, gen uint64) (cgroup.Size, bool) {
if err != nil {
return cgroup.Size{}, false
}
- return cgroup.SizeOf(cgroup.Limit{MemoryMax: n})
+ for _, size := range cgroup.Sizes {
+ limit := size.Limit
+ if sandbox == execsandbox.FamilyGVisor {
+ limit = execsandbox.Physical(limit)
+ }
+ if limit.MemoryMax == n {
+ return size, true
+ }
+ }
+ return cgroup.Size{}, false
}
// sizeCell is an awake nested row's size cell (spec §5.6): "swap" while a
@@ -101,24 +101,24 @@ func sizeCell(inForce cgroup.Size, ok bool, st activator.SizeState) string {
return inForce.Name + ">" + st.Want.Name
}
-// rowSizeCell is the size cell of an activator-managed row the layout pass
-// calls word: "" with no source armed (the report is as it was before
-// sizes), "-" for a row that is not nested (no live size there) or not an
-// awake instance (asleep, or a worker), else sizeCell over the cgroup's
-// read-back.
-func rowSizeCell(src *sizeSource, host string, word activator.Layout) string {
+// rowSizeCell reads size and sandbox from the same retained handle. Sleeping
+// instances have no observed sandbox; only nested instances have a size read-back.
+func rowSizeCell(src *sizeSource, host string, word activator.Layout) (size, sandbox string) {
if src == nil {
- return ""
- }
- if word != activator.LayoutNested {
- return "-"
+ return "", ""
}
st, awake := src.svc.SizeState(host)
if !awake {
- return "-"
+ return "-", ""
+ }
+ if st.Unit != "" {
+ sandbox = string(st.Sandbox)
+ }
+ if word != activator.LayoutNested {
+ return "-", sandbox
}
- inForce, ok := readSizeInForce(src.cgroupRoot, host, st.Gen)
- return sizeCell(inForce, ok, st)
+ inForce, ok := readSizeInForce(src.cgroupRoot, host, st.Unit, st.Sandbox)
+ return sizeCell(inForce, ok, st), sandbox
}
// sizeCommittedMiB is the box's committed figure (spec §5.5): the sum, in
diff --git a/internal/host/sizestatus_test.go b/internal/host/sizestatus_test.go
index 91ac44c55..21b03ffc9 100644
--- a/internal/host/sizestatus_test.go
+++ b/internal/host/sizestatus_test.go
@@ -11,6 +11,7 @@ import (
"github.com/carlosframework/platform/internal/activator"
"github.com/carlosframework/platform/internal/cgroup"
+ "github.com/carlosframework/platform/internal/execsandbox"
"github.com/carlosframework/platform/internal/instancectl"
"github.com/carlosframework/platform/internal/layout"
"github.com/carlosframework/platform/internal/provision"
@@ -103,10 +104,10 @@ func TestReadSizeInForcePrefersTheServingUnit(t *testing.T) {
ok bool
}{
{"the serving unit", 2, "large", true},
- {"no unit directory: the slice", 3, "xlarge", true},
- {"no generation: the slice", 0, "xlarge", true},
+ {"no unit directory: unknown", 3, "", false},
+ {"no generation: unknown", 0, "", false},
} {
- got, ok := readSizeInForce(root, host, c.gen)
+ got, ok := readSizeInForce(root, host, instancectl.GenUnitName(host, c.gen), execsandbox.FamilySystemd)
if ok != c.ok || got.Name != c.want {
t.Errorf("%s: readSizeInForce(gen %d) = %q, %v; want %q, %v", c.name, c.gen, got.Name, ok, c.want, c.ok)
}
@@ -118,7 +119,7 @@ func TestReadSizeInForcePrefersTheServingUnit(t *testing.T) {
writeMemoryMax(t, filepath.Join(root, instancectl.SliceControlGroup(unlimited)), "max")
writeMemoryMax(t, filepath.Join(root, instancectl.SliceControlGroup(odd)), strconv.FormatInt(1536<<20, 10))
for _, h := range []string{unlimited, odd, "shop-d.example.com"} {
- if got, ok := readSizeInForce(root, h, 0); ok {
+ if got, ok := readSizeInForce(root, h, instancectl.UnitName(instancectl.RoleRun, h), execsandbox.FamilySystemd); ok {
t.Errorf("%s: readSizeInForce = %q, true; want false", h, got.Name)
}
}
@@ -131,7 +132,7 @@ func TestReadSizeInForcePrefersTheServingUnit(t *testing.T) {
}
writeMemoryMax(t, filepath.Join(slice, instancectl.GenUnitName(host, 6)), "not-a-number")
for _, gen := range []uint64{5, 6} {
- if got, ok := readSizeInForce(root, host, gen); ok {
+ if got, ok := readSizeInForce(root, host, instancectl.GenUnitName(host, gen), execsandbox.FamilySystemd); ok {
t.Errorf("unreadable unit gen %d: readSizeInForce = %q, true; want false, not the slice's size", gen, got.Name)
}
}
@@ -171,12 +172,12 @@ func TestLayoutReportCarriesSize(t *testing.T) {
)
writeMemoryMax(t, filepath.Join(root, instancectl.SliceControlGroup(serving)), "2147483648")
writeMemoryMax(t, filepath.Join(root, instancectl.SliceControlGroup(serving), instancectl.GenUnitName(serving, 2)), "1073741824")
- writeMemoryMax(t, filepath.Join(root, instancectl.SliceControlGroup(growing)), "536870912")
+ writeMemoryMax(t, filepath.Join(root, instancectl.SliceControlGroup(growing), instancectl.UnitName(instancectl.RoleRun, growing)), "536870912")
writeMemoryMax(t, filepath.Join(root, instancectl.SliceControlGroup(swapped)), "1610612736")
large, xlarge, standard := mustSizeNamed(t, "large"), mustSizeNamed(t, "xlarge"), mustSizeNamed(t, "standard")
svc := &fakeSizeStater{states: map[string]activator.SizeState{
- serving: {Gen: 2, Want: large},
- growing: {Want: xlarge},
+ serving: {Gen: 2, Unit: instancectl.GenUnitName(serving, 2), Sandbox: execsandbox.FamilySystemd, Want: large},
+ growing: {Unit: instancectl.UnitName(instancectl.RoleRun, growing), Sandbox: execsandbox.FamilySystemd, Want: xlarge},
flat: {Want: standard},
swapped: {Gen: 4, Raised: true, Want: standard},
}}
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv
index 1b425b608..09714435d 100644
--- a/internal/provision/testdata/plan14-root-reads-chain.tsv
+++ b/internal/provision/testdata/plan14-root-reads-chain.tsv
@@ -128,4 +128,4 @@ plan14-root-reads-fix-activator-backoff-flake.tsv feba66806ddfcbdfaf369d72413bb1
plan14-root-reads-region-ha-dr5.tsv f19eb78c1da1475cbf8e11a3d6c394d828aa1c8f88ae24469fe8d473581b934b
plan14-root-reads-instance-syscall-filter.tsv b970bb28c5a633d2572a1da549030e9258cfdabb6322ddffdd0ebf41b56c464c
plan14-root-reads-instance-restore-658-cli.tsv b970bb28c5a633d2572a1da549030e9258cfdabb6322ddffdd0ebf41b56c464c
-plan14-root-reads-gvisor-demos.tsv 5706d5ec40dfe497b0eae7933135ef9ff9f89025c58b4721ed576516cc3ceb7a
+plan14-root-reads-gvisor-demos.tsv 37512fd6f9760cb3907b945274902f8631402bd620fd16dddd60120578135a98
diff --git a/internal/provision/testdata/plan14-root-reads-gvisor-demos.tsv b/internal/provision/testdata/plan14-root-reads-gvisor-demos.tsv
index 213ef928b..decd136b4 100644
--- a/internal/provision/testdata/plan14-root-reads-gvisor-demos.tsv
+++ b/internal/provision/testdata/plan14-root-reads-gvisor-demos.tsv
@@ -1,8 +1,9 @@
# Census overlay gvisor-demos, written by census-propose (#369). census-ruling-gvisor-demos, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-gvisor-demos.md.
-# 33 body, 33 sites, 8 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
+# 37 body, 34 sites, 9 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
# 60 new dispositions: 4 reads re-frozen at their disposition with the claim, 55 new units frozen accepted-legacy, 1 quiet units retired while they read nothing, 0 other.
@legacy c704be8adc98ef362ac25f0ee4916e4bd6b7d636fbf3e62a068643790aadc9eb internal/activator/backend_unit.go UnitBackend.systemctl legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-gvisor-demos;basis=Task 5: gate launch using startup-captured mode and existing route/role/layout before preparation or execution; migrate structured root start identity and reject mismatches. Unsupported gVisor paths refuse; native behavior and existing root authority checks retained. No new root read source. file:CommandContext@332 fc3481b0f6f5410479d649b20bed2f0870bf574e67d5b00e6e47bd6262036c1b
@legacy bba784d6c5913e5483457620b8c6b0cea30cef7eaa19954b148cea75d1a944ae internal/activator/sidecar_ha.go ExecBackend.startHAWorker legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1b3b-s;basis=Require nested HA sidecar shape and closed worker identity environment; prepare and acknowledge sealed secrets before writing the existing run launch file. Start the previously verified staged executable through existing root StartExe, mark uncertain starts for stop proof, and observe the same run unit. No health dial or new root verb.;rev3=census-ruling-gvisor-demos;basis=Task 5: migrate structured root start identity, validate binding, retain actual unit for observation/exit/stop. Unknown worker response retains only a cleanup request and listener, never a guessed observed identity. Existing route/control/cgroup inputs; no new root read. registry:Host@1355,registry:Host@1391,registry:Host@2005,registry:Host@270,registry:Host@320,whole:Route@1049,whole:Route@1433,whole:Route@1504,whole:Route@1637,whole:Route@1692,whole:Route@184,whole:Route@2048,whole:Route@853 f90fb0c55c16840a832498cd96ffdbf8bbc3bc8adca210372a731679afb36edd
+@legacy 9c86cfa6cbd773a060dfd4ede0b114ad4562af31e3c8d2e47f0b4eadc41b4d45 internal/activator/size.go Service.SizeState legacy accepted-legacy accepted-legacy;rev3=census-ruling-instance-egress-sizes-328-329;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=root-route (J1, as ExecBackend.GenTier): new (#329 plan 3 Task 6, pending column from the final review): the agent's status (internal/host sizestatus) asks for an awake non-worker entry's generation unit (genUnitOf), whether a swap holds the parent, and the size it should run at, EffectiveSize over sizedRouteLocked's route. Its two sites are the entry's in-memory route and the sized copy; it reads no registry, file or root state of its own; no root decision;rev3=census-ruling-gvisor-demos;basis=Task 8: copy actual Unit and parsed execsandbox.Family from the retained process handle under the existing Service lock. No box-mode inference or added external read; logical Want unchanged. whole:Route@227,whole:Route@502 f6d1d22080a447e7ef654f84f9713a68396312e51aa3efef2de1f6069dc6ca65
@legacy 6becaa7d7d3b47c82db5f5edc9a18c080948feeaebc835f8455a5130cadb9d5d internal/activator/unitproc.go ExecBackend.newUnitProc legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-rootfs-apps-2;basis=returns newUnitProcFor's error alongside the handle; the same one site, no read added;rev3=census-ruling-gvisor-demos;basis=Task 5: migrate structured root start identity, validate binding, retain actual unit for observation/exit/stop. Unknown worker response retains only a cleanup request and listener, never a guessed observed identity. Existing route/control/cgroup inputs; no new root read. whole:Route@220 2c4479b8182bd8f0fc235dd213776e6c59b22b341e6a470c0f690bee428f42ad
@legacy 8a1d54c72d48200fb3774f636caf471bc15122405399e598ffae6bd1caf25d38 internal/activator/unitproc.go unitProc.Stop legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-gvisor-demos;basis=Task 5 fix round 2: keep original-run owner stop proof failure latched until a successful plain fenced stop, in the owner Stop path. The foreign-invocation observer again completes from main's existing cgroup evidence after its plain stop attempt. Same control channel and retained unit kind; no new read. registry:Host@703,whole:Route@705 246d7bf501f06517b73496be89d55c2618ce5968fe06a259f6d6d7b0c3ebea0a
@legacy 53927e0d3ea245b498cb2a72f3574b3de4d0328169afbcdc0302d64b7f057639 internal/demobuild/purge.go Worker.PurgeDemo legacy accepted-legacy accepted-legacy;rev3=census-ruling-agent-start-demo-1;basis=Reads root-owned seen/job-ID marker and scratch existence; checks demo/box/job binding before existing stop/cgroup/unmount cleanup. Fix round 1: also requires the job marker host to match the purge host; no new file reads.;rev3=census-ruling-gvisor-demos;basis=Task 7: derive the selected build family for existing authenticated job retirement; cleanup proves both named families before any shared mount or bundle removal. Existing marker and scratch reads unchanged. file:Lstat@423,file:Lstat@906,file:ReadAll@581 2ec4d6cbaeece4e687ef8923a84afe6bb717ea83688266007bacf072b95675fb
@@ -21,6 +22,8 @@
@legacy d6421b84958c2af443e0556aa224414d7a2a9056ed887f0cd389c7b4c1a759a9 internal/instancectl/rootfs.go Server.runRootfsProbe legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-2;identity=instance control (/opt/carlos/carlos instance-control, carlos-instance-control.service, root);basis=root-input (J2,J4, as Server.RunProbe): new (rootfs Plan 2 Task 7): builds the probe image once per service start, hashes it (fileSHA256), lays out the _probe rootfs exe layout and its box-addrs, starts carlos-instance-rootfs-probe.service and ReadFiles its report from /run/carlos-control/rootfs-probe.out, which PID 1 writes from the probe's stdout; the probe runs the platform binary from root's own probe image, no tenant code; the report only decides readiness, and without an ok root-image line it is never ready, whatever it says;rev3=census-ruling-agent-start-demo-1;basis=Reads DemoBox and refuses before preparing or launching a rootfs probe; ordinary probe behavior unchanged.;rev3=census-ruling-gvisor-demos;basis=Refuse sandbox configuration or readiness errors before preparing or starting the native rootfs probe. Existing image read unchanged. Task 6: Effective gVisor refuses ROOTFS explicitly before native/rootfs probe preparation; no fallback. Existing native reads unchanged. file:ReadFile@2133 9f191518546c42664f607e5b8dbc85bc273fc7abc29bb12283edad58223b73a3
@legacy fba53ebc8c38053a37328dd85a3d3b38d4852b20f20cc55897227a59722cac5a internal/instancectl/server.go Server.RunProbe legacy accepted-legacy accepted-legacy;rev3=J2,J4;basis=root-input;rev3=census-ruling-rootfs-apps-2;basis=after the resolver allow it applies the box-address deny (denyLocalAddrs: set-property IPAddressDeny on carlos-instances.slice from localPrefixes, which reads /proc/net/fib_trie and /proc/net/if_inet6 as LocalAddrs already did), writes the probe's box-addrs under its own exe layout (writeFileExcl, a decision row), and after the binary probe runs the rootfs probe (runRootfsProbe, a decision row); its own direct read, probe.out, is unchanged;rev3=census-ruling-region-ha-p3b;basis=Take shared root hairpin lease for the entire probe so deny refresh and hairpin mutation cannot race it. Indirect reads validate root boot snapshot, root state/fence and interface inventory; existing probe.out direct read remains and lock/config errors fail readiness.;rev3=census-ruling-gvisor-demos;basis=Select the fixed root-private probe family and delegate gVisor to its serialized root/guest proof, with no native/rootfs fallback. Task 6 fix round 1: remove mode drain from probe execution (Ready/ReadyDemo only), and let runGVisorProbe atomically publish the report/runtime identity including start lines once. Existing native report read unchanged. file:ReadFile@2874 d77aeeac7de9d58663980809014bd4c83060235b63ac4c85cf25bcb89827c80b
@legacy 82605110a6be16960462dabb0f3740520c3204748ff60a8ead26fc4c36d91d90 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. file:Statfs@4829 1541a3b0e5f9972f07c1d94b85d1067fa83d1b24099ebf6b65d783716d4a7353
+@legacy 94f529dab8132514e8465d43036503f8d2bf3756fbffef26c885dca3e706b1c1 internal/status/dryrun.go dryRunFixtures legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-gvisor-demos;basis=Task 8: add private sandbox status and row fixtures plus leak needles. Fixture data only; public fleet shape unchanged. whole:Route@5482 8ddd1f1ff4d638b9ec2df0f24fe3f3559fe5a6f2b4d9e347f539aee89d95faf1
+@legacy e2acef4737299cc83882f71697f932039ba26522a61138d88aaa2361c120b1db status_instances.go printStatusLayout legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328 plan 2 Task 12 and #329 plan 3 Task 10: carlos status --layout, in the operator's carlos CLI on the operator's own machine, prints SIZE and EGRESS columns from the console's JSON (statusLayoutRow.Size and Egress), joins the egress reason into REASON and prints one note when a size is pending; the same one site (the /data literal in the mixed-box warning), no read added.;rev3=census-ruling-region-labels;basis=a REGION column (statusRegionCell) from the console's answer; no read added;rev3=census-ruling-gvisor-demos;basis=Task 8: print draft SANDBOX column and one exec-sandbox summary per reported box from the existing operator API. Missing/stale reports display unknown; no new file read or authority. data-literal@2413 28d6e05b336a4c99d9e1a3172116a4f6c03ddc7ae3cacd68d0ba0b304b203687
@legacy 9874cef8d7e250375fe74636e2cdf0138df6ab889df1e3dbbd4f308b99904b82 internal/activator/backend_exec.go ExecBackend.waitLegacyRunGone legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Task 5: after root fenced Stop succeeds, check both native and gVisor original siblings using the existing systemd/cgroup readers; rootfs retains its existing path. A failed root proof returns immediately and keeps the lease. No mode-dependent cleanup. whole:Route@524 3f1799da4272a8c8fb1fafb704f0cbad074dc9a8e8becb6ae7e7667c37a0ee79
@legacy 11be0650a243f28cddd173711c6fb6a695ac3778804055d8284b6f64efc84529 internal/activator/backend_rootfs.go uncertainWorkerProc.Stop legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Task 5: migrate structured root start identity, validate binding, retain actual unit for observation/exit/stop. Unknown worker response retains only a cleanup request and listener, never a guessed observed identity. Existing route/control/cgroup inputs; no new root read. whole:Route@166 c75ed435c88311a74616e4bf44a73694e0f5f99276b92a489a15674ab849a451
@legacy ccfa0c9fb480e3258ad0036dc10a42f3259a803ebe6db6257c50102a2c2eb5c1 internal/activator/sandbox.go ExecBackend.sandboxLaunch legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Task 5: read only existing in-memory route layout, demo marker, role, runtime and backing plus startup-captured mode/config error. AgentLaunchAllowed refuses direct/native/unsupported work in gVisor. No environment re-resolution or new filesystem path. registry:Backing@695,registry:Runtime@754,whole:Route@482 3d78de6e0c4be99af3ae7269be831588345389f4e9b8329ebab64475884e32f8
@@ -106,10 +109,12 @@
@legacy 3b35e70f85a15dd6a3f3fbf00e82a4cfd1df024c8b0b9d5bc93f6428dd8d87cc internal/activator/rootfs.go ExecBackend.spawnRootfs 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-route (J1, as spawnUnitFrom, whose shape it has): new (rootfs Plan 2 Tasks 5 and 9): prepareKeyedAt (the instance's own directories, environment and listeners, unchanged), the schema-2 tenant launch file (environment only, CARLOS_SOCKET and CARLOS_DB set by the agent), the caller's exec gate, then StartRootfs over the control socket naming the image and web; root resolves the command from its own staged manifest (C4) and the tenant file may name no command (the trampoline refuses one); the failure handling is spawnUnitFrom's; its sites are the row's host and route; no root decision; final fix I1: root's answers that guarantee no start (ErrStartRefused: 503 not ready or claim-armed, 501 unconfigured, 400, 409, 507), like its 403, are marked a refusal (refuseRootfs), so verdictOf and classifyStep record no failure of the build and no stop is asked; a 502 and a transport failure still may have run; the same nineteen sites, offsets moved;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 fix wave 1 (d35fcb1f, census P1-1): takes the tier root is asked for as an argument; a zero tier means GenTier's (the former body), so a caller that chose a limit has it kept, as spawnChildFrom and spawnUnitFrom keep theirs; the same nineteen sites, no read added;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Use the verified generation/launch mode to remove CARLOS_DB after environment merges and omit the binary --db argument where applicable. Existing runtime, layout, secrets and exec gates remain; route reads are mode projection only.;rev3=census-ruling-gvisor-demos;basis=Task 5: gate launch using startup-captured mode and existing route/role/layout before preparation or execution; migrate structured root start identity and reject mismatches. Unsupported gVisor paths refuse; native behavior and existing root authority checks retained. No new root read source. registry:Host@1315,registry:Host@1488,registry:Host@1788,registry:Host@1907,registry:Host@2654,registry:Host@2997,registry:Host@3124,registry:Host@3449,registry:Host@3577,registry:Host@3686,registry:Host@390,registry:Host@4159,registry:Host@4253,whole:Route@1105,whole:Route@1137,whole:Route@199,whole:Route@2014,whole:Route@2830,whole:Route@3762,whole:Route@502,whole:Route@602,whole:Route@732 787a0c6f3c9664b8c6250c13f07d71e2bab947a4b6148df99a944e804c8ff163
@legacy 84fc29aee53e3df8e101908f47e3200c21db798396eadbaf9e90200b22a8913e internal/activator/unitproc.go ExecBackend.newRootfsWorkerProc legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-3-workers;basis=rootfs Plan 3 Group W: starts observing the named worker's unit; refused for a binary row and for a name that is no worker's before anything watches; holds no control listener;rev3=census-ruling-gvisor-demos;basis=Task 5: migrate structured root start identity, validate binding, retain actual unit for observation/exit/stop. Unknown worker response retains only a cleanup request and listener, never a guessed observed identity. Existing route/control/cgroup inputs; no new root read. registry:Host@260,registry:Host@346,registry:Host@524,registry:Host@658,whole:Route@565,whole:Route@569 87173abe8f01c89ab0b5f7afbba78b47867d19b84e275a8438f98df78c97135d
@legacy 45a2b65be2fe2e180df8281f490349f25637e9395b0eb4506924234dec0bed46 internal/activator/unitproc.go ExecBackend.newUnitProcFor legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-rootfs-apps-2;basis=the unit is named by unitNameFor(rt, role, gen), one more Route site (+whole:Route), and a role with no unit of the row's kind is refused before anything watches ""; no new read kind and no file read;rev3=census-ruling-region-ha-p1b3b-s;basis=Attach optional per-worker API closers to the existing unit observer before starting it; unit naming and systemd/cgroup proof reads unchanged.;rev3=census-ruling-gvisor-demos;basis=Task 5: migrate structured root start identity, validate binding, retain actual unit for observation/exit/stop. Unknown worker response retains only a cleanup request and listener, never a guessed observed identity. Existing route/control/cgroup inputs; no new root read. registry:Host@304,registry:Host@492,whole:Route@421,whole:Route@425 16104276147108e1c9bdb2fe844e2d7b38885ec741c26375cd5eb1d09b58d069
-@legacy 51793b860ca44c83632aa1d0dbab39732747922ebfaac41df024b398c1223049 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;rev3=census-ruling-region-ha-p1b3b-s;basis=Retain the already-read advisory exit record for native sidecars after the same systemd and cgroup termination proof; crash classification never substitutes for stop proof. No new read source.;rev3=census-ruling-gvisor-demos;basis=Task 5: migrate structured root start identity, validate binding, retain actual unit for observation/exit/stop. Unknown worker response retains only a cleanup request and listener, never a guessed observed identity. Existing route/control/cgroup inputs; no new root read. Fix round 2: rootfs log says stop accepted and waits for termination proof; no claim of termination from stop acceptance. Foreign observer uses plain fenced stop with main's existing cgroup evidence. registry:Host@1233,registry:Host@3084,registry:Host@3308,registry:Host@3655,registry:Host@3881,registry:Host@4585,registry:Host@6209,whole:Route@1235,whole:Route@2233,whole:Route@3086,whole:Route@3310,whole:Route@3657,whole:Route@3883,whole:Route@4587,whole:Route@4843,whole:Route@5296,whole:Route@5761,whole:Route@6211,whole:Route@983 2bf509d00b81d8ae113a1baa659b85872e4fb6c8cdd0bd670a88fd5cc0a247fb
+@legacy 7794faecfc27b38d89341f96d8460a7d73ea94bc879423e84b5399350ceaa5bb 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;rev3=census-ruling-region-ha-p1b3b-s;basis=Retain the already-read advisory exit record for native sidecars after the same systemd and cgroup termination proof; crash classification never substitutes for stop proof. No new read source.;rev3=census-ruling-gvisor-demos;basis=Task 5: migrate structured root start identity, validate binding, retain actual unit for observation/exit/stop. Unknown worker response retains only a cleanup request and listener, never a guessed observed identity. Existing route/control/cgroup inputs; no new root read. Fix round 2: rootfs log says stop accepted and waits for termination proof; no claim of termination from stop acceptance. Foreign observer uses plain fenced stop with main's existing cgroup evidence. Task 8: move the existing gVisor advisory exit label to unitProc.exitLine, based on UnitIdentity. No changes to records, termination proof, stop, or cgroup reads. registry:Host@1233,registry:Host@3084,registry:Host@3308,registry:Host@3655,registry:Host@3881,registry:Host@4585,registry:Host@6083,whole:Route@1235,whole:Route@2233,whole:Route@3086,whole:Route@3310,whole:Route@3657,whole:Route@3883,whole:Route@4587,whole:Route@4843,whole:Route@5170,whole:Route@5635,whole:Route@6085,whole:Route@983 76c573cb7122765e70ae4a0009f68c8c25977cfdf751f586185fed336c41cfd5
+@legacy 9d62a633973c4123d7b97a8c1ecbaf28c8e695da049c843e5e87226e33548f36 internal/host/sizestatus.go readSizeInForce legacy accepted-legacy accepted-legacy;rev3=census-ruling-instance-egress-sizes-328-329;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=root-input (J4, as readCgroupEvents): new (#329 plan 3 Task 7): os.Stat of the generation unit's cgroup directory and one ReadFile of memory.max under /sys/fs/cgroup/<parent slices>/<SliceName(host)>[/<GenUnitName(host, gen)>] (instancectl's names; host and gen from the agent's own activator state), a kernel file, matched to a size row; called through rowSizeCell from layoutStatusReport, once per awake nested row per 5-minute status tick; runs in the agent, not root; a status cell only; no root decision;rev3=census-ruling-gvisor-demos;basis=Task 8: remove Stat and generation-name reconstruction/parent fallback; read memory.max only under the host slice and validated retained unit name. Compare against Physical(logical tier) only for FamilyGVisor, return unchanged logical size/shares. Existing agent cgroupfs read, no root or guest-file read. file:ReadFile@304 2658704f34ad47a3284606e7d6e0ee97ba2936b3e05fbecbd6083f61ba0f9f65
@legacy 0284ae0a93f4d19ad551b3a2f7946966a11c0b7c8eb16529d0920f314284a530 internal/host/systemapply.go systemApplier.stageCandidate legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-region-ha-p3b;basis=Require groupStageDigest before staging/candidate execution; action and new digest come from root-owned operator permit bound to boot marker. Existing signed pointer/artifact verification and two direct read sites remain.;rev3=census-ruling-gvisor-demos;basis=Pass the already-open regular file fstat size to bounded preflight. Allocate payload once at exactly that size, use ReadFull then confirm EOF; hash and scan those same bytes before staging. Root-owned staged target is still checked before execution. Preserve staging on floor refusal for apply/install-channel. file:Stat@694 ea8c519d19786af346500c289fc768bd7047639d90154af6ec6ecefdfb41d57f
internal/activator/backend_unit.go UnitBackend.systemctl legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-gvisor-demos;basis=Task 5: gate launch using startup-captured mode and existing route/role/layout before preparation or execution; migrate structured root start identity and reject mismatches. Unsupported gVisor paths refuse; native behavior and existing root authority checks retained. No new root read source. file:CommandContext@332 fc3481b0f6f5410479d649b20bed2f0870bf574e67d5b00e6e47bd6262036c1b
internal/activator/sidecar_ha.go ExecBackend.startHAWorker legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1b3b-s;basis=Require nested HA sidecar shape and closed worker identity environment; prepare and acknowledge sealed secrets before writing the existing run launch file. Start the previously verified staged executable through existing root StartExe, mark uncertain starts for stop proof, and observe the same run unit. No health dial or new root verb.;rev3=census-ruling-gvisor-demos;basis=Task 5: migrate structured root start identity, validate binding, retain actual unit for observation/exit/stop. Unknown worker response retains only a cleanup request and listener, never a guessed observed identity. Existing route/control/cgroup inputs; no new root read. registry:Host@1355,registry:Host@1391,registry:Host@2005,registry:Host@270,registry:Host@320,whole:Route@1049,whole:Route@1433,whole:Route@1504,whole:Route@1637,whole:Route@1692,whole:Route@184,whole:Route@2048,whole:Route@853 f90fb0c55c16840a832498cd96ffdbf8bbc3bc8adca210372a731679afb36edd
+internal/activator/size.go Service.SizeState legacy accepted-legacy accepted-legacy;rev3=census-ruling-instance-egress-sizes-328-329;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=root-route (J1, as ExecBackend.GenTier): new (#329 plan 3 Task 6, pending column from the final review): the agent's status (internal/host sizestatus) asks for an awake non-worker entry's generation unit (genUnitOf), whether a swap holds the parent, and the size it should run at, EffectiveSize over sizedRouteLocked's route. Its two sites are the entry's in-memory route and the sized copy; it reads no registry, file or root state of its own; no root decision;rev3=census-ruling-gvisor-demos;basis=Task 8: copy actual Unit and parsed execsandbox.Family from the retained process handle under the existing Service lock. No box-mode inference or added external read; logical Want unchanged. whole:Route@227,whole:Route@502 f6d1d22080a447e7ef654f84f9713a68396312e51aa3efef2de1f6069dc6ca65
internal/activator/unitproc.go ExecBackend.newUnitProc legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-rootfs-apps-2;basis=returns newUnitProcFor's error alongside the handle; the same one site, no read added;rev3=census-ruling-gvisor-demos;basis=Task 5: migrate structured root start identity, validate binding, retain actual unit for observation/exit/stop. Unknown worker response retains only a cleanup request and listener, never a guessed observed identity. Existing route/control/cgroup inputs; no new root read. whole:Route@220 2c4479b8182bd8f0fc235dd213776e6c59b22b341e6a470c0f690bee428f42ad
internal/activator/unitproc.go unitProc.Stop legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-gvisor-demos;basis=Task 5 fix round 2: keep original-run owner stop proof failure latched until a successful plain fenced stop, in the owner Stop path. The foreign-invocation observer again completes from main's existing cgroup evidence after its plain stop attempt. Same control channel and retained unit kind; no new read. registry:Host@703,whole:Route@705 246d7bf501f06517b73496be89d55c2618ce5968fe06a259f6d6d7b0c3ebea0a
internal/demobuild/purge.go Worker.PurgeDemo legacy accepted-legacy accepted-legacy;rev3=census-ruling-agent-start-demo-1;basis=Reads root-owned seen/job-ID marker and scratch existence; checks demo/box/job binding before existing stop/cgroup/unmount cleanup. Fix round 1: also requires the job marker host to match the purge host; no new file reads.;rev3=census-ruling-gvisor-demos;basis=Task 7: derive the selected build family for existing authenticated job retirement; cleanup proves both named families before any shared mount or bundle removal. Existing marker and scratch reads unchanged. file:Lstat@423,file:Lstat@906,file:ReadAll@581 2ec4d6cbaeece4e687ef8923a84afe6bb717ea83688266007bacf072b95675fb
@@ -118,12 +123,13 @@ internal/demobuild/unit.go Worker.assertUnit legacy accepted-legacy accepted-leg
internal/demobuild/unit.go Worker.prepareUnit legacy accepted-legacy accepted-legacy;rev3=census-ruling-agent-start-demo-1;basis=Cleanup now has its own five-second context; stop, empty-cgroup and unmount gates remain unchanged.;rev3=census-ruling-gvisor-demos;basis=Task 7: derive family and ID from validated job/attempt; retain validated root extraction and warm overlay. gVisor uses cache-upper/view so mounted-root ownership cannot transfer cache-upper itself; chown only out/tmp/home and mounted cache directories through no-follow descriptors, then write shared OCI bundle/skeleton. No tenant-supplied path or command. file:WalkDir@3085 c244485861c5ffea9f252024523c71bc199005dde5ebee94f14604c1b02e365e
internal/demobuild/unit.go emptyBuildCgroup legacy accepted-legacy accepted-legacy;rev3=census-ruling-agent-start-demo-1;basis=Reads only the derived cgroup.events path; absent directory or populated 0 proves termination.;rev3=census-ruling-gvisor-demos;basis=Task 7: retain fixed derived kernel cgroup.events read; reject duplicate or malformed populated fields rather than accepting any populated 0 substring. file:Lstat@256,file:Read@403 2f3123f43a398a5b67c4f7ded787de0d05a743a878b63cb1cc1d0204cf0db936
internal/demobuild/worker.go NewWorker legacy accepted-legacy accepted-legacy;rev3=census-ruling-agent-start-demo-1;basis=Wires existing root-owned recovery into cleanup retry; existing bundle/root reads unchanged.;rev3=census-ruling-agent-start-demo-3;basis=Start with snapshot recovery poisoned; builder readiness stays closed until orphan helper cleanup succeeds. Census read-site delta: unchanged (1).;rev3=census-ruling-gvisor-demos;basis=Task 7: capture only fixed policy from the supplied roleBuild callback; readiness remains per-build and during the selected-family probe. Existing root directory checks and lock unchanged. file:Stat@1419 71be598c63a7ba7e62e90905ae6b1d5b29fe79946ca7c1f814c55916bdb84f5a
-internal/host/agent.go runAgent authority B,C,D,F rev3=census-ruling-self-serve-moves-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): builds the box's lifetime judge once (newBoxJudge, nil with host claims on) and hands it to the seed placement, the moves and runs workers and every loop it starts; read sites unchanged, offsets moved; B,C,D,F authority retained; self-serve moves 1 Task 8: derives the box's lifetimes switch from the judge once (lifetimes := boxJudge != nil) and hands it to the edges file loop; read sites unchanged, offsets moved;rev3=census-ruling-plans-4d-lapse;basis=arms two more plans hooks from the same snapshot: e.SetPlanDisabledFor(planDisabledFor) beside SetPlanGovernedFor, and svc.SetDisabledFor(planDisabledRoute) beside SetMaxRunFor (plans 4d); the reads live in those units (plans-4d-units decision); read sites unchanged, offsets moved;rev3=census-ruling-rootfs-apps-2;basis=main's body as of the merge of origin/main 9b81d97b (with main's plan rate ceiling, edge request records, regional box names, self-serve moves plan 1, plans 4d-1 lapse and its other later changes under main's own census rulings) plus the rootfs placement wiring in the activator start: an agentRootfs built from eb.NestedOK, CARLOS_DEPLOYMENT_SINGLE_TENANT, CARLOS_POOLS, the claim flag, swapArming's answer, the control client's /ready/rootfs and, on a fleet box whose identity resolved, fleetOwnerCheck over the deploy store main already opens for the fleet label (fleetStore), then arm and armedRootfs.Store; this body reads nothing new itself; the closures it wires read later, at a rootfs wake and each status tick: GET /ready/rootfs over the control socket, NestedOK's checks, and release.FleetOwnerKey for the judged row's own account and this box's fleet from the deploy store;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328 plan 2 Tasks 7 and 11, #329 plan 3 Task 7 and plan 1 Task 7's policy cache: the control client is built once and handed to eb.Control, to the status tick (egressStatus) and to a new egressNudgeLoop goroutine; armSizeSource(svc, "/sys/fs/cgroup") after the activator Service; armPolicyCache() after armChangeIndex; statusLoop takes egressStatus. The reads are those units' own (decision rows); this body reads nothing new: the same five sites, offsets moved, in the agent; B,C,D,F authority retained.;rev3=census-ruling-remote-instance-metrics;basis=builds the metrics loop's owners closure (metricsOwners over the agent's registry, the activator and cgm.Leftover) when an activator exists and hands it to metricsLoop; reads nothing new itself;rev3=census-ruling-edge-asset-cache-3;basis=adds file:Statfs. runAgent keeps its authority (B,C,D,F). The new site is assetcache.Statfs, an exported assetcache.FS interface value (var Statfs FS = statfsFS{}), not a function value and not a call in runAgent: the ready hook passes it to armEdgeAssetCache as the store's filesystem, and armEdgeAssetCache calls its Space method on the configured data directory (dataDir(): $CARLOS_DATA_DIR, else /data), which calls unix.Statfs there (statfsFS.Space, accepted legacy at census-ruling-edge-asset-cache-2). No request-supplied pathname reaches it.;rev3=census-ruling-remote-metrics-nested;basis=main's body (merged origin/main acfa4f80, under main's own census rulings) plus: snapshots the nested layout (snapshotNestedUnits over /sys/fs/cgroup/carlos.slice/carlos-instances.slice) once at start, before the activator, and hands the metrics loop a unitSources struct (stamped units, routeHostNames, that root and the snapshot); reads nothing new itself;rev3=census-ruling-region-ha-p1a;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): wires region HA P1a into the activator: cfg.Record = haRecordFacts(openDeployStore, boxJudge) (the box's lifetime judge this body already builds with newBoxJudge, nil with host claims on; CI fix) and cfg.Self = lease.CurrentSelf; eb.Lifetimes (the process's lifetime index), eb.Registry, eb.StartupSwept (seedSweptAtStart.Load), eb.FilesStore from newProductionFilesStore (now lease.NewFilesStore, rootaws-loaded, a log line on failure) and lease.SetObligationDir(<data>/.ha-owed) (logged on failure; HA acquires then refuse); this body reads nothing new itself, the same five sites; the reads are those units' own (haRecordFacts and lease's SetObligationDir are new rows on this card); merge of origin/main d7ae1d76: main's own later changes to this body are kept as main has them, under main's rulings (census-ruling-remote-instance-metrics: the metricsOwners closure for metricsLoop; census-ruling-edge-asset-cache-3: the +file:Statfs site, assetcache.Statfs handed to the asset ready hook); this branch's change is the same as above;rev3=census-ruling-region-ha-p1b1;basis=region HA P1b-1: builds one termfence.Confirmer (Self from lease.CurrentSelf at each call, EC2 DescribeInstances method only, client from rootaws.LoadDefaultConfig with retries off, built lazily on first use) and sets eb.OwnerTerminated; this body reads nothing new itself, the same six sites;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 7: the startup Sweep literal hands its answer to startupSwept, which logs as before and, only on a clean sweep, marks rootfs admission swept (MarkRootfsSwept); same Sweep call, no read added;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (controller ruling after branch review R1, and Paul's R2 ruling): sets svc.Fleet = fleetWakeFor(os.Getenv, identity, identErr, fleetStore) from the identity it already resolves once and the deployment store the fleet loops already opened, and logs an ERROR naming the identity error when the box is on a fleet with an invalid identity. fleetWakeFor reads CARLOS_REGION and CARLOS_FLEET from the same environment. Read sites unchanged (6). Agent, not root; a platform box is unchanged.;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 12: one call more beside armRunsPass, armInteractivePass(svc, reg, rolloutSink, boxJudge), in the same activator Configure hook, handing it the same box judge; fix round 1 (Astra P2, shutdown): after svc.Shutdown(ctx), shutdownInteractive(ctx) ends and joins every interactive session under the same shutdown budget; the worker's own reads are its units' (interactive.go); this body reads nothing new, the same six sites; merge of origin/main 6f1f6ca6: main's svc.Fleet = fleetWakeFor(...) and its invalid-identity ERROR line are kept as main has them (census-ruling-managed-fleets-1b); this branch's change is the same as above; read sites unchanged (6);rev3=census-ruling-fix-set-aside-exdev;basis=set-aside EXDEV fix: one field more on the agent ExecBackend literal, RawInstanceDir: layout.RawInstanceDir (a pure path join: <dataDir>/.instances/<InstanceID(host)>), so the start rule set-aside moves a copy out through the raw directory instead of through the nosymfollow bind; this body reads nothing new, the same six sites;rev3=census-ruling-durability-3a-escrow;basis=durability 3a Task 3: one more assignment beside eb.FilesStore: eb.EscrowKey = haEscrowKey(os.Getenv("CARLOS_SECRETS_KEY")), the agent's own environment parsed by appconfig.ParsePrivateKey as the moves pass parses it (unset or unparseable: a log line and nil, and HA publication refuses on the box). No path is opened or read, no read site added; the same six sites, offsets moved; B,C,D,F authority retained. Durability 3a Task 4: one more goroutine beside configSyncLoop: go escrowLoop(agentCtx, reg, svc), the escrow sweep every 30 s over the same registry and Service. This body reads nothing new itself; the same six sites, offsets moved; B,C,D,F authority retained. Durability 3a Task 5: one more call beside eb.EscrowKey: wireRawSecretPages(eb, PageOperator, metricsBoxLabel(os.Getenv, readMachineID())), which sets eb.OnRawSecret to page an operator (alerting.Page through PageOperator, LevelIncident) on its own goroutine with a 20 s timeout; metricsBoxLabel and readMachineID are the reads this body already makes for the moves refusal log; no new read site; the same six sites, offsets moved; B,C,D,F authority retained. Merge of origin/main 90c4d3aa: main's own later changes to this body are kept as main has them, under main's rulings; this branch's change is the same as above. Merge of origin/main 00bf5b8c (fleet set-aside EXDEV fix): main's change to this body is kept as main has it, under its own census ruling; this branch's change is unchanged.;rev3=census-ruling-probe-burst-limit;basis=two more sink wirings beside setAnalyticsSink: setProtectionSink(e.SetProtectionRecordOnly) and setAssetOwnersSource(e.AssetOwners), function values the telemetry pass calls; this body reads nothing new, the same six sites; authority B,C,D,F retained; no new root read or write kind;rev3=census-ruling-region-ha-p1b3a;basis=Arm HA placement exactly once on the existing Service before activatorStart and edges publication, wiring AwakeApps and the PageOperator callback; existing six read sites unchanged, no new root authority.;rev3=census-ruling-stateless-replicas-1;basis=Final review I3: start the concrete coordinator's renewal worker with agent setup; existing closeReplicaCoordinator shutdown cancels and joins it before release. No new read sites or credentials. Merge origin/main c59715e7: retain main's armHAPlacement(svc, PageOperator) wiring beside the existing activator setup; stateless coordinator and shutdown wiring remain. Same read sites; no new root read or credential.;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): in the edge-ready callback, calls act.SetHeldWakeHook(e.HeldWake) when act is non-nil (installing the non-blocking wake callback) and stores e.HeldStreamsForStatus in heldStreamsSource. Wiring of in-memory callbacks only; no read added.;rev3=census-ruling-region-ha-p1b3b-t;basis=Wire Service.SetDutyView to the live edge DutySnapshot in the ready callback. No new read; no new loop or cloud operation. B2 wires the registry as the persistent DutyStore before service startup; no new cloud or filesystem path. B3b: arm one journal-backed termination consumer before service startup using agentCtx and the shared confirmer; expose edge tick and join at edge shutdown. No new direct read sites.;rev3=census-ruling-agent-start-demo-1;basis=Passes the existing registry, data store and hibernation prefix into the demo worker, and the existing instance-control client into the demo before-exec hook. No alternate data store or polling loop. Merge resolution against origin/main 9bd45488 retains main's HA departure controller, lifecycle and duty wiring alongside the demo data store and worker; no read site added by the resolution.;rev3=census-ruling-region-ha-p3a;basis=P3a Task 3: install closed fixed admission before every launch source, bind activator/backend and edge, wire the real termination Started lifecycle and role reader after the change index; close before cancellation/child shutdown. No new external reads or cloud authority. Fix R1: move bind/lifecycle/edge-option wiring into wireAgentAdmission and worker listing into runWorkerBootPassAfterAdmission. Worker boot waits for admission before listing then uses unchanged bounded wakes and per-host serialization; whole Route read moves to the helper. No new storage, cloud, or root execution authority. Preserve merged main's agent wiring and census basis; the branch removes one whole Route use by moving worker iteration to the helper, with no added read kind.;rev3=census-ruling-stateless-replicas-2;basis=Slice 3b: arms a fleet-only worker using the existing registry, activator, backend and authenticated console transport. Owned worker stops and joins at shutdown. No new bucket reader. merge of origin/main 9b8b2c50: retain HA duty/departure lifecycle, wake-slot and existing agent wiring alongside the replica placement worker; no new read introduced by resolution. merge of origin/main 6be08467: Retain main demo configuration, admission, build and expiry wiring alongside the replica worker; merge-only body change, no additional read. merge of origin/main 7920cccf: Retain main box-role/group admission wiring and boot publication beside the owned replica worker and shutdown; main moves the boot registry List into runWorkerBootPassAfterAdmission, removing its inline whole Route site. No new read introduced by conflict resolution.;rev3=census-ruling-stateless-replicas-3;basis=Task 1 fix round 1 M3: retain the private snapshot source and cancel/join ownership, but use the replica-health-specific retry loop. It logs its first failure only and retains the existing exponential backoff capped at 30 seconds; unsupported builds return nil. Existing five direct read sites unchanged; no new credentials, bucket reader or app lifecycle action. Fix round 1 Q20: publish Edge.ReplicaSnapshots as a separate in-memory status source, leaving the tenant-visible Upstreams source unchanged. No new external reader or authority.;rev3=census-ruling-region-ha-p3b;basis=Load root-written group marker/configuration, configure signed boot binding and agent receipt completer, wire cancellable admission into departure work and expose cached GroupReaderSnapshot. New indirect boot reads use protected root files; agent-owned receipt controls duplicate initial completion only, never root restart permission. Same five direct sites. Merge 45cebde4 retains the replica health socket lifecycle and setReplicaSource beside GroupReaderSnapshot; no extra read beyond main.;rev3=census-ruling-agent-start-demo-2;basis=agent.go:309-329 opens demo-traffic.db beside the operator-configured registry when a demo domain exists, closes it at shutdown and wires drain-before-purge; :1010-1019 shares the worker and write gate; :1164-1177 installs the fleet identity and closed-until-worker serving callback. One added whole Route pass; the new indirect filesystem/SQL reads are claimed in openDemoTraffic and worker/store units. No request chooses the database pathname.;rev3=census-ruling-region-ha-p1b3b-s;basis=Wire the service duty view to authoritative cached sidecar manifest placement in LifetimeIndex and the edge sidecar projection; missing policy denies duty. Existing instance duty wiring remains.;rev3=census-ruling-region-ha-g2-t3;basis=T3a: wire eb.Page = PageOperator beside OwnerTerminated before departures arm, so suspect-holder pages work if departure setup fails; no new read; existing nine sites and authority unchanged; pages through the existing sink. T3b: publish the same backend through an atomic pointer for the metrics observer, and clear it on return; no new external read or authority.;rev3=census-ruling-agent-start-demo-3;basis=Wire the claim activator and root snapshot client into the demo worker; pass moved readiness to status reporting. Census read-site delta: unchanged (9).;rev3=census-ruling-region-ha-g2-fixes;basis=Wire local pool evidence, live withdrawal activator, startup ingress scan and alias publication, and edge lookup; no new direct sites; new indirect record/claim reads use existing store/judge paths described in ingress helpers.;rev3=census-ruling-region-ha-g2r-fixes;basis=W3: starts the existing record-view backstop loop with a departure-inventory listener (non-blocking, coalesced signal) even without an armed RecordView; it requests the existing full pass (backstopFullDue) there. Same nine read sites; no new read or authority.;rev3=census-ruling-region-ha-graceful-terminate-t2;basis=Derive one signal-time deadline with a 90-second budget; cap departure stop and startup/seed/service shutdown joins by it. No read added.;rev3=census-ruling-static-sweep-periodic;basis=in the edge-ready callback, publishes e.LargestStaticTree in staticTreeSource for the disk alert line (diskAlertFrac in the metrics loop); in-memory wiring only, no read added; read sites unchanged (9);rev3=census-ruling-gvisor-demos;basis=Capture sandbox resolution and refusal once; log errors once; gate route admission and BeforeExec before process launch. No new root read. Task 5: pass the once-captured sandbox effective mode/config error into ExecBackend, UnitBackend and the immutable Client expectation. Same startup environment/registry reads; swapArming declines gVisor before placement. file:Exec@19523,file:Open@1837,file:Statfs@50932,registry:App@12933,registry:Host@46968,whole:Route@12925,whole:Route@46126,whole:Route@47091,whole:Route@47153 dba09c350aa2bb8e85768567467346c489904eea29cfd0c3eba7ea99a0ceade5
+internal/host/agent.go runAgent authority B,C,D,F rev3=census-ruling-self-serve-moves-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): builds the box's lifetime judge once (newBoxJudge, nil with host claims on) and hands it to the seed placement, the moves and runs workers and every loop it starts; read sites unchanged, offsets moved; B,C,D,F authority retained; self-serve moves 1 Task 8: derives the box's lifetimes switch from the judge once (lifetimes := boxJudge != nil) and hands it to the edges file loop; read sites unchanged, offsets moved;rev3=census-ruling-plans-4d-lapse;basis=arms two more plans hooks from the same snapshot: e.SetPlanDisabledFor(planDisabledFor) beside SetPlanGovernedFor, and svc.SetDisabledFor(planDisabledRoute) beside SetMaxRunFor (plans 4d); the reads live in those units (plans-4d-units decision); read sites unchanged, offsets moved;rev3=census-ruling-rootfs-apps-2;basis=main's body as of the merge of origin/main 9b81d97b (with main's plan rate ceiling, edge request records, regional box names, self-serve moves plan 1, plans 4d-1 lapse and its other later changes under main's own census rulings) plus the rootfs placement wiring in the activator start: an agentRootfs built from eb.NestedOK, CARLOS_DEPLOYMENT_SINGLE_TENANT, CARLOS_POOLS, the claim flag, swapArming's answer, the control client's /ready/rootfs and, on a fleet box whose identity resolved, fleetOwnerCheck over the deploy store main already opens for the fleet label (fleetStore), then arm and armedRootfs.Store; this body reads nothing new itself; the closures it wires read later, at a rootfs wake and each status tick: GET /ready/rootfs over the control socket, NestedOK's checks, and release.FleetOwnerKey for the judged row's own account and this box's fleet from the deploy store;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328 plan 2 Tasks 7 and 11, #329 plan 3 Task 7 and plan 1 Task 7's policy cache: the control client is built once and handed to eb.Control, to the status tick (egressStatus) and to a new egressNudgeLoop goroutine; armSizeSource(svc, "/sys/fs/cgroup") after the activator Service; armPolicyCache() after armChangeIndex; statusLoop takes egressStatus. The reads are those units' own (decision rows); this body reads nothing new: the same five sites, offsets moved, in the agent; B,C,D,F authority retained.;rev3=census-ruling-remote-instance-metrics;basis=builds the metrics loop's owners closure (metricsOwners over the agent's registry, the activator and cgm.Leftover) when an activator exists and hands it to metricsLoop; reads nothing new itself;rev3=census-ruling-edge-asset-cache-3;basis=adds file:Statfs. runAgent keeps its authority (B,C,D,F). The new site is assetcache.Statfs, an exported assetcache.FS interface value (var Statfs FS = statfsFS{}), not a function value and not a call in runAgent: the ready hook passes it to armEdgeAssetCache as the store's filesystem, and armEdgeAssetCache calls its Space method on the configured data directory (dataDir(): $CARLOS_DATA_DIR, else /data), which calls unix.Statfs there (statfsFS.Space, accepted legacy at census-ruling-edge-asset-cache-2). No request-supplied pathname reaches it.;rev3=census-ruling-remote-metrics-nested;basis=main's body (merged origin/main acfa4f80, under main's own census rulings) plus: snapshots the nested layout (snapshotNestedUnits over /sys/fs/cgroup/carlos.slice/carlos-instances.slice) once at start, before the activator, and hands the metrics loop a unitSources struct (stamped units, routeHostNames, that root and the snapshot); reads nothing new itself;rev3=census-ruling-region-ha-p1a;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): wires region HA P1a into the activator: cfg.Record = haRecordFacts(openDeployStore, boxJudge) (the box's lifetime judge this body already builds with newBoxJudge, nil with host claims on; CI fix) and cfg.Self = lease.CurrentSelf; eb.Lifetimes (the process's lifetime index), eb.Registry, eb.StartupSwept (seedSweptAtStart.Load), eb.FilesStore from newProductionFilesStore (now lease.NewFilesStore, rootaws-loaded, a log line on failure) and lease.SetObligationDir(<data>/.ha-owed) (logged on failure; HA acquires then refuse); this body reads nothing new itself, the same five sites; the reads are those units' own (haRecordFacts and lease's SetObligationDir are new rows on this card); merge of origin/main d7ae1d76: main's own later changes to this body are kept as main has them, under main's rulings (census-ruling-remote-instance-metrics: the metricsOwners closure for metricsLoop; census-ruling-edge-asset-cache-3: the +file:Statfs site, assetcache.Statfs handed to the asset ready hook); this branch's change is the same as above;rev3=census-ruling-region-ha-p1b1;basis=region HA P1b-1: builds one termfence.Confirmer (Self from lease.CurrentSelf at each call, EC2 DescribeInstances method only, client from rootaws.LoadDefaultConfig with retries off, built lazily on first use) and sets eb.OwnerTerminated; this body reads nothing new itself, the same six sites;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 7: the startup Sweep literal hands its answer to startupSwept, which logs as before and, only on a clean sweep, marks rootfs admission swept (MarkRootfsSwept); same Sweep call, no read added;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (controller ruling after branch review R1, and Paul's R2 ruling): sets svc.Fleet = fleetWakeFor(os.Getenv, identity, identErr, fleetStore) from the identity it already resolves once and the deployment store the fleet loops already opened, and logs an ERROR naming the identity error when the box is on a fleet with an invalid identity. fleetWakeFor reads CARLOS_REGION and CARLOS_FLEET from the same environment. Read sites unchanged (6). Agent, not root; a platform box is unchanged.;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 12: one call more beside armRunsPass, armInteractivePass(svc, reg, rolloutSink, boxJudge), in the same activator Configure hook, handing it the same box judge; fix round 1 (Astra P2, shutdown): after svc.Shutdown(ctx), shutdownInteractive(ctx) ends and joins every interactive session under the same shutdown budget; the worker's own reads are its units' (interactive.go); this body reads nothing new, the same six sites; merge of origin/main 6f1f6ca6: main's svc.Fleet = fleetWakeFor(...) and its invalid-identity ERROR line are kept as main has them (census-ruling-managed-fleets-1b); this branch's change is the same as above; read sites unchanged (6);rev3=census-ruling-fix-set-aside-exdev;basis=set-aside EXDEV fix: one field more on the agent ExecBackend literal, RawInstanceDir: layout.RawInstanceDir (a pure path join: <dataDir>/.instances/<InstanceID(host)>), so the start rule set-aside moves a copy out through the raw directory instead of through the nosymfollow bind; this body reads nothing new, the same six sites;rev3=census-ruling-durability-3a-escrow;basis=durability 3a Task 3: one more assignment beside eb.FilesStore: eb.EscrowKey = haEscrowKey(os.Getenv("CARLOS_SECRETS_KEY")), the agent's own environment parsed by appconfig.ParsePrivateKey as the moves pass parses it (unset or unparseable: a log line and nil, and HA publication refuses on the box). No path is opened or read, no read site added; the same six sites, offsets moved; B,C,D,F authority retained. Durability 3a Task 4: one more goroutine beside configSyncLoop: go escrowLoop(agentCtx, reg, svc), the escrow sweep every 30 s over the same registry and Service. This body reads nothing new itself; the same six sites, offsets moved; B,C,D,F authority retained. Durability 3a Task 5: one more call beside eb.EscrowKey: wireRawSecretPages(eb, PageOperator, metricsBoxLabel(os.Getenv, readMachineID())), which sets eb.OnRawSecret to page an operator (alerting.Page through PageOperator, LevelIncident) on its own goroutine with a 20 s timeout; metricsBoxLabel and readMachineID are the reads this body already makes for the moves refusal log; no new read site; the same six sites, offsets moved; B,C,D,F authority retained. Merge of origin/main 90c4d3aa: main's own later changes to this body are kept as main has them, under main's rulings; this branch's change is the same as above. Merge of origin/main 00bf5b8c (fleet set-aside EXDEV fix): main's change to this body is kept as main has it, under its own census ruling; this branch's change is unchanged.;rev3=census-ruling-probe-burst-limit;basis=two more sink wirings beside setAnalyticsSink: setProtectionSink(e.SetProtectionRecordOnly) and setAssetOwnersSource(e.AssetOwners), function values the telemetry pass calls; this body reads nothing new, the same six sites; authority B,C,D,F retained; no new root read or write kind;rev3=census-ruling-region-ha-p1b3a;basis=Arm HA placement exactly once on the existing Service before activatorStart and edges publication, wiring AwakeApps and the PageOperator callback; existing six read sites unchanged, no new root authority.;rev3=census-ruling-stateless-replicas-1;basis=Final review I3: start the concrete coordinator's renewal worker with agent setup; existing closeReplicaCoordinator shutdown cancels and joins it before release. No new read sites or credentials. Merge origin/main c59715e7: retain main's armHAPlacement(svc, PageOperator) wiring beside the existing activator setup; stateless coordinator and shutdown wiring remain. Same read sites; no new root read or credential.;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): in the edge-ready callback, calls act.SetHeldWakeHook(e.HeldWake) when act is non-nil (installing the non-blocking wake callback) and stores e.HeldStreamsForStatus in heldStreamsSource. Wiring of in-memory callbacks only; no read added.;rev3=census-ruling-region-ha-p1b3b-t;basis=Wire Service.SetDutyView to the live edge DutySnapshot in the ready callback. No new read; no new loop or cloud operation. B2 wires the registry as the persistent DutyStore before service startup; no new cloud or filesystem path. B3b: arm one journal-backed termination consumer before service startup using agentCtx and the shared confirmer; expose edge tick and join at edge shutdown. No new direct read sites.;rev3=census-ruling-agent-start-demo-1;basis=Passes the existing registry, data store and hibernation prefix into the demo worker, and the existing instance-control client into the demo before-exec hook. No alternate data store or polling loop. Merge resolution against origin/main 9bd45488 retains main's HA departure controller, lifecycle and duty wiring alongside the demo data store and worker; no read site added by the resolution.;rev3=census-ruling-region-ha-p3a;basis=P3a Task 3: install closed fixed admission before every launch source, bind activator/backend and edge, wire the real termination Started lifecycle and role reader after the change index; close before cancellation/child shutdown. No new external reads or cloud authority. Fix R1: move bind/lifecycle/edge-option wiring into wireAgentAdmission and worker listing into runWorkerBootPassAfterAdmission. Worker boot waits for admission before listing then uses unchanged bounded wakes and per-host serialization; whole Route read moves to the helper. No new storage, cloud, or root execution authority. Preserve merged main's agent wiring and census basis; the branch removes one whole Route use by moving worker iteration to the helper, with no added read kind.;rev3=census-ruling-stateless-replicas-2;basis=Slice 3b: arms a fleet-only worker using the existing registry, activator, backend and authenticated console transport. Owned worker stops and joins at shutdown. No new bucket reader. merge of origin/main 9b8b2c50: retain HA duty/departure lifecycle, wake-slot and existing agent wiring alongside the replica placement worker; no new read introduced by resolution. merge of origin/main 6be08467: Retain main demo configuration, admission, build and expiry wiring alongside the replica worker; merge-only body change, no additional read. merge of origin/main 7920cccf: Retain main box-role/group admission wiring and boot publication beside the owned replica worker and shutdown; main moves the boot registry List into runWorkerBootPassAfterAdmission, removing its inline whole Route site. No new read introduced by conflict resolution.;rev3=census-ruling-stateless-replicas-3;basis=Task 1 fix round 1 M3: retain the private snapshot source and cancel/join ownership, but use the replica-health-specific retry loop. It logs its first failure only and retains the existing exponential backoff capped at 30 seconds; unsupported builds return nil. Existing five direct read sites unchanged; no new credentials, bucket reader or app lifecycle action. Fix round 1 Q20: publish Edge.ReplicaSnapshots as a separate in-memory status source, leaving the tenant-visible Upstreams source unchanged. No new external reader or authority.;rev3=census-ruling-region-ha-p3b;basis=Load root-written group marker/configuration, configure signed boot binding and agent receipt completer, wire cancellable admission into departure work and expose cached GroupReaderSnapshot. New indirect boot reads use protected root files; agent-owned receipt controls duplicate initial completion only, never root restart permission. Same five direct sites. Merge 45cebde4 retains the replica health socket lifecycle and setReplicaSource beside GroupReaderSnapshot; no extra read beyond main.;rev3=census-ruling-agent-start-demo-2;basis=agent.go:309-329 opens demo-traffic.db beside the operator-configured registry when a demo domain exists, closes it at shutdown and wires drain-before-purge; :1010-1019 shares the worker and write gate; :1164-1177 installs the fleet identity and closed-until-worker serving callback. One added whole Route pass; the new indirect filesystem/SQL reads are claimed in openDemoTraffic and worker/store units. No request chooses the database pathname.;rev3=census-ruling-region-ha-p1b3b-s;basis=Wire the service duty view to authoritative cached sidecar manifest placement in LifetimeIndex and the edge sidecar projection; missing policy denies duty. Existing instance duty wiring remains.;rev3=census-ruling-region-ha-g2-t3;basis=T3a: wire eb.Page = PageOperator beside OwnerTerminated before departures arm, so suspect-holder pages work if departure setup fails; no new read; existing nine sites and authority unchanged; pages through the existing sink. T3b: publish the same backend through an atomic pointer for the metrics observer, and clear it on return; no new external read or authority.;rev3=census-ruling-agent-start-demo-3;basis=Wire the claim activator and root snapshot client into the demo worker; pass moved readiness to status reporting. Census read-site delta: unchanged (9).;rev3=census-ruling-region-ha-g2-fixes;basis=Wire local pool evidence, live withdrawal activator, startup ingress scan and alias publication, and edge lookup; no new direct sites; new indirect record/claim reads use existing store/judge paths described in ingress helpers.;rev3=census-ruling-region-ha-g2r-fixes;basis=W3: starts the existing record-view backstop loop with a departure-inventory listener (non-blocking, coalesced signal) even without an armed RecordView; it requests the existing full pass (backstopFullDue) there. Same nine read sites; no new read or authority.;rev3=census-ruling-region-ha-graceful-terminate-t2;basis=Derive one signal-time deadline with a 90-second budget; cap departure stop and startup/seed/service shutdown joins by it. No read added.;rev3=census-ruling-static-sweep-periodic;basis=in the edge-ready callback, publishes e.LargestStaticTree in staticTreeSource for the disk alert line (diskAlertFrac in the metrics loop); in-memory wiring only, no read added; read sites unchanged (9);rev3=census-ruling-gvisor-demos;basis=Capture sandbox resolution and refusal once; log errors once; gate route admission and BeforeExec before process launch. No new root read. Task 5: pass the once-captured sandbox effective mode/config error into ExecBackend, UnitBackend and the immutable Client expectation. Same startup environment/registry reads; swapArming declines gVisor before placement. Task 8: arm read-only status projection with the existing Client.SandboxStatus callback. Agent status now queries the existing root /ready endpoint; no new root authority or guest-file input. file:Exec@19565,file:Open@1837,file:Statfs@50974,registry:App@12933,registry:Host@47010,whole:Route@12925,whole:Route@46168,whole:Route@47133,whole:Route@47195 eda257a83e1da93c0438031c72018a9bbda62c634cb670ccb970d668856549e1
internal/host/bootstrap.go bootstrapWithGroup legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p3b;basis=Move bootstrapWith body here, retaining host.env, embedded unit reads and tmpfiles execution. Group live caller holds root mutation guard; skip automatic update/recovery units, preserve Restart=no/nftables drop-in and masks, and write separate root-owned /run/carlos-group-maintenance tmpfiles rule outside service ownership walk. No agent receipt read.;rev3=census-ruling-gvisor-demos;basis=Create the rootfs parent at 0700 and runtime root at 0755. Existing host.env/unit reads unchanged; workload templates remain unarmed. file:Command@12057,file:ReadFile@564,file:ReadFile@7111 2710b4ae0c444e7742e91dfffc6c136a698927eb62c42eae7cfc4eb1b06d2453
internal/host/claimactivation_preflight.go claimActivationLocalUnits authority G rev3=PROPOSED-p3;run=22;identity=agent uid carlos; root migration/adopt/control uid 0;basis=refusal-only local named-unit inventory; agent skips only ordinary claim runtime drop-in directories under /run/systemd/system, whose private contents root still inventories and verifies before launch; legacy and named units remain checked;rev3=census-ruling-gvisor-demos;basis=Fix round 1 I2: preserve the existing native preflight skip decision in a named helper for tests; ParseUnitName now returns a distinct discovery kind for gVisor so its leftover drop-ins are not skipped. Same walks and reads, no new paths or native authority. file:ReadDir@215,file:ReadFile@1303,file:ReadFile@1386,file:WalkDir@603 ed9d41211897d86e11e1797fe52ad8adacaad0766f901d0c68225ddb827421e2
internal/host/claimstop_run.go RunInstanceControl authority C,D,G rev3=PROPOSED-p3;run=24;identity=root claim/adopt/update controller uid 0;basis=production root startup builds authenticated execution and launch handlers then uses activateClaimRoot for recovery, the registered census launch verifier and lifecycle start;rev3=census-ruling-rootfs-apps-2;basis=the claims-off path serves through instancectl.RunWithRegistryView with HostRuntime: instanceRegistryHostRuntime beside the same instanceRegistryHostApp(nil); the new read is instanceRegistryHostRuntime's own (a decision row in rootfs-apps-2-new); no read added in this body;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328 plan 2 Tasks 4 and 6: the claims-off branch hands RunWithRegistryView the pre-claim egress asserter (newEgressAsserter over registryEgressSource and registryEgressHosts, which read the agent-written registry read-only, beside the instanceRegistryHostApp read it already had); the claims branch builds its runtime resources in instanceControlClaimResources, adding the claims asserter (claimsEgressSource writes no allow; the registry is read only to name slices), and serves through runClaimControl, which passes RunWithClaim the same handler, held-release route and host lookup plus that asserter. No read site in the unit, none added.;rev3=census-ruling-agent-start-demo-1;basis=Wires demo registry views and existing root release/adoption guard into instance control.;rev3=census-ruling-region-ha-p3b;basis=Add root hairpin identity verification, dormant install and reset CLI entries with bounded contexts. Indirect inputs are root-owned marker/identity/ingress/state and kernel/systemd process evidence; no request-controlled addresses or executable path. Existing control-service path remains.;rev3=census-ruling-gvisor-demos;basis=Retain Task 1 admission and claim separation; wire host-owned exact recovery baseline and pinned-set verification/retry callbacks. No new direct read. Task 6: In effective gVisor mode serve the cleanup-capable registry-view controller before claim recovery or assembly; preserve the retained Configure error so CLAIMS and invalid config still block launches. No new direct read. 9b56b2d8c8461852e6d6af0b62397b11694fd5edfecc980a9eaa7b291a0777a8
internal/host/claimunit.go claimUnitContent authority E1,E3 rev3=PROPOSED-p3;identity=root claim/adoption controller uid 0;basis=adds write permission for exactly the public retry directory only when the root settings reader has verified a complete census and prepared that directory;rev3=census-ruling-agent-start-demo-1;basis=Demo-only ReadWritePaths for instance data/runtime, staged files and root release lock; ordinary rendering unchanged.;rev3=census-ruling-agent-start-demo-1-followups;basis=In demo box mode, declare StateDirectory=carlos-release/private with mode 0700 so systemd creates root-owned release state before namespace setup and keeps it writable. Existing ReadWritePaths and ordinary/claims rendering stay unchanged. No new read site or caller-controlled path.;rev3=census-ruling-agent-start-demo-3;basis=Declare /var/lib/carlos-demo-snapshots as root-owned StateDirectory with mode 0700 only for configured demo boxes, including recovery with admission off. Ordinary claims units retain their original directories. The shared unit template is unchanged from main; no file read is added.;rev3=census-ruling-gvisor-demos;basis=Mark only claim/demo renderings explicitly; common host.env remains loaded. Ordinary rendering masks CARLOS_HOST_CLAIM with UnsetEnvironment, removed only for a successfully parsed enabled claim rendering. Existing template read unchanged. Task 7: render aggregate build slice through SlicePropertiesFor using the resolved host mode, with 32 MiB and 64-task gVisor overhead per slot. Existing control permissions unchanged. data-literal@1504 90df27de34be8e60ea1b9f03dd3eff5eb8291f05b93e8a488460150f51e70725
internal/host/claimunit.go readClaimUnitSettings authority C,E3,G,J4 rev3=PROPOSED-p3;identity=root claim/adoption controller uid 0;basis=retains exact no-census unit settings; a claims-enabled complete census prepares the root-owned retry directory before the hardened controller starts;rev3=census-ruling-agent-start-demo-1;basis=Reads worker/concurrency/toolchain settings from the existing host.env parser; requires box mode and refuses claims coexistence.;rev3=census-ruling-gvisor-demos;basis=Task 7: parse CARLOS_EXEC_SANDBOX in the existing host.env reader and resolve fixed mode for installed build-slice budgets. No new file read; invalid values refuse rendering. data-literal@167,data-literal@2091,data-literal@2823 2f4d6a1a09c9cf646ddc30339526d62cb7d9a69f613f6c786da607d21156a288
+internal/host/layoutleg.go layoutStatusReport diagnostic H3 no-effect;rev3=census-ruling-instance-egress-sizes-328-329;basis=#329 plan 3 Task 7: each activator-managed instance row gains a Size cell, rowSizeCell(armedSizeSource.Load(), rt.Host, word) (the added registry:Host site), which for an awake nested row reads that host's cgroup memory.max through readSizeInForce (a decision row, in the agent); still a status report with no effect on any decision.;rev3=census-ruling-alias-socket-follow-338;basis=#338: a platform socket row reports alias (aliasLayout) instead of external; reads Platform;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 5: Pass.Held takes the whole route (so a row with a runtime is never reported as held); status display only;rev3=census-ruling-gvisor-demos;basis=Task 8: add root-reported configured/effective mode, runtime pin and readiness through Client.SandboxStatus, plus observed per-row family from the activator handle. Missing/stale root builds remain unknown. Presentation only, no root decision. registry:Hibernate@1457,registry:Hibernate@1545,registry:Host@1270,registry:Host@1293,registry:Host@1375,registry:Host@1479,registry:Host@1695,registry:Kind@622,registry:Platform@1422,registry:Socket@1437,registry:Socket@1525,whole:Route@1502,whole:Route@156,whole:Route@416,whole:Route@707,whole:Route@745,whole:Route@749,whole:Route@969 4874f16c4788e0fda7034c0db0afdc290992ca1bc9c19eae199f546867a12b4e
internal/host/systemapply.go systemApplier.install authority F,J4 rev3=PROPOSED-p3;identity=carlos system apply, root update unit or offline root CLI, uid 0;basis=root verifies staged signature and final locked bounds before rename, then records root accepted floor history only after health succeeds;rev3=census-ruling-region-ha-p1a;basis=root apply, uid 0: comment and error text only around the beginExecutableChange call (the wrapped error now reads "update not begun" instead of "update-begun marker"); the call, its position before the first box-changing step and the deferral on error are unchanged; no read added;rev3=census-ruling-region-ha-p3b;basis=Require groupTarget for the staged new artifact and propagate quiesce refusal before effects. Root-owned operator permit must authorize digest/action/current boot; existing signed image, floor and journal checks remain; no new direct read.;rev3=census-ruling-gvisor-demos;basis=Check staged and previous executable awareness before unit-plan execution. Existing reads unchanged; no unaware prev executes in gvisor mode. a22f4cbbab3f7aea6a8f12ae494b8dfe808caee6ea6048ab7a1b8eb600945897
internal/host/systemapply.go systemApplier.installUnits legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-agent-start-demo-1;basis=Renders the staged build slice against live root host configuration; preserves it when settings cannot be parsed.;rev3=census-ruling-region-ha-p3b;basis=Require group apply/rollback permit, preserve root Restart=no/nftables drop-in and masks, and skip automatic update/recovery units. Existing staged unit and host.env reads remain; new indirect marker/permit reads are protected and agent receipts are excluded.;rev3=census-ruling-gvisor-demos;basis=Create rootfs/runtime parent directories before controller restart. Existing staged unit and root-owned host.env reads unchanged. file:ReadDir@1509,file:ReadFile@1060,file:ReadFile@2100,file:ReadFile@5135,file:Stat@2758,file:Stat@4051 f20ce9ef05e19ccb08e68d7c7935aaf20175892fa2616c794ac6adad5303a8a8
internal/host/systemapply.go systemApplier.restoreFiles authority F,J4 rev3=PROPOSED-p3;identity=carlos system apply/recover, root systemd units or offline root CLI, uid 0;basis=selects signed prev identity and checks staged restore against both root bounds before rename; version sidecar cannot authorize;rev3=census-ruling-region-ha-p3b;basis=Authorize exact previous artifact before restore, propagate quiesce refusal and remove automatic group units from enable list. Existing signature/floor and staged plan reads remain; indirect permit must be root-owned and bind old digest/current boot.;rev3=census-ruling-gvisor-demos;basis=Check prev awareness before quiesce/copy/restore and check the copied restore executable before rename. Existing stat unchanged. file:Stat@430 6a1bc52aac86cd48cde5b568cdcb8b7299227e4ac2373f60f2e92c9ab10bad25
@@ -139,6 +145,8 @@ internal/instancectl/rootfs.go Server.runRootfsProbe legacy accepted-legacy acce
internal/instancectl/server.go Server.RunProbe legacy accepted-legacy accepted-legacy;rev3=J2,J4;basis=root-input;rev3=census-ruling-rootfs-apps-2;basis=after the resolver allow it applies the box-address deny (denyLocalAddrs: set-property IPAddressDeny on carlos-instances.slice from localPrefixes, which reads /proc/net/fib_trie and /proc/net/if_inet6 as LocalAddrs already did), writes the probe's box-addrs under its own exe layout (writeFileExcl, a decision row), and after the binary probe runs the rootfs probe (runRootfsProbe, a decision row); its own direct read, probe.out, is unchanged;rev3=census-ruling-region-ha-p3b;basis=Take shared root hairpin lease for the entire probe so deny refresh and hairpin mutation cannot race it. Indirect reads validate root boot snapshot, root state/fence and interface inventory; existing probe.out direct read remains and lock/config errors fail readiness.;rev3=census-ruling-gvisor-demos;basis=Select the fixed root-private probe family and delegate gVisor to its serialized root/guest proof, with no native/rootfs fallback. Task 6 fix round 1: remove mode drain from probe execution (Ready/ReadyDemo only), and let runGVisorProbe atomically publish the report/runtime identity including start lines once. Existing native report read unchanged. file:ReadFile@2874 d77aeeac7de9d58663980809014bd4c83060235b63ac4c85cf25bcb89827c80b
internal/instancectl/server.go runWithClaim authority C,D,G Claim instance controller adds held-release RPC dispatch within existing launch/participation execution boundary.;rev3=census-ruling-rootfs-apps-2;basis=takes a RegistryView (HostApp and HostRuntime) for the bare hostApp, and the production Server literal gains HostRuntime, ProbeImage: BuildProbeImage, ProbeImageFile: ProbeImagePath, RootfsProbeOut under /run/carlos-control and DenyEvery: 10s; this body reads nothing new itself; the readers it wires (instanceRegistryHostRuntime, BuildProbeImage, the rootfs probe's output) are decision rows;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328 plan 2 Task 4 and #329 plan 3 Task 5: takes the egress asserter as a parameter, sets it on the production Server literal (Egress) and starts its 30 s Loop beside probeLoop and diskLoop; the literal also names the fixture check ProbeFixturesOK (renamed in plan 2 Task 14). It sets no control drop-in directory: plan 3's ControlDropInDir default (/run/systemd/system.control) was deleted with removeGenControlDropIn in ef38e13b (the P1 EROFS fix), so instance control names systemd's control directory only to read it (TrustedDropinReader). The same four sites (the two exec.CommandContext closures, statfsBytes, the data literal), offsets moved; no read added.;rev3=census-ruling-agent-start-demo-1;basis=Wires root-owned demo config and existing fixed paths into the service.;rev3=census-ruling-region-ha-p3b;basis=Resume root-owned hairpin state before probes/control service work; verify current systemd agent identity and kernel fence/addresses, restore pidfd watch or revoke stale state. Same direct exec/statfs/data sites; indirect inputs are protected root snapshot/state and kernel evidence, never receipt data.;rev3=census-ruling-agent-start-demo-3;basis=Construct the demo snapshot supervisor for configured demo boxes; startup cleanup gates builder readiness. Census read-site delta: unchanged (4).;rev3=census-ruling-gvisor-demos;basis=Retain sandbox modes and error; bind host-provided baseline and runtime callbacks without importing host templates. Existing reads unchanged. Task 6: Capture HostClaims once from ControlConfig/hostwrite.Enabled and set the fixed root-owned bundle discovery directory. Existing command and configuration reads unchanged. Task 7: enable gVisor worker construction through fixed unitFamily(roleBuild); readiness proof rechecks sandbox admission and current Ready without reaching the constructor fatal path for transient refusals. Existing command/config reads unchanged. data-literal@2476,file:CommandContext@1109,file:CommandContext@1287,file:Statfs@2497 51b727207f3d3b577f428a8d1cdabb214ca7b410de6e813bf1fd916446ef8321
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. file:Statfs@4829 1541a3b0e5f9972f07c1d94b85d1067fa83d1b24099ebf6b65d783716d4a7353
+internal/status/dryrun.go dryRunFixtures legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-gvisor-demos;basis=Task 8: add private sandbox status and row fixtures plus leak needles. Fixture data only; public fleet shape unchanged. whole:Route@5482 8ddd1f1ff4d638b9ec2df0f24fe3f3559fe5a6f2b4d9e347f539aee89d95faf1
+status_instances.go printStatusLayout legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328 plan 2 Task 12 and #329 plan 3 Task 10: carlos status --layout, in the operator's carlos CLI on the operator's own machine, prints SIZE and EGRESS columns from the console's JSON (statusLayoutRow.Size and Egress), joins the egress reason into REASON and prints one note when a size is pending; the same one site (the /data literal in the mixed-box warning), no read added.;rev3=census-ruling-region-labels;basis=a REGION column (statusRegionCell) from the console's answer; no read added;rev3=census-ruling-gvisor-demos;basis=Task 8: print draft SANDBOX column and one exec-sandbox summary per reported box from the existing operator API. Missing/stale reports display unknown; no new file read or authority. data-literal@2413 28d6e05b336a4c99d9e1a3172116a4f6c03ddc7ae3cacd68d0ba0b304b203687
system.go runSystem authority B,C,D,F,G,J4 rev3=census-ruling-self-serve-moves-1;identity=explicit operator CLI uid 0;basis=adds the lifetimes family to the system dispatch (carlos system lifetimes cutover, a console door call as the operator); every existing command branch unchanged;rev3=census-ruling-claims-cleanup-r2;basis=claims cleanup R2: drops the claims case (host.RunSystemClaims, deleted); every other branch unchanged; no read added;rev3=census-ruling-nearest-region-a;basis=adds the hosts-used family to the system dispatch (carlos system hosts-used status, one GET of a console door as the operator); every existing command branch unchanged; no read added;rev3=census-ruling-region-ha-p1a;basis=explicit operator CLI and root units, uid 0: drops the "join" case (host.RunSystemJoin, deleted with internal/host/joinroot.go, its only caller) and its line in the usage text; every other branch unchanged; no read added;rev3=census-ruling-named-unit-delivery-114;basis=the system verb dispatch gains named-units, routed to host.RunSystemNamedUnits; no read of its own;rev3=census-ruling-design-pdf-service;basis=add dispatch for carlos system pdf; no new reads;rev3=census-ruling-managed-fleets-2a;basis=Adds managed-fleets operator CLI dispatch; no direct read added; existing root command branches unchanged.;rev3=census-ruling-agent-start-demo-2;basis=system.go:62-66 adds the demos family dispatch to the console-only operator client (system_demos.go:19, system_demos_api.go:23); no direct read added and other root commands are unchanged.;rev3=census-ruling-region-ha-p3b2;basis=Dispatches carlos system group-maintenance {status|permit|revoke|prepare|apply|rollback} to internal/host; no read of its own.;rev3=census-ruling-gvisor-demos;basis=Dispatch fixed runsc-ensure and exec-sandbox-allows-prev system applets; no direct reads. b2d431b47f8d15cd017b8fd7507865f099465973c9f1eef8e5cc0ee6e3d1f588
system.go systemVerb authority B,C,D,F,G,J4 rev3=census-ruling-self-serve-moves-1;identity=explicit operator CLI uid 0;basis=adds the lifetimes family to the system dispatch (carlos system lifetimes cutover, a console door call as the operator); every existing command branch unchanged;rev3=census-ruling-claims-cleanup-r2;basis=claims cleanup R2: drops "claims" from the verb list, so it now falls to the unknown-verb message; no read added;rev3=census-ruling-nearest-region-a;basis=adds "hosts-used" to the verb list, routed to runSystemHostsUsedVerb; no read added;rev3=census-ruling-region-ha-p1a;basis=explicit operator CLI and root units, uid 0: drops "join" from the verb list, so `carlos system join` now falls to the unknown-verb message; no read added;rev3=census-ruling-named-unit-delivery-114;basis=the known-verb list gains named-units; no read of its own;rev3=census-ruling-design-pdf-service;basis=add recognition for carlos system pdf; no new reads;rev3=census-ruling-managed-fleets-2a;basis=Recognizes managed-fleets as a CLI family; no read added.;rev3=census-ruling-agent-start-demo-2;basis=system.go:43-57 recognizes demos; parsing only, no direct read added.;rev3=census-ruling-region-ha-p3b2;basis=Recognizes group-maintenance as a system verb; parsing only.;rev3=census-ruling-gvisor-demos;basis=Recognize two root sandbox applets; no direct reads. 05f652ae4aa1ba135b6bb0358be5570fe13c74e385609124a66d9947ad1f906b
internal/activator/backend_exec.go ExecBackend.waitLegacyRunGone legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Task 5: after root fenced Stop succeeds, check both native and gVisor original siblings using the existing systemd/cgroup readers; rootfs retains its existing path. A failed root proof returns immediately and keeps the lease. No mode-dependent cleanup. whole:Route@524 3f1799da4272a8c8fb1fafb704f0cbad074dc9a8e8becb6ae7e7667c37a0ee79
@@ -231,15 +239,17 @@ internal/activator/genbackend.go ExecBackend.StartStaged legacy accepted-legacy
internal/activator/rootfs.go ExecBackend.spawnRootfs 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-route (J1, as spawnUnitFrom, whose shape it has): new (rootfs Plan 2 Tasks 5 and 9): prepareKeyedAt (the instance's own directories, environment and listeners, unchanged), the schema-2 tenant launch file (environment only, CARLOS_SOCKET and CARLOS_DB set by the agent), the caller's exec gate, then StartRootfs over the control socket naming the image and web; root resolves the command from its own staged manifest (C4) and the tenant file may name no command (the trampoline refuses one); the failure handling is spawnUnitFrom's; its sites are the row's host and route; no root decision; final fix I1: root's answers that guarantee no start (ErrStartRefused: 503 not ready or claim-armed, 501 unconfigured, 400, 409, 507), like its 403, are marked a refusal (refuseRootfs), so verdictOf and classifyStep record no failure of the build and no stop is asked; a 502 and a transport failure still may have run; the same nineteen sites, offsets moved;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 fix wave 1 (d35fcb1f, census P1-1): takes the tier root is asked for as an argument; a zero tier means GenTier's (the former body), so a caller that chose a limit has it kept, as spawnChildFrom and spawnUnitFrom keep theirs; the same nineteen sites, no read added;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Use the verified generation/launch mode to remove CARLOS_DB after environment merges and omit the binary --db argument where applicable. Existing runtime, layout, secrets and exec gates remain; route reads are mode projection only.;rev3=census-ruling-gvisor-demos;basis=Task 5: gate launch using startup-captured mode and existing route/role/layout before preparation or execution; migrate structured root start identity and reject mismatches. Unsupported gVisor paths refuse; native behavior and existing root authority checks retained. No new root read source. registry:Host@1315,registry:Host@1488,registry:Host@1788,registry:Host@1907,registry:Host@2654,registry:Host@2997,registry:Host@3124,registry:Host@3449,registry:Host@3577,registry:Host@3686,registry:Host@390,registry:Host@4159,registry:Host@4253,whole:Route@1105,whole:Route@1137,whole:Route@199,whole:Route@2014,whole:Route@2830,whole:Route@3762,whole:Route@502,whole:Route@602,whole:Route@732 787a0c6f3c9664b8c6250c13f07d71e2bab947a4b6148df99a944e804c8ff163
internal/activator/unitproc.go ExecBackend.newRootfsWorkerProc legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-3-workers;basis=rootfs Plan 3 Group W: starts observing the named worker's unit; refused for a binary row and for a name that is no worker's before anything watches; holds no control listener;rev3=census-ruling-gvisor-demos;basis=Task 5: migrate structured root start identity, validate binding, retain actual unit for observation/exit/stop. Unknown worker response retains only a cleanup request and listener, never a guessed observed identity. Existing route/control/cgroup inputs; no new root read. registry:Host@260,registry:Host@346,registry:Host@524,registry:Host@658,whole:Route@565,whole:Route@569 87173abe8f01c89ab0b5f7afbba78b47867d19b84e275a8438f98df78c97135d
internal/activator/unitproc.go ExecBackend.newUnitProcFor legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-rootfs-apps-2;basis=the unit is named by unitNameFor(rt, role, gen), one more Route site (+whole:Route), and a role with no unit of the row's kind is refused before anything watches ""; no new read kind and no file read;rev3=census-ruling-region-ha-p1b3b-s;basis=Attach optional per-worker API closers to the existing unit observer before starting it; unit naming and systemd/cgroup proof reads unchanged.;rev3=census-ruling-gvisor-demos;basis=Task 5: migrate structured root start identity, validate binding, retain actual unit for observation/exit/stop. Unknown worker response retains only a cleanup request and listener, never a guessed observed identity. Existing route/control/cgroup inputs; no new root read. registry:Host@304,registry:Host@492,whole:Route@421,whole:Route@425 16104276147108e1c9bdb2fe844e2d7b38885ec741c26375cd5eb1d09b58d069
-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;rev3=census-ruling-region-ha-p1b3b-s;basis=Retain the already-read advisory exit record for native sidecars after the same systemd and cgroup termination proof; crash classification never substitutes for stop proof. No new read source.;rev3=census-ruling-gvisor-demos;basis=Task 5: migrate structured root start identity, validate binding, retain actual unit for observation/exit/stop. Unknown worker response retains only a cleanup request and listener, never a guessed observed identity. Existing route/control/cgroup inputs; no new root read. Fix round 2: rootfs log says stop accepted and waits for termination proof; no claim of termination from stop acceptance. Foreign observer uses plain fenced stop with main's existing cgroup evidence. registry:Host@1233,registry:Host@3084,registry:Host@3308,registry:Host@3655,registry:Host@3881,registry:Host@4585,registry:Host@6209,whole:Route@1235,whole:Route@2233,whole:Route@3086,whole:Route@3310,whole:Route@3657,whole:Route@3883,whole:Route@4587,whole:Route@4843,whole:Route@5296,whole:Route@5761,whole:Route@6211,whole:Route@983 2bf509d00b81d8ae113a1baa659b85872e4fb6c8cdd0bd670a88fd5cc0a247fb
+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;rev3=census-ruling-region-ha-p1b3b-s;basis=Retain the already-read advisory exit record for native sidecars after the same systemd and cgroup termination proof; crash classification never substitutes for stop proof. No new read source.;rev3=census-ruling-gvisor-demos;basis=Task 5: migrate structured root start identity, validate binding, retain actual unit for observation/exit/stop. Unknown worker response retains only a cleanup request and listener, never a guessed observed identity. Existing route/control/cgroup inputs; no new root read. Fix round 2: rootfs log says stop accepted and waits for termination proof; no claim of termination from stop acceptance. Foreign observer uses plain fenced stop with main's existing cgroup evidence. Task 8: move the existing gVisor advisory exit label to unitProc.exitLine, based on UnitIdentity. No changes to records, termination proof, stop, or cgroup reads. registry:Host@1233,registry:Host@3084,registry:Host@3308,registry:Host@3655,registry:Host@3881,registry:Host@4585,registry:Host@6083,whole:Route@1235,whole:Route@2233,whole:Route@3086,whole:Route@3310,whole:Route@3657,whole:Route@3883,whole:Route@4587,whole:Route@4843,whole:Route@5170,whole:Route@5635,whole:Route@6085,whole:Route@983 76c573cb7122765e70ae4a0009f68c8c25977cfdf751f586185fed336c41cfd5
+internal/host/sizestatus.go readSizeInForce legacy accepted-legacy accepted-legacy;rev3=census-ruling-instance-egress-sizes-328-329;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=root-input (J4, as readCgroupEvents): new (#329 plan 3 Task 7): os.Stat of the generation unit's cgroup directory and one ReadFile of memory.max under /sys/fs/cgroup/<parent slices>/<SliceName(host)>[/<GenUnitName(host, gen)>] (instancectl's names; host and gen from the agent's own activator state), a kernel file, matched to a size row; called through rowSizeCell from layoutStatusReport, once per awake nested row per 5-minute status tick; runs in the agent, not root; a status cell only; no root decision;rev3=census-ruling-gvisor-demos;basis=Task 8: remove Stat and generation-name reconstruction/parent fallback; read memory.max only under the host slice and validated retained unit name. Compare against Physical(logical tier) only for FamilyGVisor, return unchanged logical size/shares. Existing agent cgroupfs read, no root or guest-file read. file:ReadFile@304 2658704f34ad47a3284606e7d6e0ee97ba2936b3e05fbecbd6083f61ba0f9f65
internal/host/systemapply.go systemApplier.stageCandidate legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-region-ha-p3b;basis=Require groupStageDigest before staging/candidate execution; action and new digest come from root-owned operator permit bound to boot marker. Existing signed pointer/artifact verification and two direct read sites remain.;rev3=census-ruling-gvisor-demos;basis=Pass the already-open regular file fstat size to bounded preflight. Allocate payload once at exactly that size, use ReadFull then confirm EOF; hash and scan those same bytes before staging. Root-owned staged target is still checked before execution. Preserve staging on floor refusal for apply/install-channel. file:Stat@694 ea8c519d19786af346500c289fc768bd7047639d90154af6ec6ecefdfb41d57f
@remove internal/instancectl/demo_policy.go Server.demoCgroup
@removed internal/instancectl/demo_policy.go Server.demoCgroup H3 census-ruling-gvisor-demos;basis=Delegate the existing readback to demoCgroupReadback; wrapper has no direct read and retains its callers.
-@coverage . e359ebe397bac9cf64ba77fb85322e55c3409dc5ca63c9a7c1dc51348ca0ade0
-@coverage internal/activator 3279192b5e65ed56cafc66b164553e9eb992e4dbc0f7c327c4c12aebd6163e1c
+@coverage . e81de2dad7f3ecf8f6adbb426b8f6e8f732b7dff5b7e909a273f0e40194307b5
+@coverage internal/activator d326609be0b7846d7bcbb4b20856ef9d3a9ffdf70bfb091e3ac7566fa78613de
@coverage internal/demobuild a4e1514f857e1a3a7a77af7aecbe35d1c7b1f38aa224a9e560e278fa2e0a6c0d
@coverage internal/execsandbox c7bd59e07acf65b54d2c020a9b380b64a7319569ff8cf183a33a3dbcc2360b8d
-@coverage internal/host 58ada6f86c661b8715fd72df237e295f4a862308000b50c7db2ca85d91467396
+@coverage internal/host e3bac20266306e8737152c9e7e8a048271d753ae12ee66a8d3a0260fd4031ba3
@coverage internal/host/units 93402572d2fc9c32b563820a36d565afa2ed951637bde9561fe2e845137a6524
@coverage internal/instancectl 10e29ecda69c9f2d42612bf3c4d50817b249a324a84601bae15eb2b108d8ed69
@coverage internal/instanceexec f45ee9b5ec7862c3a07fd9270b38df322c91e73f13e297813698dee30b8efd2c
+@coverage internal/status 549f4bf5833dd6d85709bf86f84766736c1a0b531cf5cabdaf6ca26924c67ea8
diff --git a/internal/status/dryrun.go b/internal/status/dryrun.go
index 767ad3493..f627d9fb6 100644
--- a/internal/status/dryrun.go
+++ b/internal/status/dryrun.go
@@ -60,12 +60,15 @@ var dryRunFractionNeedles = []float64{dryRunMemFrac, dryRunDiskFrac}
// reason to appear in a template or a fleet-wide aggregate) so a false
// negative from an incidental digit collision is effectively impossible.
var dryRunMetricsNeedles = []string{
- "4242424242", // fixture MemTotalBytes, verbatim
- "4242424241", // fixture MemAvailBytes, verbatim
- "4242424240", // fixture DiskFreeBytes, verbatim
- "42.42", // fixture Load1, verbatim
- "dryrun4242sha", // fixture Release, verbatim
- "reconnecting", // fixture Tunnel, verbatim (a real, valid Tunnel value)
+ "4242424242", // fixture MemTotalBytes, verbatim
+ "4242424241", // fixture MemAvailBytes, verbatim
+ "4242424240", // fixture DiskFreeBytes, verbatim
+ "42.42", // fixture Load1, verbatim
+ "dryrun4242sha", // fixture Release, verbatim
+ "reconnecting", // fixture Tunnel, verbatim (a real, valid Tunnel value)
+ "dryrun-sandbox-host-4242.invalid", // private observed unit
+ "dryrun-sandbox-pin-4242", // private runtime identity
+ "dryrun-sandbox-blocked-4242", // private root refusal
}
// dryRunRouteVersionHost and dryRunRouteVersionVersion are Task 8's own
@@ -256,6 +259,11 @@ func dryRunFixtures() ([]registry.Route, Probes) {
load1 := 42.42
probes := Probes{
+ Layout: &LayoutReport{Mode: "nested", ExecSandbox: &ExecSandbox{
+ Configured: "gvisor", Effective: "gvisor", Ready: false,
+ Runsc: &RunscStatus{Version: "release-20261102.0", SHA256: "dryrun-sandbox-pin-4242"},
+ Blocked: "dryrun-sandbox-blocked-4242",
+ }, Rows: map[string]RowLayout{"dryrun-sandbox-host-4242.invalid": {Layout: "nested", Sandbox: "gvisor"}}},
MachineID: "ip-10-0-0-7",
Region: "us-east-1",
MemFrac: &memFrac,
diff --git a/internal/status/execsandbox_test.go b/internal/status/execsandbox_test.go
new file mode 100644
index 000000000..5362ddc34
--- /dev/null
+++ b/internal/status/execsandbox_test.go
@@ -0,0 +1,73 @@
+package status
+
+import (
+ "context"
+ "encoding/json"
+ "reflect"
+ "strings"
+ "testing"
+ "time"
+
+ "github.com/carlosframework/platform/internal/release"
+)
+
+func TestExecSandboxStatus(t *testing.T) {
+ for _, ready := range []bool{false, true} {
+ report := &LayoutReport{Mode: "nested", ExecSandbox: &ExecSandbox{Configured: "auto", Effective: "gvisor", Runsc: &RunscStatus{Version: "release-20261102.0", SHA256: strings.Repeat("a", 64)}, Ready: ready, Blocked: "probe-blocked"}, Rows: map[string]RowLayout{"demo.example.com": {Layout: "nested", Sandbox: "gvisor"}}}
+ box := CollectBox(nil, Probes{MachineID: "box", Layout: report}, time.Now())
+ raw, err := json.Marshal(box)
+ if err != nil {
+ t.Fatal(err)
+ }
+ var round Box
+ if err := json.Unmarshal(raw, &round); err != nil {
+ t.Fatal(err)
+ }
+ if round.Metrics == nil || !reflect.DeepEqual(round.Metrics.Layout, report) {
+ t.Fatalf("round trip: %s", raw)
+ }
+ for _, s := range []string{`"exec_sandbox":`, `"configured":"auto"`, `"effective":"gvisor"`, `"runsc":`, `"sha256":`, `"ready":`, `"blocked":"probe-blocked"`, `"sandbox":"gvisor"`} {
+ if !strings.Contains(string(raw), s) {
+ t.Errorf("missing %s: %s", s, raw)
+ }
+ }
+ store := release.NewDirStore(t.TempDir())
+ if err := WriteBox(context.Background(), store, box); err != nil {
+ t.Fatal(err)
+ }
+ fleet, err := BuildFleet(context.Background(), store, nil, time.Now(), 5*time.Minute)
+ if err != nil {
+ t.Fatal(err)
+ }
+ public, _ := json.Marshal(fleet)
+ for _, s := range []string{"exec_sandbox", "sandbox", "probe-blocked", "release-20261102.0"} {
+ if strings.Contains(string(public), s) {
+ t.Fatalf("private data leaked: %s", public)
+ }
+ }
+ }
+ var old LayoutReport
+ if err := json.Unmarshal([]byte(`{"mode":"nested","rows":{"sleep":{"layout":"nested"}}}`), &old); err != nil {
+ t.Fatal(err)
+ }
+ raw, _ := json.Marshal(old)
+ if old.ExecSandbox != nil || old.Rows["sleep"].Sandbox != "" || strings.Contains(string(raw), "sandbox") {
+ t.Fatalf("old report guessed: %s", raw)
+ }
+}
+
+func TestExecSandboxStatusDryRunFixtures(t *testing.T) {
+ routes, probes := dryRunFixtures()
+ raw, err := json.Marshal(CollectBox(routes, probes, time.Now()))
+ if err != nil {
+ t.Fatal(err)
+ }
+ for _, needle := range []string{"dryrun-sandbox-host-4242.invalid", "dryrun-sandbox-pin-4242", "dryrun-sandbox-blocked-4242"} {
+ if !strings.Contains(string(raw), needle) {
+ t.Fatalf("dry-run fixture lacks %q", needle)
+ }
+ if len(ScanForLeaks([]byte(needle), dryRunMetricsNeedles)) == 0 {
+ t.Fatalf("dry-run scanner misses %q", needle)
+ }
+ }
+}
diff --git a/internal/status/snapshot.go b/internal/status/snapshot.go
index 6ab43d54a..ad5abf633 100644
--- a/internal/status/snapshot.go
+++ b/internal/status/snapshot.go
@@ -277,8 +277,9 @@ type HostUpdates struct {
// instancepage.go's handleAppInstance): a member sees the word, an operator
// reading status/boxes/<label>.json sees the reason too.
type RowLayout struct {
- Layout string `json:"layout"`
- Reason string `json:"reason,omitempty"`
+ Sandbox string `json:"sandbox,omitempty"`
+ Layout string `json:"layout"`
+ Reason string `json:"reason,omitempty"`
// Note is the last event the pass recorded for the host that was not
// a refusal: what a move quarantined out of the instance directory or
// kept aside, and when. Paths, so private like Reason.
@@ -291,6 +292,20 @@ type RowLayout struct {
Size string `json:"size,omitempty"`
}
+// ExecSandbox is root's execution-sandbox report. A missing report is unknown.
+type ExecSandbox struct {
+ Configured string `json:"configured"`
+ Effective string `json:"effective"`
+ Runsc *RunscStatus `json:"runsc,omitempty"`
+ Ready bool `json:"ready"`
+ Blocked string `json:"blocked,omitempty"`
+}
+
+type RunscStatus struct {
+ Version string `json:"version"`
+ SHA256 string `json:"sha256"`
+}
+
// LayoutReport is one box's whole layout picture: Mode is the intent the
// box last converged to ("none" before any is recorded, "unreadable" when
// the last read of it failed or named a mode this binary does not know,
@@ -298,8 +313,9 @@ type RowLayout struct {
// the box, keyed by host. It carries real hostnames, so — like RowLayout
// above — it is private: BoxMetrics.Layout, never a field on Box itself.
type LayoutReport struct {
- Mode string `json:"mode"`
- Rows map[string]RowLayout `json:"rows"`
+ ExecSandbox *ExecSandbox `json:"exec_sandbox,omitempty"`
+ Mode string `json:"mode"`
+ Rows map[string]RowLayout `json:"rows"`
// Default is set when Mode is nested by the deployment's default
// rather than by a recorded intent (design §8.6, "Nested by
// default"); DefaultBlocked is why the default is not in force on a
diff --git a/region_labels_e2e_test.go b/region_labels_e2e_test.go
index acbd9f608..0adc5c5fd 100644
--- a/region_labels_e2e_test.go
+++ b/region_labels_e2e_test.go
@@ -196,7 +196,7 @@ func TestRegionLabelsStatusThroughTheConsole(t *testing.T) {
if err := statusLayout(&out, ""); err != nil {
t.Fatal(err)
}
- if !strings.Contains(out.String(), "BOX REGION HOST LAYOUT SIZE EGRESS REASON") || !strings.Contains(out.String(), labelsUKBox+" London (UK) "+host) {
+ if !strings.Contains(out.String(), "BOX REGION HOST LAYOUT SANDBOX SIZE EGRESS REASON") || !strings.Contains(out.String(), labelsUKBox+" London (UK) "+host) {
t.Fatalf("status --layout:\n%s", out.String())
}
}
diff --git a/status_instances.go b/status_instances.go
index d61760fcc..57b8dcea2 100644
--- a/status_instances.go
+++ b/status_instances.go
@@ -163,10 +163,11 @@ var statusInstancesCopy = struct {
// imported, the same wire-struct convention statusInstanceRow above
// follows.
type statusLayoutRow struct {
- Host string `json:"host"`
- Layout string `json:"layout"`
- Reason string `json:"reason"`
- Note string `json:"note"`
+ Sandbox string `json:"sandbox"`
+ Host string `json:"host"`
+ Layout string `json:"layout"`
+ Reason string `json:"reason"`
+ Note string `json:"note"`
// Egress is the host's egress read-back (#328); nil from an older
// console or when the box reports none.
Egress *apiEgress `json:"egress"`
@@ -176,19 +177,22 @@ type statusLayoutRow struct {
Size string `json:"size"`
}
-// Copy for `carlos status --layout` (plan 3 IP3-04 and IP3-09, approved by delegation, Luna pass 2026-10-26).
+// Copy for `carlos status --layout`. The pending-size text is approved
+// (plan 3 IP3-04 and IP3-09); the sandbox addition is draft.
const (
- statusLayoutHeading = "BOX REGION HOST LAYOUT SIZE EGRESS REASON"
+ // DRAFT: Paul reviews the SANDBOX heading before merge.
+ statusLayoutHeading = "BOX REGION HOST LAYOUT SANDBOX SIZE EGRESS REASON"
statusLayoutSizePending = "A size after > is the wanted size. A larger size takes effect at the instance's next start or deploy; a smaller size waits for a cold start. Restart the instance to apply the new memory size now."
)
// statusLayoutBox is one box's layout report.
type statusLayoutBox struct {
- Box string `json:"box"`
- Mode string `json:"mode"`
- Stale bool `json:"stale"`
- Rows []statusLayoutRow `json:"rows"`
- Mixed bool `json:"mixed"`
+ ExecSandbox *statusExecSandbox `json:"exec_sandbox"`
+ Box string `json:"box"`
+ Mode string `json:"mode"`
+ Stale bool `json:"stale"`
+ Rows []statusLayoutRow `json:"rows"`
+ Mixed bool `json:"mixed"`
// Default: nested by the deployment's default, not a recorded intent;
// DefaultBlocked: why the default is not in force on this box.
Default bool `json:"default"`
@@ -244,13 +248,9 @@ func statusLayout(w io.Writer, consoleFlag string) error {
// printStatusLayout renders the door's answer as one row per host, sorted
// by box then host so two runs diff on the fleet rather than on request
-// order — the door itself sorts, but a caller's own render must not depend
-// on that staying true. The heading is the approved copy verbatim; rows are
-// laid out to match it rather than through a tabwriter, whose dynamic
-// column widths would drift the heading away from what was reviewed the
-// moment any cell is wider than its header word.
+// order. Box summaries include reports with no instance rows.
func printStatusLayout(w io.Writer, boxes []statusLayoutBox) {
- type line struct{ box, region, host, layout, size, egress, reason string }
+ type line struct{ box, region, host, layout, sandbox, size, egress, reason string }
pending := false
var lines []line
for _, b := range boxes {
@@ -290,10 +290,10 @@ func printStatusLayout(w io.Writer, boxes []statusLayoutBox) {
if region == "" {
region = "-"
}
- lines = append(lines, line{name, region, r.Host, r.Layout, size, egressCell(r.Egress), reason})
+ lines = append(lines, line{name, region, r.Host, r.Layout, sandboxWord(r.Sandbox), size, egressCell(r.Egress), reason})
}
}
- if len(lines) == 0 {
+ if len(boxes) == 0 {
mutedf(w, "no boxes have reported a layout yet")
return
}
@@ -309,8 +309,9 @@ func printStatusLayout(w io.Writer, boxes []statusLayoutBox) {
if reason == "" {
reason = "-"
}
- fmt.Fprintf(w, "%s %s %s %s %s %s %s\n", l.box, l.region, l.host, l.layout, l.size, l.egress, reason)
+ fmt.Fprintf(w, "%s %s %s %s %s %s %s %s\n", l.box, l.region, l.host, l.layout, l.sandbox, l.size, l.egress, reason)
}
+ printExecSandboxStatus(w, boxes)
// A size cell "in>want" is a new size waiting for a cold start (a
// populated slice is not shrunk live, and under host claims no size
// changes live). Said once, whatever the number of such rows.
@@ -344,6 +345,50 @@ func printStatusLayout(w io.Writer, boxes []statusLayoutBox) {
}
}
+type statusExecSandbox struct {
+ Configured string `json:"configured"`
+ Effective string `json:"effective"`
+ Runsc *statusRunsc `json:"runsc"`
+ Ready bool `json:"ready"`
+ Blocked string `json:"blocked"`
+}
+
+type statusRunsc struct {
+ Version string `json:"version"`
+ SHA256 string `json:"sha256"`
+}
+
+// DRAFT: new status wording awaits Paul's copy review before merge.
+func sandboxWord(value string) string {
+ if value == "" {
+ return "unknown"
+ }
+ return value
+}
+
+func printExecSandboxStatus(w io.Writer, boxes []statusLayoutBox) {
+ sorted := append([]statusLayoutBox(nil), boxes...)
+ sort.Slice(sorted, func(i, j int) bool { return sorted[i].Box < sorted[j].Box })
+ for _, b := range sorted {
+ switch {
+ case b.Stale:
+ fmt.Fprintf(w, "%s exec-sandbox: unknown (stale report)\n", b.Box)
+ case b.ExecSandbox == nil:
+ fmt.Fprintf(w, "%s exec-sandbox: unknown\n", b.Box)
+ default:
+ s := b.ExecSandbox
+ fmt.Fprintf(w, "%s exec-sandbox: configured=%s effective=%s ready=%t", b.Box, sandboxWord(s.Configured), sandboxWord(s.Effective), s.Ready)
+ if s.Runsc != nil {
+ fmt.Fprintf(w, " runsc=%s sha256=%s", sandboxWord(s.Runsc.Version), sandboxWord(s.Runsc.SHA256))
+ }
+ if s.Blocked != "" {
+ fmt.Fprintf(w, " blocked=%s", s.Blocked)
+ }
+ fmt.Fprintln(w)
+ }
+ }
+}
+
// layoutModeSplit sorts the boxes by mode: nested, and anything else
// (flat, none, unreadable). Stale boxes are left out: their mode is what
// they last said, not what they are.
diff --git a/status_instances_test.go b/status_instances_test.go
index fa2a98c94..1b116222c 100644
--- a/status_instances_test.go
+++ b/status_instances_test.go
@@ -78,7 +78,7 @@ func TestPrintStatusLayoutRendersSortedAndMarksStale(t *testing.T) {
out := buf.String()
// REGION joined the heading with the region labels (RL-C1).
- if !strings.Contains(out, "BOX REGION HOST LAYOUT SIZE EGRESS REASON") {
+ if !strings.Contains(out, "BOX REGION HOST LAYOUT SANDBOX SIZE EGRESS REASON") {
t.Fatalf("missing the approved heading:\n%s", out)
}
if !strings.Contains(out, "alpha (stale)") {
@@ -188,11 +188,11 @@ func TestStatusLayoutShowsEgress(t *testing.T) {
printStatusLayout(&buf, boxes)
out := buf.String()
for _, want := range []string{
- "BOX REGION HOST LAYOUT SIZE EGRESS REASON\n",
- "ie-1 - shop-a.example.com nested - !10.0.5.20,fd00:5::20 -\n",
- "ie-1 - shop-b.example.com foreign - 10.0.5.20 !refused db and socket are neither default; egress: 10.0.5.1: an address of this box\n",
- "ie-1 - shop-c.example.com nested - - !box not wholly nested egress: flat row shop-d.example.com\n",
- "ie-1 - shop-d.example.com flat - - -\n",
+ "BOX REGION HOST LAYOUT SANDBOX SIZE EGRESS REASON\n",
+ "ie-1 - shop-a.example.com nested unknown - !10.0.5.20,fd00:5::20 -\n",
+ "ie-1 - shop-b.example.com foreign unknown - 10.0.5.20 !refused db and socket are neither default; egress: 10.0.5.1: an address of this box\n",
+ "ie-1 - shop-c.example.com nested unknown - - !box not wholly nested egress: flat row shop-d.example.com\n",
+ "ie-1 - shop-d.example.com flat unknown - - -\n",
} {
if !strings.Contains(out, want) {
t.Errorf("missing %q in:\n%s", want, out)
@@ -270,15 +270,15 @@ func TestStatusLayoutShowsSize(t *testing.T) {
var buf bytes.Buffer
printStatusLayout(&buf, boxes)
out := buf.String()
- if !strings.HasPrefix(out, "BOX REGION HOST LAYOUT SIZE EGRESS REASON\n") {
+ if !strings.HasPrefix(out, "BOX REGION HOST LAYOUT SANDBOX SIZE EGRESS REASON\n") {
t.Fatalf("heading is not the draft, byte for byte:\n%s", out)
}
for _, want := range []string{
- "ie-1 - shop-a.example.com nested large - ",
- "ie-1 - shop-b.example.com nested large>small - ",
- "ie-1 - shop-c.example.com nested swap - ",
- "ie-1 - shop-d.example.com flat - - ",
- "ie-2 - shop-e.example.com nested standard>xlarge - ",
+ "ie-1 - shop-a.example.com nested unknown large - ",
+ "ie-1 - shop-b.example.com nested unknown large>small - ",
+ "ie-1 - shop-c.example.com nested unknown swap - ",
+ "ie-1 - shop-d.example.com flat unknown - - ",
+ "ie-2 - shop-e.example.com nested unknown standard>xlarge - ",
} {
if !strings.Contains(out, want) {
t.Errorf("missing %q in:\n%s", want, out)
@@ -300,3 +300,21 @@ func TestStatusLayoutShowsSize(t *testing.T) {
t.Errorf("a footnote with no > cell:\n%s", buf.String())
}
}
+
+func TestStatusLayoutSandbox(t *testing.T) {
+ var boxes []statusLayoutBox
+ raw := `[{"box":"fresh","exec_sandbox":{"configured":"auto","effective":"gvisor","runsc":{"version":"release-20261102.0","sha256":"pin"},"ready":false,"blocked":"probe-blocked"},"rows":[{"host":"demo.example.com","layout":"nested","size":"small","sandbox":"gvisor"},{"host":"sleep.example.com","layout":"nested"}]},{"box":"old","rows":[]},{"box":"stale","stale":true,"exec_sandbox":{"configured":"gvisor","effective":"gvisor","ready":true},"rows":[]}]`
+ if err := json.Unmarshal([]byte(raw), &boxes); err != nil {
+ t.Fatal(err)
+ }
+ var out bytes.Buffer
+ printStatusLayout(&out, boxes)
+ for _, want := range []string{"LAYOUT SANDBOX SIZE", "nested gvisor small", "nested unknown", "fresh exec-sandbox: configured=auto effective=gvisor ready=false runsc=release-20261102.0 sha256=pin blocked=probe-blocked", "old exec-sandbox: unknown", "stale exec-sandbox: unknown (stale report)"} {
+ if !strings.Contains(out.String(), want) {
+ t.Errorf("missing %q:\n%s", want, &out)
+ }
+ }
+ if strings.Count(out.String(), "exec-sandbox:") != 3 {
+ t.Fatalf("expected one line per box: %s", &out)
+ }
+}