gvisor demos: task 1 fix round 1 (marker, claim server, egress)
Co-Authored-By: Astra (gpt-6-astra) via codex
21 files changed,
+438
−85
docs/superpowers/notes/census-proposal-gvisor-demos.md+13 −5internal/execsandbox/config.go+26 −0internal/host/bootstrap.go+1 −2internal/host/claimstop_run.go+6 −9internal/host/claimunit.go+20 −1internal/host/claimunit_test.go+1 −1internal/host/demo_policy_test.go+2 −2internal/host/execsandbox.go+1 −18internal/host/execsandbox_fix1_test.go+219 −0internal/host/systemapply.go+1 −2internal/host/systemunits.go+2 −2internal/host/units/carlos-instance-control.service+1 −0internal/instancectl/claim.go+2 −2internal/instancectl/demo_policy.go+1 −1internal/instancectl/egress.go+13 −6internal/instancectl/sandbox.go+23 −7internal/instancectl/sandbox_egress_linux_test.go+75 −0internal/instancectl/sandbox_test.go+1 −1internal/instancectl/server.go+12 −16internal/provision/testdata/plan14-root-reads-chain.tsv+1 −1internal/provision/testdata/plan14-root-reads-gvisor-demos.tsv+17 −9
CI failed — run details
Intent
diff --git a/docs/superpowers/notes/census-proposal-gvisor-demos.md b/docs/superpowers/notes/census-proposal-gvisor-demos.md| index ff07f82a4..cbe0309ad 100644 |
| --- a/docs/superpowers/notes/census-proposal-gvisor-demos.md |
| +++ b/docs/superpowers/notes/census-proposal-gvisor-demos.md |
| @@ -5,12 +5,16 @@ Ruling `census-ruling-gvisor-demos`. The independent reviewer approves or reject |
| | unit | change | read sites | what changed | |
| |---|---|---|---| |
| | `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. | |
| -| `internal/host/claimstop_run.go` `RunInstanceControl` | body | unchanged (0) | Resolve sandbox before claim assembly; serve legacy cleanup with starts refused for invalid config or unsupported gVisor claims; pass fixed settings to control. No new root read. | |
| -| `internal/host/claimunit.go` `claimUnitContent` | body | unchanged (1) | Remove conditional host.env injection because the common control unit now includes it on every box. Existing template read unchanged. | |
| -| `internal/host/units/carlos-instance-control.service` `external` | body | unchanged (1) | Load root-owned /etc/carlos/host.env on ordinary boxes as well as claim/demo boxes so sandbox configuration cannot be ignored. No new agent-writable source or permissions. | |
| +| `internal/host/bootstrap.go` `bootstrapWithGroup` | body | unchanged (3) | Use the distinct claim/demo rendering marker, with historic state-directory recognition, for the 6b-N2 keep-installed decision; ordinary units are repaired on malformed host.env. Existing reads unchanged. | |
| +| `internal/host/claimstop_run.go` `RunInstanceControl` | body | unchanged (0) | Resolve sandbox once through shared Configure; select claim protocol independently of sandbox refusal and retain claim stop/recovery, activation and host-fence pass. Relax demo-plus-claims fatal only for ErrClaims. Keep egress asserter and install its restart-only refusal before claim recovery. No new root read. | |
| +| `internal/host/claimunit.go` `claimUnitContent` | body | unchanged (1) | Mark only claim/demo renderings explicitly; common host.env remains loaded. Ordinary rendering masks CARLOS_HOST_CLAIM with UnsetEnvironment, removed only for a successfully parsed enabled claim rendering. Existing template read unchanged. | |
| +| `internal/host/systemapply.go` `systemApplier.installUnits` | body | unchanged (6) | Use claim/demo rendering evidence instead of the now-common EnvironmentFile line to preserve installed control on settings errors. Ordinary control stays flag-off and does not gain automatic restarts. Existing reads unchanged. | |
| +| `internal/host/systemunits.go` `ensureSystemUnitsWithGuard` | body | unchanged (5) | Use claim/demo rendering evidence for repair/restart selection and 6b-N2 preservation. Ordinary environment loading does not classify a box as claims-enabled. Existing reads unchanged. | |
| +| `internal/host/units/carlos-instance-control.service` `external` | body | unchanged (1) | Load root-owned host.env on every box for sandbox configuration; mask CARLOS_HOST_CLAIM in the default flag-off rendering. Only claim-enabled rendering removes that mask. No new agent-writable source or permission. | |
| +| `internal/instancectl/demo_policy.go` `Server.demoHandler` | body | unchanged (4) | Retain authenticated claim cleanup routes on demo-plus-claims sandbox refusal when a ClaimStop handler exists; sandbox admission still rejects claim launches, and claimAwareLegacy rejects legacy mutations. Existing registry reads unchanged. | |
| | `internal/instancectl/rootfs.go` `Server.runRootfsProbe` | body | unchanged (1) | Refuse sandbox configuration or readiness errors before preparing or starting the native rootfs probe. Existing image read unchanged. | |
| | `internal/instancectl/server.go` `Server.RunProbe` | body | unchanged (1) | Refuse sandbox configuration or readiness errors before fixture reads and native probe dispatch. Existing probe read unchanged. | |
| -| `internal/instancectl/server.go` `runWithClaim` | body | unchanged (4) | Retain fixed startup sandbox settings; preserve cleanup in gVisor claims refusal; disable native egress restarts and builder construction while sandbox admission is unavailable. Existing source reads unchanged. | |
| +| `internal/instancectl/server.go` `runWithClaim` | body | unchanged (4) | Require fixed sandbox settings from shared Configure; retain claim handler and legacy-route refusals; preserve egress asserter and revokes for invalid settings and gate only native restart dispatch. Native probe/build/start admission remains refused. Existing root reads unchanged. | |
| | `internal/instancectl/server.go` `type Server` | body | unchanged (1) | Add fixed configured and effective sandbox modes, configuration error and runtime readiness callback. No new path or read. | |
| Envelopes re-pinned: `internal/execsandbox`, `internal/host`, `internal/host/units`, `internal/instancectl`. |
| @@ -20,9 +24,13 @@ Review: a model from the other family than the author reads the branch's diff ag |
| Recorded dispositions, which each change must still satisfy: |
| - `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. |
| - `internal/host/claimstop_run.go` `RunInstanceControl`: authority, task C,D,G. Basis: rev3=PROPOSED-p3;run=24;identity=root claim/adopt/update controller uid 0;basis=production root startup builds authenticated execution and launch handlers then uses activateClaimRoot for recovery, the registered census launch verifier and lifecycle start;rev3=census-ruling-rootfs-apps-2;basis=the claims-off path serves through instancectl.RunWithRegistryView with HostRuntime: instanceRegistryHostRuntime beside the same instanceRegistryHostApp(nil); the new read is instanceRegistryHostRuntime's own (a decision row in rootfs-apps-2-new); no read added in this body;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328 plan 2 Tasks 4 and 6: the claims-off branch hands RunWithRegistryView the pre-claim egress asserter (newEgressAsserter over registryEgressSource and registryEgressHosts, which read the agent-written registry read-only, beside the instanceRegistryHostApp read it already had); the claims branch builds its runtime resources in instanceControlClaimResources, adding the claims asserter (claimsEgressSource writes no allow; the registry is read only to name slices), and serves through runClaimControl, which passes RunWithClaim the same handler, held-release route and host lookup plus that asserter. No read site in the unit, none added.;rev3=census-ruling-agent-start-demo-1;basis=Wires demo registry views and existing root release/adoption guard into instance control.;rev3=census-ruling-region-ha-p3b;basis=Add root hairpin identity verification, dormant install and reset CLI entries with bounded contexts. Indirect inputs are root-owned marker/identity/ingress/state and kernel/systemd process evidence; no request-controlled addresses or executable path. Existing control-service path remains. |
| - `internal/host/claimunit.go` `claimUnitContent`: authority, task E1,E3. Basis: rev3=PROPOSED-p3;identity=root claim/adoption controller uid 0;basis=adds write permission for exactly the public retry directory only when the root settings reader has verified a complete census and prepared that directory;rev3=census-ruling-agent-start-demo-1;basis=Demo-only ReadWritePaths for instance data/runtime, staged files and root release lock; ordinary rendering unchanged.;rev3=census-ruling-agent-start-demo-1-followups;basis=In demo box mode, declare StateDirectory=carlos-release/private with mode 0700 so systemd creates root-owned release state before namespace setup and keeps it writable. Existing ReadWritePaths and ordinary/claims rendering stay unchanged. No new read site or caller-controlled path.;rev3=census-ruling-agent-start-demo-3;basis=Declare /var/lib/carlos-demo-snapshots as root-owned StateDirectory with mode 0700 only for configured demo boxes, including recovery with admission off. Ordinary claims units retain their original directories. The shared unit template is unchanged from main; no file read is added. |
| +- `internal/host/systemapply.go` `systemApplier.installUnits`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-agent-start-demo-1;basis=Renders the staged build slice against live root host configuration; preserves it when settings cannot be parsed.;rev3=census-ruling-region-ha-p3b;basis=Require group apply/rollback permit, preserve root Restart=no/nftables drop-in and masks, and skip automatic update/recovery units. Existing staged unit and host.env reads remain; new indirect marker/permit reads are protected and agent receipts are excluded. |
| +- `internal/host/systemunits.go` `ensureSystemUnitsWithGuard`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-region-ha-p3b;basis=Move unit-repair body here with existing lock/unit/host.env reads; under lock require operator repair permit on groups before writes and each systemctl effect, preserve root masks/drop-in and omit automatic update/recovery units. New indirect protected marker/permit reads, never agent receipt; fixed repair unchanged. |
| - `internal/host/units/carlos-instance-control.service` `external`: authority, task B3,C,D,E1,J4. Basis: root-input;kept=B3,C,D,E1;scope=protected-decision-only;rev3=census-ruling-agent-start-demo-3;basis=Correct the runtime-write comment to include escaped demo snapshot .mount units alongside per-generation drop-ins; service directives are unchanged.;rev3=census-ruling-region-ha-graceful-terminate-t1;basis=Region HA T1/DR-4 final fix: retain After=nftables.service without Wants or Requires; add Restart=on-failure and RestartSec=1 so a crashed control restarts before a later edge stop can block socket activation and shutdown proofs; rewrap the header and explain this ordering. Same ExecStart and protections; no new root read, input, path, command or capability. |
| +- `internal/instancectl/demo_policy.go` `Server.demoHandler`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-agent-start-demo-1;basis=R26: HostDemo and the demo start/purge lock run only in demo mode. Ordinary starts do not read HostDemo or gain its read-error refusal. Demo-mode missing/non-demo/held-row and read-error refusals remain. |
| - `internal/instancectl/rootfs.go` `Server.runRootfsProbe`: legacy, task accepted-legacy. Basis: 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. |
| - `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). |
| @@ -34,6 +42,6 @@ New dispositions, which census-propose wrote and the reviewer checks against the |
| - new `internal/host/execsandbox.go:sandboxExecGate`: reads +whole:Route ×2; written legacy, accepted-legacy, frozen |
| - new `internal/host/execsandbox.go:sandboxRouteGate`: reads +registry:Runtime, +whole:Route ×2; written legacy, accepted-legacy, frozen |
| -Seal: `b970bb28c5a633d2572a1da549030e9258cfdabb6322ddffdd0ebf41b56c464c` → `218776be89b3c83e9f015c5b52abe79be0be27f102f003387ecc9693e676e05e`. |
| +Seal: `b970bb28c5a633d2572a1da549030e9258cfdabb6322ddffdd0ebf41b56c464c` → `39d38b6f517d92fcace7950644b0fc3455d03f5e055fd3c08a7f9ffcb06652dd`. |
| Overlay: `internal/provision/testdata/plan14-root-reads-gvisor-demos.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`. |
diff --git a/internal/execsandbox/config.go b/internal/execsandbox/config.go| new file mode 100644 |
| index 000000000..9e1c9d8c3 |
| --- /dev/null |
| +++ b/internal/execsandbox/config.go |
| @@ -0,0 +1,26 @@ |
| +package execsandbox |
| + |
| +import ( |
| + "github.com/carlosframework/platform/internal/demo" |
| + "github.com/carlosframework/platform/internal/hostwrite" |
| +) |
| + |
| +// Configure captures the process's mode and startup refusal from its environment. |
| +func Configure(getenv func(string) string) (Configured, Effective, error) { |
| + configured, err := Parse(getenv) |
| + cfg, demoErr := demo.BoxConfig(getenv) |
| + effective := Resolve(configured, cfg.BoxMode()) |
| + if err != nil { |
| + return configured, effective, err |
| + } |
| + if demoErr != nil { |
| + return configured, effective, demoErr |
| + } |
| + if effective == EffectiveGVisor && hostwrite.Enabled(getenv) { |
| + return configured, effective, ErrClaims |
| + } |
| + if effective == EffectiveGVisor && !cfg.BoxMode() { |
| + return configured, effective, ErrUnsupported |
| + } |
| + return configured, effective, nil |
| +} |
diff --git a/internal/host/bootstrap.go b/internal/host/bootstrap.go| index 0d766dd73..29b356222 100644 |
| --- a/internal/host/bootstrap.go |
| +++ b/internal/host/bootstrap.go |
| @@ -14,7 +14,6 @@ import ( |
| "github.com/carlosframework/platform/internal/demo" |
| "github.com/carlosframework/platform/internal/hostenv" |
| - "bytes" |
| "embed" |
| "encoding/json" |
| "errors" |
| @@ -427,7 +426,7 @@ func bootstrapWithGroup(root string, consumers []string, planJSON, group bool) e |
| // (6b-N2). A control unit already rendered for an enabled box stays as |
| // it is, unrestarted, as adopt leaves it; a flag-off one is rendered as |
| // main renders it. |
| - keepControl := settingsErr != nil && bytes.Contains(beforeControl, []byte(claimControlEnvironment)) |
| + keepControl := settingsErr != nil && claimControlRendered(beforeControl) |
| var afterControl []byte |
| out := io.Writer(os.Stdout) |
| if planJSON { |
diff --git a/internal/host/claimstop_run.go b/internal/host/claimstop_run.go| index 6c927b153..6441cd416 100644 |
| --- a/internal/host/claimstop_run.go |
| +++ b/internal/host/claimstop_run.go |
| @@ -10,7 +10,6 @@ import ( |
| "time" |
| "github.com/carlosframework/platform/internal/demo" |
| - "github.com/carlosframework/platform/internal/execsandbox" |
| "github.com/carlosframework/platform/internal/hairpin" |
| "github.com/carlosframework/platform/internal/hostwrite" |
| "github.com/carlosframework/platform/internal/instancectl" |
| @@ -49,20 +48,16 @@ func RunInstanceControl(args []string) { |
| } |
| configured, effective, sandboxErr := execSandboxConfig(os.Getenv) |
| sandbox := instancectl.SandboxSettings{Configured: configured, Effective: effective, Err: sandboxErr} |
| - cfg, err := demo.BoxConfig(os.Getenv) |
| - if err != nil || cfg.BoxMode() && hostwrite.Enabled(os.Getenv) && sandboxErr == nil { |
| + cfg, claimsEnabled, err := instancectl.ControlConfig(os.Getenv, sandbox) |
| + if err != nil { |
| log.Fatal("instance-control: demo box configuration refused") |
| } |
| - if sandboxErr != nil || effective == execsandbox.EffectiveGVisor { |
| - instancectl.RunWithRegistryView(args, instancectl.RegistryView{HostApp: instanceRegistryHostApp(nil), HostRuntime: instanceRegistryHostRuntime, HostDemo: instanceRegistryDemo, DemoRoutes: instanceRegistryDemoRoutes, DemoPurgeGuard: instanceDemoPurgeGuard}, nil, sandbox) |
| - return |
| - } |
| ctx, cancel := context.WithCancel(context.Background()) |
| defer cancel() |
| if err := registerProductionLaunchVerifier(); err != nil { |
| log.Fatal(err) |
| } |
| - if hostwrite.Enabled(os.Getenv) { |
| + if claimsEnabled { |
| if err := claimRecoveryReady(rootparticipation.OpenForUpdate); err != nil { |
| log.Print(&ClaimDependencyError{Contracts: []string{"census", "registered verifier", "flag must stay off until Part 3 (G)"}}) |
| return |
| @@ -89,7 +84,9 @@ func RunInstanceControl(args []string) { |
| defer reg.Close() |
| // The egress asserter is in the resources before the assembly exists |
| // (Astra plan R1-5); RunWithClaim and the launch's units get the same one. |
| - ctx = withClaimRuntimeResources(ctx, instanceControlClaimResources(reg, dataDir())) |
| + resources := instanceControlClaimResources(reg, dataDir()) |
| + resources.Egress.RestartAllowed = func(context.Context) error { return sandbox.Err } |
| + ctx = withClaimRuntimeResources(ctx, resources) |
| ctx, err = ensureProductionClaimAssembly(ctx) |
| if err != nil { |
| log.Fatal(err) |
diff --git a/internal/host/claimunit.go b/internal/host/claimunit.go| index 397f01b76..5469ce94c 100644 |
| --- a/internal/host/claimunit.go |
| +++ b/internal/host/claimunit.go |
| @@ -20,6 +20,19 @@ var claimBootstrapHostEnv = "/etc/carlos/host.env" |
| var readClaimUnitFile = os.ReadFile |
| const claimControlEnvironment = "EnvironmentFile=-/etc/carlos/host.env\n" |
| +const claimControlMarker = "# Carlos claim/demo control rendering\n" |
| +const claimControlUnset = "UnsetEnvironment=CARLOS_HOST_CLAIM\n" |
| + |
| +// Older rendered units have state directories but no explicit marker. |
| +func claimControlRendered(content []byte) bool { |
| + lines := append([]byte("\n"), content...) |
| + for _, line := range []string{claimControlMarker, "StateDirectory=carlos-claims\n", "StateDirectory=carlos-demo-snapshots\n"} { |
| + if bytes.Contains(lines, []byte("\n"+line)) { |
| + return true |
| + } |
| + } |
| + return false |
| +} |
| type claimUnitSettings struct { |
| demo demo.Config |
| @@ -118,6 +131,12 @@ func claimUnitContent(name string, content []byte, cfg claimUnitSettings) []byte |
| if name != claimControlUnit { |
| return content |
| } |
| + if cfg.enabled || cfg.demo.BoxMode() { |
| + content = bytes.Replace(content, []byte("[Service]\n"), []byte("[Service]\n"+claimControlMarker), 1) |
| + } |
| + if cfg.enabled { |
| + content = bytes.ReplaceAll(content, []byte(claimControlUnset), nil) |
| + } |
| if cfg.demo.BoxMode() { |
| // Retain snapshot recovery on demo boxes even with admission off. |
| content = bytes.Replace(content, []byte("[Service]\n"), []byte("[Service]\nStateDirectory=carlos-demo-snapshots\nStateDirectoryMode=0700\n"), 1) |
| @@ -160,7 +179,7 @@ func claimUnitContent(name string, content []byte, cfg claimUnitSettings) []byte |
| } |
| func claimControlChanged(before, after []byte) bool { |
| - return !bytes.Equal(before, after) && (bytes.Contains(before, []byte(claimControlEnvironment)) || bytes.Contains(after, []byte(claimControlEnvironment))) |
| + return !bytes.Equal(before, after) && (claimControlRendered(before) || claimControlRendered(after)) |
| } |
| func restartClaimControl(path string, before, after []byte, systemctl func(...string) (string, error)) error { |
diff --git a/internal/host/claimunit_test.go b/internal/host/claimunit_test.go| index 5fc758bf7..61c967cdb 100644 |
| --- a/internal/host/claimunit_test.go |
| +++ b/internal/host/claimunit_test.go |
| @@ -140,7 +140,7 @@ func TestClaimControlUnitInstallers(t *testing.T) { |
| t.Fatal(e) |
| } |
| if name == claimControlUnit && !enabled { |
| - b = append(append([]byte{}, b...), []byte("\n[Service]\nEnvironmentFile=-/etc/carlos/host.env\n")...) |
| + b = claimUnitContent(claimControlUnit, b, claimUnitSettings{enabled: true, data: "/data", opt: "/opt/carlos"}) |
| } |
| if e = os.WriteFile(filepath.Join(units, name), b, 0644); e != nil { |
| t.Fatal(e) |
diff --git a/internal/host/demo_policy_test.go b/internal/host/demo_policy_test.go| index 27d7b1788..00ac9ed72 100644 |
| --- a/internal/host/demo_policy_test.go |
| +++ b/internal/host/demo_policy_test.go |
| @@ -153,8 +153,8 @@ func TestDemoPolicyBoxInstallers(t *testing.T) { |
| } |
| } |
| raw, err := os.ReadFile(filepath.Join(etc, "systemd/system", claimControlUnit)) |
| - if err != nil || strings.Contains(string(raw), claimControlEnvironment) { |
| - t.Fatalf("disabled box kept environment: %v", err) |
| + if err != nil || claimControlRendered(raw) { |
| + t.Fatalf("disabled box kept claim/demo rendering: %v", err) |
| } |
| } |
diff --git a/internal/host/execsandbox.go b/internal/host/execsandbox.go| index d65fd9a39..913f8dc7b 100644 |
| --- a/internal/host/execsandbox.go |
| +++ b/internal/host/execsandbox.go |
| @@ -4,29 +4,12 @@ import ( |
| "context" |
| "github.com/carlosframework/platform/internal/activator" |
| - "github.com/carlosframework/platform/internal/demo" |
| "github.com/carlosframework/platform/internal/execsandbox" |
| - "github.com/carlosframework/platform/internal/hostwrite" |
| "github.com/carlosframework/platform/internal/registry" |
| ) |
| func execSandboxConfig(getenv func(string) string) (execsandbox.Configured, execsandbox.Effective, error) { |
| - configured, err := execsandbox.Parse(getenv) |
| - cfg, demoErr := demo.BoxConfig(getenv) |
| - effective := execsandbox.Resolve(configured, cfg.BoxMode()) |
| - if err != nil { |
| - return configured, effective, err |
| - } |
| - if demoErr != nil { |
| - return configured, effective, demoErr |
| - } |
| - if effective == execsandbox.EffectiveGVisor && hostwrite.Enabled(getenv) { |
| - return configured, effective, execsandbox.ErrClaims |
| - } |
| - if effective == execsandbox.EffectiveGVisor && !cfg.BoxMode() { |
| - return configured, effective, execsandbox.ErrUnsupported |
| - } |
| - return configured, effective, nil |
| + return execsandbox.Configure(getenv) |
| } |
| // Classification is the same one the backend uses to choose root or direct exec. |
diff --git a/internal/host/execsandbox_fix1_test.go b/internal/host/execsandbox_fix1_test.go| new file mode 100644 |
| index 000000000..9cd78cdd7 |
| --- /dev/null |
| +++ b/internal/host/execsandbox_fix1_test.go |
| @@ -0,0 +1,219 @@ |
| +package host |
| + |
| +import ( |
| + "bytes" |
| + "context" |
| + "net/http" |
| + "net/http/httptest" |
| + "os" |
| + "path/filepath" |
| + "strings" |
| + "testing" |
| + |
| + "github.com/carlosframework/platform/internal/demo" |
| + "github.com/carlosframework/platform/internal/execsandbox" |
| + "github.com/carlosframework/platform/internal/instancectl" |
| +) |
| + |
| +func TestSandboxFix1ControlMarkerRestarts(t *testing.T) { |
| + raw, err := unitsFS.ReadFile("units/" + claimControlUnit) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + for _, tc := range []struct { |
| + name string |
| + cfg claimUnitSettings |
| + restart bool |
| + }{ |
| + {"ordinary", claimUnitSettings{}, false}, |
| + {"claims", claimUnitSettings{enabled: true, data: "/data", opt: "/opt/carlos"}, true}, |
| + {"demo", claimUnitSettings{demo: demo.Config{Account: "demo", Fleet: "dev", Domain: "demo.example"}}, true}, |
| + } { |
| + t.Run(tc.name, func(t *testing.T) { |
| + before := claimUnitContent(claimControlUnit, raw, tc.cfg) |
| + after := append(bytes.Clone(before), []byte("# next revision\n")...) |
| + calls := 0 |
| + if err := restartClaimControl("unused", before, after, func(...string) (string, error) { calls++; return "", nil }); err != nil { |
| + t.Fatal(err) |
| + } |
| + if (calls != 0) != tc.restart { |
| + t.Fatalf("restart calls=%d", calls) |
| + } |
| + if bytes.Contains(before, []byte(claimControlUnset)) == tc.cfg.enabled { |
| + t.Fatal("claim environment masking does not match rendering") |
| + } |
| + if claimControlRendered(before) != tc.restart { |
| + t.Fatal("rendering marker") |
| + } |
| + if strings.Count(string(before), claimControlEnvironment) != 1 { |
| + t.Fatal("host.env must load exactly once") |
| + } |
| + }) |
| + } |
| + if claimControlChanged(bytes.ReplaceAll(raw, []byte(claimControlEnvironment), nil), raw) { |
| + t.Fatal("ordinary upgrade restarted control") |
| + } |
| +} |
| + |
| +func TestSandboxFix1MalformedControlInstallers(t *testing.T) { |
| + raw, err := unitsFS.ReadFile("units/" + claimControlUnit) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + for _, mode := range []string{"ordinary", "claims", "demo", "historical claims"} { |
| + for _, installer := range []string{"bootstrap", "apply", "repair"} { |
| + t.Run(mode+"/"+installer, func(t *testing.T) { |
| + root := t.TempDir() |
| + etc := filepath.Join(root, "etc") |
| + unitDir := filepath.Join(etc, "systemd/system") |
| + cfg := claimUnitSettings{} |
| + if mode == "claims" || mode == "historical claims" { |
| + cfg = claimUnitSettings{enabled: true, data: "/data", opt: "/opt/carlos"} |
| + } |
| + if mode == "demo" { |
| + cfg.demo = demo.Config{Account: "demo", Fleet: "dev", Domain: "demo.example"} |
| + } |
| + before := claimUnitContent(claimControlUnit, raw, cfg) |
| + if mode == "historical claims" { |
| + before = bytes.ReplaceAll(before, []byte(claimControlMarker), nil) |
| + } |
| + before = append(bytes.Clone(before), []byte("# installed revision\n")...) |
| + write := func(path string, b []byte) { |
| + t.Helper() |
| + if err := os.MkdirAll(filepath.Dir(path), 0755); err != nil { |
| + t.Fatal(err) |
| + } |
| + if err := os.WriteFile(path, b, 0644); err != nil { |
| + t.Fatal(err) |
| + } |
| + } |
| + write(filepath.Join(unitDir, claimControlUnit), before) |
| + write(filepath.Join(etc, "carlos/host.env"), []byte("CARLOS_HOST_CLAIM=1\nOTHER='unterminated\n")) |
| + switch installer { |
| + case "bootstrap": |
| + if err := bootstrap(root, nil); err != nil { |
| + t.Fatal(err) |
| + } |
| + case "apply": |
| + f := newApplyFixture(t, "stable", "v1.0.0") |
| + f.a.etcDir = etc |
| + staged := t.TempDir() |
| + if err := bootstrap(staged, nil); err != nil { |
| + t.Fatal(err) |
| + } |
| + if err := f.a.installUnits(t.Context(), staged, nil); err != nil { |
| + t.Fatal(err) |
| + } |
| + case "repair": |
| + ensureSystemUnits(etc, filepath.Join(root, "lock"), func(...string) (string, error) { return "", nil }, func(...string) (string, error) { return "inactive\n", nil }, t.Logf) |
| + } |
| + got, err := os.ReadFile(filepath.Join(unitDir, claimControlUnit)) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + if mode != "ordinary" { |
| + if !bytes.Equal(got, before) { |
| + t.Fatal("lost installed claim/demo unit") |
| + } |
| + return |
| + } |
| + if !bytes.Equal(got, raw) { |
| + t.Fatal("ordinary unit was frozen instead of repaired") |
| + } |
| + if !bytes.Contains(got, []byte("\nUnsetEnvironment=CARLOS_HOST_CLAIM\n")) { |
| + t.Fatal("flag-off rendering can enter claims through host.env") |
| + } |
| + }) |
| + } |
| + } |
| +} |
| + |
| +func TestSandboxFix1ClaimServer(t *testing.T) { |
| + for _, mode := range []string{"invalid", "gvisor", "gvisor-demo"} { |
| + env := map[string]string{"CARLOS_HOST_CLAIM": "1", "CARLOS_EXEC_SANDBOX": mode} |
| + if mode == "gvisor-demo" { |
| + env["CARLOS_EXEC_SANDBOX"] = "gvisor" |
| + env["CARLOS_DEMO_BOX"] = "1" |
| + env["CARLOS_DEMO_ACCOUNT"] = "demo" |
| + env["CARLOS_DEMO_FLEET"] = "dev" |
| + env["CARLOS_DEMO_DOMAIN"] = "demo.example" |
| + } |
| + get := func(k string) string { return env[k] } |
| + settings := instancectl.SandboxSettingsFromEnvironment(get) |
| + cfg, claims, err := instancectl.ControlConfig(get, settings) |
| + if err != nil || !claims { |
| + t.Fatalf("claim server not selected: %v %v", claims, err) |
| + } |
| + ctx := context.WithValue(context.Background(), claimEntryKey{}, claimEntry{FlagRead: true, Enabled: true, Assembly: &ClaimAssembly{}}) |
| + seen := []string{} |
| + claim := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { seen = append(seen, r.URL.Path); w.WriteHeader(204) }) |
| + runClaimControl(ctx, nil, claim, func(_ []string, h, held http.Handler, _ func(string) (string, string, error), e *instancectl.EgressAsserter) { |
| + s := &instancectl.Server{DemoBox: cfg.BoxMode(), ClaimStop: h, SandboxConfigured: settings.Configured, SandboxEffective: settings.Effective, SandboxConfigErr: settings.Err} |
| + for _, path := range []string{"/claim/stop", "/claim/retire", "/claim/execution", "/claim/journal", "/claim/writers-stopped", "/claim/recovery-rebind"} { |
| + w := httptest.NewRecorder() |
| + s.Handler().ServeHTTP(w, httptest.NewRequest("POST", path, nil)) |
| + if w.Code != 204 { |
| + t.Fatalf("%s: %d", path, w.Code) |
| + } |
| + } |
| + for _, path := range []string{"/stop", "/reset", "/sweep", "/parent", "/size", "/claim/launch"} { |
| + w := httptest.NewRecorder() |
| + s.Handler().ServeHTTP(w, httptest.NewRequest("POST", path, nil)) |
| + if w.Code != 503 { |
| + t.Fatalf("%s: %d", path, w.Code) |
| + } |
| + } |
| + }) |
| + if len(seen) != 6 { |
| + t.Fatal(seen) |
| + } |
| + } |
| +} |
| + |
| +func TestSandboxFix1DemoClaimsFatal(t *testing.T) { |
| + env := map[string]string{"CARLOS_DEMO_BOX": "1", "CARLOS_DEMO_ACCOUNT": "demo", "CARLOS_DEMO_FLEET": "dev", "CARLOS_DEMO_DOMAIN": "demo.example", "CARLOS_HOST_CLAIM": "1"} |
| + for _, mode := range []string{"invalid", "systemd", "auto", "gvisor"} { |
| + env["CARLOS_EXEC_SANDBOX"] = mode |
| + get := func(k string) string { return env[k] } |
| + s := instancectl.SandboxSettingsFromEnvironment(get) |
| + _, claims, err := instancectl.ControlConfig(get, s) |
| + if !claims || (err == nil) != (s.Err == execsandbox.ErrClaims) { |
| + t.Fatalf("%s: claims=%v err=%v sandbox=%v", mode, claims, err, s.Err) |
| + } |
| + } |
| +} |
| + |
| +func TestSandboxFix1SharedConfiguration(t *testing.T) { |
| + for _, mode := range []string{"", "auto", "systemd", "gvisor", "bad", " gvisor"} { |
| + for _, demoBox := range []bool{false, true} { |
| + for _, claims := range []bool{false, true} { |
| + env := map[string]string{"CARLOS_EXEC_SANDBOX": mode} |
| + if demoBox { |
| + env["CARLOS_DEMO_BOX"] = "1" |
| + env["CARLOS_DEMO_ACCOUNT"] = "demo" |
| + env["CARLOS_DEMO_FLEET"] = "dev" |
| + env["CARLOS_DEMO_DOMAIN"] = "demo.example" |
| + } |
| + if claims { |
| + env["CARLOS_HOST_CLAIM"] = "1" |
| + } |
| + reads := 0 |
| + get := func(k string) string { |
| + if k == "CARLOS_EXEC_SANDBOX" { |
| + reads++ |
| + } |
| + return env[k] |
| + } |
| + c, e, err := execSandboxConfig(get) |
| + if reads != 1 { |
| + t.Fatalf("agent resolved %d times", reads) |
| + } |
| + reads = 0 |
| + s := instancectl.SandboxSettingsFromEnvironment(get) |
| + if reads != 1 || c != s.Configured || e != s.Effective || err != s.Err { |
| + t.Fatalf("root and agent differ: %s/%v/%v", mode, demoBox, claims) |
| + } |
| + } |
| + } |
| + } |
| +} |
diff --git a/internal/host/systemapply.go b/internal/host/systemapply.go| index 9ccb2d87e..39f531964 100644 |
| --- a/internal/host/systemapply.go |
| +++ b/internal/host/systemapply.go |
| @@ -1,7 +1,6 @@ |
| package host |
| import ( |
| - "bytes" |
| "context" |
| "crypto/ed25519" |
| "crypto/sha256" |
| @@ -1473,7 +1472,7 @@ func (a *systemApplier) installUnits(ctx context.Context, stagedRoot string, rem |
| // (6b-N2). A control unit already rendered for an enabled box stays as |
| // it is, unrestarted, as adopt leaves it; a flag-off one is rendered as |
| // main renders it. |
| - keepControl := settingsErr != nil && bytes.Contains(beforeControl, []byte(claimControlEnvironment)) |
| + keepControl := settingsErr != nil && claimControlRendered(beforeControl) |
| entries, err := os.ReadDir(filepath.Join(stagedRoot, "etc", "systemd", "system")) |
| if err != nil { |
| return err |
diff --git a/internal/host/systemunits.go b/internal/host/systemunits.go| index edae092d9..eceb90232 100644 |
| --- a/internal/host/systemunits.go |
| +++ b/internal/host/systemunits.go |
| @@ -178,7 +178,7 @@ func ensureSystemUnitsWithGuard(etcDir, lockPath string, systemctl, probe func(a |
| logf("adopt: instance-control unit: %v", err) |
| return |
| } |
| - controlChanged := settingsErr == nil && (claimSettings.enabled || claimSettings.demo.BoxMode() || bytes.Contains(installed, []byte(claimControlEnvironment))) && (err != nil || !bytes.Equal(installed, claimUnitContent(claimControlUnit, control, claimSettings))) |
| + controlChanged := settingsErr == nil && (claimSettings.enabled || claimSettings.demo.BoxMode() || claimControlRendered(installed)) && (err != nil || !bytes.Equal(installed, claimUnitContent(claimControlUnit, control, claimSettings))) |
| dbrEnabled := parseIsEnabled(dbrEnabledOut) |
| // Dark: neither listening nor enabled for the next boot. |
| dbrDark := !*dbrActive && (dbrEnabled == nil || !*dbrEnabled) |
| @@ -204,7 +204,7 @@ func ensureSystemUnitsWithGuard(etcDir, lockPath string, systemctl, probe func(a |
| } |
| // A host.env this pass cannot parse says nothing about the claim |
| // (6b-N2): a control unit rendered for an enabled box stays as it is. |
| - if u == claimControlUnit && settingsErr != nil && bytes.Contains(installed, []byte(claimControlEnvironment)) { |
| + if u == claimControlUnit && settingsErr != nil && claimControlRendered(installed) { |
| continue |
| } |
| b, err := unitsFS.ReadFile("units/" + u) |
diff --git a/internal/host/units/carlos-instance-control.service b/internal/host/units/carlos-instance-control.service| index 1b48c9d64..456c372c7 100644 |
| --- a/internal/host/units/carlos-instance-control.service |
| +++ b/internal/host/units/carlos-instance-control.service |
| @@ -33,6 +33,7 @@ After=nftables.service |
| [Service] |
| EnvironmentFile=-/etc/carlos/host.env |
| +UnsetEnvironment=CARLOS_HOST_CLAIM |
| ExecStart=/opt/carlos/carlos instance-control |
| # The edge is ordered After= control (T1/DR-4), so a socket-activated start |
| # of a dead control queues behind any edge stop job and stalls the agent's |
diff --git a/internal/instancectl/claim.go b/internal/instancectl/claim.go| index 76abfac04..84d36e20a 100644 |
| --- a/internal/instancectl/claim.go |
| +++ b/internal/instancectl/claim.go |
| @@ -21,8 +21,8 @@ func requestConnContext(ctx context.Context, c net.Conn) context.Context { |
| // host passes it only with both flags on; nil leaves the route absent). |
| // egress is as for RunWithRegistry; under claims its source writes no |
| // allow (ruling 9). |
| -func RunWithClaim(args []string, handler, heldRelease http.Handler, hostApp func(string) (string, string, error), egress *EgressAsserter, sandbox ...SandboxSettings) { |
| +func RunWithClaim(args []string, handler, heldRelease http.Handler, hostApp func(string) (string, string, error), egress *EgressAsserter, sandbox SandboxSettings) { |
| // The claim root reads account and app only: under claim control no |
| // rootfs unit starts (RFS-2-C06), so the service needs no runtime view. |
| - runWithClaim(args, handler, heldRelease, RegistryView{HostApp: hostApp}, egress, sandbox...) |
| + runWithClaim(args, handler, heldRelease, RegistryView{HostApp: hostApp}, egress, sandbox) |
| } |
diff --git a/internal/instancectl/demo_policy.go b/internal/instancectl/demo_policy.go| index 36fbb5046..a1795c3f8 100644 |
| --- a/internal/instancectl/demo_policy.go |
| +++ b/internal/instancectl/demo_policy.go |
| @@ -19,7 +19,7 @@ import ( |
| // DemoBox comes only from this root service's environment, never a request. |
| func (s *Server) demoHandler(next http.Handler) http.Handler { |
| return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { |
| - if s.DemoBox && (strings.HasPrefix(r.URL.Path, "/claim/") || r.Method == "POST" && (r.URL.Path == "/cmd" || r.URL.Path == "/tty" || r.URL.Path == "/seed")) { |
| + if s.DemoBox && (s.ClaimStop == nil && strings.HasPrefix(r.URL.Path, "/claim/") || r.Method == "POST" && (r.URL.Path == "/cmd" || r.URL.Path == "/tty" || r.URL.Path == "/seed")) { |
| http.Error(w, demo.ErrPolicy.Error(), http.StatusForbidden) |
| return |
| } |
diff --git a/internal/instancectl/egress.go b/internal/instancectl/egress.go| index fe7debb40..a8f15b2d9 100644 |
| --- a/internal/instancectl/egress.go |
| +++ b/internal/instancectl/egress.go |
| @@ -110,12 +110,14 @@ type EgressReport struct { |
| // slice (SliceName), so nothing from a request reaches systemctl as a |
| // string. A nil *EgressAsserter does nothing. |
| type EgressAsserter struct { |
| - Systemctl func(context.Context, ...string) (string, error) |
| - Source EgressSource |
| - LocalAddrs func() ([]netip.Prefix, error) |
| - CgroupRoot string // /sys/fs/cgroup; Sweep lists the populated host slices under it |
| - Hosts func() ([]string, error) // names for slices, read once when Loop starts |
| - Logf func(string, ...any) |
| + // RestartAllowed gates native starts without blocking policy writes or revokes. |
| + RestartAllowed func(context.Context) error |
| + Systemctl func(context.Context, ...string) (string, error) |
| + Source EgressSource |
| + LocalAddrs func() ([]netip.Prefix, error) |
| + CgroupRoot string // /sys/fs/cgroup; Sweep lists the populated host slices under it |
| + Hosts func() ([]string, error) // names for slices, read once when Loop starts |
| + Logf func(string, ...any) |
| // UnderClaims is set when host claims are on: every revoke then |
| // restarts the slice's running services and nothing is nudged (reach), |
| // the sweep's reset of a slice it cannot name included, where there is |
| @@ -492,6 +494,11 @@ func (e *EgressAsserter) restartRunning(ctx context.Context, slice string, rep * |
| failed = append(failed, fmt.Sprintf("%q: not a unit name", unit)) |
| continue |
| } |
| + if e.RestartAllowed != nil { |
| + if err := e.RestartAllowed(ctx); err != nil { |
| + return keepDue(err) |
| + } |
| + } |
| inv, invErr := e.Systemctl(ctx, "show", "-p", "InvocationID", "--value", unit) |
| if out, err := e.Systemctl(ctx, "try-restart", unit); err != nil { |
| // A restart whose start fails (a claim unit's start without a |
diff --git a/internal/instancectl/sandbox.go b/internal/instancectl/sandbox.go| index 6055ac96d..90884e5dd 100644 |
| --- a/internal/instancectl/sandbox.go |
| +++ b/internal/instancectl/sandbox.go |
| @@ -2,6 +2,7 @@ package instancectl |
| import ( |
| "context" |
| + "errors" |
| "net/http" |
| "github.com/carlosframework/platform/internal/demo" |
| @@ -16,13 +17,28 @@ type SandboxSettings struct { |
| Err error |
| } |
| -func sandboxSettings(getenv func(string) string, cfg demo.Config) SandboxSettings { |
| - configured, err := execsandbox.Parse(getenv) |
| - effective := execsandbox.Resolve(configured, cfg.BoxMode()) |
| - if err == nil && effective == execsandbox.EffectiveGVisor && hostwrite.Enabled(getenv) { |
| - err = execsandbox.ErrClaims |
| +func SandboxSettingsFromEnvironment(getenv func(string) string) SandboxSettings { |
| + configured, effective, err := execsandbox.Configure(getenv) |
| + return SandboxSettings{Configured: configured, Effective: effective, Err: err} |
| +} |
| + |
| +// A sandbox refusal never changes whether the controller uses the claim protocol. |
| +func ControlConfig(getenv func(string) string, settings SandboxSettings) (demo.Config, bool, error) { |
| + cfg, err := demo.BoxConfig(getenv) |
| + claims := hostwrite.Enabled(getenv) |
| + if err != nil { |
| + return cfg, claims, err |
| + } |
| + if cfg.BoxMode() && claims && !errors.Is(settings.Err, execsandbox.ErrClaims) { |
| + return cfg, claims, demo.ErrConfig |
| + } |
| + return cfg, claims, nil |
| +} |
| + |
| +func (s *Server) bindSandboxEgress() { |
| + if s.Egress != nil && s.Egress.RestartAllowed == nil { |
| + s.Egress.RestartAllowed = s.sandboxAdmission |
| } |
| - return SandboxSettings{configured, effective, err} |
| } |
| func (s *Server) sandboxAdmission(ctx context.Context) error { |
| @@ -60,7 +76,7 @@ func (s *Server) sandboxHandler(next http.Handler) http.Handler { |
| return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { |
| if r.Method == http.MethodPost { |
| switch r.URL.Path { |
| - case "/start", "/seed", "/cmd", "/tty", "/claim/launch", "/egress", "/demo-build": |
| + case "/start", "/seed", "/cmd", "/tty", "/claim/launch", "/demo-build": |
| if !s.sandboxHTTP(w, r) { |
| return |
| } |
diff --git a/internal/instancectl/sandbox_egress_linux_test.go b/internal/instancectl/sandbox_egress_linux_test.go| new file mode 100644 |
| index 000000000..dd353f162 |
| --- /dev/null |
| +++ b/internal/instancectl/sandbox_egress_linux_test.go |
| @@ -0,0 +1,75 @@ |
| +//go:build linux |
| + |
| +package instancectl |
| + |
| +import ( |
| + "context" |
| + "net/http/httptest" |
| + "strings" |
| + "testing" |
| + |
| + "github.com/carlosframework/platform/internal/execsandbox" |
| +) |
| + |
| +func TestSandboxFix1EgressRevokes(t *testing.T) { |
| + for _, restart := range []bool{false, true} { |
| + t.Run(map[bool]string{false: "narrowing", true: "restart due"}[restart], func(t *testing.T) { |
| + policy := EgressPolicy{Allow: []string{"10.0.5.21"}} |
| + if restart { |
| + policy = EgressPolicy{} |
| + } |
| + ctl, e, unit := nudgeBox(t, "10.0.5.20/32 10.0.5.21/32", "", policy, nil) |
| + e.DueDir = t.TempDir() |
| + s := &Server{SandboxEffective: execsandbox.EffectiveSystemd, SandboxConfigErr: execsandbox.ErrConfig, Egress: e} |
| + s.bindSandboxEgress() |
| + w := httptest.NewRecorder() |
| + s.Handler().ServeHTTP(w, httptest.NewRequest("POST", "/egress?host="+egressHost, nil)) |
| + want := 204 |
| + if restart { |
| + want = 502 |
| + } |
| + if w.Code != want { |
| + t.Fatalf("HTTP %d: %s", w.Code, w.Body.String()) |
| + } |
| + if len(ctl.sets()) == 0 { |
| + t.Fatal("refused config suppressed revoke") |
| + } |
| + calls := ctl.takeCalls() |
| + if got := ctl.held[SliceName(egressHost)]; (restart && got != "") || (!restart && got != "10.0.5.21/32") { |
| + t.Fatalf("held allow=%q", got) |
| + } |
| + if !restart && !strings.Contains(strings.Join(calls, "\n"), "set-property --runtime "+unit+" IPAddressAllow=") { |
| + t.Fatal("running filter not nudged") |
| + } |
| + for _, call := range calls { |
| + if strings.HasPrefix(call, "try-restart ") { |
| + t.Fatalf("native start: %s", call) |
| + } |
| + } |
| + if restart { |
| + if !e.isRestartDue(SliceName(egressHost)) { |
| + t.Fatal("restart debt lost") |
| + } |
| + restored := newEgressAsserter(ctl, staticSource(policy, nil)) |
| + restored.DueDir = e.DueDir |
| + restored.CgroupRoot = e.CgroupRoot |
| + next := &Server{SandboxEffective: execsandbox.EffectiveSystemd, Egress: restored} |
| + next.bindSandboxEgress() |
| + if !restored.isRestartDue(SliceName(egressHost)) { |
| + t.Fatal("restart debt not persisted") |
| + } |
| + if err := restored.Assert(context.Background(), egressHost); err != nil { |
| + t.Fatal(err) |
| + } |
| + if restored.isRestartDue(SliceName(egressHost)) { |
| + t.Fatal("recovered config failed to finish revoke") |
| + } |
| + if !strings.Contains(strings.Join(ctl.takeCalls(), "\n"), "try-restart "+unit) { |
| + t.Fatal("owed restart not retried") |
| + } |
| + } else if e.isRestartDue(SliceName(egressHost)) { |
| + t.Fatal("successful live narrowing left debt") |
| + } |
| + }) |
| + } |
| +} |
diff --git a/internal/instancectl/sandbox_test.go b/internal/instancectl/sandbox_test.go| index 2f86a55b4..745667591 100644 |
| --- a/internal/instancectl/sandbox_test.go |
| +++ b/internal/instancectl/sandbox_test.go |
| @@ -31,7 +31,7 @@ func TestSandboxIncompleteAdmission(t *testing.T) { |
| t.Run(tc.name, func(t *testing.T) { |
| calls := 0 |
| s := &Server{DemoBuilder: sandboxTestBuilder{called: func() { calls++ }}, SandboxEffective: tc.mode, SandboxConfigErr: tc.configErr, DemoBox: tc.demo, Systemctl: func(context.Context, ...string) (string, error) { calls++; return "", nil }, FixtureOK: func() error { calls++; return nil }, ProbeImage: func(string) error { calls++; return nil }} |
| - for _, path := range []string{"/start?host=demo.example&role=run", "/start?host=demo.example&role=sidecar", "/start?host=demo.example&role=run&gen=1", "/start?host=demo.example&runtime=rootfs", "/seed", "/cmd", "/tty", "/claim/launch", "/egress", "/demo-build"} { |
| + for _, path := range []string{"/start?host=demo.example&role=run", "/start?host=demo.example&role=sidecar", "/start?host=demo.example&role=run&gen=1", "/start?host=demo.example&runtime=rootfs", "/seed", "/cmd", "/tty", "/claim/launch", "/demo-build"} { |
| w := httptest.NewRecorder() |
| s.Handler().ServeHTTP(w, httptest.NewRequest("POST", path, nil)) |
| if w.Code != 503 || !strings.Contains(w.Body.String(), tc.want) { |
diff --git a/internal/instancectl/server.go b/internal/instancectl/server.go| index 8f1526d5e..b55e0a411 100644 |
| --- a/internal/instancectl/server.go |
| +++ b/internal/instancectl/server.go |
| @@ -28,7 +28,6 @@ import ( |
| "github.com/carlosframework/platform/internal/demo" |
| "github.com/carlosframework/platform/internal/demobuild" |
| "github.com/carlosframework/platform/internal/execsandbox" |
| - "github.com/carlosframework/platform/internal/hostwrite" |
| "github.com/carlosframework/platform/internal/provision" |
| "github.com/carlosframework/platform/internal/registry" |
| "github.com/carlosframework/platform/internal/release" |
| @@ -253,42 +252,38 @@ const ( |
| ) |
| // Run is `carlos instance-control`. |
| -func Run(args []string) { runWithClaim(args, nil, nil, RegistryView{}, nil) } |
| +func Run(args []string) { |
| + runWithClaim(args, nil, nil, RegistryView{}, nil, SandboxSettingsFromEnvironment(os.Getenv)) |
| +} |
| // RunWithRegistry is RunWithRegistryView with the account-and-app read only: |
| // such a service refuses every rootfs start. egress is as for |
| // RunWithRegistryView. |
| func RunWithRegistry(args []string, hostApp func(string) (string, string, error), egress *EgressAsserter) { |
| - RunWithRegistryView(args, RegistryView{HostApp: hostApp}, egress) |
| + RunWithRegistryView(args, RegistryView{HostApp: hostApp}, egress, SandboxSettingsFromEnvironment(os.Getenv)) |
| } |
| // RunWithRegistryView serves with view as the service's reads of the |
| // registry, and with the egress asserter (#328): the start paths and POST |
| // /egress assert through it, and its Loop re-asserts every populated host |
| // slice every 30 s. A nil egress is off. |
| -func RunWithRegistryView(args []string, view RegistryView, egress *EgressAsserter, sandbox ...SandboxSettings) { |
| - runWithClaim(args, nil, nil, view, egress, sandbox...) |
| +func RunWithRegistryView(args []string, view RegistryView, egress *EgressAsserter, sandbox SandboxSettings) { |
| + runWithClaim(args, nil, nil, view, egress, sandbox) |
| } |
| -func runWithClaim(args []string, claim, heldRelease http.Handler, view RegistryView, egress *EgressAsserter, sandbox ...SandboxSettings) { |
| +func runWithClaim(args []string, claim, heldRelease http.Handler, view RegistryView, egress *EgressAsserter, sandbox SandboxSettings) { |
| fs := flag.NewFlagSet("instance-control", flag.ExitOnError) |
| fs.Usage = cliflag.Usage(fs, "usage: carlos instance-control (socket-activated by carlos-instance-control.socket)") |
| _ = fs.Parse(args) |
| if os.Geteuid() != 0 { |
| log.Fatal("instance-control: this is the root service behind carlos-instance-control.socket; it is not for operators") |
| } |
| - cfg, cfgErr := demo.BoxConfig(os.Getenv) |
| - settings := SandboxSettings{} |
| - if len(sandbox) > 0 { |
| - settings = sandbox[0] |
| - } else { |
| - settings = sandboxSettings(os.Getenv, cfg) |
| - } |
| - if cfgErr != nil || cfg.BoxMode() && hostwrite.Enabled(os.Getenv) && settings.Err == nil { |
| + settings := sandbox |
| + cfg, _, cfgErr := ControlConfig(os.Getenv, settings) |
| + if cfgErr != nil { |
| log.Fatal("instance-control: demo box configuration refused") |
| } |
| - if cfg.BoxMode() || settings.Err != nil || settings.Effective == execsandbox.EffectiveGVisor { |
| - // Fixed demo unit restrictions need no registry-derived allow or restart sweep. |
| + if cfg.BoxMode() && claim == nil { |
| egress = nil |
| } |
| s := &Server{ |
| @@ -334,6 +329,7 @@ func runWithClaim(args []string, claim, heldRelease http.Handler, view RegistryV |
| ExeCurrent: installedBinaryCurrent, |
| Egress: egress, |
| } |
| + s.bindSandboxEgress() |
| ln, activated, err := activatedListener() |
| if err != nil { |
| log.Fatalf("instance-control: %v", err) |
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv| index 30d7f2963..20fe4fc4c 100644 |
| --- a/internal/provision/testdata/plan14-root-reads-chain.tsv |
| +++ b/internal/provision/testdata/plan14-root-reads-chain.tsv |
| @@ -128,4 +128,4 @@ plan14-root-reads-fix-activator-backoff-flake.tsv feba66806ddfcbdfaf369d72413bb1 |
| plan14-root-reads-region-ha-dr5.tsv f19eb78c1da1475cbf8e11a3d6c394d828aa1c8f88ae24469fe8d473581b934b |
| plan14-root-reads-instance-syscall-filter.tsv b970bb28c5a633d2572a1da549030e9258cfdabb6322ddffdd0ebf41b56c464c |
| plan14-root-reads-instance-restore-658-cli.tsv b970bb28c5a633d2572a1da549030e9258cfdabb6322ddffdd0ebf41b56c464c |
| -plan14-root-reads-gvisor-demos.tsv 218776be89b3c83e9f015c5b52abe79be0be27f102f003387ecc9693e676e05e |
| +plan14-root-reads-gvisor-demos.tsv 39d38b6f517d92fcace7950644b0fc3455d03f5e055fd3c08a7f9ffcb06652dd |
diff --git a/internal/provision/testdata/plan14-root-reads-gvisor-demos.tsv b/internal/provision/testdata/plan14-root-reads-gvisor-demos.tsv| index bfa962176..2f72046a7 100644 |
| --- a/internal/provision/testdata/plan14-root-reads-gvisor-demos.tsv |
| +++ b/internal/provision/testdata/plan14-root-reads-gvisor-demos.tsv |
| @@ -1,6 +1,10 @@ |
| # 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. |
| -# 8 body, 0 sites, 4 envelope: each changed unit re-frozen at its existing disposition with its claim appended. |
| +# 12 body, 0 sites, 4 envelope: each changed unit re-frozen at its existing disposition with its claim appended. |
| # 3 new dispositions: 0 reads re-frozen at their disposition with the claim, 3 new units frozen accepted-legacy, 0 quiet units retired while they read nothing, 0 other. |
| +@legacy 53142bae4c3f2ad8444ecd148a1e5389cf059e60e80b0366056a6f7dce33997b 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=Use the distinct claim/demo rendering marker, with historic state-directory recognition, for the 6b-N2 keep-installed decision; ordinary units are repaired on malformed host.env. Existing reads unchanged. file:Command@11946,file:ReadFile@564,file:ReadFile@7000 3cb60d7cb52e0e04a5ed690938acd5376f38e8275bf92624610f05bd3f6b41ab |
| +@legacy 30cbb184502cda61320987fa438776a839eee01c610185e050779ae82eeed822 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=Use claim/demo rendering evidence instead of the now-common EnvironmentFile line to preserve installed control on settings errors. Ordinary control stays flag-off and does not gain automatic restarts. Existing reads unchanged. file:ReadDir@1409,file:ReadFile@2000,file:ReadFile@5035,file:ReadFile@960,file:Stat@2658,file:Stat@3951 957f210b9c50169a414cc99ddf5ddae35a804e7c2ff734fe755e85bf3388087a |
| +@legacy 16c52a77d87551d9536e381991f55ea95e527b1d647d5d58ff2f1797c0e1b971 internal/host/systemunits.go ensureSystemUnitsWithGuard legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p3b;basis=Move unit-repair body here with existing lock/unit/host.env reads; under lock require operator repair permit on groups before writes and each systemctl effect, preserve root masks/drop-in and omit automatic update/recovery units. New indirect protected marker/permit reads, never agent receipt; fixed repair unchanged.;rev3=census-ruling-gvisor-demos;basis=Use claim/demo rendering evidence for repair/restart selection and 6b-N2 preservation. Ordinary environment loading does not classify a box as claims-enabled. Existing reads unchanged. file:OpenFile@293,file:ReadFile@4702,file:ReadFile@4835,file:ReadFile@6239,file:Stat@4611 123236f110db2d69dc2f425944485e52ba12fede7be07d07f7db0d08987f4f61 |
| +@legacy 5fd7a23e052a152316c75b4c833012f4ac059e747fa492da80bf6e1706058039 internal/instancectl/demo_policy.go Server.demoHandler legacy accepted-legacy accepted-legacy;rev3=census-ruling-agent-start-demo-1;basis=R26: HostDemo and the demo start/purge lock run only in demo mode. Ordinary starts do not read HostDemo or gain its read-error refusal. Demo-mode missing/non-demo/held-row and read-error refusals remain.;rev3=census-ruling-gvisor-demos;basis=Retain authenticated claim cleanup routes on demo-plus-claims sandbox refusal when a ClaimStop handler exists; sandbox admission still rejects claim launches, and claimAwareLegacy rejects legacy mutations. Existing registry reads unchanged. file:Query@485,file:Query@525,registry:Status@703,whole:Route@658 b52ba1d3b35ed5195d5009ec59c180abd32262bd716ddbac4e1de245f1173d2e |
| @legacy 05b7a387b7ff2a6a99259dde4f508f308afaf7cfff9a08c2ddc648169578c082 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. file:ReadFile@2005 6ad27d7fe661eba457ea01736b8c482e27fd3d1a64ed80e8afefa8ffe4e9f386 |
| @legacy 7129928a96c588d2dcaf6e93b8c5e5f6977f2519ccb60f1af361f7b1c57602ee 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=Refuse sandbox configuration or readiness errors before fixture reads and native probe dispatch. Existing probe read unchanged. file:ReadFile@2608 2a0e32e04c6e0c5f25021c62f760f72429fa5e91d7597fcc4b09b7fdf5790b34 |
| @legacy bc7cd834024c83776bd9b64133f191a03588dd973960954fd6a6ce853023ad69 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=Add fixed configured and effective sandbox modes, configuration error and runtime readiness callback. No new path or read. file:Statfs@4123 4f7b68950f5e49b21ed52a7d58e416d90f2e062e4e3c01e44468a2bd87494b98 |
| @@ -8,17 +12,21 @@ |
| @legacy ee7a88073c08baf804220709c6e2d7778d7d277054f413be0443d2ac431643ef internal/host/execsandbox.go sandboxExecGate legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Read the existing registry route through injected lookup only for gVisor; require the same route admission before BeforeExec. No new path; lookup is the existing registry handle. whole:Route@493,whole:Route@587 e66292565a6718b38622cfbd0747888356fb66fca161d782399067a0db23a1f5 |
| @legacy 8d2537e489c6d9c5782c1548a3cdabe421f20a9d4eae4b71d008d089c071a43c internal/host/execsandbox.go sandboxRouteGate legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Read existing route layout, demo marker and runtime to refuse unsupported or direct gVisor launches before the next config gate. No new path; layout inputs are the backend's existing ones. registry:Runtime@700,whole:Route@432,whole:Route@802 6d3b45864d6e551a523e37dbec39f6d7befd414d02ce6751531ac312c7ec1d67 |
| 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. file:Exec@19431,file:Open@1837,file:Statfs@50774,registry:App@12933,registry:Host@46810,whole:Route@12925,whole:Route@45968,whole:Route@46933,whole:Route@46995 c618605dd17ada0fb0b53b3c4d2176fd737c4f44b38a25298fbc1c48bae9fa0e |
| -internal/host/claimstop_run.go RunInstanceControl authority C,D,G rev3=PROPOSED-p3;run=24;identity=root claim/adopt/update controller uid 0;basis=production root startup builds authenticated execution and launch handlers then uses activateClaimRoot for recovery, the registered census launch verifier and lifecycle start;rev3=census-ruling-rootfs-apps-2;basis=the claims-off path serves through instancectl.RunWithRegistryView with HostRuntime: instanceRegistryHostRuntime beside the same instanceRegistryHostApp(nil); the new read is instanceRegistryHostRuntime's own (a decision row in rootfs-apps-2-new); no read added in this body;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328 plan 2 Tasks 4 and 6: the claims-off branch hands RunWithRegistryView the pre-claim egress asserter (newEgressAsserter over registryEgressSource and registryEgressHosts, which read the agent-written registry read-only, beside the instanceRegistryHostApp read it already had); the claims branch builds its runtime resources in instanceControlClaimResources, adding the claims asserter (claimsEgressSource writes no allow; the registry is read only to name slices), and serves through runClaimControl, which passes RunWithClaim the same handler, held-release route and host lookup plus that asserter. No read site in the unit, none added.;rev3=census-ruling-agent-start-demo-1;basis=Wires demo registry views and existing root release/adoption guard into instance control.;rev3=census-ruling-region-ha-p3b;basis=Add root hairpin identity verification, dormant install and reset CLI entries with bounded contexts. Indirect inputs are root-owned marker/identity/ingress/state and kernel/systemd process evidence; no request-controlled addresses or executable path. Existing control-service path remains.;rev3=census-ruling-gvisor-demos;basis=Resolve sandbox before claim assembly; serve legacy cleanup with starts refused for invalid config or unsupported gVisor claims; pass fixed settings to control. No new root read. 95d936bd0340a54c55b2fa19cd66f72dcd46d9220653383d0ce8b0f0ccd468c2 |
| -internal/host/claimunit.go claimUnitContent authority E1,E3 rev3=PROPOSED-p3;identity=root claim/adoption controller uid 0;basis=adds write permission for exactly the public retry directory only when the root settings reader has verified a complete census and prepared that directory;rev3=census-ruling-agent-start-demo-1;basis=Demo-only ReadWritePaths for instance data/runtime, staged files and root release lock; ordinary rendering unchanged.;rev3=census-ruling-agent-start-demo-1-followups;basis=In demo box mode, declare StateDirectory=carlos-release/private with mode 0700 so systemd creates root-owned release state before namespace setup and keeps it writable. Existing ReadWritePaths and ordinary/claims rendering stay unchanged. No new read site or caller-controlled path.;rev3=census-ruling-agent-start-demo-3;basis=Declare /var/lib/carlos-demo-snapshots as root-owned StateDirectory with mode 0700 only for configured demo boxes, including recovery with admission off. Ordinary claims units retain their original directories. The shared unit template is unchanged from main; no file read is added.;rev3=census-ruling-gvisor-demos;basis=Remove conditional host.env injection because the common control unit now includes it on every box. Existing template read unchanged. data-literal@1127 f0638f1d09817a59f7dc8058a3158e4aa5b2cd6e1cbb7fe3d4203abab4addc04 |
| -internal/host/units/carlos-instance-control.service external authority B3,C,D,E1,J4 root-input;kept=B3,C,D,E1;scope=protected-decision-only;rev3=census-ruling-agent-start-demo-3;basis=Correct the runtime-write comment to include escaped demo snapshot .mount units alongside per-generation drop-ins; service directives are unchanged.;rev3=census-ruling-region-ha-graceful-terminate-t1;basis=Region HA T1/DR-4 final fix: retain After=nftables.service without Wants or Requires; add Restart=on-failure and RestartSec=1 so a crashed control restarts before a later edge stop can block socket activation and shutdown proofs; rewrap the header and explain this ordering. Same ExecStart and protections; no new root read, input, path, command or capability.;rev3=census-ruling-gvisor-demos;basis=Load root-owned /etc/carlos/host.env on ordinary boxes as well as claim/demo boxes so sandbox configuration cannot be ignored. No new agent-writable source or permissions. file:external@0 c482cd60550eafdc5d37c0d96882e85e33515dd1791e971a6c1ab65b000eeabe |
| +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=Use the distinct claim/demo rendering marker, with historic state-directory recognition, for the 6b-N2 keep-installed decision; ordinary units are repaired on malformed host.env. Existing reads unchanged. file:Command@11946,file:ReadFile@564,file:ReadFile@7000 3cb60d7cb52e0e04a5ed690938acd5376f38e8275bf92624610f05bd3f6b41ab |
| +internal/host/claimstop_run.go RunInstanceControl authority C,D,G rev3=PROPOSED-p3;run=24;identity=root claim/adopt/update controller uid 0;basis=production root startup builds authenticated execution and launch handlers then uses activateClaimRoot for recovery, the registered census launch verifier and lifecycle start;rev3=census-ruling-rootfs-apps-2;basis=the claims-off path serves through instancectl.RunWithRegistryView with HostRuntime: instanceRegistryHostRuntime beside the same instanceRegistryHostApp(nil); the new read is instanceRegistryHostRuntime's own (a decision row in rootfs-apps-2-new); no read added in this body;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328 plan 2 Tasks 4 and 6: the claims-off branch hands RunWithRegistryView the pre-claim egress asserter (newEgressAsserter over registryEgressSource and registryEgressHosts, which read the agent-written registry read-only, beside the instanceRegistryHostApp read it already had); the claims branch builds its runtime resources in instanceControlClaimResources, adding the claims asserter (claimsEgressSource writes no allow; the registry is read only to name slices), and serves through runClaimControl, which passes RunWithClaim the same handler, held-release route and host lookup plus that asserter. No read site in the unit, none added.;rev3=census-ruling-agent-start-demo-1;basis=Wires demo registry views and existing root release/adoption guard into instance control.;rev3=census-ruling-region-ha-p3b;basis=Add root hairpin identity verification, dormant install and reset CLI entries with bounded contexts. Indirect inputs are root-owned marker/identity/ingress/state and kernel/systemd process evidence; no request-controlled addresses or executable path. Existing control-service path remains.;rev3=census-ruling-gvisor-demos;basis=Resolve sandbox once through shared Configure; select claim protocol independently of sandbox refusal and retain claim stop/recovery, activation and host-fence pass. Relax demo-plus-claims fatal only for ErrClaims. Keep egress asserter and install its restart-only refusal before claim recovery. No new root read. 8defd30b08522508edaf87978bf7e7a70ff48fc0aef71a63a702231f387f0efb |
| +internal/host/claimunit.go claimUnitContent authority E1,E3 rev3=PROPOSED-p3;identity=root claim/adoption controller uid 0;basis=adds write permission for exactly the public retry directory only when the root settings reader has verified a complete census and prepared that directory;rev3=census-ruling-agent-start-demo-1;basis=Demo-only ReadWritePaths for instance data/runtime, staged files and root release lock; ordinary rendering unchanged.;rev3=census-ruling-agent-start-demo-1-followups;basis=In demo box mode, declare StateDirectory=carlos-release/private with mode 0700 so systemd creates root-owned release state before namespace setup and keeps it writable. Existing ReadWritePaths and ordinary/claims rendering stay unchanged. No new read site or caller-controlled path.;rev3=census-ruling-agent-start-demo-3;basis=Declare /var/lib/carlos-demo-snapshots as root-owned StateDirectory with mode 0700 only for configured demo boxes, including recovery with admission off. Ordinary claims units retain their original directories. The shared unit template is unchanged from main; no file read is added.;rev3=census-ruling-gvisor-demos;basis=Mark only claim/demo renderings explicitly; common host.env remains loaded. Ordinary rendering masks CARLOS_HOST_CLAIM with UnsetEnvironment, removed only for a successfully parsed enabled claim rendering. Existing template read unchanged. data-literal@1364 dc20399778b94614bc05db6f6046949008921df8e0d9adef1b0d07be097d1bd3 |
| +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=Use claim/demo rendering evidence instead of the now-common EnvironmentFile line to preserve installed control on settings errors. Ordinary control stays flag-off and does not gain automatic restarts. Existing reads unchanged. file:ReadDir@1409,file:ReadFile@2000,file:ReadFile@5035,file:ReadFile@960,file:Stat@2658,file:Stat@3951 957f210b9c50169a414cc99ddf5ddae35a804e7c2ff734fe755e85bf3388087a |
| +internal/host/systemunits.go ensureSystemUnitsWithGuard legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p3b;basis=Move unit-repair body here with existing lock/unit/host.env reads; under lock require operator repair permit on groups before writes and each systemctl effect, preserve root masks/drop-in and omit automatic update/recovery units. New indirect protected marker/permit reads, never agent receipt; fixed repair unchanged.;rev3=census-ruling-gvisor-demos;basis=Use claim/demo rendering evidence for repair/restart selection and 6b-N2 preservation. Ordinary environment loading does not classify a box as claims-enabled. Existing reads unchanged. file:OpenFile@293,file:ReadFile@4702,file:ReadFile@4835,file:ReadFile@6239,file:Stat@4611 123236f110db2d69dc2f425944485e52ba12fede7be07d07f7db0d08987f4f61 |
| +internal/host/units/carlos-instance-control.service external authority B3,C,D,E1,J4 root-input;kept=B3,C,D,E1;scope=protected-decision-only;rev3=census-ruling-agent-start-demo-3;basis=Correct the runtime-write comment to include escaped demo snapshot .mount units alongside per-generation drop-ins; service directives are unchanged.;rev3=census-ruling-region-ha-graceful-terminate-t1;basis=Region HA T1/DR-4 final fix: retain After=nftables.service without Wants or Requires; add Restart=on-failure and RestartSec=1 so a crashed control restarts before a later edge stop can block socket activation and shutdown proofs; rewrap the header and explain this ordering. Same ExecStart and protections; no new root read, input, path, command or capability.;rev3=census-ruling-gvisor-demos;basis=Load root-owned host.env on every box for sandbox configuration; mask CARLOS_HOST_CLAIM in the default flag-off rendering. Only claim-enabled rendering removes that mask. No new agent-writable source or permission. file:external@0 707e8b43835f0c7fab990cf814e0de6e06e81135da93ad82b01c858feab39254 |
| +internal/instancectl/demo_policy.go Server.demoHandler legacy accepted-legacy accepted-legacy;rev3=census-ruling-agent-start-demo-1;basis=R26: HostDemo and the demo start/purge lock run only in demo mode. Ordinary starts do not read HostDemo or gain its read-error refusal. Demo-mode missing/non-demo/held-row and read-error refusals remain.;rev3=census-ruling-gvisor-demos;basis=Retain authenticated claim cleanup routes on demo-plus-claims sandbox refusal when a ClaimStop handler exists; sandbox admission still rejects claim launches, and claimAwareLegacy rejects legacy mutations. Existing registry reads unchanged. file:Query@485,file:Query@525,registry:Status@703,whole:Route@658 b52ba1d3b35ed5195d5009ec59c180abd32262bd716ddbac4e1de245f1173d2e |
| 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. file:ReadFile@2005 6ad27d7fe661eba457ea01736b8c482e27fd3d1a64ed80e8afefa8ffe4e9f386 |
| 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=Refuse sandbox configuration or readiness errors before fixture reads and native probe dispatch. Existing probe read unchanged. file:ReadFile@2608 2a0e32e04c6e0c5f25021c62f760f72429fa5e91d7597fcc4b09b7fdf5790b34 |
| -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 fixed startup sandbox settings; preserve cleanup in gVisor claims refusal; disable native egress restarts and builder construction while sandbox admission is unavailable. Existing source reads unchanged. data-literal@2576,file:CommandContext@1329,file:CommandContext@1507,file:Statfs@2597 a29d6cd24a299daa433a3aeb3a90736d09ffb46ad84154d64a8b29c92d76121c |
| +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=Require fixed sandbox settings from shared Configure; retain claim handler and legacy-route refusals; preserve egress asserter and revokes for invalid settings and gate only native restart dispatch. Native probe/build/start admission remains refused. Existing root reads unchanged. data-literal@2255,file:CommandContext@1008,file:CommandContext@1186,file:Statfs@2276 5a007c635397921c0c08353e644bc95c90b4a3834742a983c848b6ec3845838d |
| 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=Add fixed configured and effective sandbox modes, configuration error and runtime readiness callback. No new path or read. file:Statfs@4123 4f7b68950f5e49b21ed52a7d58e416d90f2e062e4e3c01e44468a2bd87494b98 |
| internal/execsandbox/runsc.lock.json external legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Embed verified release-20261102.0 runsc archive and binary digests for both Linux platforms; URLs are immutable upstream HTTPS sources. No external runtime read. file:external@0 ee02ee9a4290bae7bf2a33fd60d1bf07484c75efd5d481c2af50523a374375e8 |
| internal/host/execsandbox.go sandboxExecGate legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Read the existing registry route through injected lookup only for gVisor; require the same route admission before BeforeExec. No new path; lookup is the existing registry handle. whole:Route@493,whole:Route@587 e66292565a6718b38622cfbd0747888356fb66fca161d782399067a0db23a1f5 |
| internal/host/execsandbox.go sandboxRouteGate legacy accepted-legacy accepted-legacy;rev3=census-ruling-gvisor-demos;basis=Read existing route layout, demo marker and runtime to refuse unsupported or direct gVisor launches before the next config gate. No new path; layout inputs are the backend's existing ones. registry:Runtime@700,whole:Route@432,whole:Route@802 6d3b45864d6e551a523e37dbec39f6d7befd414d02ce6751531ac312c7ec1d67 |
| -@coverage internal/execsandbox 89521b5ee8c6cc353f08679228be7c6eddd624b0f80e1b39542f694ba1a0c897 |
| -@coverage internal/host d5462b0d5649e6e277f12368384cf5f3dd30aa0626f1477585c6494444417862 |
| -@coverage internal/host/units 937fa7f6bc87f9a11ca5b3d5f1baa71ff79bd79fd67a571988abdc8d95b486dc |
| -@coverage internal/instancectl 8b9b45e0219ead00708ac24d18f81c19aab0c4128bb5f584f703a040506f4bc8 |
| +@coverage internal/execsandbox a82f0d29e785761294636ba166ef77182c9b54223678313d3a5f1e12152f6b73 |
| +@coverage internal/host 6c84353dc2f5a136936c4872f2a69454d0f0578fc49583879fe8fa06854e87ae |
| +@coverage internal/host/units bd5e78f37a4c2e876e5d5eb906e0bee0987eff2b8c61fb0fe130b09bdd4f0540 |
| +@coverage internal/instancectl a943ca98500fd1e41282a8cb1421428f53df5e6a5ec2a347d542b107df03a6c8 |