Fleet public routes: Astra spec review brief, round 3 (last)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+200
−0
docs/superpowers/reviews/CODEX-REVIEW-BRIEF-fleet-public-routes-R3.md+200 −0
CI cancelled — superseded by a newer push — run details
diff --git a/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-fleet-public-routes-R3.md b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-fleet-public-routes-R3.md| new file mode 100644 |
| index 000000000..80522d76f |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-fleet-public-routes-R3.md |
| @@ -0,0 +1,200 @@ |
| +# Review brief: fleet public routes design (#457 Phase 1a), round 3 of 3 |
| + |
| +Repo carlos/platform, branch `design-fleet-public-routes`, commit 955710c131fb408de0f81dc287c2adcf40bb4170. |
| +Under review: `docs/superpowers/specs/2026-10-29-fleet-public-routes-design.md` (rev 3). |
| +Authorities: main's code (origin/main 1fa2a99b), AGENTS.md (census, request |
| +budget, provider-neutral core, production-wired witnesses, stopping rules), |
| +docs/superpowers/specs/2026-10-24-rootfs-apps-design.md, the fleet secrets |
| +key spec docs/superpowers/specs/2026-10-29-fleet-secrets-key-design.md. The |
| +managed-fleets draft (branch design-managed-fleets-457) is context only, |
| +not an authority. |
| + |
| +You are an independent reviewer. Read the document, then the code it |
| +names, and check every claim against that code. |
| + |
| +## Fixed: do not re-argue |
| + |
| +- Paul, 2026-10-29: fleet-placed apps must serve at their public URL |
| + through the platform router with no hand-written route. Scope is Phase 1a |
| + only (not managed provisioning, billing, 1b box choice, 1c reboot leases). |
| +- Controller's calls on rev 1's open questions (platform-39): Q1 a new |
| + `forward` row kind; Q2 forwarded responses skip the hub's response cache |
| + in 1a; Q3 hand rows keep winning and are not adopted; Q4 the edge refuses |
| + a fleet-placed row whose account does not match the fleet owner (rows |
| + with no account served as today and logged); Q5 `apps place` stops |
| + re-stamping rows on the console box. |
| +- Controller's rulings on round 1 (platform-39), applied in rev 2: |
| + - R1-7: conversion is CUT. The forward pass never converts or overwrites |
| + an existing row at the host; any non-forward row there is left alone and |
| + reported (one log line per pass, rate-limited as existing reports are). |
| + - R1-5: a release floor on the RegionalDomainsFloor pattern |
| + (`internal/release/layoutintent.go:265` and its channel-move refusal with |
| + an override flag): while fleet-placed records exist, no channel moves |
| + below the first release with forward rows. The floor value is the |
| + release that ships this, numbered at the cut. |
| + - R1-3: the hub never interprets a gate on a forward row; it forwards |
| + every path, the gate login POST included, to the fleet edge, which owns |
| + the gate and its cookie. |
| + - R1-1: bindings are fixed in this work: applied only when the object key |
| + equals `fleetBindingKey(b.Fleet, b.Host)` and the box label is a |
| + registered box of that fleet; witness through the authenticated store |
| + door. A pre-existing hole. |
| + - R1-2: rate limit and plan throttle are enforced once, at the hub, for |
| + forward rows; the fleet edge keeps exempting tunneled requests. |
| + `rateAdmit`, `planThrottleOf/For` and upgrade tracking admit forward |
| + rows with the app's own settings. |
| + - R1-4: `boxWhollyNested` recognises the inert forward shape as not a |
| + local process and still refuses every unknown kind; a root change, |
| + claimed in §7. |
| + - R1-6: one shared eligibility predicate, used by `Edge.Reload` and the |
| + edges-file writer (aliases and wildcards included). |
| + - R1-8: `declineMint` and `removable` carried explicitly; uncertainty |
| + keeps an existing row; retirement reuses the production guard and the |
| + fresh-store confirmation. |
| + - R2 P2s: keep and converge `Slug` (R1-10); forward rows produce no |
| + platform names in 1a, with disjoint removal ownership (R1-11); check the |
| + raw account for empty before `RouteAccount` (R1-12); correct the budget |
| + (R1-9) and the census claims (R1-13). |
| +- Controller's rulings on round 2 (platform-39), applied in rev 3: |
| + - R2-1: for a forward row the hub does no gate work at all: it skips the |
| + login-POST `ParseForm` and the login re-resolution before routing, so |
| + the body reaches the fleet edge untouched. Tested with an ordinary |
| + urlencoded browser form (and multipart, as the gate treats it) through |
| + both edges, right and wrong password. |
| + - R2-2: a below-floor FIRST publication is refused while any fleet |
| + exists, in the up-front gate and under `fleetFloorMu`; the fleet-create |
| + barrier takes the simpler correct rule, stated with its reason (rev 3 |
| + §9: an absent pointer passes, because every later publication is |
| + judged under the same mutex with the fleet visible). The "a fleet |
| + exists" condition was accepted in round 2. |
| + - R2-3: bindings are applied only through a new conditional write, |
| + `SetFleetBoxIf(host, fleet, box)`, which updates only where the row's |
| + region is `fleet/<fleet>` and the box is an active member of that fleet, |
| + in one statement; deterministic placement-change witness through the |
| + authenticated store door. |
| + - R2-4: forward rows are excluded from local canary-status channel reads, |
| + and the trash-only prefetch for forward apps is kept apart from the |
| + manifest prefetch; re-budgeted, canary channels in the comparative test. |
| + - R2-5: the domains trash-removal loop skips forward rows; ownership |
| + witness. |
| + - R2-6: one exhaustive persisted shape: observational stamps the health |
| + pass writes (DNS, cert) are allowed and preserved by `PutForward`; |
| + every behavioural field is zero, checked by `InertForward`, each tested |
| + on its own. |
| + - R2-7: `SystemPromoteOptions`, `PrepareSystemPromotion`, |
| + `PrepareSystemRollback` and their envelope named in §7, and the full |
| + unit list reconciled, by reading, against what `make census-card` |
| + would show. |
| + Report only mechanisms that fail these rulings, not the rulings. |
| + |
| +## What to check |
| + |
| +1. Each R1 and R2 finding against rev 3 (the list under "Round 3" below). |
| +2. The login path (§4.8, §4.4): with `loginPost` excluding forward rows at |
| + `edge.go:1798`, is there any other read of the request body, or any |
| + other hub-side gate, path or cache decision, between the host lookup |
| + and `fleetProxy` for a forward host? Are path rows of forward hosts |
| + kept out of every lookup (`lookupUpstreamPath`)? |
| +3. The floor (§9): do the judge's three cases, `fleetFloorPublish` and the |
| + barrier close both orders, first publication included? Any door that |
| + publishes a system pointer without `systemFloorSnapshot` or |
| + `fleetFloorPublish`? |
| +4. The shape (§4.2): is the four-class table exhaustive over |
| + `registry.Route` and `ClaimOwnership`? Is any writer of the `routes` |
| + table missing from the guarded list, including the import journal, |
| + layout moves and the claim rows? |
| +5. `SetFleetBoxIf` (§4.5): does the single statement bind placement, kind |
| + and membership at write time, given `fleets` and `fleet_boxes` share |
| + `registry.db`? |
| +6. The budget (§6) and the census list (§7): any reader or unit still |
| + missing. |
| + |
| +## Round 3 |
| + |
| +Earlier rounds: `docs/superpowers/reviews/CODEX-FINDINGS-fleet-public-routes-R1.md` |
| +(round 1, NOT READY, 8 P1, 5 P2) and |
| +`docs/superpowers/reviews/CODEX-FINDINGS-fleet-public-routes-R2.md` (round |
| +2, NOT READY, 3 P1, 4 P2). The round number counts every earlier review of |
| +this design under any file name or reviewer. |
| + |
| +Where rev 3 answers each (the spec marks changes **(R1-n)** and **(R2-n)**): |
| + |
| +Round 1 (round 2 judged R1-2, 4, 6, 7, 8, 10, 12 resolved): |
| +- R1-1 (binding forgery): §4.5 (key check, hub only) and, for its race, |
| + R2-3 below; §8 test 9. |
| +- R1-2 (rate limit, throttle): §4.2 `RateLimit`, §4.8 selectors; §8 test 7. |
| +- R1-3 (gate login): §4.8 (no gate work at the hub for a forward host; |
| + caches refuse forward rows), and R2-1 below; §8 test 12 and the witness. |
| +- R1-4 (root egress): §4.15, §7; §8 test 10. |
| +- R1-5 (rollback): §9 floor, and R2-2 below; §8 test 11. |
| +- R1-6 (publication and certs): §4.4; §8 test 8. |
| +- R1-7 (Upsert conversion): §4.2 (writers), §4.7 (no conversion); §8 test 1. |
| +- R1-8 (trash): §4.3 steps 1, 3, 5; §4.6; §8 test 2. |
| +- R1-9 (budget): §6, and R2-4 below; §8 test 13. |
| +- R1-10 (Slug): §4.2, §4.11. |
| +- R1-11 (domains ownership): §4.3 (both domains removal grounds), §4.11, |
| + and R2-5 below; §8 test 3. |
| +- R1-12 (accountless exception): §4.4; §8 test 5. |
| +- R1-13 (census claims): §7, and R2-7 below. |
| + |
| +Round 2: |
| +- R2-1 (login body drained): §3.8 (the parse and re-resolution as they |
| + are), §4.8 (the branch point at `edge.go:1798` and its two readers), |
| + §4.4 (no path map at the hub for a forward host); §8 test 12 and the |
| + witness. |
| +- R2-2 (absent pointer escapes the floor): §9 (the judge's no-pointer |
| + case; `systemFloorSnapshot`'s not-found branch; `fleetFloorPublish` |
| + judges a nil `current()`; the barrier's rule and why); §8 test 11 (both |
| + interleavings). |
| +- R2-3 (binding races placement): §4.5 (`SetFleetBoxIf`, its statement; |
| + `SetFleetBox` removed, §4.2); §8 test 9 (deterministic, through the |
| + door). |
| +- R2-4 (budget: canary reads, manifest prefetch): §4.3 step 1 (trash-only |
| + prefetch), §4.15 (canary status), §6 rows and the comparative test. |
| +- R2-5 (domains trash loop): §4.3 ownership paragraph, §4.15; §8 test 3. |
| +- R2-6 (column contract): §4.2 four-class table, `InertForward`, guarded |
| + writers; §8 test 1 (each forbidden column on its own; reflection guard). |
| +- R2-7 (census units): §7 rewritten per file, release publication units |
| + and envelopes named, method stated. |
| + |
| +First give one line per P1 and P2 from rounds 1 and 2: 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. |
| + |
| +This is round 3, the last (AGENTS.md stopping rules). Prefer findings that |
| +can be closed by refusing a case up front over ones that add another |
| +tolerance. |
| + |
| +## 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, 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. |