edge-roll-blip: Astra spec review brief, round 2
1 file changed,
+127
−0
docs/superpowers/specs/CODEX-REVIEW-BRIEF-edge-roll-blip-spec-R2.md+127 −0
CI failed — run details
Intent
diff --git a/docs/superpowers/specs/CODEX-REVIEW-BRIEF-edge-roll-blip-spec-R2.md b/docs/superpowers/specs/CODEX-REVIEW-BRIEF-edge-roll-blip-spec-R2.md| new file mode 100644 |
| index 000000000..7d197b02c |
| --- /dev/null |
| +++ b/docs/superpowers/specs/CODEX-REVIEW-BRIEF-edge-roll-blip-spec-R2.md |
| @@ -0,0 +1,127 @@ |
| +# Review brief: edge-roll-blip design spec (#434 part B), round 2 of 3 |
| + |
| +Repo carlos/platform, branch `edge-roll-blip`, commit 6e029fd91c51aaf56768b83044d04cfebab7902b (the commit before this brief). |
| +Under review: `docs/superpowers/specs/2026-10-27-edge-roll-blip-design.md`. |
| +Authorities: the code on this branch (which is main plus docs only), AGENTS.md, |
| +and the binding brief `.superpowers/sdd/2026-10-27-edge-roll-blip/BRIEF.md`. |
| +Do not review against unmerged branches; if this work needs one, say so as a P1 and stop. |
| + |
| +You are an independent reviewer. Read the document, then the code it |
| +names, and check every claim against that code. The systemd man pages on |
| +this machine (systemd 257, the same major as the boxes) are the authority |
| +for systemd semantics: `man systemd.socket`, `man systemd.service`, |
| +`man systemd.unit`, `man systemctl`, `man sd_listen_fds`. |
| + |
| +## Fixed: do not re-argue |
| + |
| +- Paul's rulings in BRIEF.md: part B only (edge listeners survive a |
| + restart; edge holds requests to a restarting local upstream instead of |
| + 502; local witness; startup log line). Part C (instances surviving an |
| + edge restart, BindsTo) is OUT. No AWS, infra, DNS or box changes. No |
| + console special case unless forced. Prefer refusing up front over |
| + tolerance layers. |
| + |
| +## What to check |
| + |
| +1. Rollback safety, the hard part. Walk the spec's §4 table against the |
| + real updater, gate, rollback, recovery and bootstrap code |
| + (`systemapply.go` and friends, `internal/host/units`, the bootstrap |
| + script/code). Is there any mix (old/new binary x old/new units, first |
| + install, fresh bootstrap, gate rollback, `carlos-system-recover`, |
| + runtime OnFailure recovery, downgrade by `system update --file`) where |
| + an old binary starts while a socket unit holds :80/:443 and the box |
| + goes dark, beyond the one the spec names (row 14)? Verify the claim |
| + that every binary a box can roll back to records added units and runs |
| + `disable --now` on them during rollback (cite the version and line). |
| +2. D4 (`ExecStartPre=carlos system edge-socket-check`): does an unknown |
| + `system` verb really exit non-zero in every build a box could hold? |
| + Does a failed ExecStartPre on a socket unit leave the port unbound and |
| + not wedge `carlos-edge.service` (`Wants=`/`After=`)? |
| +3. D3/D7: unit dependency semantics. Does `Wants=` + `After=` on the |
| + socket give the ordering the spec claims for `systemctl restart |
| + carlos-edge` (old edge exits before the socket starts at first |
| + install)? Does `restart carlos-edge` leave an active socket alone? Is |
| + excluding the socket from `armedUnits` coherent with how |
| + `enabledUnits`/`armedUnits`/`ensureSystemUnits` actually work? |
| +4. D5: fd inheritance. Correct LISTEN_PID/LISTEN_FDS handling, close-on- |
| + exec, no leak of the public listeners or LISTEN_* env to tenant/exec |
| + children (the activator, the guard drop-in's `syscall.Exec`). Is |
| + matching by port correct with `BindIPv6Only=both` and the existing |
| + `-http`/`-https` flags (and dev mode)? |
| +5. D6: graceful stop. Does anything in the edge's shutdown path |
| + (http.Server.Shutdown, any custom drain, TLS, HTTP/3 if any) call |
| + shutdown(2) or otherwise empty the shared accept queue? |
| +6. #281 listen-first + admission latch and TLS readiness: with |
| + connections queued in a held backlog, is anything served before certs |
| + and the latch are ready, or does anything hang forever? |
| +7. D10: the loopback dial hold. Is retrying ECONNREFUSED on loopback TCP |
| + safe for every method and for upgrades? Does it interact badly with |
| + probed routes, the wake hold, `answered.go` cause classification, |
| + timeouts, or the activator's own dial logic? Is 13 s coherent with the |
| + existing limits? |
| +8. Unit hardening (`RestrictAddressFamilies`, capabilities, |
| + `SystemCallFilter`) and cross-compile (darwin/windows need linux-only |
| + code behind `//go:build linux` and a stub). |
| +9. §7 local witness: will it actually measure what it claims, on a |
| + machine without sudo, binding 127.0.0.1 only? |
| + |
| +## Round 2 |
| + |
| +Earlier rounds: round 1, `docs/superpowers/specs/CODEX-REVIEW-FINDINGS-edge-roll-blip-spec.md` |
| +(NOT READY: P1 recovery leaves an old binary behind an active socket, fault |
| +family "rollback compatibility"; P1 probed local routes still 503, fault |
| +family "restart admission"; four P2s). The spec's "Round 1 dispositions" |
| +section says how each was handled. The round number counts every earlier |
| +review of this design or change, under any file name or reviewer. |
| + |
| +First give one line per P1 and P2 from round 1: resolved, partly, or not. |
| +Carry every unresolved or partly resolved finding forward at its current |
| +severity, then add new findings. The verdict covers everything |
| +outstanding, earlier rounds included. Name the fault family beside every |
| +finding; say explicitly if a new finding is in the same family as a |
| +round-1 P1 (rollback compatibility, or restart admission). |
| + |
| +Round-2 focus, in addition to the list above: |
| +- INV-R and its two enforcement points (the `carlos-edge.service.d` |
| + guard drop-in and the socket's `ExecStartPre=` gate). Check that the |
| + drop-in really survives every old unit set and old applier/rollback |
| + path, that stopping the socket from inside the edge's own start cannot |
| + deadlock or wedge the service under systemd 257's job engine, and that |
| + the two-step activation (drop-in written only by this build's root code) |
| + holds on every §4 row, including fresh bootstrap and the hand script. |
| +- D10b, the probed-route hold: readmission timing, never dialing an |
| + ejected upstream, the empty-live-set case, mixed local/remote sets, |
| + and the cap. |
| + |
| +## Severity |
| + |
| +- **P1**: unsafe, would not compile, a test fails, or it would not work. |
| + Blocks merge. |
| +- **P2**: wrong or missing. Fixed without reopening this review. (The |
| + census, and review of any newly changed security, root, termination |
| + or production-storage behaviour, still check the fix; see AGENTS.md, |
| + "Stopping rules".) |
| +- **P3**: clarity or polish. Goes on a follow-up list; never a reason for |
| + another round. |
| + |
| +A P1 states its failure scenario and the evidence (file:line). Do not |
| +raise a P2 to P1 to keep the review open. |
| + |
| +## Output |
| + |
| +Findings ranked P1, P2, P3. Each gives the section or task, the problem, |
| +the evidence (file:line, verified), the failure scenario, a concrete |
| +fix and the invariant or trust boundary it breaks (that is its fault |
| +family). End with exactly one verdict: |
| + |
| +- **READY**: no P1 and no P2. |
| +- **READY AFTER FIXES**: no P1. The listed P2s are fixed without another |
| + round. |
| +- **NOT READY**: one or more P1s, listed. |
| + |
| +In round 3, a NOT READY also says whether the P1s share one cause, and |
| +whether refusing the case up front or cutting the feature would remove |
| +them. |
| + |
| +Do not edit files. Do not spawn Anthropic-model reviewers or subagents of |
| +your own. Do not run the full test suites. |