Tunnel WebSockets (#471): Astra plan review brief, round 1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+40
−0
docs/superpowers/reviews/CODEX-REVIEW-BRIEF-tunnel-websockets-plan.md+40 −0
CI passed — run details
Intent
Attributed to this commit: 25.5 g CO₂e (3,333,395 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on design-tunnel-websockets-471, never backward from it. A turn that produced more than one commit books all of its tokens to the last one, and a concurrent session on this branch can add to the same figure. Some of it was priced using the shared default rate, because no model-specific factor row exists yet for at least one model involved. The Carbon view has the repo total, which is never derived from this attribution.
diff --git a/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-tunnel-websockets-plan.md b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-tunnel-websockets-plan.md| new file mode 100644 |
| index 000000000..ae88bed21 |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-tunnel-websockets-plan.md |
| @@ -0,0 +1,40 @@ |
| +# Review brief: tunnel WebSockets implementation plan (#471), round 1 of 3 |
| + |
| +Repo carlos/platform, branch `design-tunnel-websockets-471`, commit a3ca387374524eb6eaa5bffcf1f5f69c576b50fc. |
| +Under review: `docs/superpowers/plans/2026-10-30-tunnel-websockets.md` (rev 1). |
| +Authorities: `docs/superpowers/specs/2026-10-30-tunnel-websockets-design.md` rev 4, APPROVED by Paul 2026-10-30 (recorded on #471), on this branch; main's code at `c24e7a04`, merged into this branch at `4c4bc976`; `docs/superpowers/specs/2026-10-29-fleet-public-routes-design.md` and its merged plan `docs/superpowers/plans/2026-10-30-fleet-public-routes.md` (house style and the lessons this plan builds in); AGENTS.md (census, request budget, provider-neutral core, production-wired witnesses, stopping rules). 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 plan, then the spec, then the code it names, and check every claim against that code (file:line). Library code is golang.org/x/net v0.60.0 and the Go 1.26.10 standard library. |
| + |
| +## Fixed: do not re-argue |
| + |
| +- The spec, rev 4, as approved by Paul: option B (the upgrade carried unchanged in one HTTP/2 stream); the cap of 128 per box; the hub's receive windows unchanged; `-tunnel` rows included; the Action Cable channel in the sample as the last code task; the tenancy sweep with one reload mutex; the reservation with an `AfterFunc` backstop; no release floor, no switch. Report only where the plan fails to implement the spec, or where the spec's mechanism cannot be built as the plan says. |
| +- The controller's plan requirements (platform-60): Task 0 copy deck TWS-C01..C03 kept pending until Paul approves the text; upgrades stay refused (today's 502) until one named task turns on the hub's marker (Task 5); every changed function's callers, tests included, listed and migrated in the same task; every refusal test's fixture able to produce the refusal; every race or interleaving test on deterministic hooks; one shared decision, no copies; persisted or raw-SQL changes read back before use; a live task with a 101, Action Cable's welcome and pings, a revocation and plain HTTP unchanged, no flagship. |
| + |
| +## What to check |
| + |
| +1. Buildability and dormancy: does `main` build and pass after every task? Is it true that no upgrade crosses the tunnel before Task 5, and that Task 1's box-side shim and limits are safe on boxes talking to an old or a new hub? |
| +2. Caller and fixture completeness: for every function the plan changes (`transportFor`, `TunnelHub.conn`/`channel`, `NewTunnelHub`, `Reload`, `Watch`, `fleetProxy`, `tunnelProxy`, `Mark`, `Serve`, `Dial`, `EnableTunnels`, the three policy tests), are all callers, tests included, named and migrated in the task that changes it? Does every refusal test have a fixture and a positive control that can produce the refusal? |
| +3. Determinism: are Task 4's and Task 7's interleaving tests decided by scheduling-free assertions (the `TryLock`, the ordered event log), and would they fail on the mutations named? Does the guard test in Task 4 pin the one publication site and the lock as the spec requires, given the `enter` hook? |
| +4. The trust rule and the reservation: does Task 5's `transportFor` keep "marker only with admission and a reservation", and does every terminal path release exactly once (spec §4.6.2), including the `ModifyResponse` and `http.ErrNotSupported` witnesses in Task 6 case 12, built without adding production seams? |
| +5. The witnesses: is Task 6 production-wired (real hub on TLS, real `tunnelclient.Loop`, real box edge with its gate, a real WebSocket app)? Does Task 7's maximum-load test prove spec §4.8's guarantee at production values, and would it fail with today's 1 MiB connection window? |
| +6. Census, copy and budget steps per task; the live task's steps and its dependency on decision D-1. |
| +7. Anything the spec requires that no task builds, or a task builds that the spec does not ask for. |
| + |
| +## Severity |
| + |
| +- **P1**: unsafe, would not compile, a test fails, or it would not work. Blocks the plan. |
| +- **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. |
| + |
| +Do not edit files. Do not spawn Anthropic-model reviewers or subagents of your own. Do not run the full test suites. |