carlos / platform Public

rootfs-worker-exit: Astra review brief, round 1

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev 8ea0b282a8c046e1687f3f326f9b90f5052794b3 parent 18e5561
1 file changed, +28 −0
  • docs/superpowers/reviews/CODEX-REVIEW-BRIEF-rootfs-worker-exit.md +28 −0

CI cancelled — superseded by a newer push — run details

diff --git a/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-rootfs-worker-exit.md b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-rootfs-worker-exit.md
new file mode 100644
index 000000000..94b7a35eb
--- /dev/null
+++ b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-rootfs-worker-exit.md
@@ -0,0 +1,28 @@
+# Review brief: rootfs-worker-exit, round 1 of 3
+
+Repo carlos/platform, branch `rootfs-worker-exit`, review the diff `a66482c9..<this brief's parent>`.
+Authorities on main: docs/superpowers/specs/2026-10-24-rootfs-apps-design.md (§5.4 crashes and restarts), docs/superpowers/plans/2026-10-24-rootfs-apps-3-lifecycle.md (Group W: RFS-3-C08..C10, "every other exit emits C09"), AGENTS.md (census, copy, stopping rules).
+
+You are an independent reviewer. Read the diff, then the code it names, and check every claim against that code.
+
+## The changes (found by Task 11 on dev fleet box r10r, systemd 257 with PrivatePIDs)
+1. 60edee13: a SIGKILLed rootfs process's exit record held result "success" with empty code/status, because systemd kills a not-our-child main pid before recording its exit, so ExecStopPost gets no EXIT_CODE/EXIT_STATUS. observe (internal/activator/unitproc.go) now falls back to systemd's ExecMainCode/ExecMainStatus through a new seam UnitMainExit (systemctl show), only when systemd's InvocationID matches the handle's; 1 -> exited/status, 2 -> killed, 3 -> dumped (signal named via workerSignals); a "success" result over a non-zero main exit becomes systemd's word. Covers run, gen, worker and sidecar handles; release cmd status already comes from root's cmdStatusOf.
+2. 8ea8e816 + 18e55618: a worker that ran and ended with no status emits RFS-3-C35 "worker %s exited. starting it again in %s" (Paul approved the text unchanged; id C12 was taken) at warn, paced like C09; a failed start keeps its old behaviour (log line, C10 on loop entry).
+3. b505b547: instances list REASON prints zdd.state.held-because "held: build %s failed on this box, because %s" with rolloutwords.Reason(r.Reason) when the box sent a reason, else zdd.state.held (Paul approved the text unchanged).
+4. census: card docs/superpowers/notes/census-proposal-rootfs-worker-exit.md.
+
+## What to check
+1. The fallback's trust: can a stale or foreign systemd state (a newer invocation, another instance's unit, a restarted unit) be attributed to this handle? Is the InvocationID match sufficient and race-free? What happens when systemctl fails or prints words instead of numbers?
+2. Mapping correctness against systemd's ExecMainCode values and the existing exit-status consumers (crash loop, C09/C11 wording, worker restarts, web generation stop/swap logic, lease proof). Could the "success over non-zero" rewrite change a clean stop into a crash, or the reverse, anywhere?
+3. RFS-3-C35 pacing and level; failed starts excluded; nothing else changes for workers that have a status.
+4. REASON: only rolloutwords.Reason phrases reach the cell (no raw box text); empty reason keeps the old cell.
+5. Census verdict for every unit and envelope on the card per AGENTS.md "Getting a change approved".
+6. Tests and mutations pin 1-4.
+
+## Severity
+P1 unsafe/wrong/fails, blocks merge; P2 wrong or missing, fixed without another round; P3 polish, follow-up list.
+
+## Output
+Findings P1, P2, P3 with evidence (file:line), failure scenario, fix, invariant. Census verdicts. 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.