rootfs-check-volumes: Astra R1 findings and the R2 brief
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 files changed,
+28
−0
docs/superpowers/reviews/CODEX-FINDINGS-rootfs-check-volumes-R1.md+17 −0docs/superpowers/reviews/CODEX-REVIEW-BRIEF-rootfs-check-volumes-R2.md+11 −0
CI passed — run details
diff --git a/docs/superpowers/reviews/CODEX-FINDINGS-rootfs-check-volumes-R1.md b/docs/superpowers/reviews/CODEX-FINDINGS-rootfs-check-volumes-R1.md| new file mode 100644 |
| index 000000000..e2be49076 |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/CODEX-FINDINGS-rootfs-check-volumes-R1.md |
| @@ -0,0 +1,17 @@ |
| +Reviewed `03e08f569cb2ecd07e0ecdc1ceba5d29f9b8cbad`, round 1/3. |
| + |
| +- **P1 — Helper container collides with a valid worker named `prepare`.** Verified in [ship_check.go:210](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/rootfs-check-volumes/ship_check.go:210): the helper requests `<prefix>-prepare`, remains until deferred cleanup, and `start` at line 300 assigns that same name to worker `prepare`. `ValidWorkerName` permits it (`internal/release/rootfs.go:70–85`). A healthy app with this worker fails its check when the runtime rejects the duplicate container name. **Fix:** give the helper a name outside the worker-name grammar and add a regression test whose fake rejects duplicate names. **Invariant:** internal helper names must not overlap valid process names. |
| + |
| +- **P2 — Tests do not pin the ownership transition or chmod-before-chown ordering.** [ship_check_prepare_test.go:20](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/rootfs-check-volumes/ship_check_prepare_test.go:20) passes the directory’s existing UID/GID at line 39. Verified by inspection: deleting `Lchown`, or moving it before `Chmod`, would satisfy these assertions. Such regressions would prevent UID 65534 from writing, or make chmod fail without `CAP_FOWNER`. **Fix:** add a capability-constrained integration test that changes ownership from root to 65534 and confirms that user can write; verify both mutations fail. **Invariant:** preparation must establish writable ownership using only `CAP_CHOWN`. |
| + |
| +No P3 findings. |
| + |
| +Census verdicts: |
| + |
| +- **APPROVE — `ship_check_probe.go:prepareCheckDir`.** Read lines 108–140. The `file:Lstat` read and `legacy / accepted-legacy` disposition match the container-only caller. It refuses a final symlink or non-directory, changes mode before ownership, and does not recurse. |
| +- **APPROVE — envelope `.`.** Read changed code in `main.go:21–51`, `ship_check.go:132–153,180–239,299–365`, and `ship_check_probe.go:108–140`; traced import, probe selection and cleanup. Import discards source execution metadata, the helper runs the selected probe with fixed arguments, and no box-root caller gains a new input path. The P1 collision is a functional defect. |
| +- **APPROVE — record-write re-pin `main.go:main`.** Read the dispatch and `internal/provision/rootfs_check_volumes_census_test.go:16–37`. The new dispatch writes no record; the `instances` and `sidecars` literals remain unchanged. |
| + |
| +Targeted check and census tests were attempted but stopped before compilation: Go could not create its work directory under read-only `$TMPDIR`. `GOCACHE` remained unset. No files changed; no full suites or mutation runs executed. |
| + |
| +NOT READY |
| \ No newline at end of file |
diff --git a/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-rootfs-check-volumes-R2.md b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-rootfs-check-volumes-R2.md| new file mode 100644 |
| index 000000000..7a3233ada |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-rootfs-check-volumes-R2.md |
| @@ -0,0 +1,11 @@ |
| +# Review brief: rootfs-check-volumes, round 2 of 3 |
| + |
| +Same branch, authorities and "what to check" as docs/superpowers/reviews/CODEX-REVIEW-BRIEF-rootfs-check-volumes.md (read it). Review the diff 03e08f56..<this brief's parent> for the fixes, and the whole branch diff 1fa2a99b..HEAD for anything they broke. |
| + |
| +Earlier rounds: R1 (docs/superpowers/reviews/CODEX-FINDINGS-rootfs-check-volumes-R1.md): P1 helper container name collides with a worker named `prepare`; P2 tests do not pin chmod-before-chown or the 65534 owner. Fix commits 29e0c39a (helper `<prefix>_prepare`, outside ^[a-z][a-z0-9-]{0,15}$; fake rejects duplicate names; TestRootfsCheckWorkerNamedLikeTheHelper) and 500ec2ba (checkChmod/checkLchown package vars; TestPrepareCheckDirSetsModeThenOwner). Census re-proposed 2d5be53e (same unit and read; seal 4fb2a2ad; envelope . re-pinned). |
| + |
| +First give one line per R1 P1/P2: resolved, partly, or not. Then new findings. Then census verdicts again for every unit and envelope on the current card (docs/superpowers/notes/census-proposal-rootfs-check-volumes.md) and the main.go main re-pin. |
| + |
| +Severity, output format and rules as in round 1. End with exactly one verdict: READY, READY AFTER FIXES, or NOT READY. |
| + |
| +Do not edit files. Do not spawn Anthropic-model reviewers or subagents of your own. Do not run the full test suites. |