gvisor demos: design round 4 findings
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+26
−0
docs/superpowers/reviews/CODEX-FINDINGS-gvisor-demos-design-R4.md+26 −0
diff --git a/docs/superpowers/reviews/CODEX-FINDINGS-gvisor-demos-design-R4.md b/docs/superpowers/reviews/CODEX-FINDINGS-gvisor-demos-design-R4.md| new file mode 100644 |
| index 000000000..9b35477d2 |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/CODEX-FINDINGS-gvisor-demos-design-R4.md |
| @@ -0,0 +1,26 @@ |
| +R3 P1-1 — **Partly:** the prescribed first-roll order is safe, but bootstrap and guarded executor selection remain incompletely protected. |
| +R3 P1-2 — **Resolved:** retaining `/stop`’s fence, removing bundles before releasing it, and refusing gVisor generations excludes delayed earlier starts. |
| +R3 P2-3 — **Resolved:** the marker format, bounded reader and stripped-binary tests replace the incorrect `rootFloorBinary` analogy. |
| +R3 P2-4 — **Resolved:** size reporting uses retained unit identity and maps physical limits back to logical tiers. |
| + |
| +Reviewed `77e2943c..e577d5dc`. No files changed; no tests run. |
| + |
| +1. **P1 — §7, activation baseline: checking Ready does not cover every executor that can bypass Ready.** |
| + |
| + **Problem and failure scenarios:** |
| + |
| + - **Fresh bootstrap remains unprotected.** The new assertion that an unaware bootstrap “never enters gVisor mode” does not prevent native execution when host.env explicitly requires gVisor ([design:353](/home/paulca/amadan.net/carlos/platform-gvisor-demos/docs/superpowers/specs/2026-11-08-gvisor-demos-design.md:353)). That binary ignores the setting and never executes the proposed baseline check. Existing bootstrap arms its units ([bootstrap.go:679](/home/paulca/amadan.net/carlos/platform-gvisor-demos/internal/host/bootstrap.go:679)); the unaware controller selects native units ([server.go:835](/home/paulca/amadan.net/carlos/platform-gvisor-demos/internal/instancectl/server.go:835)). An old bootstrap/pointer plus `CARLOS_EXEC_SANDBOX=gvisor` therefore still permits native workloads. |
| + |
| + - **An aware guard executable still needs an explicit check on its selected candidate.** Condition (b) checks the guard’s marker; the recovery change checks only the shell’s second branch. The first branch executes guard-exec directly ([recovery unit:41](/home/paulca/amadan.net/carlos/platform-gvisor-demos/internal/host/units/carlos-system-recover.service:41)). Guard-exec selects `.prev` when a journal exists and executes it through either its floor-selection path or `d.Exec` ([guardexec.go:70](/home/paulca/amadan.net/carlos/platform-gvisor-demos/internal/host/guardexec.go:70)). The revision does not specify an exec-sandbox check before either execution. |
| + |
| + A later aware transaction does not inherently make `.prev` aware: `decidePrev` retains the existing backup when `applied.json` does not certify the current binary ([systemapply.go:915](/home/paulca/amadan.net/carlos/platform-gvisor-demos/internal/host/systemapply.go:915)). Conditions (a)–(c) do not exclude that starting state. After an interrupted transaction, the guard can therefore execute an unaware `.prev`; that process’s recovery can restore native control. Blocking the aware controller’s Ready does not constrain it. |
| + |
| + **Fix or cut:** require an external bootstrap check before executing an unaware binary with gVisor requested. Explicitly apply the exec-sandbox check to every guard-selected candidate before execution. Alternatively, refuse those bootstrap configurations and all retained guard configurations up front until those protections exist. This preserves ruling A. |
| + |
| + **Fault family:** no native fallback during activation and recovery; continuation of R3 P1-1. |
| + |
| +The original-unit cleanup claim is correct: `backend_exec.go:2823` marks the uncertain start; wake cleanup calls `legacyRunGone`, which reaches `LegacyRunGone` and the original-unit `/stop` path ([maintenance.go:415](/home/paulca/amadan.net/carlos/platform-gvisor-demos/internal/activator/maintenance.go:415), [backend_exec.go:2932](/home/paulca/amadan.net/carlos/platform-gvisor-demos/internal/activator/backend_exec.go:2932)). The revised fence contract resolves the termination finding. |
| + |
| +No additional P2 or P3 findings. Round 4 is exhausted; return the remaining activation/recovery finding to Paul with the refusal cut above. |
| + |
| +**NOT READY** |
| \ No newline at end of file |