carlos / platform Public

reviews: Astra plan round 2 findings for path routes across boxes

4 P1, 3 P2; three families repeat from round 1, so rule 2 applies.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 647f2e95e0329337dfa380f376c18f2ceb97c68b parent a02a1c1
1 file changed, +95 −0
  • docs/superpowers/reviews/ASTRA-FINDINGS-path-routes-across-boxes-plan-R2.md +95 −0

CI cancelled — superseded by a newer push — run details

diff --git a/docs/superpowers/reviews/ASTRA-FINDINGS-path-routes-across-boxes-plan-R2.md b/docs/superpowers/reviews/ASTRA-FINDINGS-path-routes-across-boxes-plan-R2.md
new file mode 100644
index 000000000..5943a18b5
--- /dev/null
+++ b/docs/superpowers/reviews/ASTRA-FINDINGS-path-routes-across-boxes-plan-R2.md
@@ -0,0 +1,95 @@
+Reviewed `a02a1c115bdec3785a03c84d1af01370396f18f8`. No files changed or tests run. References to **plan** mean [2026-11-19-path-routes-across-boxes.md](/home/paulca/.paseo/worktrees/03ai90xp/path-routes-across-boxes/docs/superpowers/plans/2026-11-19-path-routes-across-boxes.md).
+
+| Round-one finding | Status |
+|---|---|
+| P1-1 — unchecked target selection | Resolved: Task 6 validates before returning the target and retains the front on rejection. |
+| P1-2 — admission bypass | Resolved: Task 8 selects a local target before admission. |
+| P1-3 — incomplete front-mark comparison | Resolved: account, app and current eligibility are now checked. |
+| P1-4 — same-box compatibility | Partly: service targets are restored, but platform-alias targets are rejected; finding 2. |
+| P2-5 — linked-request pinning | Partly: the main selection preserves pins, but the guard and login helper remain inconsistent; findings 3 and 5. |
+| P2-6 — incomplete routing snapshots | Resolved: hosts and remote paths are published through one atomic pointer. |
+| P2-7 — unrepresentative benchmarks | Resolved: retained-row assertions and reruns after remote-map construction and before merge are specified. |
+| P2-8 — indistinguishable test destinations | Resolved: distinct advertised addresses, per-destination transports and actual backend Host assertions are specified. |
+| P2-9 — missing executable coverage | Partly: coverage is substantially expanded, but the publication guard and several required negative cases remain incomplete; finding 6. |
+| P2-10 — incomplete interfaces | Partly: remote-map inputs and purge authority are supplied, but the received-hop fallback lacks a dispatch contract; finding 7. |
+| P2-11 — census workflow | Resolved: Task 13 includes the proposal, independent approval and recorded tip. |
+
+1. **P1 — Tasks 8–9: a remote selection still runs the front’s HA dispatch.**
+
+ **Evidence:** Plan:273 places the pending remote action after `routeHAIngress` “for the front.” Plan:292 passes the target’s name only for `pathLocal`; a `pathRemote` selection still passes the front host. Existing [haingress.go:47](/home/paulca/.paseo/worktrees/03ai90xp/path-routes-across-boxes/internal/edge/haingress.go:47) looks up that name, and [haingress.go:128](/home/paulca/.paseo/worktrees/03ai90xp/path-routes-across-boxes/internal/edge/haingress.go:128) can perform handover or front forwarding before the pending target hop executes.
+
+ **Failure:** H is an HA front and `/acme` selects remote T. On an ingress box with H’s HA metadata, H’s dispatch can refuse the request or forward it to H’s holder. That spends the hop on H; the receiver cannot continue to T. Spec §5.7 explicitly requires H’s HA dispatch not to run after a prefix selects T.
+
+ Task 9 also omits the identity lookup in `haIngressBlocked`: [haingress.go:107](/home/paulca/.paseo/worktrees/03ai90xp/path-routes-across-boxes/internal/edge/haingress.go:107) checks `[host]` as well as `[rt.Host]`. Leaving the former as wire Host lets a blocked H refuse an otherwise eligible local T.
+
+ **Fix:** give pending remote selections an explicit dispatch branch after the applicable regional checks and before H’s HA dispatch. Use the selected route for every remaining HA identity lookup, including `haIngressBlocked`. Test an HA front with a remote target while H is unavailable or held elsewhere.
+
+ **Fault family:** dispatch decisions must use the selected route’s identity. New in this plan review.
+
+2. **P1 — Task 6: the revised same-box rule breaks existing platform-alias targets.**
+
+ **Evidence:** Plan:21 and plan:209 reject every target with `platformAlias`. Existing reconciliation accepts a ready, same-account platform route: [aliases.go:685](/home/paulca/.paseo/worktrees/03ai90xp/path-routes-across-boxes/internal/domains/aliases.go:685). Reload then resolves that route to its instance and marks it as a platform alias at [edge.go:1479](/home/paulca/.paseo/worktrees/03ai90xp/path-routes-across-boxes/internal/edge/edge.go:1479). Today’s path lookup returns that entry at [edge.go:2039](/home/paulca/.paseo/worktrees/03ai90xp/path-routes-across-boxes/internal/edge/edge.go:2039).
+
+ **Failure:** an existing same-box prefix targets the platform-minted app apex. Its derived row remains, but the new selector rejects its folded entry and serves the front instead. Spec §5.3 case 1 requires today’s answer unchanged.
+
+ **Fix:** preserve local registry-route provenance through folding. Allow an existing eligible platform-route target in case 1 while retaining account validation and refusing an attached alias that was never a registry route. Keep the stricter cross-box rule. Add a reconciliation-through-dispatch regression test.
+
+ **Fault family:** same-box compatibility; repeats round-one P1-4.
+
+3. **P1 — Tasks 6 and 8: the prescribed selector refactor fails the existing structural guard.**
+
+ **Evidence:** Plan:214 makes `selectUpstream` call `selectPath` directly. However, [linkpin_test.go:140](/home/paulca/.paseo/worktrees/03ai90xp/path-routes-across-boxes/internal/edge/linkpin_test.go:140) fails unless `selectUpstream` references the old lookup functions. Moving `lookupDemoAware` into `selectPath` also conflicts with the allowlist at [linkpin_test.go:54](/home/paulca/.paseo/worktrees/03ai90xp/path-routes-across-boxes/internal/edge/linkpin_test.go:54), enforced at line 164. Neither task includes updating this guard, yet plan:280 explicitly requires it to pass.
+
+ **Failure:** implementation following the stated call graph fails `TestSelectUpstreamIsTheOnlySite`. Merely adding exemptions would leave the new selection paths outside the protection the test provides.
+
+ **Fix:** specify one request-selection entry point that handles pins and returns the full selection result. Update the structural guard to enforce that call graph, including the new selector and routing-table reads. Put the test-only `storeHosts` helper in a `_test.go` file so it does not violate `TestReloadIsTheOnlyPublisher`.
+
+ **Fault family:** linked requests remain confined through one guarded selection path; repeats round-one P2-5, with a new deterministic test failure.
+
+4. **P1 — Task 13: the pre-roll check cannot discover maps containing only remote targets.**
+
+ **Evidence:** Plan:354 discovers “path-routed hosts from `carlos routes`.” That command reports derived rows. [domains_cli.go:462](/home/paulca/.paseo/worktrees/03ai90xp/path-routes-across-boxes/domains_cli.go:462) explicitly documents that published prefixes with non-local targets appear in `domains paths` but disappear from `routes`; the dropping condition is [aliases.go:698](/home/paulca/.paseo/worktrees/03ai90xp/path-routes-across-boxes/internal/domains/aliases.go:698).
+
+ **Failure:** H has a published map whose targets all live elsewhere. Before rollout it has no derived prefixes, so the proposed discovery step skips H and incorrectly reports no cross-box maps. This bypasses the ordering check that replaces the removed capability gate.
+
+ **Fix:** enumerate candidate front names independently of derived path rows, then read each published map through the API/CLI with its account and app context. Include hosts with zero derived prefixes. Add a fixture proving that an entirely unresolved published map is discovered.
+
+ **Fault family:** rollout checks must inspect desired state, including currently unresolved configuration. New in this plan review.
+
+5. **P2 — Task 11: login re-selection must preserve pinning and URL parsing.**
+
+ **Evidence:** Plan:326 unconditionally describes running `selectPath` on `next`. The existing login code parses `next` and selects using decoded `u.Path` at [edge.go:2784](/home/paulca/.paseo/worktrees/03ai90xp/path-routes-across-boxes/internal/edge/edge.go:2784). Its call through `selectUpstream` also preserves a linked request’s pin at [edge.go:2159](/home/paulca/.paseo/worktrees/03ai90xp/path-routes-across-boxes/internal/edge/edge.go:2159).
+
+ **Failure:** the new helper can inspect ordinary path maps for a pinned login and reject it because of an unrelated remote prefix. Passing raw `next` also misses prefixes such as `/acme?tab=1` or `/%61cme`, allowing the front’s gate to handle a login that should be refused.
+
+ **Fix:** explicitly bypass this helper for linked requests and pass the already parsed `lookupPath`, or perform precisely the same parsing inside it. Add pinned-login, query-string and encoded-prefix tests.
+
+ **Fault family:** login re-selection preserves the request’s selection constraints; pinning repeats round-one P2-5.
+
+6. **P2 — Tasks 2, 4 and 6: the publication guard does not account for unpublished routes, and negative coverage remains incomplete.**
+
+ **Evidence:** Plan:73 includes a starting instance with `Front=true`. Plan:126 requires every case to pass through `edgesFileWriteClaims`, then compares the published marks with the predicates. But [edgesfile.go:685](/home/paulca/.paseo/worktrees/03ai90xp/path-routes-across-boxes/internal/host/edgesfile.go:685) omits non-ready routes entirely; line 706 also omits sidecars.
+
+ **Failure:** the starting-instance case has no published row whose front mark can equal `true`. Treating absence as zero fails the comparison; skipping absent rows silently weakens the intended guard.
+
+ Plan:216 also does not explicitly cover case 3 selecting a **remote** target in another account, or a forward front attempting remote selection. These are required by spec §9.
+
+ **Fix:** separate predicate expectations from publication expectations. Assert absence for rows the writer excludes, and predicate equality for rows it publishes; retain all existing publication filters. Add the missing negative selection cases to the matrix.
+
+ **Fault family:** executable coverage of the approved contract; repeats round-one P2-9.
+
+7. **P2 — Tasks 6 and 8: the home-box hop fallback has no complete return contract.**
+
+ **Evidence:** Plan:196–200 defines `Up` for `pathNone` and `pathLocal`, but not `pathRemote`. Plan:273 gives pending remote selections `ok=false`. Yet plan:268 requires `servePathRemote` to return the front’s own entry on an arrived hop, while its signature returns only `bool`.
+
+ **Failure:** the helper cannot restore the caller’s upstream and `ok` value through that interface. Directly invoking the front proxy would bypass the normal admission, gate, metering and dispatch stages; returning false leaves the caller in the miss path.
+
+ **Fix:** settle the arrived-hop fallback inside `pathRequest`, returning the front upstream with `ok=true` and no pending remote action before normal checks run. Alternatively, return the restored upstream explicitly and specify where checks resume. Define whether remote outcomes retain a front entry for compatibility callers.
+
+ **Fault family:** task interface completeness; repeats round-one P2-10.
+
+The atomic snapshot change is sound, and the revised backhaul harness can observe the intended destinations and wire Host. Task 7’s identity split covers the existing holder, alternative and handover decisions. The one-branch, one-merge order satisfies rule 6 because its first merge delivers the feature together with its measurements.
+
+The repeated compatibility, pinning and interface families trigger the repository’s two-round stopping rule. The recommended next step is its central-invariant option: settle the selection contract and compatibility rule in one place, with guard tests, before another implementation fix wave.
+
+**NOT READY**
\ No newline at end of file