gvisor demos: fix CI regressions on systemd boxes
Restore native stop submission and sweep polling on systemd boxes (a), and match the requested systemd fields in legacy fixtures (b). Keep both-family fencing in gVisor mode and validate builder admission. Route gVisor cleanup through the existing pinned owner (c), read guest interfaces from procfs without netlink (d), and add inspected census and credential-family inventory entries (e). Update only the draft SANDBOX copy pin (f); distinguish readiness discovery from actual sweeps (g). Refresh the cumulative census. Targeted CI regressions, build, vet, cross-builds and census checks pass. The single full-suite run retains main-reproduced failures and package timeout limitations; see the CI fix report for commands, per-failure evidence and pending review.
Co-Authored-By: Astra (gpt-6-astra) via codex
26 files changed,
+322
−48
docs/superpowers/notes/census-proposal-gvisor-demos.md+13 −3docs/superpowers/plans/2026-10-21-instance-policy-copy.json+1 −1internal/activator/rootfs_admission_test.go+6 −2internal/execsandbox/cleanup_linux.go+5 −0internal/execsandbox/cleanup_linux_test.go+19 −0internal/host/demo_cleanup_test.go+1 −1internal/host/hadeparture_credentials_test.go+23 −0internal/instancectl/claimunit_test.go+16 −0internal/instancectl/demo_build.go+3 −0internal/instancectl/demo_claim_test.go+1 −1internal/instancectl/gen.go+55 −4internal/instancectl/gvisor_cleanup_test.go+3 −1internal/instancectl/gvisorprobe.go+7 −11internal/instancectl/gvisorprobe_flow_linux_test.go+3 −1internal/instancectl/gvisorstart_test.go+31 −0internal/instancectl/rootfs_removal_guard_test.go+0 −2internal/instancectl/sandboxstop.go+7 −6internal/instancectl/sandboxstop_test.go+29 −0internal/instancectl/server.go+1 −1internal/instanceexec/probe_gvisor.go+26 −1internal/instanceexec/probe_gvisor_linux.go+2 −2internal/instanceexec/probe_gvisor_test.go+23 −0internal/provision/gvisor_demos_census_test.go+36 −0internal/provision/plan9_b8_census_test.go+1 −1internal/provision/testdata/plan14-root-reads-chain.tsv+1 −1internal/provision/testdata/plan14-root-reads-gvisor-demos.tsv+9 −9
Intent
diff --git a/docs/superpowers/notes/census-proposal-gvisor-demos.md b/docs/superpowers/notes/census-proposal-gvisor-demos.md| index 0839593c5..a521c9868 100644 |
| --- a/docs/superpowers/notes/census-proposal-gvisor-demos.md |
| +++ b/docs/superpowers/notes/census-proposal-gvisor-demos.md |
| @@ -167,7 +167,7 @@ New dispositions, which census-propose wrote and the reviewer checks against the |
| - new `internal/activator/sandbox.go:ExecBackend.sandboxLaunch`: reads +registry:Backing, +registry:Runtime, +whole:Route; written legacy, accepted-legacy, frozen |
| - new `internal/activator/sandbox.go:UnitBackend.sandboxLaunch`: reads +registry:Runtime; written legacy, accepted-legacy, frozen |
| - new `internal/demobuild/gvisor.go:ownBuildDirectories`: reads +file:WalkDir; written legacy, accepted-legacy, frozen |
| -- new `internal/execsandbox/cleanup_linux.go:bundleStore.removeDirectory`: reads +file:Lstat, +file:OpenRoot, +file:Stat ×2; written legacy, accepted-legacy, frozen |
| +- new `internal/execsandbox/cleanup_linux.go:bundleStore.removeDirectory`: reads +file:Lstat ×2, +file:OpenRoot, +file:Stat ×2; written legacy, accepted-legacy, frozen |
| - new `internal/execsandbox/file_linux.go:checkRunscDir`: reads +file:Stat; written legacy, accepted-legacy, frozen |
| - new `internal/execsandbox/file_linux.go:openCheckedDir`: reads +file:Open, +file:Openat, +file:Stat; written legacy, accepted-legacy, frozen |
| - new `internal/execsandbox/file_linux.go:openCheckedFile`: reads +file:Openat, +file:Stat; written legacy, accepted-legacy, frozen |
| @@ -216,14 +216,14 @@ New dispositions, which census-propose wrote and the reviewer checks against the |
| - new `internal/instancectl/sandboxstop.go:Server.proveRunGone`: reads +file:ReadFile; written legacy, accepted-legacy, frozen |
| - new `internal/instanceexec/probe_gvisor.go:checkGVisorFacts`: reads +file:Openat2; written legacy, accepted-legacy, frozen |
| - new `internal/instanceexec/probe_gvisor.go:type gvisorProbeFacts`: reads +file:Openat2; written legacy, accepted-legacy, frozen |
| -- new `internal/instanceexec/probe_gvisor_linux.go:runGVisorProbeChecks`: reads +data-literal, +file:Lstat, +file:Openat2, +file:ReadFile ×2; written legacy, accepted-legacy, frozen |
| +- new `internal/instanceexec/probe_gvisor_linux.go:runGVisorProbeChecks`: reads +data-literal, +file:Lstat, +file:Openat2, +file:ReadFile ×3; written legacy, accepted-legacy, frozen |
| - quiet `internal/instancectl/demo_policy.go:Server.demoCgroup`: reads nothing now; retired while it reads nothing (or its row keeps no sites) |
| - reads `internal/activator/backend_unit.go:SplitBackend.Start`: +file:Exec, +registry:Backing, +whole:Route; keeps legacy, task accepted-legacy |
| - reads `internal/activator/backend_unit.go:SplitBackend.StartGen`: +file:Exec, +registry:Backing, +whole:Route; keeps legacy, task accepted-legacy |
| - 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` → `3639a17ab5a6d2f6097776026af7792136fb048676d11117180d063cf3738c0e`. |
| +Seal: `b970bb28c5a633d2572a1da549030e9258cfdabb6322ddffdd0ebf41b56c464c` → `6f8b2354ccd73a6a0e48f5c675fdb186e7def8c7dd9863c8e898c351201da597`. |
| Overlay: `internal/provision/testdata/plan14-root-reads-gvisor-demos.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`. |
| @@ -245,3 +245,13 @@ read-census change. Reproduce this section after regenerating the card. |
| - `internal/execsandbox/command.go:RunscRunArgs`, `internal/instancectl/gvisorunit.go:gvisorCommands`, `internal/demobuild/gvisor.go:gvisorBuildCommands`: one constructor supplies the unchanged runsc start argv to the writers and their readback verifiers. No flags or stop commands changed. |
| - `internal/execsandbox/lock.go:RunscMemberAssetName` and `RunscObjectKey`, `internal/publicrelease/runsc.go:RunscMemberAssetName`: flattened release asset names and object-key suffixes use the same allowlist. Unsupported platforms and members still return no name. |
| - `internal/publicrelease/feed.go:Feed.AssetWithSums` and `Feed.OptionalAsset`: download bounds and digest verification are preserved while allowing all runtime members to use one verified manifest. The console mirror compares downloaded hashes with that manifest; it never accepts replacement bytes under a changed release. Strict signed-list parsers are unchanged. No new filesystem read or write authority. |
| + |
| +## CI fix envelope claims |
| + |
| +- `Server.stopAndProveRun`: submit the native stop unconditionally on systemd boxes before the unchanged termination proof. gVisor commandless-unit handling is unchanged. |
| +- `Server.handleSweep`: restore main's stop/poll/cgroup path for native original targets on systemd boxes. gVisor-mode boxes retain the fenced both-family path for either original family. |
| +- `Server.initializeDemoBuilder`: apply existing unitFamily refusal before initialization, including malformed configuration and a non-demo gVisor box. |
| +- `Server.removeGenFiles`: existing pinned owner receives closed selectors for gVisor bundle/drop-in and serialized probe nonce fixture/output. Validate unit family and ID; probe-only selectors refuse run units. No new raw removal allowance or caller-supplied filesystem path. Callers retain their existing fences and termination proof. |
| +- `bundleStore.removeDirectory`: an absent derived leaf needs no removal. Existing entries retain all checked-parent, OpenRoot identity and leaf checks. |
| +- `gvisorLoopbackOnly`: pure parsing of fixed guest procfs interface evidence; accepts only one complete lo row. |
| +- The record-write sites and metadata credential-family inventory are individually explained in the controller's `.superpowers/sdd/2026-11-08-gvisor-demos/cifix-report.md`. Independent approval is pending. |
diff --git a/docs/superpowers/plans/2026-10-21-instance-policy-copy.json b/docs/superpowers/plans/2026-10-21-instance-policy-copy.json| index 85c2cdfd2..63d9b689e 100644 |
| --- a/docs/superpowers/plans/2026-10-21-instance-policy-copy.json |
| +++ b/docs/superpowers/plans/2026-10-21-instance-policy-copy.json |
| @@ -83,7 +83,7 @@ |
| {"id": "GAP-1", "file": "internal/updatewords/words_surfaces.go", "text": "usage: carlos instances set <host> [--app <a>] [--updates auto|manual] [--channel <c>] [--major <n>] [--pin <build>] [--size small|standard|large|xlarge|default] (an empty value clears an update setting)"}, |
| {"id": "GAP-2", "file": "apps_swap.go", "text": "usage: carlos apps set <app> [--copies <n>] [--swap overlap|hold] [--swap-concurrency <n>] [--interactive on|off] [--account <sqid|name>] [--account-id <sqid>] [--console <origin>] [--egress-allow <ip,...>] [--size <size>]\n", "superseded_by": "SR-2-C13", "note": "Replaced verbatim by SR-2-C13 in the stateless replicas copy deck for Plan 2 slice 1a."}, |
| {"id": "GAP-3", "file": "apps_swap.go", "text": "app whose swap or instance policy to set"}, |
| - {"id": "IP3-04", "file": "status_instances.go", "text": "BOX REGION HOST LAYOUT SIZE EGRESS REASON"}, |
| + {"id": "IP3-04", "file": "status_instances.go", "text": "BOX REGION HOST LAYOUT SANDBOX SIZE EGRESS REASON"}, |
| {"id": "IP3-08", "file": "status_instances.go", "text": "-"}, |
| {"id": "IP3-12", "file": "status_instances.go", "text": "-"}, |
| {"id": "IP3-09", "file": "status_instances.go", "text": "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."}, |
diff --git a/internal/activator/rootfs_admission_test.go b/internal/activator/rootfs_admission_test.go| index 0d028eb8b..0bab22eea 100644 |
| --- a/internal/activator/rootfs_admission_test.go |
| +++ b/internal/activator/rootfs_admission_test.go |
| @@ -124,6 +124,7 @@ func TestRootfsAdmissionWaitsForTheStartupProof(t *testing.T) { |
| if err := startupSweepFor(a, h); err == nil { |
| t.Fatal("the sweep proved a unit whose stop failed gone") |
| } |
| + startupStops := len(h.callsLike("stop ")) |
| a.Start() |
| sweeps := func(n int) { |
| t.Helper() |
| @@ -167,8 +168,11 @@ func TestRootfsAdmissionWaitsForTheStartupProof(t *testing.T) { |
| h.release(leftover) |
| sweeps(60) |
| refused("an hour after the leftover ended") |
| - if sweeps := h.callsLike("list-units"); len(sweeps) != 1 { |
| - t.Fatalf("the box swept %d times; a sweep after Start would stop this agent's own units", len(sweeps)) |
| + if sweeps := h.requested("POST /sweep"); sweeps != 1 { |
| + t.Fatalf("the box swept %d times; a sweep after Start would stop this agent's own units", sweeps) |
| + } |
| + if stops := len(h.callsLike("stop ")); stops != startupStops { |
| + t.Fatalf("stop calls grew from %d to %d after Start", startupStops, stops) |
| } |
| // The agent restarts and its startup sweep is clean. |
diff --git a/internal/execsandbox/cleanup_linux.go b/internal/execsandbox/cleanup_linux.go| index 3c4da5267..ecd9176f7 100644 |
| --- a/internal/execsandbox/cleanup_linux.go |
| +++ b/internal/execsandbox/cleanup_linux.go |
| @@ -22,6 +22,11 @@ func removeSandboxDirectory(path string) error { |
| } |
| func (s bundleStore) removeDirectory(path string) error { |
| + if _, err := os.Lstat(path); errors.Is(err, os.ErrNotExist) { |
| + return nil |
| + } else if err != nil { |
| + return err |
| + } |
| parent, err := s.openDirectory(filepath.Dir(path)) |
| if errors.Is(err, os.ErrNotExist) { |
| return nil |
diff --git a/internal/execsandbox/cleanup_linux_test.go b/internal/execsandbox/cleanup_linux_test.go| index c52cb063c..0a7377790 100644 |
| --- a/internal/execsandbox/cleanup_linux_test.go |
| +++ b/internal/execsandbox/cleanup_linux_test.go |
| @@ -3,6 +3,7 @@ |
| package execsandbox |
| import ( |
| + "errors" |
| "os" |
| "path/filepath" |
| "testing" |
| @@ -60,3 +61,21 @@ func TestGVisorStopCleanupDoesNotFollowLinks(t *testing.T) { |
| t.Fatal("followed child link", err) |
| } |
| } |
| + |
| +func TestGVisorCleanupAbsentWithoutTrustedParent(t *testing.T) { |
| + path := filepath.Join(t.TempDir(), "run-demo.example") |
| + checks := 0 |
| + s := bundleStore{openDir: func(string) (*os.File, error) { checks++; return nil, os.ErrPermission }} |
| + if err := s.removeDirectory(path); err != nil || checks != 0 { |
| + t.Fatalf("absent: %v checks=%d", err, checks) |
| + } |
| + if err := os.Mkdir(path, 0700); err != nil { |
| + t.Fatal(err) |
| + } |
| + if err := s.removeDirectory(path); !errors.Is(err, os.ErrPermission) || checks != 1 { |
| + t.Fatalf("existing: %v checks=%d", err, checks) |
| + } |
| + if _, err := os.Stat(path); err != nil { |
| + t.Fatal("removed through untrusted parent", err) |
| + } |
| +} |
diff --git a/internal/host/demo_cleanup_test.go b/internal/host/demo_cleanup_test.go| index 5c37154b5..1393acd29 100644 |
| --- a/internal/host/demo_cleanup_test.go |
| +++ b/internal/host/demo_cleanup_test.go |
| @@ -119,7 +119,7 @@ func testDemoRetirement(t *testing.T, legacy bool, claimHeld ...bool) { |
| if !stopped { |
| t.Error("state checked before stop") |
| } |
| - return "ActiveState=inactive\n", nil |
| + return "LoadState=loaded\nActiveState=inactive\nSubState=dead\nMainPID=0\nControlPID=0\nJob=\nControlGroup=\nInvocationID=\n", nil |
| } |
| return "", nil |
| }} |
diff --git a/internal/host/hadeparture_credentials_test.go b/internal/host/hadeparture_credentials_test.go| index a18e6bf33..a72031693 100644 |
| --- a/internal/host/hadeparture_credentials_test.go |
| +++ b/internal/host/hadeparture_credentials_test.go |
| @@ -5,6 +5,8 @@ import ( |
| "path/filepath" |
| "strings" |
| "testing" |
| + |
| + "github.com/carlosframework/platform/internal/execsandbox" |
| ) |
| func TestTerminationProofCredentials(t *testing.T) { |
| @@ -24,6 +26,27 @@ func TestTerminationProofCredentials(t *testing.T) { |
| } |
| continue |
| } |
| + if name := filepath.Base(path); name == "carlos-instance-gvisor@.service" || name == "carlos-instance-gvisor-probe.service" { |
| + checkGVisorMeasuredTemplates(t) |
| + pin, err := execsandbox.RunscFor("linux-arm64") |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + args, err := execsandbox.RunscRunArgs(pin, "probe") |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + network := "" |
| + for _, arg := range args { |
| + if strings.HasPrefix(arg, "--network=") { |
| + network += arg |
| + } |
| + } |
| + if network != "--network=none" { |
| + t.Fatalf("tenant metadata path not isolated: %s: %v", path, args) |
| + } |
| + continue |
| + } |
| var deny string |
| for _, line := range strings.Split(text, "\n") { |
| if strings.HasPrefix(line, "IPAddressDeny=") { |
diff --git a/internal/instancectl/claimunit_test.go b/internal/instancectl/claimunit_test.go| index 981fbce15..cde6d17d3 100644 |
| --- a/internal/instancectl/claimunit_test.go |
| +++ b/internal/instancectl/claimunit_test.go |
| @@ -47,12 +47,28 @@ func (u *unitCtl) run(ctx context.Context, args ...string) (string, error) { |
| case "stop": |
| if !u.stopLeavesActive { |
| u.state = "inactive" |
| + u.pid = 0 |
| u.setPopulated(false) |
| } |
| case "show": |
| + if strings.HasPrefix(args[len(args)-1], UnitPrefixGVisor) { |
| + return systemd257GVisorAbsent, nil |
| + } |
| var out []string |
| for _, p := range strings.Split(args[2], ",") { |
| switch p { |
| + case "LoadState": |
| + out = append(out, "LoadState=loaded") |
| + case "SubState": |
| + state := "running" |
| + if u.state == "inactive" { |
| + state = "dead" |
| + } |
| + out = append(out, "SubState="+state) |
| + case "ControlPID": |
| + out = append(out, "ControlPID=0") |
| + case "Job": |
| + out = append(out, "Job=") |
| case "ActiveState": |
| out = append(out, "ActiveState="+u.state) |
| case "InvocationID": |
diff --git a/internal/instancectl/demo_build.go b/internal/instancectl/demo_build.go| index 4d64d57fd..18f385aad 100644 |
| --- a/internal/instancectl/demo_build.go |
| +++ b/internal/instancectl/demo_build.go |
| @@ -175,6 +175,9 @@ func (s *Server) handleDemoBuild(w http.ResponseWriter, r *http.Request) { |
| } |
| func (s *Server) initializeDemoBuilder(ctx context.Context) error { |
| + if _, err := s.unitFamily(s.effectiveSandbox(), roleBuild, nil); err != nil { |
| + return err |
| + } |
| if s.DemoBuilder == nil { |
| return demobuild.ErrBuild |
| } |
diff --git a/internal/instancectl/demo_claim_test.go b/internal/instancectl/demo_claim_test.go| index 9f089af3c..9088ea110 100644 |
| --- a/internal/instancectl/demo_claim_test.go |
| +++ b/internal/instancectl/demo_claim_test.go |
| @@ -138,7 +138,7 @@ func TestDemoClaimFreezeRecovery(t *testing.T) { |
| } |
| } |
| if fault == "allGenerations" || fault == "restartBeforeAck" { |
| - for _, unit := range []string{UnitName(RoleRun, d.Host), GVisorUnitName(d.Host), GenUnitName(d.Host, 6), GenUnitName(d.Host, 7), GenUnitName(d.Host, 8), SliceName(d.Host)} { |
| + for _, unit := range []string{UnitName(RoleRun, d.Host), GenUnitName(d.Host, 6), GenUnitName(d.Host, 7), GenUnitName(d.Host, 8), SliceName(d.Host)} { |
| count := 0 |
| for _, got := range stopped { |
| if got == unit { |
diff --git a/internal/instancectl/gen.go b/internal/instancectl/gen.go| index 6459af373..29e683ffa 100644 |
| --- a/internal/instancectl/gen.go |
| +++ b/internal/instancectl/gen.go |
| @@ -139,10 +139,61 @@ func (s *Server) ensureGenExe(host string, n uint64) error { |
| // removal only when it removed something (fix K1), and both are |
| // best-effort: a leftover is a few bytes in /run, never a running unit. |
| -// removeGenFiles removes a BINARY generation unit's files, by the unit's |
| -// name as systemd reports it (the rule above). The sweep logs its error, |
| -// so a leftover it cannot remove says why (Task 15). |
| -func (s *Server) removeGenFiles(unit string) (removed bool, err error) { |
| +type gvisorRemoval uint8 |
| + |
| +const ( |
| + gvisorRemoveDropIn gvisorRemoval = iota + 1 |
| + gvisorRemoveBundle |
| + gvisorRemoveFixture |
| + gvisorRemoveOutput |
| +) |
| + |
| +// removeGenFiles owns binary generation files and the explicitly selected |
| +// gVisor files. Callers retain their existing stop proof and start fence. |
| +func (s *Server) removeGenFiles(unit string, sandbox ...gvisorRemoval) (removed bool, err error) { |
| + if len(sandbox) != 0 { |
| + if len(sandbox) != 1 { |
| + return false, execsandbox.ErrRole |
| + } |
| + id := "probe" |
| + if unit != gvisorProbeUnit { |
| + role, esc, ok := ParseUnitName(unit) |
| + iid, decoded := Unescape(esc) |
| + if !ok || role != RoleGVisorRun || !decoded || !validInstanceIDPart(iid) || !execsandbox.ValidID("run-"+iid) { |
| + return false, execsandbox.ErrRole |
| + } |
| + id = "run-" + iid |
| + } |
| + switch sandbox[0] { |
| + case gvisorRemoveDropIn: |
| + if s.DropInDir == "" { |
| + return false, nil |
| + } |
| + return removeEntry(filepath.Join(s.DropInDir, unit+".d", gvisorDropInName)) |
| + case gvisorRemoveBundle: |
| + remove := s.removeSandbox |
| + if remove == nil { |
| + remove = execsandbox.RemoveRunFiles |
| + } |
| + return false, remove(id) |
| + case gvisorRemoveFixture: |
| + if unit != gvisorProbeUnit { |
| + return false, execsandbox.ErrRole |
| + } |
| + _, _, fixture, err := s.gvisorProbeOperations().paths(s.gvisorProbeNonce) |
| + if err != nil { |
| + return false, err |
| + } |
| + return removeEntry(fixture) |
| + case gvisorRemoveOutput: |
| + if unit != gvisorProbeUnit { |
| + return false, execsandbox.ErrRole |
| + } |
| + return removeEntry(s.gvisorProbeOperations().output) |
| + default: |
| + return false, execsandbox.ErrRole |
| + } |
| + } |
| esc, n, ok := ParseGenUnitName(unit) |
| if !ok { |
| if _, _, rootfs := ParseRootfsGenUnitName(unit); rootfs { |
diff --git a/internal/instancectl/gvisor_cleanup_test.go b/internal/instancectl/gvisor_cleanup_test.go| index 0c1583e5e..617c84074 100644 |
| --- a/internal/instancectl/gvisor_cleanup_test.go |
| +++ b/internal/instancectl/gvisor_cleanup_test.go |
| @@ -7,6 +7,8 @@ import ( |
| "path/filepath" |
| "strings" |
| "testing" |
| + |
| + "github.com/carlosframework/platform/internal/execsandbox" |
| ) |
| // Read-only capture on docs-t1, systemd 257.13-1~deb13u1, 2026-11-09: |
| @@ -34,7 +36,7 @@ func TestGVisorCleanupCommandless257(t *testing.T) { |
| for _, load := range []string{"not-found", "bad-setting", "loaded"} { |
| for _, kind := range []string{"probe", "run"} { |
| t.Run(kind+"/"+load, func(t *testing.T) { |
| - s := &Server{CgroupRoot: t.TempDir()} |
| + s := &Server{CgroupRoot: t.TempDir(), SandboxEffective: execsandbox.EffectiveGVisor} |
| removed := false |
| s.removeSandbox = func(string) error { removed = true; return nil } |
| s.Systemctl = func(_ context.Context, args ...string) (string, error) { |
diff --git a/internal/instancectl/gvisorprobe.go b/internal/instancectl/gvisorprobe.go| index c44d36208..3d5b9342a 100644 |
| --- a/internal/instancectl/gvisorprobe.go |
| +++ b/internal/instancectl/gvisorprobe.go |
| @@ -109,11 +109,7 @@ func (s *Server) finishGVisorProbe(ctx context.Context) error { |
| return err |
| } |
| - remove := s.removeSandbox |
| - if remove == nil { |
| - remove = execsandbox.RemoveRunFiles |
| - } |
| - if err := remove("probe"); err != nil { |
| + if _, err := s.removeGenFiles(gvisorProbeUnit, gvisorRemoveBundle); err != nil { |
| return err |
| } |
| return s.removeGVisorDropIn(ctx, gvisorProbeUnit) |
| @@ -123,12 +119,12 @@ func (s *Server) removeGVisorDropIn(ctx context.Context, unit string) error { |
| return nil |
| } |
| - err := os.Remove(filepath.Join(s.DropInDir, unit+".d", gvisorDropInName)) |
| - if err != nil && !errors.Is(err, os.ErrNotExist) { |
| + removed, err := s.removeGenFiles(unit, gvisorRemoveDropIn) |
| + if err != nil { |
| return err |
| } |
| s.mu.Lock() |
| - if err == nil { |
| + if removed { |
| s.gvisorRemovals++ |
| } |
| through := s.gvisorRemovals |
| @@ -212,16 +208,16 @@ func (s *Server) runGVisorProbe(ctx context.Context) (report ProbeReport) { |
| return fail("host-fixture", err) |
| } |
| if err = f.Close(); err != nil { |
| - os.Remove(fixture) |
| + s.removeGenFiles(gvisorProbeUnit, gvisorRemoveFixture) |
| return fail("host-fixture", err) |
| } |
| - defer os.Remove(fixture) |
| + defer s.removeGenFiles(gvisorProbeUnit, gvisorRemoveFixture) |
| listener, err := net.Listen("unix", abstract) |
| if err != nil { |
| return fail("host-abstract", err) |
| } |
| defer listener.Close() |
| - if err = os.Remove(ops.output); err != nil && !errors.Is(err, os.ErrNotExist) { |
| + if _, err = s.removeGenFiles(gvisorProbeUnit, gvisorRemoveOutput); err != nil { |
| return fail("probe-output", err) |
| } |
| // The nonce makes the socket path new. Existing state is a refusal. |
diff --git a/internal/instancectl/gvisorprobe_flow_linux_test.go b/internal/instancectl/gvisorprobe_flow_linux_test.go| index 7f2ce509a..4c8e6ecc5 100644 |
| --- a/internal/instancectl/gvisorprobe_flow_linux_test.go |
| +++ b/internal/instancectl/gvisorprobe_flow_linux_test.go |
| @@ -82,7 +82,9 @@ func newProbeFlow(t *testing.T) *probeFlow { |
| } |
| f.mu.Lock() |
| f.nonce = nonce |
| - f.nonces = append(f.nonces, nonce) |
| + if len(f.nonces) == 0 || f.nonces[len(f.nonces)-1] != nonce { |
| + f.nonces = append(f.nonces, nonce) |
| + } |
| f.mu.Unlock() |
| f.event("nonce") |
| if f.fault == "paths" { |
diff --git a/internal/instancectl/gvisorstart_test.go b/internal/instancectl/gvisorstart_test.go| index ab4738d5a..ed8606bdc 100644 |
| --- a/internal/instancectl/gvisorstart_test.go |
| +++ b/internal/instancectl/gvisorstart_test.go |
| @@ -211,3 +211,34 @@ func TestGVisorDispatchReloadDebt(t *testing.T) { |
| t.Fatal(err, attempts) |
| } |
| } |
| + |
| +func TestGVisorRemovalUsesExistingOwner(t *testing.T) { |
| + s := &Server{DropInDir: t.TempDir()} |
| + unit := GVisorUnitName("demo.example") |
| + sibling := GVisorUnitName("other.example") |
| + for _, name := range []string{unit, sibling} { |
| + dir := filepath.Join(s.DropInDir, name+".d") |
| + if err := os.Mkdir(dir, 0755); err != nil { |
| + t.Fatal(err) |
| + } |
| + if err := os.WriteFile(filepath.Join(dir, gvisorDropInName), []byte("keep"), 0644); err != nil { |
| + t.Fatal(err) |
| + } |
| + } |
| + for _, invalid := range []string{UnitName(RoleRun, "demo.example"), RootfsUnitName(RoleRun, "demo.example"), "../escape", ""} { |
| + for _, kind := range []gvisorRemoval{gvisorRemoveDropIn, gvisorRemoveBundle, gvisorRemoveFixture, gvisorRemoveOutput} { |
| + if _, err := s.removeGenFiles(invalid, kind); err == nil { |
| + t.Fatalf("accepted %q kind %d", invalid, kind) |
| + } |
| + } |
| + } |
| + if removed, err := s.removeGenFiles(unit, gvisorRemoveDropIn); !removed || err != nil { |
| + t.Fatal(removed, err) |
| + } |
| + if _, err := os.Stat(filepath.Join(s.DropInDir, sibling+".d", gvisorDropInName)); err != nil { |
| + t.Fatal("removed sibling", err) |
| + } |
| + if removed, err := s.removeGenFiles(unit, gvisorRemoveDropIn); removed || err != nil { |
| + t.Fatal(removed, err) |
| + } |
| +} |
diff --git a/internal/instancectl/rootfs_removal_guard_test.go b/internal/instancectl/rootfs_removal_guard_test.go| index ff9289f29..2a67af00b 100644 |
| --- a/internal/instancectl/rootfs_removal_guard_test.go |
| +++ b/internal/instancectl/rootfs_removal_guard_test.go |
| @@ -99,8 +99,6 @@ var ( |
| "writeFileExcl": true, "BuildProbeImage": true, "bindControlSocket": true, |
| "prepareExecGate": true, "clearLaunch": true, |
| "persistDueLocked": true, |
| - // gVisor owns only its fenced drop-in and serialized nonce/output fixtures. |
| - "removeGVisorDropIn": true, "runGVisorProbe": true, |
| } |
| // rawRemovals: import path -> the functions of that package that remove. |
| rawRemovals = map[string]map[string]bool{ |
diff --git a/internal/instancectl/sandboxstop.go b/internal/instancectl/sandboxstop.go| index ded38438d..4c6767457 100644 |
| --- a/internal/instancectl/sandboxstop.go |
| +++ b/internal/instancectl/sandboxstop.go |
| @@ -43,12 +43,7 @@ func (s *Server) stopRunFamiliesID(ctx context.Context, iid string) error { |
| if err := errors.Join(nativeErr, siblingErr); err != nil { |
| return err |
| } |
| - remove := s.removeSandbox |
| - if remove == nil { |
| - remove = execsandbox.RemoveRunFiles |
| - } |
| - |
| - if err := remove("run-" + iid); err != nil { |
| + if _, err := s.removeGenFiles(sibling, gvisorRemoveBundle); err != nil { |
| return err |
| } |
| return s.removeGVisorDropIn(ctx, sibling) |
| @@ -60,6 +55,12 @@ func runInactive(m map[string]string) bool { |
| m["MainPID"] == "0" && m["ControlPID"] == "0" && (m["Job"] == "" || m["Job"] == "0") |
| } |
| func (s *Server) stopAndProveRun(ctx context.Context, host, unit string) error { |
| + if strings.HasPrefix(unit, UnitPrefixRun) && s.effectiveSandbox() == execsandbox.EffectiveSystemd { |
| + if _, err := s.Systemctl(ctx, "stop", unit); err != nil { |
| + return fmt.Errorf("%s: %w", unit, err) |
| + } |
| + return s.proveRunGone(ctx, host, unit) |
| + } |
| out, err := s.Systemctl(ctx, "show", "-p", runProofProperties, unit) |
| if err != nil { |
| return fmt.Errorf("%s: %w", unit, err) |
diff --git a/internal/instancectl/sandboxstop_test.go b/internal/instancectl/sandboxstop_test.go| index 2281ae183..a27ba5ed4 100644 |
| --- a/internal/instancectl/sandboxstop_test.go |
| +++ b/internal/instancectl/sandboxstop_test.go |
| @@ -298,6 +298,7 @@ func TestGVisorStopSystemd257Shapes(t *testing.T) { |
| func TestGVisorStopBothNotFound(t *testing.T) { |
| s, calls := sandboxStopServer(t) |
| + s.SandboxEffective = execsandbox.EffectiveGVisor |
| base := s.Systemctl |
| s.Systemctl = func(ctx context.Context, args ...string) (string, error) { |
| out, err := base(ctx, args...) |
| @@ -349,3 +350,31 @@ func sandboxStopActiveUntilStopped(s *Server) { |
| return out, err |
| } |
| } |
| + |
| +func TestGVisorSweepNativeTargetKeepsFence(t *testing.T) { |
| + s, calls := sandboxStopServer(t) |
| + s.SandboxEffective = execsandbox.EffectiveGVisor |
| + s.cgroupWaitBudget = 20 * time.Millisecond |
| + sandboxStopActiveUntilStopped(s) |
| + base := s.Systemctl |
| + s.Systemctl = func(ctx context.Context, args ...string) (string, error) { |
| + switch args[0] { |
| + case "list-units": |
| + return UnitName(RoleRun, "demo.example") + " loaded active running\n", nil |
| + case "list-jobs": |
| + return "", nil |
| + } |
| + return base(ctx, args...) |
| + } |
| + w := httptest.NewRecorder() |
| + s.handleSweep(w, httptest.NewRequest(http.MethodPost, "/sweep", nil)) |
| + if w.Code != http.StatusOK { |
| + t.Fatal(w.Code, w.Body) |
| + } |
| + joined := strings.Join(*calls, "\n") |
| + for _, want := range []string{"stop " + UnitName(RoleRun, "demo.example"), "stop " + GVisorUnitName("demo.example"), "remove run-demo.example"} { |
| + if !strings.Contains(joined, want) { |
| + t.Fatalf("missing %s:\n%s", want, joined) |
| + } |
| + } |
| +} |
diff --git a/internal/instancectl/server.go b/internal/instancectl/server.go| index f4f293226..4aaa8486f 100644 |
| --- a/internal/instancectl/server.go |
| +++ b/internal/instancectl/server.go |
| @@ -1291,7 +1291,7 @@ func (s *Server) handleSweep(w http.ResponseWriter, r *http.Request) { |
| for unit := range targets { |
| wctx, cancel := context.WithTimeout(ctx, s.waitBudget()) |
| role, esc, _ := ParseUnitName(unit) |
| - if role == RoleGVisorRun || strings.HasPrefix(unit, UnitPrefixRun) { |
| + if role == RoleGVisorRun || strings.HasPrefix(unit, UnitPrefixRun) && s.effectiveSandbox() == execsandbox.EffectiveGVisor { |
| err := s.sweepOriginalRun(wctx, esc) |
| cancel() |
| if err != nil { |
diff --git a/internal/instanceexec/probe_gvisor.go b/internal/instanceexec/probe_gvisor.go| index 02146d7fa..0f283bf46 100644 |
| --- a/internal/instanceexec/probe_gvisor.go |
| +++ b/internal/instanceexec/probe_gvisor.go |
| @@ -1,6 +1,10 @@ |
| package instanceexec |
| -import "github.com/carlosframework/platform/internal/instancectl" |
| +import ( |
| + "github.com/carlosframework/platform/internal/instancectl" |
| + "strconv" |
| + "strings" |
| +) |
| // These signatures were captured from the locked release-20261102.0 spike. |
| const gvisorRelease = "4.19.0-gvisor" |
| @@ -30,3 +34,24 @@ func checkGVisorFacts(f gvisorProbeFacts) instancectl.ProbeReport { |
| } |
| return v.report() |
| } |
| + |
| +func gvisorLoopbackOnly(raw []byte) bool { |
| + lines := strings.Split(strings.TrimSpace(string(raw)), "\n") |
| + if len(lines) != 3 || !strings.Contains(lines[0], "Receive") || !strings.Contains(lines[0], "Transmit") || !strings.Contains(lines[1], "bytes") { |
| + return false |
| + } |
| + name, counters, ok := strings.Cut(lines[2], ":") |
| + if !ok || strings.TrimSpace(name) != "lo" { |
| + return false |
| + } |
| + fields := strings.Fields(counters) |
| + if len(fields) != 16 { |
| + return false |
| + } |
| + for _, field := range fields { |
| + if _, err := strconv.ParseUint(field, 10, 64); err != nil { |
| + return false |
| + } |
| + } |
| + return true |
| +} |
diff --git a/internal/instanceexec/probe_gvisor_linux.go b/internal/instanceexec/probe_gvisor_linux.go| index a09237a41..7aed23e79 100644 |
| --- a/internal/instanceexec/probe_gvisor_linux.go |
| +++ b/internal/instanceexec/probe_gvisor_linux.go |
| @@ -54,9 +54,9 @@ func runGVisorProbeChecks() instancectl.ProbeReport { |
| f.Err = errors.Join(f.Err, err) |
| f.Version = strings.TrimSpace(string(raw)) |
| f.UringENOSYS = errors.Is(realIOUringSetup(), unix.ENOSYS) |
| - interfaces, err := net.Interfaces() |
| + raw, err = os.ReadFile("/proc/net/dev") |
| f.Err = errors.Join(f.Err, err) |
| - f.LoopbackOnly = err == nil && len(interfaces) == 1 && interfaces[0].Name == "lo" && interfaces[0].Flags&net.FlagLoopback != 0 |
| + f.LoopbackOnly = err == nil && gvisorLoopbackOnly(raw) |
| connect := func(network, address string) error { |
| c, err := net.DialTimeout(network, address, time.Second) |
| if err == nil { |
diff --git a/internal/instanceexec/probe_gvisor_test.go b/internal/instanceexec/probe_gvisor_test.go| index b953d4889..d614bcbe5 100644 |
| --- a/internal/instanceexec/probe_gvisor_test.go |
| +++ b/internal/instanceexec/probe_gvisor_test.go |
| @@ -42,3 +42,26 @@ func TestGVisorProbeChecks(t *testing.T) { |
| }) |
| } |
| } |
| + |
| +func TestGVisorProbeProcInterfaces(t *testing.T) { |
| + const header = "Inter-| Receive | Transmit\n face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed\n" |
| + const lo = " lo: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n" |
| + for _, tc := range []struct { |
| + name, body string |
| + want bool |
| + }{ |
| + {"loopback", header + lo, true}, |
| + {"empty", "", false}, |
| + {"headers only", header, false}, |
| + {"other interface", header + lo + "eth0: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n", false}, |
| + {"duplicate", header + lo + lo, false}, |
| + {"short row", header + "lo: 0\n", false}, |
| + {"missing colon", header + "lo 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n", false}, |
| + } { |
| + t.Run(tc.name, func(t *testing.T) { |
| + if got := gvisorLoopbackOnly([]byte(tc.body)); got != tc.want { |
| + t.Fatalf("loopback=%v want %v", got, tc.want) |
| + } |
| + }) |
| + } |
| +} |
diff --git a/internal/provision/gvisor_demos_census_test.go b/internal/provision/gvisor_demos_census_test.go| new file mode 100644 |
| index 000000000..5dcd1cdb1 |
| --- /dev/null |
| +++ b/internal/provision/gvisor_demos_census_test.go |
| @@ -0,0 +1,36 @@ |
| +package provision |
| + |
| +// The CI fix report lists the source inspection for each site. These entries |
| +// await the branch census review; local paths remain key-site conservatively. |
| +func gvisorDemosWriteCensusInventory() []censusEntry { |
| + entries := append([]censusEntry(nil), instanceRestore658WriteCensusInventory()...) |
| + for i, e := range entries { |
| + if e.File == "internal/instanceexec/exit.go" && e.Unit == "writeExitRecord" { |
| + entries = append(entries[:i], entries[i+1:]...) |
| + break |
| + } |
| + } |
| + reviewed := []censusEntry{ |
| + {"internal/host/bootstrap.go", "bootstrapWithGroup", "key-site", "lit:instances", "2710b4ae0c444e7742e91dfffc6c136a698927eb62c42eae7cfc4eb1b06d2453"}, |
| + {"internal/instanceexec/exit.go", "parseExitArgs", "key-site", "lit:instances", "f0165516b464c4a94341589cda8ca51c089fc82e566476d807447b9532a951d2"}, |
| + {"main.go", "main", "key-site", "lit:instances,lit:sidecars", "b348f58a98570a45f192028e2b8907aa4df1c0d2ff0e506a8e23f7765831faaa"}, |
| + {"internal/console/runscmirror.go", "Server.mirrorRunscArtifact", "nonrecord", "sel:Put", "93cf24ac005a1fab498cbaff369f4e6cf7ac0fcf3ffc5d84b7b7d0e1a93a0ee2"}, |
| + {"internal/instancectl/gvisorprobe.go", "GVisorProbePaths", "key-site", "lit:instances", "17fb6b8b053d4c443e1c64a6b0dfb08a6464a04c3e4b083fdb9fedc969d3c7b3"}, |
| + {"internal/instancectl/ocibundle.go", "gvisorBundlePlan", "key-site", "lit:instances", "064e8089b8b53b09eed7ebb8d2c050084a7beb091043a8c5667f3266f3cb0977"}, |
| + {"internal/instanceexec/exit.go", "writeExitRecordAs", "key-site", "lit:instances", "6bc0d469d567016be8dce30ebb60fc757b13815a2a533c63fe557e8d086bc8c1"}, |
| + {"internal/instanceexec/probe_gvisor_linux.go", "runGVisorProbeChecks", "key-site", "lit:instances", "9070fe8dfa3997812f4d2e370314fe667d54560a189a466caad1ae0a2d88af42"}, |
| + } |
| + for _, r := range reviewed { |
| + replaced := false |
| + for i, e := range entries { |
| + if e.File == r.File && e.Unit == r.Unit { |
| + entries[i], replaced = r, true |
| + break |
| + } |
| + } |
| + if !replaced { |
| + entries = append(entries, r) |
| + } |
| + } |
| + return entries |
| +} |
diff --git a/internal/provision/plan9_b8_census_test.go b/internal/provision/plan9_b8_census_test.go| index 5782b4e7c..ee0d8337a 100644 |
| --- a/internal/provision/plan9_b8_census_test.go |
| +++ b/internal/provision/plan9_b8_census_test.go |
| @@ -366,7 +366,7 @@ func TestPlan9B8RecordWriteCensus(t *testing.T) { |
| if len(got) < 100 { |
| t.Fatalf("census found only %d units under %s; the walk is broken", len(got), root) |
| } |
| - inventory := instanceRestore658WriteCensusInventory() |
| + inventory := gvisorDemosWriteCensusInventory() |
| problems := append(censusDiff(inventory, got), censusPolicy(inventory)...) |
| if len(problems) > 0 { |
| t.Fatalf("record-write census rejected %d site(s); update the explicit inventory only after reviewing the source:\n %s", len(problems), strings.Join(problems, "\n ")) |
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv| index e6fde6f9a..af9878dbe 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 3639a17ab5a6d2f6097776026af7792136fb048676d11117180d063cf3738c0e |
| +plan14-root-reads-gvisor-demos.tsv 6f8b2354ccd73a6a0e48f5c675fdb186e7def8c7dd9863c8e898c351201da597 |
diff --git a/internal/provision/testdata/plan14-root-reads-gvisor-demos.tsv b/internal/provision/testdata/plan14-root-reads-gvisor-demos.tsv| index 9d28f42c6..9a12a0260 100644 |
| --- a/internal/provision/testdata/plan14-root-reads-gvisor-demos.tsv |
| +++ b/internal/provision/testdata/plan14-root-reads-gvisor-demos.tsv |
| @@ -33,7 +33,7 @@ |
| @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 |
| @legacy c413c77d1a2bbfdf5bb2e3c653409dd489fd3992621f2ed7d30b5f9a5be34e21 internal/activator/sandbox.go UnitBackend.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:Runtime@298 5a09911e17377e70105f7e8c347b5354da6e82233cd8b4a189570931f3dde17a |
| @legacy 686a7947ac6aabda8465e5c8fc533651f00b71c26b6a920da0f099ea0b7d756e internal/demobuild/gvisor.go ownBuildDirectories legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Task 7: walk only root-selected mounted cache view before compiler launch, reject symlinks, open directory descriptors beneath root-owned work and chown/chmod directories only. Never change cache files or lower/backing trees directly. Actual overlay upper is a view child inside root-owned cache-upper. file:WalkDir@493 4710c8a9666236838e43235e2b01a6a1f8b1f7040899ce735b94776d9d51e21a |
| -@legacy 456ce0d5ff6dec6c7d779b6dc6cddd6eece5c2ebcc2e892b4805ca0b53c973fd internal/execsandbox/cleanup_linux.go bundleStore.removeDirectory legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Task 5: no-follow checked root-owned parent, descriptor-scoped OpenRoot removal of only BundleDir(id) or RootfsDir(id). Compare parent identity after OpenRoot; reject a symlink leaf. No launch/tenant data read. Caller holds original-start fence and has proven both siblings stopped; partial skeletons are removable. file:Lstat@699,file:OpenRoot@381,file:Stat@482,file:Stat@545 ef37850640814033411c8a6c245567a03d9b1560f526f261a6abfc50122a7c22 |
| +@legacy a7d2ec1aa6f8ef0e3cc179144256cd547766634c22e4b7c78af5b230193ddb3d internal/execsandbox/cleanup_linux.go bundleStore.removeDirectory legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Task 5: no-follow checked root-owned parent, descriptor-scoped OpenRoot removal of only BundleDir(id) or RootfsDir(id). Compare parent identity after OpenRoot; reject a symlink leaf. No launch/tenant data read. Caller holds original-start fence and has proven both siblings stopped; partial skeletons are removable. CI fix: Lstat the derived bundle/skeleton leaf first; absent means there is nothing to remove, including a systemd-only box without gVisor state. Existing entries still require the unchanged no-follow root-owned parent, same-inode OpenRoot, directory leaf and descriptor-relative removal. No deletion through an untrusted parent. file:Lstat@72,file:Lstat@815,file:OpenRoot@497,file:Stat@598,file:Stat@661 13cb817b58919b85bc91fa295f4d2e5540b5f6e57a8c36fa131fca855e89aa0b |
| @legacy 4fb49c7ba8d52c022c0748d216f18a99d973c0a5a858e790446558f2eff9500c internal/execsandbox/file_linux.go checkRunscDir legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Open and fstat root-owned no-follow runtime directories; require 0755. Paths selected by compiled pin or root-owned installation temp. file:Stat@137 39283ba464884471a3085ea8bbb9260eb7b82c7300444aff12680cbee6018a05 |
| @legacy 3a6e0c0d7ef5c570e3b1d1d803ac705cd45c84fb9b50868a9582446548a9e956 internal/execsandbox/file_linux.go openCheckedDir legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Walk absolute clean path from root with O_DIRECTORY/O_NOFOLLOW; fstat each ancestor for root ownership and no non-root write bits. No agent-selected path in production. file:Open@197,file:Openat@458,file:Stat@687 8b45bad16e2732bd7fdfc69a8beb7f4961936cedd7f36ad4d957b02df3e2dddf |
| @legacy 518c5527298ee264e142c0d5e9ed806175417c5f87108b6d73b48f5f120899a7 internal/execsandbox/file_linux.go openCheckedFile legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Open leaf relative to checked root-owned parent with O_NOFOLLOW/O_NONBLOCK; fstat regular/single-link/root-owned/mode/size metadata before reading. No symlink traversal. file:Openat@297,file:Stat@524 fedd812d2fa99959f5b58a51ab767935396e922009eae3b5d1f93afd1f872be9 |
| @@ -69,7 +69,7 @@ |
| @legacy 732a77a4fb010d06211707a09b74525afb694cd4b7d03fecda1fc24eddf98e09 internal/instancectl/gvisordrain.go Server.sweepGVisorBundles legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=List the fixed root-owned OCI directory, accept only validated run IDs, skip live/in-flight work and acquire the original instance-ID fence before both-family stop/delete proof and removal. Never opens /run/carlos-runsc. file:ReadDir@130 0572d9325bd87b5326c195ad30874350114ad25f72d99648731ffe45ea2924a7 |
| @legacy 289e4e86ceacf4c869115693ea028f091344b330be5a02aecb4a8aac94fc3c08 internal/instancectl/gvisordrain.go sandboxGroupEmpty legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Read the caller-derived kernel cgroup.events path and require a single populated 0 field; malformed/present nonzero state refuses proof. file:ReadFile@57 4776168285ee07b83941a24023d959616dbe5af6f76491c094f1f12024384ea7 |
| @legacy 6d40c9bc5a9d95d37fbcde6ad7537905ebce03da2daf9a56c089c36f022cff91 internal/instancectl/gvisorprobe.go Server.gvisorProbeKernelLimits legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Read only the fixed probe unit cgroup limit files, requiring the pinned physical memory/tasks and logical CPU/IO contract. Task 9: Round only expected kernel memory.high for fixed probe cgroup reads; exact memory.max retained. No new read. file:ReadFile@408 b9e59399db4166e2c76b29743f1debf4e5eee4e248f08783a9cc38b5195787bd |
| -@legacy e29c1db7f86648a6a98ddc8f4f1e0025d6a7ec8fa4f64855c9efec0c402054b2 internal/instancectl/gvisorprobe.go Server.runGVisorProbe legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Task 6 fix round 1, applying the controller rulings: serialized probe construction uses root random nonce/fixed paths, root-only O_EXCL fixture, abstract listener, typed verified bundle/unit and context recheck. Read bounded root-owned nonce-bound output and the guest socket handshake; inspect kernel/proc runtime and limits while guest waits. Termination uses inactive/not-loaded state, no job/PIDs and empty cgroup, never per-command stop-post records. Keep the prior pass during the run and publish report plus runtime identity once, after cleanup; any failed attempt invalidates it and records the bounded diagnostic. A private package-test-only operations struct substitutes paths, executable preparation and output opening; production keeps GVisorProbePaths, fixed output/procfs, ensureExe and execsandbox.OpenRootFile. No new tenant-controlled path, launch/source/database read, or runtime-state read. file:Lstat@2452,file:OpenFile@1887,file:Read@1577,file:ReadAll@4796 893229809de0f7213f0d2931094c653d85f3dc4787c237e647a8357c1c70363a |
| +@legacy 805ba3299be5e00aedcc1bdad6cb8cc70c35355c480019ca24f8f13400465dcf internal/instancectl/gvisorprobe.go Server.runGVisorProbe legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Task 6 fix round 1, applying the controller rulings: serialized probe construction uses root random nonce/fixed paths, root-only O_EXCL fixture, abstract listener, typed verified bundle/unit and context recheck. Read bounded root-owned nonce-bound output and the guest socket handshake; inspect kernel/proc runtime and limits while guest waits. Termination uses inactive/not-loaded state, no job/PIDs and empty cgroup, never per-command stop-post records. Keep the prior pass during the run and publish report plus runtime identity once, after cleanup; any failed attempt invalidates it and records the bounded diagnostic. A private package-test-only operations struct substitutes paths, executable preparation and output opening; production keeps GVisorProbePaths, fixed output/procfs, ensureExe and execsandbox.OpenRootFile. No new tenant-controlled path, launch/source/database read, or runtime-state read. CI fix: route serialized nonce fixture/output cleanup through existing pinned removeGenFiles owner with closed gVisor selectors and fixed probe paths. Existing reads and stop proof unchanged; no new raw removal owner. file:Lstat@2524,file:OpenFile@1887,file:Read@1577,file:ReadAll@4868 56e6b995e3346e3bc04cf751dc9196f8ddb8e46c1f8885fbca5130ff98720fbd |
| @legacy 5453c559c4886ff67c038178332bf104aad65ec1475fc16c213c01681d76e29f internal/instancectl/gvisorprobe_linux.go gvisorProbeProcesses legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Read kernel cgroup.procs under the fixed probe subtree and /proc/<numeric PID> exe, cgroup, cmdline, task directory and children. Require pinned-set executable paths, in-subtree membership, live gofer/Sentry and no descendant outside the unit. PIDs come from kernel/systemd evidence, never a request. file:ReadDir@1895,file:ReadFile@1085,file:ReadFile@1381,file:ReadFile@2022,file:ReadFile@468,file:Readlink@925,file:WalkDir@279 f83c97c76a1584b3ae4ac34d4098902c7b805a970ce6dc5c8378e787c694ab0a |
| @legacy a6039549f1f55f12e49a2b68c709e8c90e89d20af049619fbba956484d9dd153 internal/instancectl/gvisorunit.go Server.finishPreviousGVisorRun legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Task 6 fix round 1: Lstat only the root-derived retained run drop-in; when present, stop and require terminal unit/no job/no PIDs/empty cgroup through the existing proof. No ExecStopPost status dependency. Per the explicit ruling, stale runtime metadata is inert and the next ignored ExecStartPre runsc delete -force removes it. file:Lstat@161 28836624c17a0ef444382aae2c660b500697cac35d67a6b84921823e3569ab92 |
| @legacy 62ae6757c1358f227e5da14c6a018cc72dedc4d1ed4c16ba5af72feb84357f99 internal/instancectl/ocibundle.go Server.gvisorExecutable legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Resolve prepared root-owned app link through existing native live or validated staged target; production passes fixed checked root file/directory helpers. file:EvalSymlinks@217 c64f3dc10842930f1c594db2ece7f41ac8bdde0d5907e510a179aee5dc7f1a21 |
| @@ -82,7 +82,7 @@ |
| @legacy 5492a4dd126f921302135f7c7a0b7ae6f5b24518ce0f37b745f955d47312d5ea 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. file:ReadFile@853 867b1af5b3f9ded72bd023fd0d7d02a589a131db76046b76156e581738fc90b8 |
| @legacy cec824c9807e579085fc5e14741c1b3fd97bcf58210f8861cd4f9c282d39aa1e internal/instanceexec/probe_gvisor.go checkGVisorFacts legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Evaluate guest probe facts only. Census labels the boolean Openat2 field as a file read, but this pure evaluator performs no I/O or root action. file:Openat2@845 0fbb701794c0c747fb23628a1e3ed9f791d3024e2001df8040809b8f7544bae1 |
| @legacy 41d8f6f4a50ddf86247cc886cfee2c1dad66937a57f9af7b0be82a8fef3283b5 internal/instanceexec/probe_gvisor.go type gvisorProbeFacts legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Guest evidence fields only; Openat2 is a boolean fact, not a syscall or filesystem read. file:Openat2@325 5b30f52a1aca92bfa18331e3a88ac84fbaa4b15765197f822446c1aff7884046 |
| -@legacy ced2799330403a27ba85eb6c52d5ad242b3e124dd4f06c6c6d02de3be25b1f81 internal/instanceexec/probe_gvisor_linux.go runGVisorProbeChecks legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Unprivileged guest reads fixed /proc/self/status and /proc/version; checks root-supplied numeric identity, capabilities/NNP, pinned measured kernel signature, io_uring ENOSYS, loopback/public TCP refusal, absent nonce-derived host fixture and unreachable root abstract socket. Checks existing safe-open behavior at its own fixed data directory and serves a nonce socket in its own host-visible run mount until root acknowledges process/limit proof. No host root authority or tenant-selected path. data-literal@2263,file:Lstat@2161,file:Openat2@2230,file:ReadFile@1287,file:ReadFile@607 413c4f54d74b42a5242cf9b73781898d8f71213500a42f18d876975036fe10c1 |
| +@legacy 1f9c923ed04f164bbf66e677c957e3df583122c5ffdb081fe9c1bde32b8b6e29 internal/instanceexec/probe_gvisor_linux.go runGVisorProbeChecks legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Unprivileged guest reads fixed /proc/self/status and /proc/version; checks root-supplied numeric identity, capabilities/NNP, pinned measured kernel signature, io_uring ENOSYS, loopback/public TCP refusal, absent nonce-derived host fixture and unreachable root abstract socket. Checks existing safe-open behavior at its own fixed data directory and serves a nonce socket in its own host-visible run mount until root acknowledges process/limit proof. No host root authority or tenant-selected path. CI fix: replace net.Interfaces (AF_NETLINK) with guest-only fixed /proc/net/dev ReadFile; require exactly the lo interface and a complete counters row. Existing public TCP refusal and guest isolation assertions remain. No host-selected or tenant-selected read path. data-literal@2195,file:Lstat@2093,file:Openat2@2162,file:ReadFile@1287,file:ReadFile@1465,file:ReadFile@607 9070fe8dfa3997812f4d2e370314fe667d54560a189a466caad1ae0a2d88af42 |
| @legacy c77114e0b2ad3eb534e6cb7971c0eb6742fac4b7d67e4127593ac2a1f0017e81 internal/activator/backend_unit.go SplitBackend.Start legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-region-ha-g2-fixes;basis=Apply the pool refusal to HA or Provisioned rows before start dispatch, preserving explicit non-HA operator placement; added HA and Provisioned field reads, no new I/O.;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:Exec@107,registry:Backing@178,registry:HA@263,registry:Provisioned@272,whole:Route@164,whole:Route@307,whole:Route@404,whole:Route@419 26d8d253f3a2f5a11d7629950e915a34bf0979819ac9c4ca26c6f51af9fe6ed4 |
| @legacy 068313d34de6fc0d04a4c3c2ccc86c34ea25b396ae6bb18f86e1d7b7be8e9c85 internal/activator/backend_unit.go SplitBackend.StartGen legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-region-ha-g2-fixes;basis=Apply the pool refusal to HA or Provisioned rows before generation start dispatch, preserving explicit non-HA operator placement; added HA and Provisioned field reads, no new I/O.;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:Exec@130,registry:Backing@228,registry:HA@316,registry:Provisioned@325,whole:Route@187,whole:Route@360,whole:Route@465,whole:Route@513,whole:Route@557,whole:Route@572,whole:Route@691 5ca67e3b27355d099a26de81a167c0ac25e977cc7f16bf8c5507075b328b3692 |
| @legacy a5903d005b300f84ae54cd5635feb07e0b36aa1369087073d1c494b337f7b23d internal/activator/cmdunit.go cmdUnit.StopAndSettle legacy accepted-legacy accepted-legacy;rev3=census-ruling-carlos-run;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): asks instance control to stop the unit, then waits; the agent keeps the lease until this is proven; no root decision;rev3=census-ruling-rootfs-apps-2;basis=the stop goes through stopRole with the row instead of Control.Stop with its host, so one Host site goes; for a rootfs row that is the rootfs stop verb's request (StopRootfs) over the same control socket; the proof (stop, cgroup empty, streams drained) is unchanged; no file read added;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 8 (PF-7): stops and proves the unit own role (stopRole and waitRoleCgroupEmpty with u.role, cmd or tty), never a hard-coded cmd; a unit of no one-shot role is refused; after the proof it drains the two streams, or closes the session handoff and master; new sites are the refusal text (rt.Host) and the route;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@216,registry:Runtime@365,registry:Runtime@424,whole:Route@218,whole:Route@341,whole:Route@500,whole:Route@689,whole:Route@756 0125d714d97b0cb14e0edae9caf9e8e8ab33e7aca1344dc53fa088d2bd75d120 |
| @@ -161,7 +161,7 @@ internal/activator/backend_rootfs.go uncertainWorkerProc.Stop legacy accepted-le |
| 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 |
| internal/activator/sandbox.go UnitBackend.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:Runtime@298 5a09911e17377e70105f7e8c347b5354da6e82233cd8b4a189570931f3dde17a |
| internal/demobuild/gvisor.go ownBuildDirectories legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Task 7: walk only root-selected mounted cache view before compiler launch, reject symlinks, open directory descriptors beneath root-owned work and chown/chmod directories only. Never change cache files or lower/backing trees directly. Actual overlay upper is a view child inside root-owned cache-upper. file:WalkDir@493 4710c8a9666236838e43235e2b01a6a1f8b1f7040899ce735b94776d9d51e21a |
| -internal/execsandbox/cleanup_linux.go bundleStore.removeDirectory legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Task 5: no-follow checked root-owned parent, descriptor-scoped OpenRoot removal of only BundleDir(id) or RootfsDir(id). Compare parent identity after OpenRoot; reject a symlink leaf. No launch/tenant data read. Caller holds original-start fence and has proven both siblings stopped; partial skeletons are removable. file:Lstat@699,file:OpenRoot@381,file:Stat@482,file:Stat@545 ef37850640814033411c8a6c245567a03d9b1560f526f261a6abfc50122a7c22 |
| +internal/execsandbox/cleanup_linux.go bundleStore.removeDirectory legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Task 5: no-follow checked root-owned parent, descriptor-scoped OpenRoot removal of only BundleDir(id) or RootfsDir(id). Compare parent identity after OpenRoot; reject a symlink leaf. No launch/tenant data read. Caller holds original-start fence and has proven both siblings stopped; partial skeletons are removable. CI fix: Lstat the derived bundle/skeleton leaf first; absent means there is nothing to remove, including a systemd-only box without gVisor state. Existing entries still require the unchanged no-follow root-owned parent, same-inode OpenRoot, directory leaf and descriptor-relative removal. No deletion through an untrusted parent. file:Lstat@72,file:Lstat@815,file:OpenRoot@497,file:Stat@598,file:Stat@661 13cb817b58919b85bc91fa295f4d2e5540b5f6e57a8c36fa131fca855e89aa0b |
| internal/execsandbox/file_linux.go checkRunscDir legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Open and fstat root-owned no-follow runtime directories; require 0755. Paths selected by compiled pin or root-owned installation temp. file:Stat@137 39283ba464884471a3085ea8bbb9260eb7b82c7300444aff12680cbee6018a05 |
| internal/execsandbox/file_linux.go openCheckedDir legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Walk absolute clean path from root with O_DIRECTORY/O_NOFOLLOW; fstat each ancestor for root ownership and no non-root write bits. No agent-selected path in production. file:Open@197,file:Openat@458,file:Stat@687 8b45bad16e2732bd7fdfc69a8beb7f4961936cedd7f36ad4d957b02df3e2dddf |
| internal/execsandbox/file_linux.go openCheckedFile legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Open leaf relative to checked root-owned parent with O_NOFOLLOW/O_NONBLOCK; fstat regular/single-link/root-owned/mode/size metadata before reading. No symlink traversal. file:Openat@297,file:Stat@524 fedd812d2fa99959f5b58a51ab767935396e922009eae3b5d1f93afd1f872be9 |
| @@ -197,7 +197,7 @@ internal/instancectl/gvisordrain.go Server.sandboxUnitsFor legacy accepted-legac |
| internal/instancectl/gvisordrain.go Server.sweepGVisorBundles legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=List the fixed root-owned OCI directory, accept only validated run IDs, skip live/in-flight work and acquire the original instance-ID fence before both-family stop/delete proof and removal. Never opens /run/carlos-runsc. file:ReadDir@130 0572d9325bd87b5326c195ad30874350114ad25f72d99648731ffe45ea2924a7 |
| internal/instancectl/gvisordrain.go sandboxGroupEmpty legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Read the caller-derived kernel cgroup.events path and require a single populated 0 field; malformed/present nonzero state refuses proof. file:ReadFile@57 4776168285ee07b83941a24023d959616dbe5af6f76491c094f1f12024384ea7 |
| internal/instancectl/gvisorprobe.go Server.gvisorProbeKernelLimits legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Read only the fixed probe unit cgroup limit files, requiring the pinned physical memory/tasks and logical CPU/IO contract. Task 9: Round only expected kernel memory.high for fixed probe cgroup reads; exact memory.max retained. No new read. file:ReadFile@408 b9e59399db4166e2c76b29743f1debf4e5eee4e248f08783a9cc38b5195787bd |
| -internal/instancectl/gvisorprobe.go Server.runGVisorProbe legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Task 6 fix round 1, applying the controller rulings: serialized probe construction uses root random nonce/fixed paths, root-only O_EXCL fixture, abstract listener, typed verified bundle/unit and context recheck. Read bounded root-owned nonce-bound output and the guest socket handshake; inspect kernel/proc runtime and limits while guest waits. Termination uses inactive/not-loaded state, no job/PIDs and empty cgroup, never per-command stop-post records. Keep the prior pass during the run and publish report plus runtime identity once, after cleanup; any failed attempt invalidates it and records the bounded diagnostic. A private package-test-only operations struct substitutes paths, executable preparation and output opening; production keeps GVisorProbePaths, fixed output/procfs, ensureExe and execsandbox.OpenRootFile. No new tenant-controlled path, launch/source/database read, or runtime-state read. file:Lstat@2452,file:OpenFile@1887,file:Read@1577,file:ReadAll@4796 893229809de0f7213f0d2931094c653d85f3dc4787c237e647a8357c1c70363a |
| +internal/instancectl/gvisorprobe.go Server.runGVisorProbe legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Task 6 fix round 1, applying the controller rulings: serialized probe construction uses root random nonce/fixed paths, root-only O_EXCL fixture, abstract listener, typed verified bundle/unit and context recheck. Read bounded root-owned nonce-bound output and the guest socket handshake; inspect kernel/proc runtime and limits while guest waits. Termination uses inactive/not-loaded state, no job/PIDs and empty cgroup, never per-command stop-post records. Keep the prior pass during the run and publish report plus runtime identity once, after cleanup; any failed attempt invalidates it and records the bounded diagnostic. A private package-test-only operations struct substitutes paths, executable preparation and output opening; production keeps GVisorProbePaths, fixed output/procfs, ensureExe and execsandbox.OpenRootFile. No new tenant-controlled path, launch/source/database read, or runtime-state read. CI fix: route serialized nonce fixture/output cleanup through existing pinned removeGenFiles owner with closed gVisor selectors and fixed probe paths. Existing reads and stop proof unchanged; no new raw removal owner. file:Lstat@2524,file:OpenFile@1887,file:Read@1577,file:ReadAll@4868 56e6b995e3346e3bc04cf751dc9196f8ddb8e46c1f8885fbca5130ff98720fbd |
| internal/instancectl/gvisorprobe_linux.go gvisorProbeProcesses legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Read kernel cgroup.procs under the fixed probe subtree and /proc/<numeric PID> exe, cgroup, cmdline, task directory and children. Require pinned-set executable paths, in-subtree membership, live gofer/Sentry and no descendant outside the unit. PIDs come from kernel/systemd evidence, never a request. file:ReadDir@1895,file:ReadFile@1085,file:ReadFile@1381,file:ReadFile@2022,file:ReadFile@468,file:Readlink@925,file:WalkDir@279 f83c97c76a1584b3ae4ac34d4098902c7b805a970ce6dc5c8378e787c694ab0a |
| internal/instancectl/gvisorunit.go Server.finishPreviousGVisorRun legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Task 6 fix round 1: Lstat only the root-derived retained run drop-in; when present, stop and require terminal unit/no job/no PIDs/empty cgroup through the existing proof. No ExecStopPost status dependency. Per the explicit ruling, stale runtime metadata is inert and the next ignored ExecStartPre runsc delete -force removes it. file:Lstat@161 28836624c17a0ef444382aae2c660b500697cac35d67a6b84921823e3569ab92 |
| internal/instancectl/ocibundle.go Server.gvisorExecutable legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Resolve prepared root-owned app link through existing native live or validated staged target; production passes fixed checked root file/directory helpers. file:EvalSymlinks@217 c64f3dc10842930f1c594db2ece7f41ac8bdde0d5907e510a179aee5dc7f1a21 |
| @@ -210,7 +210,7 @@ internal/instancectl/sandbox.go Server.unitFamily legacy accepted-legacy accepte |
| 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. file:ReadFile@853 867b1af5b3f9ded72bd023fd0d7d02a589a131db76046b76156e581738fc90b8 |
| internal/instanceexec/probe_gvisor.go checkGVisorFacts legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Evaluate guest probe facts only. Census labels the boolean Openat2 field as a file read, but this pure evaluator performs no I/O or root action. file:Openat2@845 0fbb701794c0c747fb23628a1e3ed9f791d3024e2001df8040809b8f7544bae1 |
| internal/instanceexec/probe_gvisor.go type gvisorProbeFacts legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Guest evidence fields only; Openat2 is a boolean fact, not a syscall or filesystem read. file:Openat2@325 5b30f52a1aca92bfa18331e3a88ac84fbaa4b15765197f822446c1aff7884046 |
| -internal/instanceexec/probe_gvisor_linux.go runGVisorProbeChecks legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Unprivileged guest reads fixed /proc/self/status and /proc/version; checks root-supplied numeric identity, capabilities/NNP, pinned measured kernel signature, io_uring ENOSYS, loopback/public TCP refusal, absent nonce-derived host fixture and unreachable root abstract socket. Checks existing safe-open behavior at its own fixed data directory and serves a nonce socket in its own host-visible run mount until root acknowledges process/limit proof. No host root authority or tenant-selected path. data-literal@2263,file:Lstat@2161,file:Openat2@2230,file:ReadFile@1287,file:ReadFile@607 413c4f54d74b42a5242cf9b73781898d8f71213500a42f18d876975036fe10c1 |
| +internal/instanceexec/probe_gvisor_linux.go runGVisorProbeChecks legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Unprivileged guest reads fixed /proc/self/status and /proc/version; checks root-supplied numeric identity, capabilities/NNP, pinned measured kernel signature, io_uring ENOSYS, loopback/public TCP refusal, absent nonce-derived host fixture and unreachable root abstract socket. Checks existing safe-open behavior at its own fixed data directory and serves a nonce socket in its own host-visible run mount until root acknowledges process/limit proof. No host root authority or tenant-selected path. CI fix: replace net.Interfaces (AF_NETLINK) with guest-only fixed /proc/net/dev ReadFile; require exactly the lo interface and a complete counters row. Existing public TCP refusal and guest isolation assertions remain. No host-selected or tenant-selected read path. data-literal@2195,file:Lstat@2093,file:Openat2@2162,file:ReadFile@1287,file:ReadFile@1465,file:ReadFile@607 9070fe8dfa3997812f4d2e370314fe667d54560a189a466caad1ae0a2d88af42 |
| internal/activator/backend_unit.go SplitBackend.Start legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-region-ha-g2-fixes;basis=Apply the pool refusal to HA or Provisioned rows before start dispatch, preserving explicit non-HA operator placement; added HA and Provisioned field reads, no new I/O.;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:Exec@107,registry:Backing@178,registry:HA@263,registry:Provisioned@272,whole:Route@164,whole:Route@307,whole:Route@404,whole:Route@419 26d8d253f3a2f5a11d7629950e915a34bf0979819ac9c4ca26c6f51af9fe6ed4 |
| internal/activator/backend_unit.go SplitBackend.StartGen legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-region-ha-g2-fixes;basis=Apply the pool refusal to HA or Provisioned rows before generation start dispatch, preserving explicit non-HA operator placement; added HA and Provisioned field reads, no new I/O.;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:Exec@130,registry:Backing@228,registry:HA@316,registry:Provisioned@325,whole:Route@187,whole:Route@360,whole:Route@465,whole:Route@513,whole:Route@557,whole:Route@572,whole:Route@691 5ca67e3b27355d099a26de81a167c0ac25e977cc7f16bf8c5507075b328b3692 |
| internal/activator/cmdunit.go cmdUnit.StopAndSettle legacy accepted-legacy accepted-legacy;rev3=census-ruling-carlos-run;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): asks instance control to stop the unit, then waits; the agent keeps the lease until this is proven; no root decision;rev3=census-ruling-rootfs-apps-2;basis=the stop goes through stopRole with the row instead of Control.Stop with its host, so one Host site goes; for a rootfs row that is the rootfs stop verb's request (StopRootfs) over the same control socket; the proof (stop, cgroup empty, streams drained) is unchanged; no file read added;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 8 (PF-7): stops and proves the unit own role (stopRole and waitRoleCgroupEmpty with u.role, cmd or tty), never a hard-coded cmd; a unit of no one-shot role is refused; after the proof it drains the two streams, or closes the session handoff and master; new sites are the refusal text (rt.Host) and the route;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@216,registry:Runtime@365,registry:Runtime@424,whole:Route@218,whole:Route@341,whole:Route@500,whole:Route@689,whole:Route@756 0125d714d97b0cb14e0edae9caf9e8e8ab33e7aca1344dc53fa088d2bd75d120 |
| @@ -253,11 +253,11 @@ internal/host/systemapply.go systemApplier.stageCandidate legacy accepted-legacy |
| @coverage . e81de2dad7f3ecf8f6adbb426b8f6e8f732b7dff5b7e909a273f0e40194307b5 |
| @coverage internal/activator d326609be0b7846d7bcbb4b20856ef9d3a9ffdf70bfb091e3ac7566fa78613de |
| @coverage internal/demobuild 60f5e9d6c2acb85d8943d848f013349157bf985bba71e69e99d4ed6e831c1dd7 |
| -@coverage internal/execsandbox ce4d20024db674a70759ea41e981178727e54c469d300c8cb3f12a13277638ba |
| +@coverage internal/execsandbox 8f4069cb40c57bc0f01a934f44c49c9fdb549879c509b374d97474b859538569 |
| @coverage internal/host f7ecb38917955e3e89c323b3f8d730271d9df28a0967459151552b0471e59149 |
| @coverage internal/host/units 93402572d2fc9c32b563820a36d565afa2ed951637bde9561fe2e845137a6524 |
| -@coverage internal/instancectl 070e83f5684269385b4c301f8601d6524b6c303375f099f22a3abea0bea970f1 |
| -@coverage internal/instanceexec f45ee9b5ec7862c3a07fd9270b38df322c91e73f13e297813698dee30b8efd2c |
| +@coverage internal/instancectl 1a3a46e781273b5487fdf5291f9b2d2329c89db8363ac0558561497b229d6b6b |
| +@coverage internal/instanceexec 8ab54471e06294387badbe91bf51e0e4a2e0ccde6a5dee51b75cfe817dcac5ae |
| @coverage internal/publicrelease 4b98543d38d648c60009592dac6c1e8a012ecca42e52d95d12404c0f9506457c |
| @coverage internal/status 549f4bf5833dd6d85709bf86f84766736c1a0b531cf5cabdaf6ca26924c67ea8 |
| @coverage internal/systemdshow fee9413c43dcc5d3122ae3283bc42747b68275b713ea1a58e3145401f7752a9b |