| index eef8e176b..d00f1adaf 100644 |
| --- a/internal/provision/testdata/plan14-root-reads-gvisor-update-dirs.tsv |
| +++ b/internal/provision/testdata/plan14-root-reads-gvisor-update-dirs.tsv |
| @@ -7,7 +7,7 @@ |
| @legacy a28f4924a540c362a66074dd29a18ff2a17afbbcf6e965fd411c9e59df95fd8f internal/instancectl/sandboxstop.go Server.proveRunGone legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Task 5: read only the validated host-derived systemd cgroup.events path under the configured root. Require complete inactive/dead state, zero jobs/MainPID/ControlPID, expected ControlGroup and exact populated 0 or absent cgroup; unreadable or malformed proof refuses cleanup. Fix round 1 C1/I1: accept the captured systemd 257 empty Job field as no queued job, also zero. Do not infer running state from LoadState; keep required-property presence, inactive/failed plus dead/failed, zero MainPID/ControlPID, expected ControlGroup and empty/absent cgroup proof. Native cleanup runs before sibling ID derivation. No new read path. Task 9: Treat omitted empty Job, InvocationID and ControlGroup as their captured systemd 257 unset defaults. Require explicit LoadState, ActiveState, SubState, MainPID and ControlPID; retain no-job, zero-PID, terminal-state, expected-group and empty/absent-cgroup checks. Same fixed derived path and read.;rev3=census-ruling-gvisor-update-dirs;basis=For a carlos-instance-gvisor@ unit only, return proven-gone without naming it to systemctl when gvisorUnitNeverLoaded holds (no cgroup dir, no drop-in dir, not listed by systemd). Every other unit, and any doubt or error, keeps the existing show/cgroup proof unchanged. file:ReadFile@916 5d67a0f1f76f5582b6a1a2a8690f7355c4724f2a0518ed59f1d5850ddfe675a2 |
| @legacy 796be076f07a5138618981ef1c0b304f4cd1eed6d4eaf84796f184255dd9fb46 internal/activator/backend_exec.go ExecBackend.gvisorSiblingNeverLoaded legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-update-dirs;basis=New, agent side: Lstat of /run/systemd/system/<sibling>.d, the existing unitEvents cgroup read, and the read-only list-units family glob via UnitsListed. All must say absent; any error returns false so the full proof runs. No root decision. file:Lstat@322,whole:Route@455 70df41b956a2c1b4ce6d0c769a36f81f3facb6943229e9a744ce62fe3a5fda20 |
| @legacy f5399a6f15da500e625eac9cfd36448779ea1051b7f7b9e5f3fe54dcba973114 internal/activator/control.go systemctlUnitsListed legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-update-dirs;basis=New, agent side: `systemctl list-units --all --plain --no-legend --no-pager <glob>`, read-only; the spawn guard's read-only verb list gains list-units. file:CommandContext@91 52c36953bba90fadc4ff0684877f8efe0b9d951d97693077faded8b1123ab373 |
| -@legacy 4f253ef4ab6554ec49ac67c7c0bc3fc5d5efa02ef3a3979fa494c0e011227272 internal/demobuild/unit.go gvisorBuildNeverLoaded legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-update-dirs;basis=New: Lstat of the build cgroup dir (emptyBuildCgroup's path) and of the job drop-in dir under unitRoot, then list-units with the fixed carlos-demo-build-gvisor@*.service glob and an exact match. Only when all say absent does stopBuildContext skip show/stop of the gVisor build unit; any error keeps the full proof. file:Lstat@191 75075033174ee5c506e13aae5b1a1b9d3bc114d944ff96b0edd954991c0d1810 |
| +@legacy 4f5cf0afb2c8cc2bb2d6bb2435d2db17c49b5cc4ca2fe5b0c1bfcbecc86cb73e internal/demobuild/unit.go gvisorBuildNeverLoaded legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-update-dirs;basis=New: Lstat of the build cgroup dir (emptyBuildCgroup's path) and of the job drop-in dir under unitRoot, then list-units with the fixed carlos-demo-build-gvisor@*.service glob and an exact match. Only when all say absent does stopBuildContext skip show/stop of the gVisor build unit; any error keeps the full proof. R1 P2-3: a listing at the wrapper's 128 KiB capture limit may be truncated and also returns false (full proof). file:Lstat@191 bce764f50a586475761b49c47c4c001fde1bc1f6117bf41f5502e02f248f1ae8 |
| @legacy 10541080f448c9a0092472990d4d844931c7f9d27d6a4e3b8f4e95e805707913 internal/host/execsandboxfloor.go var controlMountinfo legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-update-dirs;basis=New seam: reads /proc/<pid>/mountinfo of instance-control's MainPID (digits only, from systemctl show -p MainPID --value carlos-instance-control.service) to see whether systemd mounted /var/lib/carlos/oci-rootfs writable in its namespace. Kernel-owned file; the only effect is one try-restart of carlos-instance-control.service in effective gVisor mode (host.env read through the existing sandboxHostEnvironmentAt) when the mount is absent. Unreadable or anything unexpected: no restart. file:ReadFile@66 5cc66076a36cf77ea5add013814e51d7231576e3e07482965f6907032c30ce6d |
| @legacy 5ef56f0c8f8c9f406f11356586c550e8d64d2f0f08c492138c3a78204c3730fb internal/instancectl/sandboxstop.go Server.gvisorUnitNeverLoaded legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-update-dirs;basis=New: Lstat of the host-derived cgroup directory under the configured cgroup root and of <DropInDir>/<unit>.d (both must be absent), then `systemctl list-units --all --plain --no-legend --no-pager carlos-instance-gvisor@*.service` (fixed family glob) and an exact-name match in Go. Any error or presence returns false so the full proof runs. file:Lstat@379 6c51d378fd35d05545483615163fc5a28431b97359a4de8b4c2437c6d5a4b06c |
| @legacy 1c1fe1e038d3f677379ebd06d48c81c9cdb7b02a658529b51eeb21b3a010225e internal/activator/backend_exec.go ExecBackend.LegacyRunGone legacy accepted-legacy 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;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.;rev3=census-ruling-gvisor-update-dirs;basis=Agent side (carlos user): skip the gVisor sibling's show-based proof only when gvisorSiblingNeverLoaded holds; the native unit's proof is unchanged and any doubt keeps the lease as before. registry:Host@174,registry:Host@606,whole:Route@393,whole:Route@448,whole:Route@665,whole:Route@783 036ffb949da93314622f0e15d128e5e8db794971c2546a96ddbac217209a4415 |
| @@ -18,12 +18,12 @@ internal/instancectl/demo_cleanup.go Server.stopDemoUnits legacy accepted-legacy |
| internal/instancectl/sandboxstop.go Server.proveRunGone legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Task 5: read only the validated host-derived systemd cgroup.events path under the configured root. Require complete inactive/dead state, zero jobs/MainPID/ControlPID, expected ControlGroup and exact populated 0 or absent cgroup; unreadable or malformed proof refuses cleanup. Fix round 1 C1/I1: accept the captured systemd 257 empty Job field as no queued job, also zero. Do not infer running state from LoadState; keep required-property presence, inactive/failed plus dead/failed, zero MainPID/ControlPID, expected ControlGroup and empty/absent cgroup proof. Native cleanup runs before sibling ID derivation. No new read path. Task 9: Treat omitted empty Job, InvocationID and ControlGroup as their captured systemd 257 unset defaults. Require explicit LoadState, ActiveState, SubState, MainPID and ControlPID; retain no-job, zero-PID, terminal-state, expected-group and empty/absent-cgroup checks. Same fixed derived path and read.;rev3=census-ruling-gvisor-update-dirs;basis=For a carlos-instance-gvisor@ unit only, return proven-gone without naming it to systemctl when gvisorUnitNeverLoaded holds (no cgroup dir, no drop-in dir, not listed by systemd). Every other unit, and any doubt or error, keeps the existing show/cgroup proof unchanged. file:ReadFile@916 5d67a0f1f76f5582b6a1a2a8690f7355c4724f2a0518ed59f1d5850ddfe675a2 |
| internal/activator/backend_exec.go ExecBackend.gvisorSiblingNeverLoaded legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-update-dirs;basis=New, agent side: Lstat of /run/systemd/system/<sibling>.d, the existing unitEvents cgroup read, and the read-only list-units family glob via UnitsListed. All must say absent; any error returns false so the full proof runs. No root decision. file:Lstat@322,whole:Route@455 70df41b956a2c1b4ce6d0c769a36f81f3facb6943229e9a744ce62fe3a5fda20 |
| internal/activator/control.go systemctlUnitsListed legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-update-dirs;basis=New, agent side: `systemctl list-units --all --plain --no-legend --no-pager <glob>`, read-only; the spawn guard's read-only verb list gains list-units. file:CommandContext@91 52c36953bba90fadc4ff0684877f8efe0b9d951d97693077faded8b1123ab373 |
| -internal/demobuild/unit.go gvisorBuildNeverLoaded legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-update-dirs;basis=New: Lstat of the build cgroup dir (emptyBuildCgroup's path) and of the job drop-in dir under unitRoot, then list-units with the fixed carlos-demo-build-gvisor@*.service glob and an exact match. Only when all say absent does stopBuildContext skip show/stop of the gVisor build unit; any error keeps the full proof. file:Lstat@191 75075033174ee5c506e13aae5b1a1b9d3bc114d944ff96b0edd954991c0d1810 |
| +internal/demobuild/unit.go gvisorBuildNeverLoaded legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-update-dirs;basis=New: Lstat of the build cgroup dir (emptyBuildCgroup's path) and of the job drop-in dir under unitRoot, then list-units with the fixed carlos-demo-build-gvisor@*.service glob and an exact match. Only when all say absent does stopBuildContext skip show/stop of the gVisor build unit; any error keeps the full proof. R1 P2-3: a listing at the wrapper's 128 KiB capture limit may be truncated and also returns false (full proof). file:Lstat@191 bce764f50a586475761b49c47c4c001fde1bc1f6117bf41f5502e02f248f1ae8 |
| internal/host/execsandboxfloor.go var controlMountinfo legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-update-dirs;basis=New seam: reads /proc/<pid>/mountinfo of instance-control's MainPID (digits only, from systemctl show -p MainPID --value carlos-instance-control.service) to see whether systemd mounted /var/lib/carlos/oci-rootfs writable in its namespace. Kernel-owned file; the only effect is one try-restart of carlos-instance-control.service in effective gVisor mode (host.env read through the existing sandboxHostEnvironmentAt) when the mount is absent. Unreadable or anything unexpected: no restart. file:ReadFile@66 5cc66076a36cf77ea5add013814e51d7231576e3e07482965f6907032c30ce6d |
| internal/instancectl/sandboxstop.go Server.gvisorUnitNeverLoaded legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-update-dirs;basis=New: Lstat of the host-derived cgroup directory under the configured cgroup root and of <DropInDir>/<unit>.d (both must be absent), then `systemctl list-units --all --plain --no-legend --no-pager carlos-instance-gvisor@*.service` (fixed family glob) and an exact-name match in Go. Any error or presence returns false so the full proof runs. file:Lstat@379 6c51d378fd35d05545483615163fc5a28431b97359a4de8b4c2437c6d5a4b06c |
| internal/activator/backend_exec.go ExecBackend.LegacyRunGone legacy accepted-legacy 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;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.;rev3=census-ruling-gvisor-update-dirs;basis=Agent side (carlos user): skip the gVisor sibling's show-based proof only when gvisorSiblingNeverLoaded holds; the native unit's proof is unchanged and any doubt keeps the lease as before. registry:Host@174,registry:Host@606,whole:Route@393,whole:Route@448,whole:Route@665,whole:Route@783 036ffb949da93314622f0e15d128e5e8db794971c2546a96ddbac217209a4415 |
| @coverage internal/activator 10892f693ca6b72fa9cac7ec90ed25edb3cff03888f2a7365ce3d3e4d8f57ca4 |
| -@coverage internal/demobuild 205010e865d8048b1c506e188cf43b21b78ace9c35db3ba270a22590c9361790 |
| -@coverage internal/host 63d1d3f937551607d28e42bb9d4882b428646a1e94570bb7347d53a79fb6b507 |
| +@coverage internal/demobuild ec946d406609b27ff6bd70ac463163a3831656f9f3e972f92831dbc54e77406f |
| +@coverage internal/host cab4a90906f3fc5d8fc514321d483b8c0dce68d1369e79a11de1f418d69c510f |
| @coverage internal/host/units da7a1e3e835538ee4b56d31d0e19d671aa2b80d40d4ac3e5341806aaab13cf19 |
| @coverage internal/instancectl 3b705c0428138f9cb85849fc917b964e4de3576d4499ce8c382ab45ae690822e |