carlos / platform Public

Fleet public routes: Astra spec review brief, round 2

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev 30bd952be7134ee250ef5b28f66a55737a3f9ecc parent e1e628a
1 file changed, +168 −0
  • docs/superpowers/reviews/CODEX-REVIEW-BRIEF-fleet-public-routes-R2.md +168 −0

CI passed — run details

diff --git a/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-fleet-public-routes-R2.md b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-fleet-public-routes-R2.md
new file mode 100644
index 000000000..a24de12a1
--- /dev/null
+++ b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-fleet-public-routes-R2.md
@@ -0,0 +1,168 @@
+# Review brief: fleet public routes design (#457 Phase 1a), round 2 of 3
+
+Repo carlos/platform, branch `design-fleet-public-routes`, commit e1e628a6f34a9e4998a50047cbbf2ee9b83ba4e0.
+Under review: `docs/superpowers/specs/2026-10-29-fleet-public-routes-design.md` (rev 2).
+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).
+ Report only mechanisms that fail these rulings, not the rulings.
+
+## What to check
+
+1. Each R1 finding against rev 2 (the list under "Round 2" below).
+2. The floor (§9): is the condition "a fleet exists in the console's
+ registry" (a deliberate superset of the ruling's "a fleet-placed record
+ exists", argued in §9 and §10) sound, and does the fleet-create barrier
+ under `fleetFloorMu` close both orders (downgrade judged then fleet
+ created; fleet created then downgrade) against how
+ `regionalFloorPublish` and `systemFloorGate` work?
+3. `PutForward`/`DeleteForward` (§4.2): can any path still leave a forward
+ row with a column outside §4.2's set, or delete a row that is not a
+ forward row? Do `carlos route`/`carlos add` refusals cover every
+ operator setter?
+4. The gate path (§4.8): login POST, cookie, same-origin check through
+ `fleetProxy`; can any hub-side store (response cache, asset cache, hop
+ fill, far-edge asset catch) answer a gated fleet app without the fleet
+ edge?
+5. Rev 2's own addition (§4.15): retention now skips forward rows. Is
+ there any other reader that acts on an app because it has a row on the
+ box (pruning, sweeping, purging, billing) and would now act on a fleet
+ app from the hub?
+6. The request budget table (§6): verify each row against the readers'
+ code, and whether the comparative counting test can see them all.
+7. The census list (§7): every changed unit in the root binary named,
+ `boxWhollyNested`'s change correctly scoped to "a row can only skip
+ itself".
+
+## Round 2
+
+Earlier rounds: `docs/superpowers/reviews/CODEX-FINDINGS-fleet-public-routes-R1.md`
+(round 1, NOT READY, 8 P1, 5 P2). The round number counts every earlier
+review of this design under any file name or reviewer.
+
+Where rev 2 answers each (the spec marks changes **(R1-n)**):
+
+- R1-1 (binding forgery): §3.4 (the hole, stated as pre-existing), §4.5
+ (key equality, registered active box, hub only), §8 test 9 (through the
+ store door).
+- R1-2 (rate limit and plan throttle bypass): §4.2 (`RateLimit` column),
+ §4.8 (the four selectors admit forward rows), §8 test 7 and the witness.
+- R1-3 (gate login): §4.2 (`Gate` empty on purpose), §4.8 (the login-POST
+ code change; same-origin and cookie; response and asset caches refuse
+ forward rows), §8 the witness (login then authenticated request through
+ both edges; unauthenticated request not served from the hub).
+- R1-4 (root egress): §4.15 (`boxWhollyNested` case), §7 (root claim),
+ §8 test 10.
+- R1-5 (rollback): §9 (`FleetForwardFloor`, `FleetForwardFloorAllows`,
+ `--allow-below-fleet-forward-floor`, `AllowBelowFleetForwardFloor`,
+ checked in `systemFloorGate`/`systemFloorSnapshot` and under
+ `fleetFloorMu` before publish; fleet-create barrier), §8 test 11.
+- R1-6 (certificate authority from publication): §4.4
+ (`FleetServeEligible` used by `Reload` and the edges-file writer, aliases,
+ catch-alls and wildcards follow their primary, no `assets` block), §4.9,
+ §8 test 8 (separate issuer reading the hub's file).
+- R1-7 (Upsert conversion): §4.2 (`PutForward`/`DeleteForward`, explicit
+ clearing, read-back), §4.3 step 4 and §4.7 (no conversion, report),
+ §8 test 1.
+- R1-8 (trash): §4.3 steps 1, 3 and 5 (prefetch, mint/keep/retire from
+ `declineMint` and `removable`, fresh-store confirmation, production
+ guard), §4.6, §8 test 2.
+- R1-9 (budget): §6 rewritten whole, savings formula corrected, a
+ comparative test over the production pass set; §4.15 found retention
+ would have acted (now excluded).
+- R1-10 (Slug): §4.2, §4.11, the witness's instance catch-all.
+- R1-11 (domains source): §4.11 (no platform names; `firstReadyUpstream`
+ never picks a forward row), §4.3 (disjoint ownership), §8 test 3.
+- R1-12 (accountless exception): §4.4 (raw account checked first), §8
+ test 5.
+- R1-13 (census claims): §7 rewritten per unit, input sources separated
+ from added read sites.
+
+First give one line per P1 and P2 from round 1
+(`CODEX-FINDINGS-fleet-public-routes-R1.md`): 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.
+
+Round 3 is 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.
+
+Do not edit files. Do not spawn Anthropic-model reviewers or subagents of
+your own. Do not run the full test suites.