carlos / platform Public

reviews: Astra brief for path routes across boxes, round 2

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 8f1a932db85f46247cb3426c5e3445a74056a498 parent 9be6d6d
1 file changed, +109 −0
  • docs/superpowers/reviews/ASTRA-BRIEF-path-routes-across-boxes-R2.md +109 −0

CI cancelled — superseded by a newer push — run details

diff --git a/docs/superpowers/reviews/ASTRA-BRIEF-path-routes-across-boxes-R2.md b/docs/superpowers/reviews/ASTRA-BRIEF-path-routes-across-boxes-R2.md
new file mode 100644
index 000000000..3a98951ec
--- /dev/null
+++ b/docs/superpowers/reviews/ASTRA-BRIEF-path-routes-across-boxes-R2.md
@@ -0,0 +1,109 @@
+# Review brief: path routes across boxes design (#186), round 2 of 3
+
+Repo carlos/platform, branch `path-routes-across-boxes`, commit
+9be6d6db27483890bb06b6568a66a075a74d45c3 (spec rev 2).
+Under review: `docs/superpowers/specs/2026-11-19-path-routes-across-boxes-design.md`.
+Authorities: `docs/superpowers/specs/2026-09-02-path-based-routing-design.md`
+and its plan `docs/superpowers/plans/2026-09-03-path-based-routing.md`;
+`docs/superpowers/specs/2026-10-28-regional-domains-447-design.md`; the code
+on `main` (this branch is main plus the spec). 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.
+
+## Fixed: do not re-argue
+
+- The 09-02 design's rulings: a prefix selects a route (no per-prefix
+ settings), first segment only, both raw and cleaned spellings, no
+ stripping, target in the claim's account, wholesale republish via
+ `PUT .../domains/{host}/paths`, 10,000 cap. Report only mechanisms that
+ fail to honour them.
+- The goal itself: a path target may live on any box (discussion #186).
+- "One hop, ever" between edges stays (the loop guard in `backhaul` and
+ `backhaulTo`, `internal/edge/edge.go`).
+
+- Rev 2's scope cuts, made in response to round 1: region-HA routes as
+ front or target, aliases, catch-alls, platform aliases, regional and
+ forward names never select across boxes (they keep today's same-box
+ behaviour); password-gated targets under a cross-box prefix are refused.
+ Report a mechanism that fails to keep one of these cuts, not the cut.
+
+## What to check
+
+1. **Tenancy.** (Also: the new `route_account`/`route_app`/`route_ha` edges-file fields, §5.1, and the front-route and target-route rules, §5.3.) Can any box, under §5.1-§5.3, send a request for a prefix to
+ a route in another account, or let one app's map select another app's
+ route, now that rows for non-local hosts and targets are derived without
+ a local route to check against? Check `homes.Owner` (`internal/edge/homemap.go`)
+ actually returns what §5.3 relies on (account, app, dialable, serving
+ box), including for HA, alias and wildcard names.
+2. **Hop correctness.** §5.4: MAC over the request `Host`, dialled to the
+ target's box, receiver re-resolves and accepts only a local answer.
+ Check `acceptHop`, `signHop`/`verifyHopEitherKey` (`mesh.go`),
+ `backhaulProxy` (Host, SNI, transport pool key), `backhaulTarget` and
+ `backhaulAlternative`. Is there any path to a second hop, a loop, or a
+ hop that lands on a box that serves a different app for the same Host?
+3. **The ServeHTTP placement** (§5.5): the remote selection against the
+ order in `ServeHTTP` (regional gate, `routeHAIngress`, the
+ `!e.servesExactly(host)` ownership block, the far asset catch,
+ `frontForwardHA`, the login POST re-resolution, the page cache and
+ response cache). Anything that would now run with the wrong entry, or
+ skip a check it needs?
+4. **Derivation on every box** (§5.1): every `ListPaths` reader and every
+ consumer of `route_paths` (registry, edgesfile `servedOwners`,
+ `assetpolicy`, `apiroutes`, `Fingerprint`, `filterDemoRoutes`). Is the
+ audit table complete and right? Any cost problem (the fast-converge
+ pass, Fingerprint every 2 s) at the cap?
+5. **Mixed-version roll** (§5.4's last paragraph, §8): old ingress, new
+ home; new ingress, old target box; the `path-hops-1` capability via
+ edges-file `capabilities`. Does any combination turn today's 200 into an
+ error, or serve the wrong app?
+6. **Regional names (#447)**: regional entries "carry no path map". Does
+ §7.1 hold, including a regional name on a box where the regional table
+ has no row, and a target that is itself a regional or forward row?
+7. **Purge and the gate** (§7.2, §7.3): does the purge change keep the
+ account requirement in `purge_header.go`; is the gate cut safe (no
+ password judged by the wrong route, no cookie for the wrong host)?
+8. **Rule 5 and rule 6 of AGENTS.md** (no dormant feature; something Paul
+ can see lands first): does §1 and §9's dev witness meet them?
+
+## Round 2
+
+Earlier rounds: round 1, `docs/superpowers/reviews/ASTRA-FINDINGS-path-routes-across-boxes-R1.md`
+(7 P1, 2 P2; rev 2's "Review history" paragraph says where each was
+answered). The round number counts every earlier review of this design.
+
+First give one line per P1 and P2 from round 1: resolved, partly, or not.
+Carry every unresolved or partly resolved finding forward at its current
+severity, then add new findings. Name each finding's fault family; say
+when a new finding is in the same family as a round 1 finding. The
+verdict covers everything outstanding, earlier rounds included.
+
+## 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.
+
+Do not edit files. Do not spawn Anthropic-model reviewers or subagents of
+your own. Do not run the full test suites.