gvisor demos: runsc is a pinned runtime set (spec rev 5.2, ruling R-T2)
Task 2's root runner showed the pinned runsc needs gvisor-bin/ helpers beside it. Pin five members per platform with a set ID; install all or nothing; one store-door object per member.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 files changed,
+43
−1
docs/superpowers/plans/2026-11-08-gvisor-demos.md+14 −0docs/superpowers/specs/2026-11-08-gvisor-demos-design.md+29 −1
CI failed — run details
Intent
diff --git a/docs/superpowers/plans/2026-11-08-gvisor-demos.md b/docs/superpowers/plans/2026-11-08-gvisor-demos.md| index 53eb72ce4..c6484abbc 100644 |
| --- a/docs/superpowers/plans/2026-11-08-gvisor-demos.md |
| +++ b/docs/superpowers/plans/2026-11-08-gvisor-demos.md |
| @@ -538,3 +538,17 @@ From plan review round 1; not applied inline, no further round. |
| - **P3-11. Duplicate host.env injection:** Task 1 (claimunit.go:31) and Task 3 Step 4 both add host.env to control. Keep one owner. Injecting all of host.env widens what root reads from the environment (for example `CARLOS_DATA_DIR` via `dataDir()` in claimstop_run.go); reading only `CARLOS_EXEC_SANDBOX` with the existing host-env parser, as runsc-ensure does, is smaller. |
| - **P3-12. Candidate buffering:** `systemArtifactLimit` (96 MiB) is buffered inside units capped at `MemoryMax=256M` (carlos-system-update.service:63). Note the headroom, or hash and scan the root-owned staged copy before `version` runs. |
| - **P3-13. `After=carlos-runsc.service` on control:** with the runsc object unreachable, every control (re)start waits up to `TimeoutStartSec=120`, including a socket-activated restart during edge shutdown (T1/DR-4). Consider a shorter fetch bound; design-level, note it in the runbook. |
| + |
| +## Build ruling R-T2 (2026-11-08): the pinned runtime is a set |
| + |
| +Spec rev 5.2 §5.1 supersedes every single-binary statement in this plan. Task 2 |
| +extends Task 1's lock schema: `RunscPin` gains `Files []RunscFile` (`{Path, SHA256}`, |
| +JSON `files`, `path`, `sha256`), sorted, exactly the five members of §5.1, and |
| +`SetID() string`; `RunscPath(pin)` returns `/opt/carlos/runsc/<setid>/runsc` and new |
| +`RunscDir(pin)` returns the set directory; `RunscObjectKey(platform, pin, member)` |
| +returns `bootstrap/router/runsc-<setid>/<asset>`; the top-level `sha256` of the runsc |
| +binary stays as the `runsc` member's hash. Task 2's fixture installs the whole set. |
| +Task 3's installer, verifier, cache and garbage collection operate on the set |
| +(all-or-nothing install by directory rename). Task 10's cut helper emits five assets |
| +per platform and the console mirrors each present member. Every test that named one |
| +binary names the set. |
diff --git a/docs/superpowers/specs/2026-11-08-gvisor-demos-design.md b/docs/superpowers/specs/2026-11-08-gvisor-demos-design.md| index 8265a885b..7e82ac0de 100644 |
| --- a/docs/superpowers/specs/2026-11-08-gvisor-demos-design.md |
| +++ b/docs/superpowers/specs/2026-11-08-gvisor-demos-design.md |
| @@ -1,4 +1,4 @@ |
| -# gVisor sandbox for anonymous demos: design (2026-11-08, rev 5.1) |
| +# gVisor sandbox for anonymous demos: design (2026-11-08, rev 5.2) |
| Discussion: amadan carlos/platform #527. Spike: `~/.cache/gvisor-spike/REPORT.md` |
| and `astra-integration.md` (2026-11-07, runsc release-20261102.0, systrap, t4g). |
| @@ -117,6 +117,34 @@ matches the pin is authentic wherever it was fetched from. |
| `carlos-runsc.service` on a backoff. Directories for other pins are removed by |
| runsc-ensure once no unit's ExecStart names them. |
| +### 5.1 The runtime is a set of files (rev 5.2, build ruling 2026-11-08) |
| + |
| +The pinned `runsc` of release-20261102.0 does not run alone: it executes helpers from |
| +`gvisor-bin/` beside its own path (Task 2 root runner `20261108T213441-eaf4ac`: |
| +`sidecar "gvisor_sentry" not usable: stat <dir>/gvisor-bin/gvisor_sentry`). So the |
| +pin is a **runtime set**, still pinned, checksummed and shipped through our channel |
| +(ruling 4 unchanged): |
| + |
| +- Members: `runsc`, `gvisor-bin/gvisor_sentry`, `gvisor-bin/runsc-fd-parking`, |
| + `gvisor-bin/gvisor-proc-umounter`, `gvisor-bin/gvisor-sentry-prewarmer`. Excluded: |
| + `containerd-shim-runsc-v1`, `gvisor-bin/checkpointgofer` (checkpoint/restore is a |
| + non-goal), `gvisor-bin/runsc-metric-server`. If a run needs an excluded member, the |
| + root runner shows it and the build stops for a ruling; nothing is added silently. |
| +- The lock lists each member's relative path and sha256 per platform. The **set ID** |
| + is the sha256 of the canonical manifest: one line per member, sorted by path, |
| + `<sha256><two spaces><relpath>\n`. |
| +- Installed layout: `/opt/carlos/runsc/<setid>/runsc` and |
| + `/opt/carlos/runsc/<setid>/gvisor-bin/<member>`, every directory root-owned 0755, |
| + every file root-owned 0755 single-link regular. Units name |
| + `/opt/carlos/runsc/<setid>/runsc`. |
| +- Objects: `bootstrap/router/runsc-<setid>/<asset>`, one object per member, with |
| + asset names flattened (no `/`, store-door shape): `runsc-<plat>`, |
| + `gvisor-sentry-<plat>`, `runsc-fd-parking-<plat>`, `gvisor-proc-umounter-<plat>`, |
| + `gvisor-sentry-prewarmer-<plat>`. The same names are the release assets. |
| +- runsc-ensure installs the whole set or nothing (write every member to temp under |
| + a temp set directory, fsync, then rename the directory into place); Ready verifies |
| + every member. Everything else in §5 is unchanged. |
| + |
| ## 6. Units and the bundle |
| ### 6.1 Templates (embedded in `internal/host/units`) |