carlos / platform Public

spec: path routes across boxes rev 5, cut the roll gate (rule 2)

Paul's choice after rounds 3 and 4 found the same family twice: no
path-hops-1 capability or pool gate; an ordering rule instead (roll the
release everywhere before any map names a cross-box target).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev b5d16aaa31ddfe1350bd44855cd0f599116c52ef parent f5e2554
1 file changed, +55 −61
  • docs/superpowers/specs/2026-11-19-path-routes-across-boxes-design.md +55 −61

CI cancelled — superseded by a newer push — run details

diff --git a/docs/superpowers/specs/2026-11-19-path-routes-across-boxes-design.md b/docs/superpowers/specs/2026-11-19-path-routes-across-boxes-design.md
index 21380888a..1b14ccaf1 100644
--- a/docs/superpowers/specs/2026-11-19-path-routes-across-boxes-design.md
+++ b/docs/superpowers/specs/2026-11-19-path-routes-across-boxes-design.md
@@ -1,6 +1,6 @@
# Path routes across boxes: a prefix whose target lives on another box
-Rev 4, 2026-11-19. Discussion #186. Builds on the path-routing design
+Rev 5, 2026-11-19. Discussion #186. Builds on the path-routing design
(`2026-09-02-path-based-routing-design.md`, "the 09-02 design" below) and
changes none of its rulings except the one it was written to lift: §6's
"a prefix's target route must be homed on the same box as the hostname's
@@ -29,7 +29,11 @@ there rather than by exclusion. Round 3
(`ASTRA-FINDINGS-path-routes-across-boxes-R3.md`): all 11 earlier findings
resolved, 1 P1 in R1 P1-6's family (an old lease holder discovered after
the first hop). Rev 4 refuses that case up front with a pool readiness gate
-(§5.4); Paul approved a fourth round.
+(§5.4); Paul approved a fourth round. Round 4
+(`ASTRA-FINDINGS-path-routes-across-boxes-R4.md`): 1 P1 in the same family
+(the gate cannot see every box that may hold T's lease). Rule 2 applied;
+Paul chose to **cut** the mixed-version machinery: no capability, no gate,
+and an ordering rule instead (§8). Rev 5 removes `path-hops-1` everywhere.
## 1. Intent
@@ -88,8 +92,9 @@ Anti-goals (would be a failure even if requests got through):
- **Another tenant's traffic reaching a backend**, or a wildcard's map
answering for a hostname another account owns exactly. The 09-02 account
rule holds on every box, including boxes that cannot see either route.
-- **A 503 where today gives a 200 during a roll.** A mixed-version fleet
- must behave at least as well as today's fall-through.
+- **A change in what a live map does during the roll that ships this.** Held
+ by ordering, not by code (§8): the release rolls out fully before any map
+ names a target on another box.
## 3. How it works today
@@ -252,8 +257,7 @@ lookup runs exactly as today (round 1 P1-3, P1-4).
**What may be selected across boxes.** A **target route**: the exact name of
a route, resolved through the home map's exact lookup only (never
`Owner`'s wildcard fallback), with `path_target` set and `route_account`
-equal to the row's account; the box it would be dialled on publishing
-`path-hops-1` (§8). Locally, `m[T]` must be a route's own entry (not an
+equal to the row's account. Locally, `m[T]` must be a route's own entry (not an
alias, platform alias or regional entry) whose route satisfies
`PathTarget`. Both sides run the same predicate, so sender and receiver
agree on what a target is (round 1 P1-2, round 2 P1-1).
@@ -297,28 +301,12 @@ A remote selection makes a signed backhaul through `hopTo`, with:
(`backhaulTarget`, `backhaulAttempt`) all run keyed on T with T's
backhaul owner, under the existing two-attempt cap. §5.7 says why that is
right for an HA target.
-- **Pool readiness, before the first hop** (round 3 P1-1, rule 2's first
- option). For a target the home map shows as region-HA, or as served by
- more than one box, the sender commits to path dispatch only when **every**
- box the home map lists as eligible to serve or hold T (its pool's members
- in T's region view, the same set `backhaulAlternative` and
- `handoverAlternative` choose from) publishes `path-hops-1`. Incomplete or
- mixed evidence (a member without the capability, a member whose edges file
- cannot be read, a region view not yet loaded) means today's fallback,
- decided before any byte is sent: the host's route, or a backhaul to the
- host's home. So no holder or handover answer can name a box the request
- may not follow to, except one that joined the pool after the check, which
- the next bullet covers.
-- **Every destination publishes `path-hops-1`** (round 1 P1-6). The check
- runs on each box actually dialled, not only on the first: a cached holder,
- an alternative, a holder hint or a handover destination without it is not
- used. Before the first attempt that means today's fallback (the host's
- route, or a backhaul to the host's home); on a follow it means the
- refusal is answered as it is today (503). With the readiness gate this is
- reachable only for a box that entered T's pool between the gate and the
- follow, a window of one request. A failed dial answers what a
- failed backhaul answers today (502); nothing falls back to the host's
- route after bytes have been sent.
+- **No capability check** (Paul, 2026-11-19, rule 2's cut after rounds 3
+ and 4). A failed dial answers what a failed backhaul answers today (502);
+ a holder refusal that is not followed answers as today (503); nothing
+ falls back to the host's route after bytes have been sent. An old box
+ receiving a path-selected hop answers `staleHopRefusal` (503). That is
+ the cost of the cut, bounded by §8's ordering.
**No new hop header.** The receiving box runs the same selection itself,
from `Host` and path, against its own maps and home map, and on a verified
@@ -334,11 +322,10 @@ target" header: no new hop vocabulary, "a hop is a request for `Host`"
stays true, and the receiving box's own tenancy view is the last word.
**The host's home box receiving a hop that selects a remote target.** This
-happens when the sender did not select the prefix: an old binary mid-roll,
-or a sender a tick behind. The home box cannot hop again. It serves the
-**host's own route**, exactly today's answer, and logs. **My call**, over a
-503: a 503 would turn today's 200 into an error for every request arriving
-through an old box during a roll (§2's last anti-goal).
+happens when the sender did not select the prefix: a sender a tick behind
+after a republish. The home box cannot hop again. It serves the **host's
+own route**, exactly today's answer, and logs. **My call**, over a 503: the
+window is the same few seconds a republish has today.
### 5.5 ServeHTTP placement
@@ -371,8 +358,8 @@ exclusion of path-routed hosts (`pagecache.go`) must hold for case 3 too.
- The reconcile log keeps its per-host "names no local ready route" count,
reworded so it no longer tells anyone to co-locate.
- The edge logs, throttled per host, when a front route's prefix names a
- target that is not a target route anywhere, is in another account, or
- sits on a box without `path-hops-1`; and when a front name is not a front
+ target that is not a target route anywhere or is in another account; and
+ when a front name is not a front
route (alias, wildcard, forward) but its map names a remote target. These are the "it still falls through" reasons an operator can
act on.
- **My call:** no new CLI surface in this slice. `carlos domains paths`
@@ -408,10 +395,8 @@ Concretely:
receiving box re-resolves (H, path) to T (§5.4) and then runs T's HA
dispatch as for a hop to T: if it is not T's holder it answers the same
503 with a holder hint, or the same handover answer, that it gives a
- hop for T today, and the sender follows under the two-attempt cap,
- checking `path-hops-1` on the box it follows to. It never forwards. The
- sender only got here because every box in T's pool passed the readiness
- gate (§5.4).
+ hop for T today, and the sender follows under the two-attempt cap. It
+ never forwards.
4. **An HA front H on a box that is not H's lease holder**, when no prefix
selects: unchanged, H's own front forward. When a prefix selects a
target that is local here: served here (case 1 or case 3), and T's HA
@@ -512,20 +497,36 @@ A tenant calls the hub on the hub's own hostname, and itself on its own.
A target that is a fleet forward row is not a target route (`PathTarget`),
so it keeps today's behaviour everywhere.
-## 8. Rollout and the mixed-version fleet
+## 8. Rollout: ordering instead of a capability
No feature switch (**my call**): publishing a map that names a remote target
is the opt-in, and the scaffold that does so has not shipped.
-A box running this release publishes `path-hops-1` in its edges file's
-capabilities and the route-owner and eligibility fields of §5.1. A sender
-dials a box for a path-selected request only when that box publishes
-`path-hops-1`, and for an HA or multi-box target only when every box in its
-pool does (§5.4), and case 3
-needs the front host's home to publish the route owner; an old home
-publishes neither, so its prefixes keep today's behaviour. An old ingress
-box backhauls to the host's home as today, and §5.4's rule keeps that
-answer a 200.
+No capability and no mixed-version gate (**Paul, 2026-11-19**, rule 2's cut
+after rounds 3 and 4 found the gate could not see every box that may hold
+an HA target's lease). Mixed versions only matter on the one roll that
+introduces this feature; every later release already carries it. So the
+safety is an ordering rule:
+
+1. Before the roll, list path maps on dev and flagship
+ (`carlos domains paths` per path-routed host) and confirm none names a
+ target homed on another box. If one does, record it and tell Paul; the
+ roll waits for his go.
+2. The release rolls to every box of the deployment.
+3. Only then may anything publish a map with a cross-box target: the
+ Rastrillo hub scaffold ships after the roll completes on that
+ deployment, and its docs say so.
+
+Until step 2 completes, an old box publishes no route-owner or eligibility
+fields, so no new sender treats its routes as front or target routes:
+`path_front`/`path_target` read as false when absent (§5.1). The residual
+case is a new sender dialling a new box whose HA holder is still old; it
+cannot arise while step 1's check holds, because no map names a cross-box
+target until step 3.
+
+**A box left on an old version afterwards** (a pinned or forgotten box) can
+answer a path-selected hop for an HA target with a 503. Accepted with the
+cut.
**Behaviour change on release:** any live map that already names a target on
another box starts reaching that target. Before the roll, list path maps on
@@ -554,22 +555,17 @@ shipped.
- HA (§5.7): an HA target reached from the front's box, from a third box and
from a non-holder pool box; holder follow and handover follow keyed on T
with wire `Host` H; an HA front whose prefix selects a target never runs
- H's front forward; an HA front with no prefix hit behaves as today; a
- follow to a box without `path-hops-1` is not taken.
-- **Pool readiness (round 3 P1-1):** an upgraded first box, an uncached old
- lease holder in T's pool and a healthy front route: the request gets the
- front route's 200 and no hop is made; the same with an unreadable pool
- member's edges file; with every pool member upgraded, the request reaches
- T.
+ H's front forward; an HA front with no prefix hit behaves as today.
+- An old publisher: a route with no `path_front`/`path_target` fields is
+ never a front or target route.
- **Tenancy:** a remote map whose target's route owner is another account
never selects it, on the host's box and off it; a local wildcard's map
never answers for another account's exact hostname on another box (the
ownership block still refuses).
- One hop: a verified hop never leaves the receiving box; the dial goes to
- exactly the checked box.
+ T's serving box, or a holder or handover box the follow names.
- The home box receiving a hop that selects a remote target serves the
host's route.
-- `path-hops-1` absent on the target's box → no remote selection.
- Two edges and a shared fake store: a request on the hub's box and one on
the tenant's box both get the tenant's version header with the front
`Host`; a removed prefix stops selecting within one fold.
@@ -600,9 +596,7 @@ shipped.
7. No new CLI surface (§5.6).
8. A hub's whole-host purge stops reaching tenants on other boxes (§7.2).
9. Password-gated targets under a cross-box prefix are refused (§7.3).
-10. No feature switch; `path-hops-1` on every dialled box, and on every
- box of an HA or multi-box target's pool before the first hop, protects
- the roll (§8).
+10. No feature switch (§8). (No capability gate: Paul's cut, not my call.)
11. Region HA: the front name carries authority, `Host`, MAC, cache key
and purge host; the selected route carries every HA decision (§5.7).