carlos / platform Public

gvisor demos: prepare runtime release assets and dev rollout

Prepare the five-member runtime sets at release cut time and mirror signed target sets before promotion. Keep the internal dev rollout runbook as draft copy.

Collapse Task 9 into the cumulative gvisor-demos census overlay under the controller ruling, retaining its claims and the ratified slice-start envelope evidence.
Co-Authored-By: Astra (gpt-6-astra) via codex
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 5f38e17e592226fe071f00b135e54de7a73024e1 parent f4a7614
14 files changed, +1,028 −83
  • cmd/runsc-assets/main.go +204 −0
  • cmd/runsc-assets/main_test.go +164 −0
  • docs/superpowers/notes/census-proposal-gvisor-demos.md +23 −4
  • docs/superpowers/notes/census-proposal-gvisor-task9-stop.md +0 −31
  • docs/superpowers/runbooks/gvisor-demos.md +121 −0
  • internal/console/apisystemupdate.go +3 −0
  • internal/console/runscmirror.go +74 −0
  • internal/console/runscmirror_test.go +180 −0
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −2
  • internal/provision/testdata/plan14-root-reads-gvisor-demos.tsv +23 −15
  • internal/provision/testdata/plan14-root-reads-gvisor-task9-stop.tsv +0 −21
  • internal/publicrelease/feed.go +43 −10
  • internal/publicrelease/runsc.go +52 −0
  • internal/publicrelease/runsc_test.go +140 −0

CI failed — run details

