carlos / platform Public

reviews: Astra task review of Task 8, round 1

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 336c1c23b499fa8a06596585e6a8872df56f2032 parent a9ee50c
1 file changed, +31 −0
  • docs/superpowers/reviews/ASTRA-FINDINGS-path-routes-across-boxes-task8-R1.md +31 −0
diff --git a/docs/superpowers/reviews/ASTRA-FINDINGS-path-routes-across-boxes-task8-R1.md b/docs/superpowers/reviews/ASTRA-FINDINGS-path-routes-across-boxes-task8-R1.md
new file mode 100644
index 000000000..5ccca5807
--- /dev/null
+++ b/docs/superpowers/reviews/ASTRA-FINDINGS-path-routes-across-boxes-task8-R1.md
@@ -0,0 +1,31 @@
+Found **2 P1s and 1 P2**.
+
+1. **P1 — A path-selected target hides an attached alias from the ownership check.** [pathhop.go:122](/home/paulca/.paseo/worktrees/03ai90xp/path-routes-across-boxes/internal/edge/pathhop.go:122)
+
+ Suppose this box has an exact attached alias `other.example` for account A’s primary, whose prefix selects a local target in A. Another box publishes an admission-aware exact route for `other.example` in account B. `pathMatch` returns the target wholesale, losing the front’s alias flag. `servesExactly(host)` remains true because the alias key exists, so lines 123–124 skip ownership resolution and serve A’s target.
+
+ **Fix:** Preserve the front’s name/alias identity through selection and use it for ownership resolution. Add the attached-alias counterpart to the wildcard test.
+
+ **Invariant broken:** An alias cannot answer for another account’s authoritative exact name. This hole predates these commits but remains in the extracted security gate.
+
+2. **P1 — Upgrade re-selection can bypass exact-name precedence.** [pathhop.go:178](/home/paulca/.paseo/worktrees/03ai90xp/path-routes-across-boxes/internal/edge/pathhop.go:178), [upgrades.go:217](/home/paulca/.paseo/worktrees/03ai90xp/path-routes-across-boxes/internal/edge/upgrades.go:217)
+
+ Admit a case 3 upgrade for front H and tunnel target T in account A. Before reservation, H’s published owner changes to B and a reload installs a local wildcard alias pointing to T. Re-selection now returns the wildcard’s upstream with T’s unchanged tenancy. Reservation succeeds; the sweep likewise retains an existing reservation. An ordinary request would reach `serveNameOwner` and yield to B’s exact claim.
+
+ **Fix:** Revalidate front-name authority alongside tenancy during reservation and sweeping. Preserve the admitting case 3 authority requirement, or share a side-effect-free ownership decision with `ServeHTTP`. Test this transition through `beforeReserve` and a reload sweep.
+
+ **Invariant broken:** An upgrade re-check must not authorize a backend that the request’s current ownership checks forbid.
+
+3. **P2 — The owner-change test shares callback results without synchronization.** [path_across_e2e_test.go:670](/home/paulca/.paseo/worktrees/03ai90xp/path-routes-across-boxes/internal/edge/path_across_e2e_test.go:670)
+
+ The HTTP handler writes `ran` and `hookErr`; the test goroutine reads them at line 687. Receiving an HTTP response is not a Go synchronization guarantee for those variables.
+
+ **Fix:** Send the callback result through a channel and receive it before asserting, or protect both fields with a mutex.
+
+ **Invariant broken:** Test assertions must synchronize with handler-owned state.
+
+The remote dispatch placement, one-hop guards, case 3 admission target, and page-cache exclusion are correct. Front-mark revalidation checks host, account, app, stamp, incarnation, and current eligibility. Refusing with 503 when that mark fails and no valid dispatch succeeds is appropriate; the no-mesh-key refusal is also appropriate. HA identity changes remain Task 9’s explicit responsibility.
+
+The topology tests use destination-specific transports and backend-observed requests. I could not independently run the targeted race test: Go could not create its work directory in the read-only sandbox. GOCACHE stayed unset; no files were edited or full suites run.
+
+NOT READY
\ No newline at end of file