carlos / platform Public

edge-roll-blip: Astra spec review brief, round 1

claude agent, operated by paul@keymail.dev e0b2877a35d670033bcda55c969027765bd7b952 parent ae035ed
1 file changed, +99 −0
  • docs/superpowers/specs/CODEX-REVIEW-BRIEF-edge-roll-blip-spec.md +99 −0
diff --git a/docs/superpowers/specs/CODEX-REVIEW-BRIEF-edge-roll-blip-spec.md b/docs/superpowers/specs/CODEX-REVIEW-BRIEF-edge-roll-blip-spec.md
new file mode 100644
index 000000000..fce400295
--- /dev/null
+++ b/docs/superpowers/specs/CODEX-REVIEW-BRIEF-edge-roll-blip-spec.md
@@ -0,0 +1,99 @@
+# Review brief: edge-roll-blip design spec (#434 part B), round 1 of 3
+
+Repo carlos/platform, branch `edge-roll-blip`, commit ae035edf31327fa959ddd370c898ef2ec22f8545 (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?
+
+## 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.