carlos / platform Public

review: Astra brief for bounded-systemctl, round 1

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev f0283ee4fccf746079d4c4cc97de0a4810f9fdc3 parent bfc764e
1 file changed, +58 −0
  • docs/superpowers/reviews/REVIEW-BRIEF-bounded-systemctl.md +58 −0

CI failed — run details

diff --git a/docs/superpowers/reviews/REVIEW-BRIEF-bounded-systemctl.md b/docs/superpowers/reviews/REVIEW-BRIEF-bounded-systemctl.md
new file mode 100644
index 000000000..f5e24d0ba
--- /dev/null
+++ b/docs/superpowers/reviews/REVIEW-BRIEF-bounded-systemctl.md
@@ -0,0 +1,58 @@
+# Review brief: branch bounded-systemctl, round 1 of 3
+
+Repo carlos/platform, branch `bounded-systemctl`, commit bfc764e62b5c69a441c4c2609ef26a6e33935374.
+Under review: the diff `origin/main...bfc764e62b5c69a441c4c2609ef26a6e33935374` (base 7e50962).
+Authorities: `docs/superpowers/plans/2026-11-16-go-code-health.md` (batch 3),
+AGENTS.md ("The census", "Writing Go here", "Stopping rules").
+
+You are the independent reviewer and the census reviewer (card:
+`docs/superpowers/notes/census-proposal-bounded-systemctl.md`; verdict per
+unit and envelope, citing lines read). This is **root-side and
+termination-adjacent**: 45 systemctl/journalctl call sites across host,
+activator, caps, demobuild, hairpin, ops and instancectl now go through a
+new `internal/systemd` helper with timeouts (30 s read-only and journalctl,
+5 min job verbs, 18 min system apply/recovery), killed at the bound with a
+1 s WaitDelay; guard `TestSystemctlCallsAreBounded`; the edge prober's
+dial bounded at its 2 s probe timeout.
+
+## What to check
+
+1. Values: are 30 s / 5 min / 18 min right against the units' own
+ TimeoutStartSec/TimeoutStopSec, the drain and recovery units, and the
+ update unit's 20 min? Could any legitimate operation now be cut?
+2. Outcome changes the implementer lists: adopt restart past 5 min errors
+ (rollback without poisoning the version); settle's `show` timing out
+ counts "not up" and triggers rollback (left as the existing rule); system
+ apply past 18 min fails and rolls back. Is each safe? Is any rollback now
+ triggered by a slow-but-healthy systemd where it wasn't before?
+3. `systemd.Detached()` (context.Background() inside the helper) is used by
+ host callers with no context. **It also hides those sites from the
+ ratchet's host-context metric.** Is that a dodge of the ratchet (fault
+ family: measurement boundary), and should those callers thread a context
+ or count?
+4. The constructor is named `Command` so the census keeps counting the
+ exec sites (otherwise 38 units would lose their only counted site and be
+ retired). Is that sound census practice, or does it hide a change the
+ census should see? Do all dispositions remain correct?
+5. Kill at the bound: does killing systemctl mid-job leave systemd's job
+ running (it does: the job lives in PID 1)? Does any caller assume the
+ job stopped when the call returns an error?
+6. The guard: catches exec of systemctl/journalctl by any spelling
+ (exec.Command, CommandContext, sh -c, a path, a var)? Empty allowlist
+ correct (grouproll/box.go builds a remote script, not a local call)?
+7. The prober dial: link-local refusal kept; 2 s right?
+8. Tests: fake systemctl on PATH only; would each fail on the old code.
+
+## Severity
+
+- **P1**: unsafe, would not compile, a test fails, or it would not work.
+- **P2**: wrong or missing. Fixed without reopening this review (root,
+ termination and census changes in the fix still get a scoped check).
+- **P3**: clarity or polish. Follow-up list only.
+
+## Output
+
+Findings ranked P1, P2, P3 with file:line, failure scenario and fix, and
+the invariant each breaks. Then the census verdicts. End with exactly one
+verdict: READY, READY AFTER FIXES, or NOT READY. Do not edit files, spawn
+reviewers or run full suites.