edge-roll-blip: Astra whole-branch review brief, round 1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 files changed,
+106
−0
docs/superpowers/reviews/CODEX-REVIEW-BRIEF-edge-roll-blip-branch.md+79 −0docs/superpowers/reviews/edge-roll-blip-ledger-minors.md+27 −0
CI passed — run details
Intent
diff --git a/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-edge-roll-blip-branch.md b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-edge-roll-blip-branch.md| new file mode 100644 |
| index 000000000..6ab400638 |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-edge-roll-blip-branch.md |
| @@ -0,0 +1,79 @@ |
| +# Review brief: edge-roll-blip whole branch (#434 part B, option 2), round 1 of 3 |
| + |
| +Repo carlos/platform, branch `edge-roll-blip`, commit fe5e9dc57052161113924df354af9d45bea4cb4e (the commit before this brief). |
| +Under review: the diff `ee066183642d4b8e374f4fa5052b0b92349a60fc..fe5e9dc57052161113924df354af9d45bea4cb4e` (origin/main is merged in; review the branch's own changes: |
| +`git diff ee066183642d4b8e374f4fa5052b0b92349a60fc..fe5e9dc57052161113924df354af9d45bea4cb4e`). Mostly `internal/edge/`, one test fixture in |
| +`internal/host/applessroute_test.go`, census overlay files, and docs. |
| +Authorities: the spec `docs/superpowers/specs/2026-10-27-edge-roll-blip-design.md` |
| +(rev 4; its own review ended at round 3, READY AFTER FIXES, P2s applied) and the plan |
| +`docs/superpowers/plans/2026-10-27-edge-roll-blip.md`; AGENTS.md. Do not review against |
| +unmerged branches. |
| + |
| +You are an independent reviewer. Read the spec, then the diff, and check the code against |
| +the spec and against the existing code it touches. |
| + |
| +## Fixed: do not re-argue |
| + |
| +- Paul's ruling, 2026-10-28, on amadan #434 ("2 then 3"): scope is the local-upstream hold |
| + plus a startup log line. No `carlos-edge.socket`, no unit, root, updater, install or |
| + rollback change. The spec's "Later: option 3" section is not built and not under review. |
| +- Controller ruling (in `docs/superpowers/reviews/edge-roll-blip-ledger-minors.md`): no |
| + idempotent-request replay in this branch. Requests queued in a local upstream's accept |
| + backlog when it closes its listener are reset after connect; the dial hold cannot cover |
| + them, and the witness counts them separately as `resets` (bounded by its 8 workers). |
| + You may say whether that ruling leaves a defect, but not as a P1 unless the code is wrong. |
| + |
| +## What to check |
| + |
| +1. D10 (`localhold.go`, `tcpProxy`, `genproxy.go` unix paths): local detection, one |
| + absolute deadline bounding every attempt and wait, what is retried, causes filed |
| + (`answered.go`/`proxyCause`), no goroutine or connection leak, behaviour unchanged for |
| + non-local upstreams and with the hold off. |
| +2. D10b (`prober.go` Hold/readmitHold, `multiProxy` DialContext): never dials an ejected |
| + upstream; no Eject on budget exhaustion or cancel; formula vs the prober's real tick |
| + schedule; races on shared prober state; the prober transport now dialing through |
| + `hold.dialer` (nil in production). |
| +3. D8 (`listeners.go`, `RunWithActivatorReady`): binding behaviour identical to |
| + `ListenAndServe(TLS)` (empty-address defaults, TLS config, fatal message the large-box |
| + test greps), no change to when the edge accepts relative to startup/latch/certs. |
| +4. Tests: do they test behaviour, would they fail on the regressions they name, are they |
| + fast and non-flaky in CI (loaded, sometimes -race), and does the witness |
| + (`localhold_witness_test.go`) measure honestly. |
| +5. Cross-compile (darwin/windows) and anything linux-only. |
| +6. Triage the deferred minors in `docs/superpowers/reviews/edge-roll-blip-ledger-minors.md`: |
| + name any that must be fixed before merge. |
| + |
| +## Census (AGENTS.md "The census") |
| + |
| +The census card is `docs/superpowers/notes/census-proposal-edge-roll-blip.md` (overlay |
| +`internal/provision/testdata/plan14-root-reads-edge-roll-blip.tsv`). Give a verdict for every |
| +unit and the re-pinned envelope (`internal/edge`), citing the lines you read: reject if the |
| +change lets root open, run, query or follow anything it did not before from a path or input a |
| +tenant, an app or a box agent can create, write or name; if it weakens a check, refusal, |
| +validation, argument or environment root relies on; or if the diff cannot settle it. |
| +Otherwise approve. |
| + |
| +## 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 area, the problem, the evidence (file:line, |
| +verified), the failure scenario, a concrete fix and the invariant or trust boundary it breaks |
| +(its fault family). Then the census verdicts (one line per unit and envelope). 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. |
| + |
| +Do not edit files. Do not spawn Anthropic-model reviewers or subagents of your own. Do not run |
| +the full test suites (a focused `go test ./internal/edge/ -run X` is fine if you need one). |
diff --git a/docs/superpowers/reviews/edge-roll-blip-ledger-minors.md b/docs/superpowers/reviews/edge-roll-blip-ledger-minors.md| new file mode 100644 |
| index 000000000..c0d7792c1 |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/edge-roll-blip-ledger-minors.md |
| @@ -0,0 +1,27 @@ |
| +# edge-roll-blip: deferred minors and controller rulings from the SDD ledger (input to the whole-branch review) |
| + |
| +- Ruling: T1 implementer greps the external edge.New callers for routes that expect a fast failure on a refused loopback addr, runs those tests (targeted -run) and reports durations; fix only if one now fails or slows by the hold — why: plan left it to CI, a CI timeout would cost a round trip — cost if wrong: one extra test run. |
| +- Ruling: per-task review is a Sonnet task reviewer (spec + quality), not Astra/Opus — why: AGENTS.md rule 3 reserves Astra/Opus per-task review for risk areas (none here), SDD needs a task gate — cost if wrong: a defect caught later in the whole-branch Astra review. |
| +- Ruling: go test runs with the Bash sandbox off (read-only go cache, unix socket() refused in sandbox) — cost if wrong: none. |
| +Task 1: minor (deferred): applessroute_test.go `deadAddr` var now names a hang-up server (rename hangupAddr) |
| +Task 1: minor (deferred): 100 ms timing windows in TestNonLoopbackAddrRouteFailsAtOnce / TestLocalHoldOffKeepsInstant502 may flake under load |
| +Task 1: minor (deferred): cut && !retryable -> errHoldExpired also catches an unrelated non-retryable error at the deadline (filed as timeout) |
| +Task 2: minor (deferred): duplicate pass checks tcp/unix -> checkWitness helper |
| +Task 2: minor (deferred): no "was held" floor (max >= gap/2) so unix could pass vacuously |
| +Task 2: minor (deferred): p50/p99 over all requests hide the hold; add held=<n> count |
| +Task 2: minor (deferred): CARLOS_RATE_LIMIT env could turn witness load into 429s; pin e.rateMode = RateOff per Edge |
| +- Ruling: Task 4 folds Task 2's four witness minors in (it edits the same file and adds the probed subtest) — why: cheap hardening before a third copy of the checks — cost if wrong: a slightly larger Task 4 diff. |
| +Task 3: minor (deferred): dialGenUntil repeats retryLocalDial loop skeleton (brief-mandated shape; generation logic inside loop) |
| +Task 3: minor (deferred): no test pins generation-dial "retryable error stops at deadline, no extra attempt" |
| +Task 3: minor (deferred): cut && non-retryable masks e.g. ErrPeerMismatch at the deadline as errHoldExpired (same as retryLocalDial) |
| +Task 4: minor (deferred): no probed-path test for client cancel mid-hold (no Eject) |
| +Task 4: minor (deferred): 100 ms slack in WaitsForReadmission/EmptyLiveSetOnArrivalWaits/HoldSurvivesReload (restart 200 ms vs 550 ms hold) |
| +Task 4: minor (deferred): 150 ms want503At / 100 ms RemoteOnly/MixedSet bounds CI-sensitive |
| +Task 4: minor (deferred): DelayedProbe helper goroutine calls t.Cleanup/t.Errorf off the test goroutine |
| +Task 4: minor (deferred): multiProxy DialContext ~100 lines, 4 nesting levels |
| +Task 4: minor (deferred): reload dropping the route mid-hold waits the full hold (bounded, by design) |
| +- Ruling: Task 6 also fixes the CI-timing minors (Task 1 100 ms windows; Task 4 minors 1-4) before CI sees them — why: a flaky CI run costs a round trip overnight — cost if wrong: a slightly larger cleanup diff. |
| +Task 5: minor (deferred): ":0 " guard in listeners_test nearly vacuous; no test of %w-unwrap / empty-flag bind; non-dev bind path untested beyond helpers (largebox test covers it in CI) |
| +Task 6: minor (deferred): edge.go multiProxy "client left so don't eject" comment only true for direct DialContext callers (dial ctx detached) |
| +- Ruling: do NOT add an idempotent-request replay in this branch; instead Task 7 makes the witness classify 502s by the Edge's recorded cause, pass on zero refused/timeout/no-upstream failures, and report boundary resets separately (bounded by worker count) — why: replaying GETs changes request semantics beyond Paul's option-2 ruling and the R3-reviewed spec; offered to Paul as a follow-up — cost if wrong: a few GETs at the exact upstream listener-close boundary still 502 until the follow-up. |
| +Task 7: minor (deferred): no per-cause breakdown on failure; reset bound not time-correlated with Shutdown |