diff --git a/cmd/runsc-assets/main.go b/cmd/runsc-assets/main.go
new file mode 100644
index 000000000..c7998cabf
--- /dev/null
+++ b/cmd/runsc-assets/main.go
@@ -0,0 +1,204 @@
+package main
+
+import (
+ "archive/tar"
+ "bytes"
+ "context"
+ "crypto/sha256"
+ "crypto/sha512"
+ "flag"
+ "fmt"
+ "io"
+ "net/http"
+ "os"
+ "path"
+ "sort"
+ "strings"
+ "time"
+
+ "github.com/carlosframework/platform/internal/execsandbox"
+ "github.com/carlosframework/platform/internal/publicrelease"
+ "github.com/klauspost/compress/zstd"
+)
+
+const (
+ archiveLimit = 128 << 20
+ expandedLimit = 512 << 20
+ memberLimit = 128 << 20
+)
+
+func main() {
+ out := flag.String("out", "", "existing release cut artifact directory")
+ flag.Parse()
+ if *out == "" || flag.NArg() != 0 {
+ fmt.Fprintln(os.Stderr, "usage: runsc-assets -out <existing-cut-artifact-directory>")
+ os.Exit(2)
+ }
+ lock, err := execsandbox.LoadRunscLock()
+ if err == nil {
+ err = cutRunsc(context.Background(), &http.Client{Timeout: 5 * time.Minute}, lock, *out)
+ }
+ if err != nil {
+ fmt.Fprintln(os.Stderr, err)
+ os.Exit(1)
+ }
+}
+
+func extractRunsc(raw []byte, pin execsandbox.RunscPin) (map[string][]byte, error) {
+ if len(raw) > archiveLimit || fmt.Sprintf("%x", sha512.Sum512(raw)) != pin.TarballSHA512 {
+ return nil, fmt.Errorf("runtime archive SHA512 or size mismatch")
+ }
+ if pin.SetID() == "" {
+ return nil, fmt.Errorf("invalid runtime pin")
+ }
+ zr, err := zstd.NewReader(bytes.NewReader(raw), zstd.WithDecoderMaxMemory(expandedLimit), zstd.WithDecoderConcurrency(1))
+ if err != nil {
+ return nil, err
+ }
+ defer zr.Close()
+ bounded := &io.LimitedReader{R: zr, N: expandedLimit + 1}
+ tr := tar.NewReader(bounded)
+ wanted := map[string]string{}
+ for _, f := range pin.Files {
+ wanted[f.Path] = f.SHA256
+ }
+ files := map[string][]byte{}
+ seen := map[string]bool{}
+ for count := 0; ; count++ {
+ h, err := tr.Next()
+ if err == io.EOF {
+ break
+ }
+ if err != nil {
+ return nil, err
+ }
+ if count >= 1024 {
+ return nil, fmt.Errorf("too many runtime archive entries")
+ }
+ name := strings.TrimSuffix(h.Name, "/")
+ if name == "" || path.IsAbs(name) || path.Clean(name) != name || strings.Contains(name, "\\") || name == ".." || strings.HasPrefix(name, "../") {
+ return nil, fmt.Errorf("unsafe runtime archive path %q", h.Name)
+ }
+ if seen[name] {
+ return nil, fmt.Errorf("duplicate runtime archive member %q", name)
+ }
+ seen[name] = true
+ if h.Typeflag != tar.TypeReg && h.Typeflag != tar.TypeDir {
+ return nil, fmt.Errorf("runtime archive member %q is not a regular file or directory", name)
+ }
+ if h.Size < 0 || h.Size > memberLimit {
+ return nil, fmt.Errorf("runtime archive member %q exceeds size limit", name)
+ }
+ want, ok := wanted[name]
+ if !ok {
+ continue
+ }
+ if h.Typeflag != tar.TypeReg {
+ return nil, fmt.Errorf("runtime member %q is not a regular file", name)
+ }
+ body, err := io.ReadAll(tr)
+ if err != nil {
+ return nil, err
+ }
+ if fmt.Sprintf("%x", sha256.Sum256(body)) != want {
+ return nil, fmt.Errorf("runtime member %q SHA256 mismatch", name)
+ }
+ files[name] = body
+ }
+ // Finish decoding so trailing compressed data and expansion limits are checked.
+ if _, err := io.Copy(io.Discard, bounded); err != nil {
+ return nil, err
+ }
+ if bounded.N == 0 {
+ return nil, fmt.Errorf("runtime archive exceeds expanded size limit")
+ }
+ if len(files) != len(wanted) {
+ return nil, fmt.Errorf("runtime archive is missing pinned members")
+ }
+ return files, nil
+}
+
+func cutRunsc(ctx context.Context, client *http.Client, lock execsandbox.RunscLock, out string) error {
+ if out == "" {
+ return fmt.Errorf("output directory is required")
+ }
+ root, err := os.OpenRoot(out)
+ if err != nil {
+ return err
+ }
+ defer root.Close()
+ assets := map[string][]byte{}
+ platforms := make([]string, 0, len(lock.Platforms))
+ for plat := range lock.Platforms {
+ platforms = append(platforms, plat)
+ }
+ sort.Strings(platforms)
+ for _, plat := range platforms {
+ pin := lock.Platforms[plat]
+ req, err := http.NewRequestWithContext(ctx, http.MethodGet, pin.TarballURL, nil)
+ if err != nil {
+ return err
+ }
+ res, err := client.Do(req)
+ if err != nil {
+ return err
+ }
+ raw, readErr := io.ReadAll(io.LimitReader(res.Body, archiveLimit+1))
+ res.Body.Close()
+ if res.StatusCode != http.StatusOK {
+ return fmt.Errorf("%s: archive HTTP status %d", plat, res.StatusCode)
+ }
+ if readErr != nil {
+ return readErr
+ }
+ files, err := extractRunsc(raw, pin)
+ if err != nil {
+ return fmt.Errorf("%s: %w", plat, err)
+ }
+ for member, data := range files {
+ name := publicrelease.RunscMemberAssetName(plat, member)
+ if name == "" {
+ return fmt.Errorf("invalid runtime asset for %s %s", plat, member)
+ }
+ assets[name] = data
+ }
+ }
+ names := make([]string, 0, len(assets))
+ for name := range assets {
+ names = append(names, name)
+ }
+ sort.Strings(names)
+ created := []string{}
+ complete := false
+ defer func() {
+ if !complete {
+ for _, name := range created {
+ _ = root.Remove(name)
+ }
+ }
+ }()
+ for _, name := range names {
+ // Create-only also refuses symlinks and hard links already in the cut.
+ f, err := root.OpenFile(name, os.O_WRONLY|os.O_CREATE|os.O_EXCL, 0755)
+ if err != nil {
+ return err
+ }
+ created = append(created, name)
+ _, err = f.Write(assets[name])
+ if err == nil {
+ err = f.Chmod(0755)
+ }
+ if err == nil {
+ err = f.Sync()
+ }
+ closeErr := f.Close()
+ if err != nil {
+ return err
+ }
+ if closeErr != nil {
+ return closeErr
+ }
+ }
+ complete = true
+ return nil
+}
diff --git a/cmd/runsc-assets/main_test.go b/cmd/runsc-assets/main_test.go
new file mode 100644
index 000000000..7437cb921
--- /dev/null
+++ b/cmd/runsc-assets/main_test.go
@@ -0,0 +1,164 @@
+package main
+
+import (
+ "archive/tar"
+ "bytes"
+ "context"
+ "crypto/sha256"
+ "crypto/sha512"
+ "fmt"
+ "net/http"
+ "net/http/httptest"
+ "os"
+ "path/filepath"
+ "strings"
+ "testing"
+
+ "github.com/carlosframework/platform/internal/execsandbox"
+ "github.com/carlosframework/platform/internal/publicrelease"
+ "github.com/klauspost/compress/zstd"
+)
+
+func runscArchive(t *testing.T, fault string) ([]byte, execsandbox.RunscPin) {
+ t.Helper()
+ pin, err := execsandbox.RunscFor("linux-amd64")
+ if err != nil {
+ t.Fatal(err)
+ }
+ var b bytes.Buffer
+ zw, _ := zstd.NewWriter(&b)
+ tw := tar.NewWriter(zw)
+ entry := func(name string, kind byte, body string, size int64) {
+ t.Helper()
+ h := &tar.Header{Name: name, Mode: 0755, Typeflag: kind, Size: size}
+ if kind == tar.TypeSymlink || kind == tar.TypeLink {
+ h.Linkname = "runsc"
+ h.Size = 0
+ }
+ if err := tw.WriteHeader(h); err != nil {
+ t.Fatal(err)
+ }
+ if h.Size == int64(len(body)) && h.Size > 0 {
+ if _, err := tw.Write([]byte(body)); err != nil {
+ t.Fatal(err)
+ }
+ }
+ }
+ for i := range pin.Files {
+ f := &pin.Files[i]
+ body := "ELF " + f.Path
+ f.SHA256 = fmt.Sprintf("%x", sha256.Sum256([]byte(body)))
+ if f.Path == "runsc" {
+ pin.SHA256 = f.SHA256
+ }
+ if fault == "missing" && i == 0 {
+ continue
+ }
+ entry(f.Path, tar.TypeReg, body, int64(len(body)))
+ }
+ switch fault {
+ case "duplicate":
+ entry("runsc", tar.TypeReg, "x", 1)
+ case "alias":
+ entry("./runsc", tar.TypeReg, "x", 1)
+ case "symlink":
+ entry("link", tar.TypeSymlink, "", 0)
+ case "hardlink":
+ entry("link", tar.TypeLink, "", 0)
+ case "traversal":
+ entry("../escape", tar.TypeReg, "x", 1)
+ case "absolute":
+ entry("/escape", tar.TypeReg, "x", 1)
+ case "oversize":
+ entry("huge", tar.TypeReg, "", 1<<30)
+ }
+ if fault != "oversize" {
+ if err := tw.Close(); err != nil {
+ t.Fatal(err)
+ }
+ }
+ if err := zw.Close(); err != nil {
+ t.Fatal(err)
+ }
+ raw := b.Bytes()
+ pin.TarballSHA512 = fmt.Sprintf("%x", sha512.Sum512(raw))
+ if fault == "archive-hash" {
+ pin.TarballSHA512 = strings.Repeat("0", 128)
+ }
+ if fault == "binary-hash" {
+ pin.Files[0].SHA256 = strings.Repeat("0", 64)
+ }
+ return raw, pin
+}
+
+func TestRunscAssets(t *testing.T) {
+ for _, fault := range []string{"", "archive-hash", "binary-hash", "missing", "duplicate", "alias", "symlink", "hardlink", "traversal", "absolute", "oversize"} {
+ t.Run(fault, func(t *testing.T) {
+ raw, pin := runscArchive(t, fault)
+ files, err := extractRunsc(raw, pin)
+ if fault != "" {
+ if err == nil {
+ t.Fatal("accepted unsafe archive")
+ }
+ return
+ }
+ if err != nil || len(files) != 5 {
+ t.Fatalf("files=%d err=%v", len(files), err)
+ }
+ for _, f := range pin.Files {
+ if string(files[f.Path]) != "ELF "+f.Path {
+ t.Fatalf("wrong member %s", f.Path)
+ }
+ }
+ })
+ }
+ t.Run("cut-directory", func(t *testing.T) {
+ raw, pin := runscArchive(t, "")
+ ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.Write(raw) }))
+ defer ts.Close()
+ pin.TarballURL = ts.URL
+ lock := execsandbox.RunscLock{Platforms: map[string]execsandbox.RunscPin{"linux-arm64": pin, "linux-amd64": pin}}
+ out := t.TempDir()
+ if err := cutRunsc(context.Background(), ts.Client(), lock, out); err != nil {
+ t.Fatal(err)
+ }
+ entries, _ := os.ReadDir(out)
+ if len(entries) != 10 {
+ t.Fatalf("wrote %d assets", len(entries))
+ }
+ for plat := range lock.Platforms {
+ for _, f := range pin.Files {
+ name := publicrelease.RunscMemberAssetName(plat, f.Path)
+ st, err := os.Stat(filepath.Join(out, name))
+ if err != nil || st.Mode().Perm() != 0755 {
+ t.Fatalf("%s: %v %v", name, st, err)
+ }
+ }
+ }
+ if err := cutRunsc(context.Background(), ts.Client(), lock, filepath.Join(out, "missing")); err == nil {
+ t.Fatal("accepted missing output directory")
+ }
+ })
+ t.Run("output-symlink", func(t *testing.T) {
+ raw, pin := runscArchive(t, "")
+ ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.Write(raw) }))
+ defer ts.Close()
+ pin.TarballURL = ts.URL
+ out := t.TempDir()
+ outside := filepath.Join(t.TempDir(), "outside")
+ if err := os.WriteFile(outside, []byte("keep"), 0600); err != nil {
+ t.Fatal(err)
+ }
+ if err := os.Symlink(outside, filepath.Join(out, "runsc-linux-amd64")); err != nil {
+ t.Fatal(err)
+ }
+ err := cutRunsc(context.Background(), ts.Client(), execsandbox.RunscLock{Platforms: map[string]execsandbox.RunscPin{"linux-amd64": pin}}, out)
+ if err == nil {
+ t.Fatal("accepted occupied asset")
+ }
+ b, _ := os.ReadFile(outside)
+ if string(b) != "keep" {
+ t.Fatal("followed output symlink")
+ }
+ })
+}
diff --git a/docs/superpowers/notes/census-proposal-gvisor-demos.md b/docs/superpowers/notes/census-proposal-gvisor-demos.md
index 8dcf0c697..8d46cfbc8 100644
--- a/docs/superpowers/notes/census-proposal-gvisor-demos.md
+++ b/docs/superpowers/notes/census-proposal-gvisor-demos.md
@@ -10,10 +10,12 @@ Ruling `census-ruling-gvisor-demos`. The independent reviewer approves or reject
| `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. |
-| `internal/demobuild/runner.go` `Run` | body | unchanged (1) | Task 7: retain bounded no-follow diagnostics/output reads after termination proof; filter gVisor runtime timestamp lines before returning compiler diagnostics. No new read. |
+| `internal/demobuild/runner.go` `Run` | body | unchanged (1) | Task 7: retain bounded no-follow diagnostics/output reads after termination proof; filter gVisor runtime timestamp lines before returning compiler diagnostics. No new read. Task 9: Log failing steps through root logger before returning exactly ErrBuild. Existing bounded no-follow reads and termination-before-output retained. |
+| `internal/demobuild/security_linux.go` `verifyWorkMount` | body | unchanged (1) | Task 9: Add observed filesystem type/capacity and expected cap to root diagnostic; same checks and reads. |
| `internal/demobuild/unit.go` `Worker.assertUnit` | body | unchanged (1) | Task 7: gVisor branch verifies measured host properties, exact pinned command source/readback, work/cache dependencies, append diagnostics destination, physical budget and byte-identical root-derived bundle/rootfs. Native verification retained. |
-| `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` `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. Task 9: Label failing preparation steps and log underlying errors before exactly ErrBuild. Existing path derivation, mount, ownership, source and unit/bundle checks retained. |
| `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/unit.go` `var systemctl` | body | unchanged (1) | Task 9: Preserve fixed executable/environment/arguments/bounded output; attach captured output to internal errors for root logging before sanitization. |
| `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. 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. |
@@ -37,6 +39,7 @@ 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/publicrelease/feed.go` `Feed.get` | body | unchanged (1) | Bound release downloads with a one-byte oversize check so a signed prefix cannot authenticate a truncated larger response; existing HTTP body read only, no new root input. |
| `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. |
@@ -76,7 +79,7 @@ Ruling `census-ruling-gvisor-demos`. The independent reviewer approves or reject
| `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`, `internal/status`.
+Envelopes re-pinned: `.`, `internal/activator`, `internal/demobuild`, `internal/execsandbox`, `internal/host`, `internal/host/units`, `internal/instancectl`, `internal/instanceexec`, `internal/publicrelease`, `internal/status`, `internal/systemdshow`.
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.
@@ -89,9 +92,11 @@ Recorded dispositions, which each change must still satisfy:
- `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.
- `internal/demobuild/runner.go` `Run`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-agent-start-demo-1;basis=Consumes only its private root-prepared invocation, proves stop, then no-follow reads bounded diagnostics/output beneath that job.
+- `internal/demobuild/security_linux.go` `verifyWorkMount`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-agent-start-demo-1;basis=Reads filesystem type/capacity and mount presence for a root-derived work path.
- `internal/demobuild/unit.go` `Worker.assertUnit`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-agent-start-demo-1;basis=Reads effective sandbox, resource, environment and bind properties; missing or mismatched properties refuse compiler start.
- `internal/demobuild/unit.go` `Worker.prepareUnit`: legacy, task accepted-legacy. Basis: 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.
- `internal/demobuild/unit.go` `emptyBuildCgroup`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-agent-start-demo-1;basis=Reads only the derived cgroup.events path; absent directory or populated 0 proves termination.
+- `internal/demobuild/unit.go` `var systemctl`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-agent-start-demo-1;basis=Executes fixed /usr/bin/systemctl with a scrubbed fixed environment and bounded output; callers supply platform-derived unit names and fixed operations for offline build supervision.
- `internal/demobuild/worker.go` `NewWorker`: legacy, task accepted-legacy. Basis: 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).
- `internal/host/agent.go` `runAgent`: authority, task B,C,D,F. Basis: 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)
- `internal/host/bootstrap.go` `bootstrapWithGroup`: legacy, task accepted-legacy. Basis: 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.
@@ -115,6 +120,7 @@ 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/publicrelease/feed.go` `Feed.get`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J4;basis=root-input
- `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.
@@ -217,6 +223,19 @@ 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` → `37512fd6f9760cb3907b945274902f8631402bd620fd16dddd60120578135a98`.
+Seal: `b970bb28c5a633d2572a1da549030e9258cfdabb6322ddffdd0ebf41b56c464c` → `5a30bab7f892e5f37a1f7501d3bc8100a04b1766eb75fe29cec596b7cc058eef`.
Overlay: `internal/provision/testdata/plan14-root-reads-gvisor-demos.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`.
+
+## Additional instancectl envelope claim
+
+The read census covers `Server.assertGVisorUnit` through the
+`internal/instancectl` source envelope; it has no separate read-census row.
+The controller's Task 9 ruling ratifies this action. The independent reviewer
+must include it when deciding the envelope.
+
+- `internal/instancectl/gvisorunit.go:Server.assertGVisorUnit` (`internal/instancectl/gvisorunit.go:273`, slice start at line 280): Task 9 ratified slice start: after validating the host-derived slice name and verifying its unit properties, start that host slice with systemctl before the kernel cgroup readback. Starting the run unit would start the same slice; the explicit start makes parent cgroup verification possible rather than skipping it. A refused start may leave an empty root-started host slice, which demo cleanup stops. No tenant-selected unit or new filesystem read.
+
+This claim is retained as an envelope-only comment in the cumulative CLAIMS
+file because census-propose rejects a standalone claim for a unit with no
+read-census change. Reproduce this section after regenerating the card.
diff --git a/docs/superpowers/notes/census-proposal-gvisor-task9-stop.md b/docs/superpowers/notes/census-proposal-gvisor-task9-stop.md
deleted file mode 100644
index c621a4aad..000000000
--- a/docs/superpowers/notes/census-proposal-gvisor-task9-stop.md
+++ /dev/null
@@ -1,31 +0,0 @@
-# Census approval: gvisor-task9-stop
-
-Ruling `census-ruling-gvisor-task9-stop`. The independent reviewer approves or rejects every change below, 0 with a new disposition; nothing goes to the census owner (Paul, #280, 2026-10-26).
-
-| unit | change | read sites | what changed |
-|---|---|---|---|
-| `internal/demobuild/runner.go` `Run` | body | unchanged (1) | Log failing steps through root logger before returning exactly ErrBuild. Existing bounded no-follow reads and termination-before-output retained. |
-| `internal/demobuild/security_linux.go` `verifyWorkMount` | body | unchanged (1) | Add observed filesystem type/capacity and expected cap to root diagnostic; same checks and reads. |
-| `internal/demobuild/unit.go` `Worker.prepareUnit` | body | unchanged (1) | Label failing preparation steps and log underlying errors before exactly ErrBuild. Existing path derivation, mount, ownership, source and unit/bundle checks retained. |
-| `internal/demobuild/unit.go` `var systemctl` | body | unchanged (1) | Preserve fixed executable/environment/arguments/bounded output; attach captured output to internal errors for root logging before sanitization. |
-| `internal/instancectl/demo_policy.go` `Server.demoCgroupReadback` | body | unchanged (2) | Round only expected kernel memory.high for existing run and parent reads; exact memory.max and required kernel files retained. No new read. |
-| `internal/instancectl/gvisorprobe.go` `Server.gvisorProbeKernelLimits` | body | unchanged (1) | Round only expected kernel memory.high for fixed probe cgroup reads; exact memory.max retained. No new read. |
-| `internal/instancectl/sandboxstop.go` `Server.proveRunGone` | body | unchanged (1) | 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. |
-
-Envelopes re-pinned: `internal/demobuild`, `internal/execsandbox`, `internal/host`, `internal/instancectl`, `internal/systemdshow`.
-
-Review: a model from the other family than the author reads the branch's diff against main on the amadan.net remote (`origin` or `amadan`, whichever points at amadan.net) and gives a verdict for every unit and every re-pinned envelope above. For a unit, compare the change with its recorded disposition and basis below; for an envelope, read every changed function in the package and what it reaches. Reject if the change lets root open, run, query or follow anything it did not before from a path or input a tenant, an app or a box agent can create, write or name; if it weakens a check, refusal, validation, argument or environment the basis relies on; or if the diff cannot settle either. Otherwise approve. Record each verdict on #280 with the tip. A rejected unit goes back to the author to correct; nothing escalates to the census owner.
-
-Recorded dispositions, which each change must still satisfy:
-
-- `internal/demobuild/runner.go` `Run`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-agent-start-demo-1;basis=Consumes only its private root-prepared invocation, proves stop, then no-follow reads bounded diagnostics/output beneath that job.;rev3=census-ruling-gvisor-demos;basis=Task 7: retain bounded no-follow diagnostics/output reads after termination proof; filter gVisor runtime timestamp lines before returning compiler diagnostics. No new read.
-- `internal/demobuild/security_linux.go` `verifyWorkMount`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-agent-start-demo-1;basis=Reads filesystem type/capacity and mount presence for a root-derived work path.
-- `internal/demobuild/unit.go` `Worker.prepareUnit`: legacy, task accepted-legacy. Basis: 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.
-- `internal/demobuild/unit.go` `var systemctl`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-agent-start-demo-1;basis=Executes fixed /usr/bin/systemctl with a scrubbed fixed environment and bounded output; callers supply platform-derived unit names and fixed operations for offline build supervision.
-- `internal/instancectl/demo_policy.go` `Server.demoCgroupReadback`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Read memory.max/high/swap.max, pids.max, cpu.max/weight and io.weight in the derived parent and validated child cgroups. GVisor uses Physical memory/tasks and logical shares; pre-start only absent groups may defer verification, and post-start requires every file. Native checks remain the existing logical limits.
-- `internal/instancectl/gvisorprobe.go` `Server.gvisorProbeKernelLimits`: legacy, task accepted-legacy. Basis: 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.
-- `internal/instancectl/sandboxstop.go` `Server.proveRunGone`: legacy, task accepted-legacy. Basis: 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.
-
-Seal: `37512fd6f9760cb3907b945274902f8631402bd620fd16dddd60120578135a98` → `b4ec45939c6c23460284f33dc6c4bc28d005de2b403742bb1308e6f630c1c249`.
-
-Overlay: `internal/provision/testdata/plan14-root-reads-gvisor-task9-stop.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`.
diff --git a/docs/superpowers/runbooks/gvisor-demos.md b/docs/superpowers/runbooks/gvisor-demos.md
new file mode 100644
index 000000000..935ec1126
--- /dev/null
+++ b/docs/superpowers/runbooks/gvisor-demos.md
@@ -0,0 +1,121 @@
+# gVisor demos rollout — draft for Paul's copy review
+
+Set `CARLOS_EXEC_SANDBOX=gvisor` only on a box where `carlos status --layout`
+already displays the exec-sandbox line. An unaware binary cannot enforce this
+setting. A bootstrap or reimage from an old pointer with a retained gvisor setting
+is outside this build. Keep this setting in internal operator material.
+
+This rollout covers the dev demo box. The flagship is out of scope. `auto` still
+selects systemd; changing that default needs a separate change.
+
+## Prepare the release and approval
+
+Coordinate the version and window with agent manager `8a3d302`. Record Paul's
+quoted go from the design session and follow discussion #421: one live window,
+one release line. Require the merged-SHA root-runner witness before release;
+this runbook does not authorize a runner invocation.
+
+Before changing any dev resource, domain or host configuration, present the
+actual account, region, box, domain and bucket. List the release and channel,
+every object key, the host.env edit, and each service restart. Include permissions,
+traffic effects, duration, expected cost, cleanup and verification. Reuse an
+existing approval only if it covers that exact scope. A designated runner scope
+does not authorize changes to the dev box. Do not perform these steps until the
+scoped approval is recorded.
+
+In the release checkout, run the helper against the existing cut directory:
+
+```sh
+go run ./cmd/runsc-assets -out <existing-cut-artifact-directory>
+```
+
+Run it before the existing cut generates and signs `SHA256SUMS.txt` or attaches
+assets to the GitHub release. The helper reads the embedded lock, checks each
+upstream `.tar.zstd` archive's SHA512 before extraction, then checks each member's
+SHA256. It writes ten executable files, five for each of `linux-arm64` and
+`linux-amd64`. It refuses existing output names; use an unoccupied cut directory
+for a retry. It never executes a runtime member.
+
+| Installed member | Release asset, for each platform `<plat>` |
+| --- | --- |
+| `runsc` | `runsc-<plat>` |
+| `gvisor-bin/gvisor_sentry` | `gvisor-sentry-<plat>` |
+| `gvisor-bin/runsc-fd-parking` | `runsc-fd-parking-<plat>` |
+| `gvisor-bin/gvisor-proc-umounter` | `gvisor-proc-umounter-<plat>` |
+| `gvisor-bin/gvisor-sentry-prewarmer` | `gvisor-sentry-prewarmer-<plat>` |
+
+Verify all ten assets appear in the signed sums and match the release checkout's
+`internal/execsandbox/runsc.lock.json`. For each platform, sort the lock's members
+by relative path and hash the manifest with SHA256. Each line is
+`<sha256><two spaces><relative path>\n`, including its final newline. This is the
+set ID; it is not the hash of runsc alone.
+
+Every member has its own object at `bootstrap/router/runsc-<setid>/<asset>`.
+The console mirrors a complete advertised set for each supported Linux platform
+reported by the fleet before promoting the system pointer. It derives the set ID
+from the target release's signed sums, so an older aware console can mirror a
+newer pin. Historical releases with no runtime assets and `--file` uploads do not
+mirror a runtime. A partial set, a missing advertised asset, or a checksum or
+signature failure stops the update.
+
+If the console is too old to mirror runtime assets, the release agent must copy
+all five verified members for the dev box's platform once, within the approved
+dev bucket scope. Record the five full keys and each read-back SHA256. Verify
+those hashes against both the signed sums and the target lock. Do not record
+credentials. These are content-addressed objects: never overwrite different
+bytes under an existing key.
+
+Before releasing to the dev demo box, confirm that it can read **all five**
+objects through its own store door or bucket role, and verify the returned bytes
+against the target pin. A successful upload or a read using the release agent's
+credentials does not prove box access. If this check fails, stop and ask. Changing
+the store door or its permissions is a spec change, not part of this rollout.
+
+## Roll the dev box
+
+1. Roll the aware release while the box still uses systemd. Wait for adoption and
+ for `/opt/carlos/system/router/journal.json` to be absent. Check the newly
+ installed release and the exec-sandbox line in `carlos status --layout`.
+2. Verify that the guard executor `/opt/carlos/system/guard/carlos` and both
+ trigger files, `/var/lib/carlos-claims/authority/exec/census.json` and
+ `/opt/carlos/system/guard/moves`, are absent, including dangling symlinks.
+ Verify that the installed `carlos-system-recover.service` is the aware
+ release's current unit and is the effective unit. Stop on a mismatch.
+3. Restart `carlos-instance-control.service` while still in systemd mode.
+ Control reads `/etc/carlos/host.env` only at startup. Adoption alone does not
+ refresh its environment or establish that the running controller is aware.
+ Confirm Ready and the systemd status, then drain the old run family and prove
+ its processes are gone before switching.
+4. Set `CARLOS_EXEC_SANDBOX=gvisor` in root-owned `/etc/carlos/host.env`. Restart
+ control and the agent under the approved deployment procedure. Control's
+ startup runs `carlos-runsc.service`, which installs the complete pinned set.
+ Do not infer a restart from a changed symlink.
+5. Check Ready, the gVisor probe, and all five installed member hashes against
+ the target lock. Check the box's exec-sandbox line and the instance sandbox
+ column. A start refusal is a failed rollout; do not bypass it or fall back
+ silently to systemd.
+6. Create a demo and build the full private-module demo starter under gVisor.
+ Prove `Worker.Initialize` completes under gVisor, then wake and claim the
+ demo. These dev witnesses, including the claim deferred from Task 9, are
+ required before calling the rollout verified. Record the demo, build,
+ instance and claim results, and the claimed app's response version.
+7. Verify `X-Carlos-Version` over a successful response from the newly built
+ release using the correct destination and a fresh request. Record the release
+ and commit, probe result, box and instance status, and the runtime set ID.
+ A stale local binary, cached DNS answer or old demo is not this witness.
+
+Use the console API and `carlos` CLI for routine administration. The scoped
+host.env and service changes above belong to platform rollout work. Do not
+replace a missing member-facing command with an unrecorded box operation.
+
+## Roll back
+
+Set `CARLOS_EXEC_SANDBOX=systemd` in root-owned host.env, then restart control and
+the agent. Drain the gVisor run family and prove its processes are gone. Verify
+Ready and systemd in the box and instance status before rolling below the
+exec-sandbox awareness floor, if an older release is needed. Do not roll an
+unaware binary onto a box that still has gvisor configured.
+
+Follow up on the branch with a bootstrap-script check that refuses an old-pointer
+bootstrap or reimage when gvisor is retained. Keep that work separate; do not
+reopen the closed design or build the check as part of this task.
diff --git a/internal/console/apisystemupdate.go b/internal/console/apisystemupdate.go
index 46fb008a6..feaa74940 100644
--- a/internal/console/apisystemupdate.go
+++ b/internal/console/apisystemupdate.go
@@ -565,6 +565,9 @@ func (s *Server) runSystemUpdate(ctx context.Context, id string, job *systemJob,
return err
}
rel.Artifacts[plat] = release.SystemArtifact{Key: release.SystemArtifactKey(tag, plat), SHA256: sha}
+ if err := s.mirrorRunscRelease(ctx, feed, tag, plat); err != nil {
+ return fmt.Errorf("%s runtime: %w", plat, err)
+ }
}
}
p, err := s.promoteHostUpdate(ctx, rel, in.Component, in.Channel,
diff --git a/internal/console/runscmirror.go b/internal/console/runscmirror.go
new file mode 100644
index 000000000..75e26418a
--- /dev/null
+++ b/internal/console/runscmirror.go
@@ -0,0 +1,74 @@
+package console
+
+import (
+ "context"
+ "crypto/sha256"
+ "errors"
+ "fmt"
+
+ "github.com/carlosframework/platform/internal/execsandbox"
+ "github.com/carlosframework/platform/internal/publicrelease"
+ "github.com/carlosframework/platform/internal/release"
+)
+
+// Fetch a complete signed manifest before writing any member. A later fetch
+// must still match that manifest, even if the feed changes between requests.
+func (s *Server) mirrorRunscRelease(ctx context.Context, feed publicrelease.Feed, tag, platform string) error {
+ if platform != "linux-arm64" && platform != "linux-amd64" {
+ return nil
+ }
+ sums, err := feed.Sums(ctx, tag)
+ if err != nil {
+ return err
+ }
+ pin, present, err := publicrelease.RunscReleasePin(platform, sums)
+ if err != nil || !present {
+ return err
+ }
+ for _, member := range pin.Files {
+ asset := publicrelease.RunscMemberAssetName(platform, member.Path)
+ data, sha, present, err := feed.OptionalAsset(ctx, tag, asset, systemAssetMaxBytes)
+ if err != nil {
+ return err
+ }
+ if !present || sha != member.SHA256 {
+ return fmt.Errorf("%s: runtime checksum list changed during mirror", asset)
+ }
+ if err := s.mirrorRunscArtifact(ctx, platform, pin, member.Path, data, sha); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func (s *Server) mirrorRunscArtifact(ctx context.Context, platform string, pin execsandbox.RunscPin, member string, data []byte, sha string) error {
+ key := execsandbox.RunscObjectKey(platform, pin, member)
+ if key == "" {
+ return errors.New("invalid runtime set, platform or member")
+ }
+ want := ""
+ for _, f := range pin.Files {
+ if f.Path == member {
+ want = f.SHA256
+ }
+ }
+ if sha != want || fmt.Sprintf("%x", sha256.Sum256(data)) != want {
+ return fmt.Errorf("%s: runtime bytes do not match signed checksum", key)
+ }
+ if same, err := s.systemArtifactMatches(ctx, key, sha); err != nil || same {
+ return err
+ }
+ if _, err := s.cfg.Releases.Put(ctx, key, data, ""); err != nil {
+ if !errors.Is(err, release.ErrCASConflict) {
+ return err
+ }
+ same, err := s.systemArtifactMatches(ctx, key, sha)
+ if err != nil {
+ return err
+ }
+ if !same {
+ return fmt.Errorf("%s: concurrent runtime write disappeared; retry the update", key)
+ }
+ }
+ return nil
+}
diff --git a/internal/console/runscmirror_test.go b/internal/console/runscmirror_test.go
new file mode 100644
index 000000000..d8c5f2607
--- /dev/null
+++ b/internal/console/runscmirror_test.go
@@ -0,0 +1,180 @@
+package console
+
+import (
+ "context"
+ "crypto/sha256"
+ "errors"
+ "fmt"
+ "io"
+ "net/http"
+ "os"
+ "strings"
+ "testing"
+
+ "github.com/carlosframework/platform/internal/execsandbox"
+ "github.com/carlosframework/platform/internal/publicrelease"
+ "github.com/carlosframework/platform/internal/release"
+)
+
+func runscReleaseFixture(t *testing.T, platform string) (map[string][]byte, execsandbox.RunscPin) {
+ t.Helper()
+ pin, err := execsandbox.RunscFor(platform)
+ if err != nil {
+ t.Fatal(err)
+ }
+ assets := map[string][]byte{}
+ for i := range pin.Files {
+ f := &pin.Files[i]
+ body := []byte("new target pin " + platform + " " + f.Path)
+ assets[publicrelease.RunscMemberAssetName(platform, f.Path)] = body
+ f.SHA256 = fmt.Sprintf("%x", sha256.Sum256(body))
+ if f.Path == "runsc" {
+ pin.SHA256 = f.SHA256
+ }
+ }
+ return assets, pin
+}
+
+type runscRaceStore struct {
+ release.Store
+ key string
+ body []byte
+ disappear bool
+}
+
+func (s *runscRaceStore) Put(ctx context.Context, key string, body []byte, match string) (string, error) {
+ if key == s.key {
+ if !s.disappear {
+ if _, err := s.Store.Put(ctx, key, s.body, ""); err != nil {
+ return "", err
+ }
+ }
+ return "", release.ErrCASConflict
+ }
+ return s.Store.Put(ctx, key, body, match)
+}
+
+func TestRunscMirror(t *testing.T) {
+ ctx := context.Background()
+ t.Run("release-set-and-history", func(t *testing.T) {
+ for _, kind := range []string{"present", "historical", "partial", "corrupt", "missing", "collision", "upload"} {
+ t.Run(kind, func(t *testing.T) {
+ fx := newConsoleFixture(t)
+ assets, pin := runscReleaseFixture(t, "linux-arm64")
+ if kind == "historical" || kind == "upload" {
+ assets = map[string][]byte{}
+ }
+ if kind == "partial" {
+ delete(assets, "gvisor-sentry-linux-arm64")
+ }
+ assets["carlos-linux-arm64"] = []byte("ELF carlos")
+ systemFeed(t, fx, assets)
+ if kind == "corrupt" || kind == "missing" {
+ fx.srv.cfg.SystemFeed.Client = &http.Client{Transport: runscFeedTransport{kind: kind}}
+ }
+ if kind == "collision" {
+ _, err := fx.rel.Put(ctx, execsandbox.RunscObjectKey("linux-arm64", pin, "runsc"), []byte("wrong"), "")
+ if err != nil {
+ t.Fatal(err)
+ }
+ }
+ in := systemUpdateRequest{Component: "router", Channel: "canary", Version: "v0.18.0"}
+ if kind == "upload" {
+ fx.srv.cfg.SystemFeed.DownloadBase = "http://127.0.0.1:1/never"
+ fx.srv.systemUploads = map[string]systemUpload{"test": {version: "v0.18.0", platform: "linux-arm64", data: []byte("local")}}
+ in.Upload = "test"
+ }
+ job := &systemJob{}
+ fx.srv.runSystemUpdate(ctx, "test", job, "paul@keymail.dev", in, 0)
+ failed := kind == "partial" || kind == "corrupt" || kind == "missing" || kind == "collision"
+ if (job.Err != "") != failed {
+ t.Fatalf("job error=%s expected failure=%v", job.Err, failed)
+ }
+ _, _, err := release.GetSystemPointer(ctx, fx.rel, fx.pub, "router", "canary")
+ if failed {
+ if !errors.Is(err, os.ErrNotExist) {
+ t.Fatalf("promoted failed mirror: %v", err)
+ }
+ return
+ }
+ if err != nil {
+ t.Fatal(err)
+ }
+ keys, err := fx.rel.List(ctx, "bootstrap/router/runsc-")
+ if err != nil {
+ t.Fatal(err)
+ }
+ if kind != "present" {
+ if len(keys) != 0 {
+ t.Fatalf("historical/upload mirrored %v", keys)
+ }
+ return
+ }
+ if len(keys) != 5 {
+ t.Fatalf("mirrored keys: %v", keys)
+ }
+ for _, f := range pin.Files {
+ key := execsandbox.RunscObjectKey("linux-arm64", pin, f.Path)
+ body, _, err := fx.rel.Get(ctx, key)
+ if err != nil || string(body) != string(assets[publicrelease.RunscMemberAssetName("linux-arm64", f.Path)]) {
+ t.Fatalf("%s: %v", key, err)
+ }
+ }
+ })
+ }
+ })
+ t.Run("immutable-cas", func(t *testing.T) {
+ for _, kind := range []string{"new", "identical", "collision", "race-same", "race-different", "race-gone", "bad-input-hash", "bad-member", "bad-platform"} {
+ t.Run(kind, func(t *testing.T) {
+ fx := newConsoleFixture(t)
+ assets, pin := runscReleaseFixture(t, "linux-amd64")
+ member, plat := "runsc", "linux-amd64"
+ body := assets[publicrelease.RunscAssetName(plat)]
+ sha := pin.SHA256
+ key := execsandbox.RunscObjectKey(plat, pin, member)
+ switch kind {
+ case "identical", "collision":
+ b := body
+ if kind == "collision" {
+ b = []byte("wrong")
+ }
+ if _, err := fx.rel.Put(ctx, key, b, ""); err != nil {
+ t.Fatal(err)
+ }
+ case "race-same", "race-different", "race-gone":
+ b := body
+ if kind == "race-different" {
+ b = []byte("wrong")
+ }
+ fx.srv.cfg.Releases = &runscRaceStore{Store: fx.rel, key: key, body: b, disappear: kind == "race-gone"}
+ case "bad-input-hash":
+ body = []byte("wrong")
+ case "bad-member":
+ member = "../escape"
+ case "bad-platform":
+ plat = "../../escape"
+ }
+ err := fx.srv.mirrorRunscArtifact(ctx, plat, pin, member, body, sha)
+ wantErr := kind != "new" && kind != "identical" && kind != "race-same"
+ if (err != nil) != wantErr {
+ t.Fatalf("err=%v expected failure=%v", err, wantErr)
+ }
+ })
+ }
+ })
+}
+
+type runscFeedTransport struct{ kind string }
+
+func (tr runscFeedTransport) RoundTrip(r *http.Request) (*http.Response, error) {
+ res, err := http.DefaultTransport.RoundTrip(r)
+ if err == nil && strings.HasSuffix(r.URL.Path, "/gvisor-sentry-linux-arm64") {
+ if tr.kind == "missing" {
+ res.StatusCode = 404
+ } else {
+ res.Body.Close()
+ res.Body = io.NopCloser(strings.NewReader("wrong"))
+ }
+ }
+ return res, err
+}
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv
index d491a4325..0a87b1ded 100644
--- a/internal/provision/testdata/plan14-root-reads-chain.tsv
+++ b/internal/provision/testdata/plan14-root-reads-chain.tsv
@@ -128,5 +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 37512fd6f9760cb3907b945274902f8631402bd620fd16dddd60120578135a98
-plan14-root-reads-gvisor-task9-stop.tsv b4ec45939c6c23460284f33dc6c4bc28d005de2b403742bb1308e6f630c1c249
+plan14-root-reads-gvisor-demos.tsv 5a30bab7f892e5f37a1f7501d3bc8100a04b1766eb75fe29cec596b7cc058eef
diff --git a/internal/provision/testdata/plan14-root-reads-gvisor-demos.tsv b/internal/provision/testdata/plan14-root-reads-gvisor-demos.tsv
index decd136b4..601b8b058 100644
--- a/internal/provision/testdata/plan14-root-reads-gvisor-demos.tsv
+++ b/internal/provision/testdata/plan14-root-reads-gvisor-demos.tsv
@@ -1,5 +1,5 @@
# 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.
-# 37 body, 34 sites, 9 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
+# 40 body, 34 sites, 11 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
@@ -7,10 +7,12 @@
@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
-@legacy 00be7eb31dbc64d77c61bfd0f11bbf5274660e718896c2b870b8ff14c8d436d6 internal/demobuild/runner.go Run legacy accepted-legacy accepted-legacy;rev3=census-ruling-agent-start-demo-1;basis=Consumes only its private root-prepared invocation, proves stop, then no-follow reads bounded diagnostics/output beneath that job.;rev3=census-ruling-gvisor-demos;basis=Task 7: retain bounded no-follow diagnostics/output reads after termination proof; filter gVisor runtime timestamp lines before returning compiler diagnostics. No new read. file:ReadAll@518 bf2258e410bd5c69ee33feb3daa5a0442f5d79ea90ac870c7df24d43349d8edf
+@legacy 238e4dce1ff7166c4ab212c1db33462561af34db097cd1b45622fd51451ff873 internal/demobuild/runner.go Run legacy accepted-legacy accepted-legacy;rev3=census-ruling-agent-start-demo-1;basis=Consumes only its private root-prepared invocation, proves stop, then no-follow reads bounded diagnostics/output beneath that job.;rev3=census-ruling-gvisor-demos;basis=Task 7: retain bounded no-follow diagnostics/output reads after termination proof; filter gVisor runtime timestamp lines before returning compiler diagnostics. No new read. Task 9: Log failing steps through root logger before returning exactly ErrBuild. Existing bounded no-follow reads and termination-before-output retained. file:ReadAll@584 b5600faa9b1873448735a77731da5902ee80d94424932c68891b6467a5527554
+@legacy 86870fb7e9299eb5d6eacb69f73a3f646919441874146242bc77584867e1c476 internal/demobuild/security_linux.go verifyWorkMount legacy accepted-legacy accepted-legacy;rev3=census-ruling-agent-start-demo-1;basis=Reads filesystem type/capacity and mount presence for a root-derived work path.;rev3=census-ruling-gvisor-demos;basis=Task 9: Add observed filesystem type/capacity and expected cap to root diagnostic; same checks and reads. file:Statfs@83 209e90de81869b243c38ca4ac098bf3c3969c5956416c2f17d3ca94b447793b3
@legacy 7ccfb0e3f2aa2a684e6733ae6e9df9003bcc844622f33a187531dcc42577e878 internal/demobuild/unit.go Worker.assertUnit legacy accepted-legacy accepted-legacy;rev3=census-ruling-agent-start-demo-1;basis=Reads effective sandbox, resource, environment and bind properties; missing or mismatched properties refuse compiler start.;rev3=census-ruling-gvisor-demos;basis=Task 7: gVisor branch verifies measured host properties, exact pinned command source/readback, work/cache dependencies, append diagnostics destination, physical budget and byte-identical root-derived bundle/rootfs. Native verification retained. data-literal@1729 3b549cdd23cb7c77b43d21c9f8fb82c4fdc7dc398caf5f06f02b1210becfa7e8
-@legacy c01a71e80d4915f88b934d21202a8eadbd8b14292d41dbd2f905c54b331db2c7 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
+@legacy 7a3bbae1d3e5f08967d0f994effee80b78505c2548915659e4f8038c5a849299 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. Task 9: Label failing preparation steps and log underlying errors before exactly ErrBuild. Existing path derivation, mount, ownership, source and unit/bundle checks retained. file:WalkDir@3628 543a0d42c9b97e660fe26660ca7610673037798b6b86091bb7dc214b3a6e960a
@legacy 8456634cfb250bb8a182ae7013d06e838802359c6942f49be1e218ac60fde637 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
+@legacy d68f57a99720c08726d3480bb962429d1d394a565909643a48477a017480f17a internal/demobuild/unit.go var systemctl legacy accepted-legacy accepted-legacy;rev3=census-ruling-agent-start-demo-1;basis=Executes fixed /usr/bin/systemctl with a scrubbed fixed environment and bounded output; callers supply platform-derived unit names and fixed operations for offline build supervision.;rev3=census-ruling-gvisor-demos;basis=Task 9: Preserve fixed executable/environment/arguments/bounded output; attach captured output to internal errors for root logging before sanitization. file:CommandContext@82 aaf08a85aa93e16188d049610d8660ee984fd4d28bf2cd72e6699075754f687d
@legacy 95c151f83a7a2ce229c6c79b5ccd19e90101ce4ffe50a84b58557538b91f33da 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
@legacy 4ef93c4470151048cf05dc69a2c0c2375a4f25b65e6af8c33ab740705a6b33b5 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
@legacy ef8c8c20a6fd6daec8dc2c84b454a0cb05e9fc604300a1d3098f843ae5b6b67a 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
@@ -22,6 +24,7 @@
@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 ada6718d9612d563ad7856e1086f4a4fcf65eb613b39014856e9be0f2a9f4bdc internal/publicrelease/feed.go Feed.get legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-gvisor-demos;basis=Bound release downloads with a one-byte oversize check so a signed prefix cannot authenticate a truncated larger response; existing HTTP body read only, no new root input. file:ReadAll@518 8da54d4a2ce87c719f1927f1c96d9ea71770fa2475010a220c5029e3086d2752
@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
@@ -59,12 +62,12 @@
@legacy 1cb2a2b1f667f42c1b24eb4997c20b5ecc00a9571d92060dedfada948e8a0f5d internal/host/units/carlos-instance-gvisor-probe.service external legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Add the unarmed root gVisor probe skeleton with empty ExecStart, all twelve measured properties, fixed probe data/run paths, append output and mixed kill with SIGCONT. Root command preparation must reset output and bind a fresh nonce before start; full readiness consumer remains a later task. file:external@0 b05d264190ef2172e87e5b2667164f2051e83016695595e32ccbcdce9186eb6b
@legacy 4de04c1583d5fa335adadb7227f9ce1ec35e28280744d6571ebe92c72b4442f2 internal/host/units/carlos-instance-gvisor@.service external legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Add the unarmed root gVisor run skeleton with empty ExecStart and all twelve measured host properties. Defines per-instance data/run writable paths and socket output, root runtime directory, mixed kill with SIGCONT, and the existing bounded stop. A root-prepared validated command drop-in is required before it can start; no command or pin placeholder is installed here. file:external@0 914a3c0486d83b6b87ce14c473aab9005ff7bc004cb984040a81ddc60087a5c1
@legacy dd34ca6003fd907b4919382e5d960722556e8d322311cfa1d70b1eb76d96274d internal/host/units/carlos-runsc.service external legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Root oneshot reads fixed root-owned host.env through its applet and installs compiled runtime set only under /opt/carlos/runsc; no RemainAfterExit. file:external@0 215ca2aea9519d14d0e20b5f9b6588b43ff7c5ef7b485982274fbbbfe2cf02b5
-@legacy cf1d2c6d163ee921d028ab8153ec669982370e033c2d389153dbc09d05c4d643 internal/instancectl/demo_policy.go Server.demoCgroupReadback legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Read memory.max/high/swap.max, pids.max, cpu.max/weight and io.weight in the derived parent and validated child cgroups. GVisor uses Physical memory/tasks and logical shares; pre-start only absent groups may defer verification, and post-start requires every file. Native checks remain the existing logical limits. file:ReadFile@1349,file:Stat@1194 89ab9fb2d29510f76d969ad980c1fcb09b455623c6b744b5b3c9687787ba6642
+@legacy e5a4701c68ee01ad17e15dbad4f8e9bde74c34b59f38fd0b111d1c2f3fea9ac1 internal/instancectl/demo_policy.go Server.demoCgroupReadback legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Read memory.max/high/swap.max, pids.max, cpu.max/weight and io.weight in the derived parent and validated child cgroups. GVisor uses Physical memory/tasks and logical shares; pre-start only absent groups may defer verification, and post-start requires every file. Native checks remain the existing logical limits. Task 9: Round only expected kernel memory.high for existing run and parent reads; exact memory.max and required kernel files retained. No new read. file:ReadFile@1379,file:Stat@1224 41da87161a8858d3749a461486fff9a6a46b9dccbc421658a4f0643e329e9afd
@legacy 00c33dceabb209518ceebdc5ad8c399df4101357804a47141965cf01f13e1330 internal/instancectl/gvisordrain.go Server.sandboxUnitEmpty legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Read the fixed carlos.slice cgroup hierarchy for the named discovered unit and require populated 0; skip other service subtrees. Task 6 fix round 1 confines the opposite-family caller to Ready/ReadyDemo. No request-selected filesystem path or new read site. file:WalkDir@116 e802bfb809b344b2ae4e1b3d7ae9f4896b8e3396dac720de56fa218b203e8994
@legacy 2f09251e4b1d9e0966073e3ce00e5bdb6810f0e7d483fa7b054fc1d779f171f4 internal/instancectl/gvisordrain.go Server.sandboxUnitsFor legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Task 6 fix round 1: enumerate systemd units/jobs and the fixed carlos.slice kernel hierarchy, filtering by the requested fixed family. Ready in systemd mode lists only gVisor instance/probe/build patterns and ignores native jobs/services; original gVisor host overlap checks request both families. Never invoked by native per-start admission. Only kernel-owned cgroup directory reads; no tenant-selected path or runsc-state traversal. file:WalkDir@1194 6ce5d5d373840b13e1bf20a1791cbd1390540448fd238e71b2b8abb4acf05216
@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 523480138e9a6f3c15e1c0f7a58cbf5f413c511c3b2ad84cfc1744f287602ad4 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. file:ReadFile@357 919a374b3b1b5181da14d122f29c4ab9042634009da696afb899fc7bbe80cdc5
+@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 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
@@ -75,7 +78,7 @@
@legacy 1c7f28ecd4b8cef8d77feae6c655a4fd8ee46f66480a1709dad41e7e0901df5c internal/instancectl/ocibundle.go readCarlosUser legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Read fixed /etc/passwd through OpenRootFile, enforcing root owner and no-follow ancestors, bounded to 1 MiB; parse exactly one non-root carlos uid/gid without NSS or tenant input. file:ReadAll@207 83b2b8271c1d3b12e99ea6e0ad1395d0e5db7e823569702314c564ec051390af
@legacy 4e1e0e30bc8cfd5ed764037291e6cb878a5007fe869f6903931d7ad05b46ae56 internal/instancectl/sandbox.go Server.requestFamily legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Read the registry route through the existing root-provided HostDemo callback for gVisor public starts and reject held or unsupported routes before preparation. Native registry/egress behavior remains unchanged; fixed policy receives no readiness state. registry:Status@429,whole:Route@318,whole:Route@397,whole:Route@542 dfb40d756f97cc8aa68626b550ad341a9ddd796493de158d3f99ee20c9614fed
@legacy 43a54aebd894c7b4852e9fbcf3e1dc75d71ceffebe4c51ee7003dffce4d22cb7 internal/instancectl/sandbox.go Server.unitFamily legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Classify only retained mode, claims/demo flags, role and route runtime/demo shape; gVisor public starts require a route and only private probe/build may omit it. No I/O or readiness-driven fallback. registry:Runtime@630,whole:Route@614,whole:Route@794,whole:Route@852 bed900b96d6b79417c25954e25144ec00c6388a0951ffd405b9788f103851d06
-@legacy aecd2b97667691b047efb311443751aed82546bc3654db2baec85bf5cf924fc7 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. file:ReadFile@818 6c4c011ba16be748f7df2fcb56406dc5d968977eaa3321b9f2eab06fad1db393
+@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
@@ -118,10 +121,12 @@ internal/activator/size.go Service.SizeState legacy accepted-legacy accepted-leg
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
-internal/demobuild/runner.go Run legacy accepted-legacy accepted-legacy;rev3=census-ruling-agent-start-demo-1;basis=Consumes only its private root-prepared invocation, proves stop, then no-follow reads bounded diagnostics/output beneath that job.;rev3=census-ruling-gvisor-demos;basis=Task 7: retain bounded no-follow diagnostics/output reads after termination proof; filter gVisor runtime timestamp lines before returning compiler diagnostics. No new read. file:ReadAll@518 bf2258e410bd5c69ee33feb3daa5a0442f5d79ea90ac870c7df24d43349d8edf
+internal/demobuild/runner.go Run legacy accepted-legacy accepted-legacy;rev3=census-ruling-agent-start-demo-1;basis=Consumes only its private root-prepared invocation, proves stop, then no-follow reads bounded diagnostics/output beneath that job.;rev3=census-ruling-gvisor-demos;basis=Task 7: retain bounded no-follow diagnostics/output reads after termination proof; filter gVisor runtime timestamp lines before returning compiler diagnostics. No new read. Task 9: Log failing steps through root logger before returning exactly ErrBuild. Existing bounded no-follow reads and termination-before-output retained. file:ReadAll@584 b5600faa9b1873448735a77731da5902ee80d94424932c68891b6467a5527554
+internal/demobuild/security_linux.go verifyWorkMount legacy accepted-legacy accepted-legacy;rev3=census-ruling-agent-start-demo-1;basis=Reads filesystem type/capacity and mount presence for a root-derived work path.;rev3=census-ruling-gvisor-demos;basis=Task 9: Add observed filesystem type/capacity and expected cap to root diagnostic; same checks and reads. file:Statfs@83 209e90de81869b243c38ca4ac098bf3c3969c5956416c2f17d3ca94b447793b3
internal/demobuild/unit.go Worker.assertUnit legacy accepted-legacy accepted-legacy;rev3=census-ruling-agent-start-demo-1;basis=Reads effective sandbox, resource, environment and bind properties; missing or mismatched properties refuse compiler start.;rev3=census-ruling-gvisor-demos;basis=Task 7: gVisor branch verifies measured host properties, exact pinned command source/readback, work/cache dependencies, append diagnostics destination, physical budget and byte-identical root-derived bundle/rootfs. Native verification retained. data-literal@1729 3b549cdd23cb7c77b43d21c9f8fb82c4fdc7dc398caf5f06f02b1210becfa7e8
-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 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. Task 9: Label failing preparation steps and log underlying errors before exactly ErrBuild. Existing path derivation, mount, ownership, source and unit/bundle checks retained. file:WalkDir@3628 543a0d42c9b97e660fe26660ca7610673037798b6b86091bb7dc214b3a6e960a
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/unit.go var systemctl legacy accepted-legacy accepted-legacy;rev3=census-ruling-agent-start-demo-1;basis=Executes fixed /usr/bin/systemctl with a scrubbed fixed environment and bounded output; callers supply platform-derived unit names and fixed operations for offline build supervision.;rev3=census-ruling-gvisor-demos;basis=Task 9: Preserve fixed executable/environment/arguments/bounded output; attach captured output to internal errors for root logging before sanitization. file:CommandContext@82 aaf08a85aa93e16188d049610d8660ee984fd4d28bf2cd72e6699075754f687d
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. 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
@@ -145,6 +150,7 @@ 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/publicrelease/feed.go Feed.get legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-gvisor-demos;basis=Bound release downloads with a one-byte oversize check so a signed prefix cannot authenticate a truncated larger response; existing HTTP body read only, no new root input. file:ReadAll@518 8da54d4a2ce87c719f1927f1c96d9ea71770fa2475010a220c5029e3086d2752
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
@@ -184,12 +190,12 @@ internal/host/units/carlos-demo-build-gvisor@.service external legacy accepted-l
internal/host/units/carlos-instance-gvisor-probe.service external legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Add the unarmed root gVisor probe skeleton with empty ExecStart, all twelve measured properties, fixed probe data/run paths, append output and mixed kill with SIGCONT. Root command preparation must reset output and bind a fresh nonce before start; full readiness consumer remains a later task. file:external@0 b05d264190ef2172e87e5b2667164f2051e83016695595e32ccbcdce9186eb6b
internal/host/units/carlos-instance-gvisor@.service external legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Add the unarmed root gVisor run skeleton with empty ExecStart and all twelve measured host properties. Defines per-instance data/run writable paths and socket output, root runtime directory, mixed kill with SIGCONT, and the existing bounded stop. A root-prepared validated command drop-in is required before it can start; no command or pin placeholder is installed here. file:external@0 914a3c0486d83b6b87ce14c473aab9005ff7bc004cb984040a81ddc60087a5c1
internal/host/units/carlos-runsc.service external legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Root oneshot reads fixed root-owned host.env through its applet and installs compiled runtime set only under /opt/carlos/runsc; no RemainAfterExit. file:external@0 215ca2aea9519d14d0e20b5f9b6588b43ff7c5ef7b485982274fbbbfe2cf02b5
-internal/instancectl/demo_policy.go Server.demoCgroupReadback legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Read memory.max/high/swap.max, pids.max, cpu.max/weight and io.weight in the derived parent and validated child cgroups. GVisor uses Physical memory/tasks and logical shares; pre-start only absent groups may defer verification, and post-start requires every file. Native checks remain the existing logical limits. file:ReadFile@1349,file:Stat@1194 89ab9fb2d29510f76d969ad980c1fcb09b455623c6b744b5b3c9687787ba6642
+internal/instancectl/demo_policy.go Server.demoCgroupReadback legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Read memory.max/high/swap.max, pids.max, cpu.max/weight and io.weight in the derived parent and validated child cgroups. GVisor uses Physical memory/tasks and logical shares; pre-start only absent groups may defer verification, and post-start requires every file. Native checks remain the existing logical limits. Task 9: Round only expected kernel memory.high for existing run and parent reads; exact memory.max and required kernel files retained. No new read. file:ReadFile@1379,file:Stat@1224 41da87161a8858d3749a461486fff9a6a46b9dccbc421658a4f0643e329e9afd
internal/instancectl/gvisordrain.go Server.sandboxUnitEmpty legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Read the fixed carlos.slice cgroup hierarchy for the named discovered unit and require populated 0; skip other service subtrees. Task 6 fix round 1 confines the opposite-family caller to Ready/ReadyDemo. No request-selected filesystem path or new read site. file:WalkDir@116 e802bfb809b344b2ae4e1b3d7ae9f4896b8e3396dac720de56fa218b203e8994
internal/instancectl/gvisordrain.go Server.sandboxUnitsFor legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Task 6 fix round 1: enumerate systemd units/jobs and the fixed carlos.slice kernel hierarchy, filtering by the requested fixed family. Ready in systemd mode lists only gVisor instance/probe/build patterns and ignores native jobs/services; original gVisor host overlap checks request both families. Never invoked by native per-start admission. Only kernel-owned cgroup directory reads; no tenant-selected path or runsc-state traversal. file:WalkDir@1194 6ce5d5d373840b13e1bf20a1791cbd1390540448fd238e71b2b8abb4acf05216
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. file:ReadFile@357 919a374b3b1b5181da14d122f29c4ab9042634009da696afb899fc7bbe80cdc5
+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_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
@@ -200,7 +206,7 @@ internal/instancectl/ocibundle.go gvisorRegularExecutable legacy accepted-legacy
internal/instancectl/ocibundle.go readCarlosUser legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Read fixed /etc/passwd through OpenRootFile, enforcing root owner and no-follow ancestors, bounded to 1 MiB; parse exactly one non-root carlos uid/gid without NSS or tenant input. file:ReadAll@207 83b2b8271c1d3b12e99ea6e0ad1395d0e5db7e823569702314c564ec051390af
internal/instancectl/sandbox.go Server.requestFamily legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Read the registry route through the existing root-provided HostDemo callback for gVisor public starts and reject held or unsupported routes before preparation. Native registry/egress behavior remains unchanged; fixed policy receives no readiness state. registry:Status@429,whole:Route@318,whole:Route@397,whole:Route@542 dfb40d756f97cc8aa68626b550ad341a9ddd796493de158d3f99ee20c9614fed
internal/instancectl/sandbox.go Server.unitFamily legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Classify only retained mode, claims/demo flags, role and route runtime/demo shape; gVisor public starts require a route and only private probe/build may omit it. No I/O or readiness-driven fallback. registry:Runtime@630,whole:Route@614,whole:Route@794,whole:Route@852 bed900b96d6b79417c25954e25144ec00c6388a0951ffd405b9788f103851d06
-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. file:ReadFile@818 6c4c011ba16be748f7df2fcb56406dc5d968977eaa3321b9f2eab06fad1db393
+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
@@ -246,10 +252,12 @@ internal/host/systemapply.go systemApplier.stageCandidate legacy accepted-legacy
@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 . e81de2dad7f3ecf8f6adbb426b8f6e8f732b7dff5b7e909a273f0e40194307b5
@coverage internal/activator d326609be0b7846d7bcbb4b20856ef9d3a9ffdf70bfb091e3ac7566fa78613de
-@coverage internal/demobuild a4e1514f857e1a3a7a77af7aecbe35d1c7b1f38aa224a9e560e278fa2e0a6c0d
-@coverage internal/execsandbox c7bd59e07acf65b54d2c020a9b380b64a7319569ff8cf183a33a3dbcc2360b8d
-@coverage internal/host e3bac20266306e8737152c9e7e8a048271d753ae12ee66a8d3a0260fd4031ba3
+@coverage internal/demobuild 8544616096994fe88805489a99a1644d8dc387fd3a25f23ba4847f8be9ae556c
+@coverage internal/execsandbox 695b6e7772f909e39c09a22382db7d7182968638adc8d4f59e2a36246a5a8452
+@coverage internal/host 5ed054ca10605612d1ef02e04f6949d6b70ebe34dd5ca2c8128916b7e4a9e238
@coverage internal/host/units 93402572d2fc9c32b563820a36d565afa2ed951637bde9561fe2e845137a6524
-@coverage internal/instancectl 10e29ecda69c9f2d42612bf3c4d50817b249a324a84601bae15eb2b108d8ed69
+@coverage internal/instancectl 349c65db5738cc5994aa5e7a1ace3403bb6b99e7c99dbed2436dde83ca90c39c
@coverage internal/instanceexec f45ee9b5ec7862c3a07fd9270b38df322c91e73f13e297813698dee30b8efd2c
+@coverage internal/publicrelease 564bbb7ee2c6804da1b395294bc4e903d1c1c1380a25677c4a6233959635dd9a
@coverage internal/status 549f4bf5833dd6d85709bf86f84766736c1a0b531cf5cabdaf6ca26924c67ea8
+@coverage internal/systemdshow fee9413c43dcc5d3122ae3283bc42747b68275b713ea1a58e3145401f7752a9b
diff --git a/internal/provision/testdata/plan14-root-reads-gvisor-task9-stop.tsv b/internal/provision/testdata/plan14-root-reads-gvisor-task9-stop.tsv
deleted file mode 100644
index cd4d4dcfe..000000000
--- a/internal/provision/testdata/plan14-root-reads-gvisor-task9-stop.tsv
+++ /dev/null
@@ -1,21 +0,0 @@
-# Census overlay gvisor-task9-stop, written by census-propose (#369). census-ruling-gvisor-task9-stop, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-gvisor-task9-stop.md.
-# 7 body, 0 sites, 5 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
-@legacy 707e7e30715ed297f5fc0aee1bf563a29e86ef6fac6787f6013a42c09de66128 internal/demobuild/runner.go Run legacy accepted-legacy accepted-legacy;rev3=census-ruling-agent-start-demo-1;basis=Consumes only its private root-prepared invocation, proves stop, then no-follow reads bounded diagnostics/output beneath that job.;rev3=census-ruling-gvisor-demos;basis=Task 7: retain bounded no-follow diagnostics/output reads after termination proof; filter gVisor runtime timestamp lines before returning compiler diagnostics. No new read.;rev3=census-ruling-gvisor-task9-stop;basis=Log failing steps through root logger before returning exactly ErrBuild. Existing bounded no-follow reads and termination-before-output retained. file:ReadAll@584 b5600faa9b1873448735a77731da5902ee80d94424932c68891b6467a5527554
-@legacy 4f1293bf79ad2cf2e1134b4232218cc552dff4ec4b1ca4421c87ba021102d4e2 internal/demobuild/security_linux.go verifyWorkMount legacy accepted-legacy accepted-legacy;rev3=census-ruling-agent-start-demo-1;basis=Reads filesystem type/capacity and mount presence for a root-derived work path.;rev3=census-ruling-gvisor-task9-stop;basis=Add observed filesystem type/capacity and expected cap to root diagnostic; same checks and reads. file:Statfs@83 209e90de81869b243c38ca4ac098bf3c3969c5956416c2f17d3ca94b447793b3
-@legacy e32196ebfb3a0f88918fcc20099d44e3708971605aa1d0267c2df4a0f6536dc2 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.;rev3=census-ruling-gvisor-task9-stop;basis=Label failing preparation steps and log underlying errors before exactly ErrBuild. Existing path derivation, mount, ownership, source and unit/bundle checks retained. file:WalkDir@3628 543a0d42c9b97e660fe26660ca7610673037798b6b86091bb7dc214b3a6e960a
-@legacy 6e0cc41ececae8b6c1b92261ea5fae7a90716cca7bfa8c4c5f80f8ec2caf6404 internal/demobuild/unit.go var systemctl legacy accepted-legacy accepted-legacy;rev3=census-ruling-agent-start-demo-1;basis=Executes fixed /usr/bin/systemctl with a scrubbed fixed environment and bounded output; callers supply platform-derived unit names and fixed operations for offline build supervision.;rev3=census-ruling-gvisor-task9-stop;basis=Preserve fixed executable/environment/arguments/bounded output; attach captured output to internal errors for root logging before sanitization. file:CommandContext@82 aaf08a85aa93e16188d049610d8660ee984fd4d28bf2cd72e6699075754f687d
-@legacy afd7cadb3485dbf37ba8e22298a0c017103557962e4e7cc27049c649e08d27ec internal/instancectl/demo_policy.go Server.demoCgroupReadback legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Read memory.max/high/swap.max, pids.max, cpu.max/weight and io.weight in the derived parent and validated child cgroups. GVisor uses Physical memory/tasks and logical shares; pre-start only absent groups may defer verification, and post-start requires every file. Native checks remain the existing logical limits.;rev3=census-ruling-gvisor-task9-stop;basis=Round only expected kernel memory.high for existing run and parent reads; exact memory.max and required kernel files retained. No new read. file:ReadFile@1379,file:Stat@1224 41da87161a8858d3749a461486fff9a6a46b9dccbc421658a4f0643e329e9afd
-@legacy 9a03ec7092f650b291056f9c318ce732120792e772ce21b4be18122330d1ac30 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.;rev3=census-ruling-gvisor-task9-stop;basis=Round only expected kernel memory.high for fixed probe cgroup reads; exact memory.max retained. No new read. file:ReadFile@408 b9e59399db4166e2c76b29743f1debf4e5eee4e248f08783a9cc38b5195787bd
-@legacy a6d7489a8804e44f1e36350147a6f5f517e8845b49724d549722ace22d3275cd 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.;rev3=census-ruling-gvisor-task9-stop;basis=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/demobuild/runner.go Run legacy accepted-legacy accepted-legacy;rev3=census-ruling-agent-start-demo-1;basis=Consumes only its private root-prepared invocation, proves stop, then no-follow reads bounded diagnostics/output beneath that job.;rev3=census-ruling-gvisor-demos;basis=Task 7: retain bounded no-follow diagnostics/output reads after termination proof; filter gVisor runtime timestamp lines before returning compiler diagnostics. No new read.;rev3=census-ruling-gvisor-task9-stop;basis=Log failing steps through root logger before returning exactly ErrBuild. Existing bounded no-follow reads and termination-before-output retained. file:ReadAll@584 b5600faa9b1873448735a77731da5902ee80d94424932c68891b6467a5527554
-internal/demobuild/security_linux.go verifyWorkMount legacy accepted-legacy accepted-legacy;rev3=census-ruling-agent-start-demo-1;basis=Reads filesystem type/capacity and mount presence for a root-derived work path.;rev3=census-ruling-gvisor-task9-stop;basis=Add observed filesystem type/capacity and expected cap to root diagnostic; same checks and reads. file:Statfs@83 209e90de81869b243c38ca4ac098bf3c3969c5956416c2f17d3ca94b447793b3
-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.;rev3=census-ruling-gvisor-task9-stop;basis=Label failing preparation steps and log underlying errors before exactly ErrBuild. Existing path derivation, mount, ownership, source and unit/bundle checks retained. file:WalkDir@3628 543a0d42c9b97e660fe26660ca7610673037798b6b86091bb7dc214b3a6e960a
-internal/demobuild/unit.go var systemctl legacy accepted-legacy accepted-legacy;rev3=census-ruling-agent-start-demo-1;basis=Executes fixed /usr/bin/systemctl with a scrubbed fixed environment and bounded output; callers supply platform-derived unit names and fixed operations for offline build supervision.;rev3=census-ruling-gvisor-task9-stop;basis=Preserve fixed executable/environment/arguments/bounded output; attach captured output to internal errors for root logging before sanitization. file:CommandContext@82 aaf08a85aa93e16188d049610d8660ee984fd4d28bf2cd72e6699075754f687d
-internal/instancectl/demo_policy.go Server.demoCgroupReadback legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Read memory.max/high/swap.max, pids.max, cpu.max/weight and io.weight in the derived parent and validated child cgroups. GVisor uses Physical memory/tasks and logical shares; pre-start only absent groups may defer verification, and post-start requires every file. Native checks remain the existing logical limits.;rev3=census-ruling-gvisor-task9-stop;basis=Round only expected kernel memory.high for existing run and parent reads; exact memory.max and required kernel files retained. No new read. file:ReadFile@1379,file:Stat@1224 41da87161a8858d3749a461486fff9a6a46b9dccbc421658a4f0643e329e9afd
-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.;rev3=census-ruling-gvisor-task9-stop;basis=Round only expected kernel memory.high for fixed probe cgroup reads; exact memory.max retained. No new read. file:ReadFile@408 b9e59399db4166e2c76b29743f1debf4e5eee4e248f08783a9cc38b5195787bd
-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.;rev3=census-ruling-gvisor-task9-stop;basis=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
-@coverage internal/demobuild 8544616096994fe88805489a99a1644d8dc387fd3a25f23ba4847f8be9ae556c
-@coverage internal/execsandbox 695b6e7772f909e39c09a22382db7d7182968638adc8d4f59e2a36246a5a8452
-@coverage internal/host 5ed054ca10605612d1ef02e04f6949d6b70ebe34dd5ca2c8128916b7e4a9e238
-@coverage internal/instancectl 349c65db5738cc5994aa5e7a1ace3403bb6b99e7c99dbed2436dde83ca90c39c
-@coverage internal/systemdshow fee9413c43dcc5d3122ae3283bc42747b68275b713ea1a58e3145401f7752a9b
diff --git a/internal/publicrelease/feed.go b/internal/publicrelease/feed.go
index 65f1e5270..9f0b17cd8 100644
--- a/internal/publicrelease/feed.go
+++ b/internal/publicrelease/feed.go
@@ -60,7 +60,17 @@ func (f Feed) get(ctx context.Context, url string, limit int64) ([]byte, error)
if res.StatusCode != http.StatusOK {
return nil, fmt.Errorf("%s: status %d", url, res.StatusCode)
}
- return io.ReadAll(io.LimitReader(res.Body, limit))
+ if limit <= 0 || limit == int64(^uint64(0)>>1) {
+ return nil, errors.New("release download limit is invalid")
+ }
+ data, err := io.ReadAll(io.LimitReader(res.Body, limit+1))
+ if err != nil {
+ return nil, err
+ }
+ if int64(len(data)) > limit {
+ return nil, fmt.Errorf("%s: exceeds download limit %d", url, limit)
+ }
+ return data, nil
}
// Latest is the newest release tag, and only a tag.
@@ -99,9 +109,20 @@ func (f Feed) Sums(ctx context.Context, tag string) (map[string]string, error) {
out := map[string]string{}
for _, line := range strings.Split(string(sums), "\n") {
fields := strings.Fields(line)
- if len(fields) == 2 {
- out[fields[1]] = fields[0]
+ if len(fields) == 0 {
+ continue
}
+ if len(fields) != 2 {
+ return nil, errors.New("release checksum list has a malformed line")
+ }
+ digest, err := hex.DecodeString(fields[0])
+ if err != nil || len(digest) != sha256.Size || fields[0] != strings.ToLower(fields[0]) {
+ return nil, errors.New("release checksum list has an invalid SHA256")
+ }
+ if _, exists := out[fields[1]]; exists {
+ return nil, errors.New("release checksum list has a duplicate asset")
+ }
+ out[fields[1]] = fields[0]
}
return out, nil
}
@@ -109,22 +130,34 @@ func (f Feed) Sums(ctx context.Context, tag string) (map[string]string, error) {
// Asset fetches one named asset for tag and refuses it unless its sha256
// matches the signed checksum list.
func (f Feed) Asset(ctx context.Context, tag, asset string, limit int64) ([]byte, string, error) {
- sums, err := f.Sums(ctx, tag)
+ data, sha, present, err := f.OptionalAsset(ctx, tag, asset, limit)
if err != nil {
return nil, "", err
}
+ if !present {
+ return nil, "", fmt.Errorf("no %s in the release's checksum list", asset)
+ }
+ return data, sha, nil
+}
+
+// OptionalAsset treats only absence from verified signed sums as optional.
+func (f Feed) OptionalAsset(ctx context.Context, tag, asset string, limit int64) ([]byte, string, bool, error) {
+ sums, err := f.Sums(ctx, tag)
+ if err != nil {
+ return nil, "", false, err
+ }
want, ok := sums[asset]
if !ok {
- return nil, "", fmt.Errorf("no %s in the release's checksum list", asset)
+ return nil, "", false, nil
}
data, err := f.get(ctx, f.DownloadBase+"/"+tag+"/"+asset, limit)
if err != nil {
- return nil, "", err
+ return nil, "", true, err
}
- s := sha256.Sum256(data)
- got := hex.EncodeToString(s[:])
+ sum := sha256.Sum256(data)
+ got := hex.EncodeToString(sum[:])
if got != want {
- return nil, "", fmt.Errorf("%s does not match its signed checksum — refusing it", asset)
+ return nil, "", true, fmt.Errorf("%s does not match its signed checksum — refusing it", asset)
}
- return data, got, nil
+ return data, got, true, nil
}
diff --git a/internal/publicrelease/runsc.go b/internal/publicrelease/runsc.go
new file mode 100644
index 000000000..afde3c6cc
--- /dev/null
+++ b/internal/publicrelease/runsc.go
@@ -0,0 +1,52 @@
+package publicrelease
+
+import (
+ "fmt"
+ "strings"
+
+ "github.com/carlosframework/platform/internal/execsandbox"
+)
+
+func RunscAssetName(platform string) string { return RunscMemberAssetName(platform, "runsc") }
+
+func RunscMemberAssetName(platform, member string) string {
+ if platform != "linux-arm64" && platform != "linux-amd64" {
+ return ""
+ }
+ switch member {
+ case "runsc", "gvisor-bin/runsc-fd-parking", "gvisor-bin/gvisor-proc-umounter", "gvisor-bin/gvisor-sentry-prewarmer":
+ return strings.TrimPrefix(member, "gvisor-bin/") + "-" + platform
+ case "gvisor-bin/gvisor_sentry":
+ return "gvisor-sentry-" + platform
+ }
+ return ""
+}
+
+// RunscReleasePin derives the target set from verified release sums. It uses
+// the embedded lock's member paths, but none of its hashes: the target release
+// may carry a newer pin than this console. Partial sets are never optional.
+func RunscReleasePin(platform string, sums map[string]string) (execsandbox.RunscPin, bool, error) {
+ schema, err := execsandbox.RunscFor(platform)
+ if err != nil {
+ return execsandbox.RunscPin{}, false, err
+ }
+ pin := execsandbox.RunscPin{}
+ found := 0
+ for _, f := range schema.Files {
+ sha, ok := sums[RunscMemberAssetName(platform, f.Path)]
+ if ok {
+ found++
+ }
+ pin.Files = append(pin.Files, execsandbox.RunscFile{Path: f.Path, SHA256: sha})
+ if f.Path == "runsc" {
+ pin.SHA256 = sha
+ }
+ }
+ if found == 0 {
+ return execsandbox.RunscPin{}, false, nil
+ }
+ if pin.SetID() == "" {
+ return execsandbox.RunscPin{}, false, fmt.Errorf("%s: incomplete or invalid runtime set in signed checksums", platform)
+ }
+ return pin, true, nil
+}
diff --git a/internal/publicrelease/runsc_test.go b/internal/publicrelease/runsc_test.go
new file mode 100644
index 000000000..586a21dae
--- /dev/null
+++ b/internal/publicrelease/runsc_test.go
@@ -0,0 +1,140 @@
+package publicrelease
+
+import (
+ "context"
+ "crypto/ed25519"
+ "crypto/sha256"
+ "encoding/base64"
+ "fmt"
+ "io"
+ "net/http"
+ "net/http/httptest"
+ "strings"
+ "testing"
+)
+
+type runscTransport func(*http.Request) (*http.Response, error)
+
+func (f runscTransport) RoundTrip(r *http.Request) (*http.Response, error) { return f(r) }
+
+func TestOptionalRunscAsset(t *testing.T) {
+ for _, tc := range []string{"present", "absent", "missing", "tampered", "signature", "transport", "oversize", "signed-prefix"} {
+ t.Run(tc, func(t *testing.T) {
+ name := RunscAssetName("linux-arm64")
+ assets := map[string][]byte{name: []byte("runtime")}
+ if tc == "absent" {
+ delete(assets, name)
+ }
+ f, _ := testFeed(t, tc != "signature", assets)
+ requests := 0
+ f.Client = &http.Client{Transport: runscTransport(func(r *http.Request) (*http.Response, error) {
+ if strings.HasSuffix(r.URL.Path, "/"+name) {
+ requests++
+ if tc == "transport" {
+ return nil, fmt.Errorf("offline")
+ }
+ res, err := http.DefaultTransport.RoundTrip(r)
+ if err != nil {
+ return res, err
+ }
+ if tc == "missing" {
+ res.StatusCode = 404
+ }
+ if tc == "tampered" || tc == "signed-prefix" {
+ res.Body.Close()
+ body := "changed"
+ if tc == "signed-prefix" {
+ body = "runtime-extra"
+ }
+ res.Body = io.NopCloser(strings.NewReader(body))
+ }
+ return res, nil
+ }
+ return http.DefaultTransport.RoundTrip(r)
+ })}
+ limit := int64(100)
+ if tc == "oversize" {
+ limit = 1
+ }
+ if tc == "signed-prefix" {
+ limit = 7
+ }
+ b, sha, present, err := f.OptionalAsset(context.Background(), "v0.18.0", name, limit)
+ switch tc {
+ case "present":
+ if err != nil || !present || string(b) != "runtime" || sha != fmt.Sprintf("%x", sha256.Sum256(b)) {
+ t.Fatalf("%q %q %v %v", b, sha, present, err)
+ }
+ case "absent":
+ if err != nil || present || requests != 0 {
+ t.Fatalf("absent: %v %v requests=%d", present, err, requests)
+ }
+ default:
+ if err == nil {
+ t.Fatal("accepted invalid release")
+ }
+ }
+ })
+ }
+}
+
+func TestOptionalRunscAssetSetManifest(t *testing.T) {
+ for _, platform := range []string{"linux-arm64", "linux-amd64"} {
+ t.Run(platform, func(t *testing.T) {
+ members := []struct{ path, asset string }{
+ {"gvisor-bin/gvisor-proc-umounter", "gvisor-proc-umounter"},
+ {"gvisor-bin/gvisor-sentry-prewarmer", "gvisor-sentry-prewarmer"},
+ {"gvisor-bin/gvisor_sentry", "gvisor-sentry"},
+ {"gvisor-bin/runsc-fd-parking", "runsc-fd-parking"},
+ {"runsc", "runsc"},
+ }
+ sums := map[string]string{}
+ var manifest strings.Builder
+ for _, m := range members {
+ name := m.asset + "-" + platform
+ if RunscMemberAssetName(platform, m.path) != name {
+ t.Fatalf("asset name for %s", m.path)
+ }
+ sha := fmt.Sprintf("%x", sha256.Sum256([]byte(name)))
+ sums[name] = sha
+ fmt.Fprintf(&manifest, "%s %s\n", sha, m.path)
+ }
+ pin, present, err := RunscReleasePin(platform, sums)
+ want := fmt.Sprintf("%x", sha256.Sum256([]byte(manifest.String())))
+ if err != nil || !present || pin.SetID() != want {
+ t.Fatalf("set ID %q want %q: %v", pin.SetID(), want, err)
+ }
+ delete(sums, RunscAssetName(platform))
+ if _, _, err := RunscReleasePin(platform, sums); err == nil {
+ t.Fatal("accepted partial set")
+ }
+ if _, present, err := RunscReleasePin(platform, map[string]string{}); err != nil || present {
+ t.Fatalf("historical: %v %v", present, err)
+ }
+ })
+ }
+}
+
+func TestOptionalRunscAssetMalformedSignedSums(t *testing.T) {
+ for _, contents := range []string{
+ "invalid runsc-linux-arm64\n",
+ strings.Repeat("0", 64) + " runsc-linux-arm64 extra\n",
+ strings.Repeat("0", 64) + " runsc-linux-arm64\n" + strings.Repeat("1", 64) + " runsc-linux-arm64\n",
+ } {
+ pub, priv, _ := ed25519.GenerateKey(nil)
+ sig := base64.StdEncoding.EncodeToString(ed25519.Sign(priv, []byte(contents)))
+ ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ if strings.HasSuffix(r.URL.Path, ".sig") {
+ fmt.Fprint(w, sig)
+ } else {
+ fmt.Fprint(w, contents)
+ }
+ }))
+ f := Feed{DownloadBase: ts.URL, PubKey: base64.StdEncoding.EncodeToString(pub)}
+ _, _, _, err := f.OptionalAsset(context.Background(), "v0.18.0", RunscAssetName("linux-arm64"), 100)
+ ts.Close()
+ if err == nil {
+ t.Fatalf("accepted signed malformed list %q", contents)
+ }
+ }
+}