fleet-routes-followups: docs deferred minors (#457 1a, Tasks 2 and 12)
- Spec §4.2: PutForward's ErrNotForward refusal and the forwardKept list its conflict arm is built from. - Spec §6: the baseline is the same bucket with the forward phase dormant, not a bucket without the app; the edges-file PUT when the row goes; the counts are on the counting store's fallback paths. - Spec §7 (Task 12 card): the phase and the edge read the fleets table separately, converge on their next reads and fail closed. - Plan Global Constraints: the forbidden class is 50 fields. - The deferred-minors list records each item's disposition.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3 files changed,
+49
−8
docs/superpowers/plans/2026-10-30-fleet-public-routes.md+1 −1docs/superpowers/reviews/fleet-public-routes-deferred-minors.md+20 −0docs/superpowers/specs/2026-10-29-fleet-public-routes-design.md+28 −7
diff --git a/docs/superpowers/plans/2026-10-30-fleet-public-routes.md b/docs/superpowers/plans/2026-10-30-fleet-public-routes.md| index 2a9af0627..cffb44bc2 100644 |
| --- a/docs/superpowers/plans/2026-10-30-fleet-public-routes.md |
| +++ b/docs/superpowers/plans/2026-10-30-fleet-public-routes.md |
| @@ -18,7 +18,7 @@ |
| - declared, written only by `PutForward`: `Host`; `Kind` = `"forward"` (`registry.KindForward`); `Slug`; `App`; `Account`; `Region` = `fleet/<f>`; `Channel` (display only); `RateLimit` = `rec.RateLimitColumn()`; `Status` = `"ready"`; `Provisioned` = true; `CreatedAt` (kept from the existing row, else now); |
| - binding: `FleetBox`, written only by `SetFleetBoxIf`; `PutForward` keeps it while `Region` is unchanged and clears it when `Region` changes; |
| - observational, preserved by `PutForward`, read by no dispatch, publication or eligibility decision: `DNSStatus`, `DNSCheckedAt`, `CertExpiresAt`; |
| - - forbidden, zero, checked one by one by `InertForward`: `Socket`, `Addr`, `Addrs`, `Health`, `HoldOp`, `Incarnation`, `ServingSeq`, `SeedSource`, `ImportGate`, `AssetsOff`, `AssetGen`, `LastError`, `DBPath`, `Version`, `PrevVersion`, `GoodVersion`, `GoodDigest`, `GoodDemand`, `ServingVersion`, `Pool`, `Environment`, `Tunnel`, `Caps`, `Hibernate`, `HA`, `Runtime`, `Gate`, `Canary`, `Replication`, `NextDue`, `StatusNamed`, `Backing`, `Unit`, `Platform`, `Seed`, `Args`, `IdleSeconds`, `MaxRunSeconds`, `Steering`, `UpdateSettings`, `EgressAllow`, `Size`, `PolicyExpiresAt`, `BuildState`, `Replicas`, `Replica`, `ClaimIncarnation`, `ClaimStamp`, `ClaimOwner`, `ClaimRowID`. |
| + - forbidden (50 fields), zero, checked one by one by `InertForward`: `Socket`, `Addr`, `Addrs`, `Health`, `HoldOp`, `Incarnation`, `ServingSeq`, `SeedSource`, `ImportGate`, `AssetsOff`, `AssetGen`, `LastError`, `DBPath`, `Version`, `PrevVersion`, `GoodVersion`, `GoodDigest`, `GoodDemand`, `ServingVersion`, `Pool`, `Environment`, `Tunnel`, `Caps`, `Hibernate`, `HA`, `Runtime`, `Gate`, `Canary`, `Replication`, `NextDue`, `StatusNamed`, `Backing`, `Unit`, `Platform`, `Seed`, `Args`, `IdleSeconds`, `MaxRunSeconds`, `Steering`, `UpdateSettings`, `EgressAllow`, `Size`, `PolicyExpiresAt`, `BuildState`, `Replicas`, `Replica`, `ClaimIncarnation`, `ClaimStamp`, `ClaimOwner`, `ClaimRowID`. |
| - Writer rule (§4.2, R3-1): refuse forward inputs before transactional side effects, guard the route writes. Only `PutForward`, `DeleteForward`, `SetFleetBoxIf`, `SetDNSStatus` and `SetCertExpiresAt` may write a forward row. Every other `routes` statement carries `kind <> 'forward'`; an insert or upsert over a forward host returns `ErrForwardRow`. |
| - Hub: a box with `CARLOS_TUNNEL_HOST` set and `CARLOS_FLEET` unset (`hubArmed`). Only a hub mints forward rows or runs the bindings pass; every other box retires any it holds. |
| - Tenancy (§4.4): a forward row is eligible only on a hub, inert, fleet-placed, its fleet in the hub's `fleets` table, and its raw `Account` non-empty and equal to the fleet's owner. A non-forward fleet-placed row taking the fleet arm: an empty raw `Account` is served and logged; otherwise `release.RouteAccount(rt)` must equal the owner. Raw field checked before `RouteAccount`. |
diff --git a/docs/superpowers/reviews/fleet-public-routes-deferred-minors.md b/docs/superpowers/reviews/fleet-public-routes-deferred-minors.md| index d5f5cb0c5..266744f2a 100644 |
| --- a/docs/superpowers/reviews/fleet-public-routes-deferred-minors.md |
| +++ b/docs/superpowers/reviews/fleet-public-routes-deferred-minors.md |
| @@ -21,3 +21,23 @@ Task 12: minor (deferred): census basis text for fastConvergeLoop says boxProvis |
| Task 13: minor (deferred) + TASK 15 CARRY: a retired name with an existing cert is refused at HTTP (no map entry), not at the TLS handshake (wildcard cert, cert mirror, autocert cache answer without Allowed); Task 15 checks a retired name by its HTTP answer. |
| Task 13: minor (deferred): step 6 does not assert the catch-all alias refused after trash; step 4 rebuilds alias-pass inputs by hand (omits Region); step 3 lacks an upper bound (oks <= 6); noisy 401 on first dial and status/boxes 404; step 2 does not pin which edge drew the login form. |
| Task 13: final-review carry: confirm Task 6 tests cover a foreign account's record for the edges-file exclusion. |
| + |
| +## Dispositions (branch fleet-routes-followups, 2026-10-30) |
| + |
| +Done, test-first, each with a mutation shown where the item is a missing check: |
| + |
| +- Task 1: membership witness, TestSetFleetBoxIfMembershipIsTheRowsOwnFleet. |
| +- Task 2: kept columns are one production list (forwardKept), checked with ForwardForbidden against PRAGMA, and the conflict arm read back (TestPutForwardSetsEveryColumnButHost); dns_checked_at preservation; PutForward refuses a non-forward kind, an empty Host or a non-fleet Region with the sentinel ErrNotForward; the plan's list now says 50 (no committed doc said 51; the code has 50). |
| +- Task 5: cancellation (TestForwardUpgradeCloseCancelsTheRequest); HTTP plan throttle for a forward row (TestForwardPlanThrottlePlainHTTPAtTheHub); box-side plan-throttle tunnel exemption (TestForwardPlanThrottleExemptsTheTunnelAtTheBox); rateAdmit comment rewrapped. |
| +- Task 11: fleetFromRoutes comment; one loop (firstFleetPlacement) and TestFleetFromRoutesSplitOnForwardRows; sealkey.go comment. |
| +- Task 12: hub.go, budget test and spec §7 now say the phase and the edge converge and fail closed; the edges-file PUT when the row goes; the counting store's hidden optional interfaces noted in the test and spec §6; spec §6 says what the baseline is. R2's "Reload's inline owner-map construction": Registry.FleetOwners, one fold for the edge and the hub. |
| +- Task 13: catch-all refused after trash; oks <= 6; first dial after the hub's reload (no 401); the box draws the login form (metered on both edges); alias-pass inputs through FleetOwners with Region. Carry: Task 6's fpWorld already covers a foreign account's row (baj on bah's fleet) and its aliases; no change. |
| + |
| +Not done: |
| + |
| +- Task 5: TestForwardUpgradeIsLimitedAtTheHub's vacuous `ups > 2` and 101-or-502 acceptance, and the box-side upgrade exemption: WebSockets do not cross the tunnel (#471). |
| +- Task 11: C08 with no fleet to name needs new copy (R2: follow-up). |
| +- Task 11: test-report noise (buildvcs, a plan9 timeout under load): not a code item. |
| +- Task 13: a retired name with an existing certificate answers the TLS handshake (wildcard cert, cert mirror, autocert cache) and is refused only at HTTP: a behaviour change at the TLS layer, not a minor. |
| +- Task 13: the fleetapi store door answers 404 to a fleet box's alias-pass read of status/boxes/ (deployment route set unknown that pass). Production fleet boxes get the same answer, so the test keeps it. |
| +- R2: Fingerprint does not hash Runtime outside fleet admission (pre-existing ActivatorOwned dependency). |
diff --git a/docs/superpowers/specs/2026-10-29-fleet-public-routes-design.md b/docs/superpowers/specs/2026-10-29-fleet-public-routes-design.md| index 808bf386d..dc1711e46 100644 |
| --- a/docs/superpowers/specs/2026-10-29-fleet-public-routes-design.md |
| +++ b/docs/superpowers/specs/2026-10-29-fleet-public-routes-design.md |
| @@ -277,11 +277,18 @@ published by nobody and skipped by nothing that would skip an inert one |
| The registry enforces the shape where rows are written, so a stray value |
| cannot get there in the first place (R1-7, R2-6): |
| -- `PutForward(rt)`: one transaction. If a row exists at the host and is |
| - not a forward row, it returns `ErrHostHeld` and writes nothing. |
| +- `PutForward(rt)`: one transaction. An `rt` that is not a forward row, |
| + has no `Host`, or whose `Region` is not a fleet placement |
| + (`FleetPlacement`) is refused with `ErrNotForward` before anything is |
| + read or written (follow-up to the deferred minors, defence in depth: |
| + §4.4 already refuses to serve such a row). If a row exists at the host |
| + and is not a forward row, it returns `ErrHostHeld` and writes nothing. |
| Otherwise it writes the declared columns from `rt`, keeps the |
| observational ones and (by the rule above) `FleetBox`, and writes zero |
| - to every forbidden column. Never `Upsert`, which keeps non-empty |
| + to every forbidden column. The conflict arm is built from one |
| + production list of the kept columns (`forwardKept`) and |
| + `ForwardForbidden`, which a test checks together against |
| + `PRAGMA table_info(routes)`. Never `Upsert`, which keeps non-empty |
| existing values (`registry.go:1512`). |
| - `DeleteForward(host)`: deletes the row only if it is still a forward |
| row, in the same statement. |
| @@ -868,9 +875,18 @@ retention, build states, bindings, edges file, the status tick's |
| reconciliation, `aliasPassReporting` with the box's judge in the context) |
| run over identical records and registry twice, once without and once |
| with a fleet-placed app on a `canary/*` channel and its forward row, with |
| -a counting store keyed by object prefix; the difference must equal the |
| +a counting store keyed by object prefix. The baseline is not a bucket |
| +without the app: both runs hold the fleet app's records, and they differ |
| +only in the forward phase, dormant in the baseline (today's hub, which |
| +skips a fleet-placed record at the fleet boundary) and armed in the |
| +other, which mints the row. The difference must equal the |
| table's `A = 1, C = 1` row by row, with zero manifest, policy, seed and |
| -channel-pointer reads for the forward app. Two more cases **(R3-2)**: the |
| +channel-pointer reads for the forward app, and the edges file must gain |
| +one PUT on the pass the row appears and one on the pass it goes (the |
| +app's records deleted). The counts are those of the counting store, |
| +which hides the store's optional interfaces, so every reader takes its |
| +fallback path on both runs alike, as the telemetry rows are those of the |
| +index off. Two more cases **(R3-2)**: the |
| forward app with an instance catch-all claim attached (the difference |
| gains exactly one instance-prefix `List` per alias pass, `K = 1`), and |
| the same with two of its instances sharing a label (it gains the two |
| @@ -1353,8 +1369,13 @@ Units, by file (N = new, R = removed, otherwise a changed body or sites): |
| `+whole:Fleet` x2): the hub's `ReconcileConfig.FleetOwners`, the |
| fleets table read on each call. Those are the reads Task 6 listed under |
| `fleetArmInputs`, which now takes its owners from `hubFleetOwners` so |
| - the forward phase and the edge's fleet arm judge by one map; |
| - `fleetArmInputs` keeps no read site and leaves the card. |
| + the forward phase, the edges file and the alias pass read the table |
| + the same way. The edge's Reload reads it itself (since the follow-ups, |
| + through the same `Registry.FleetOwners`), so the phase and the edge |
| + can disagree for one pass after a fleet is created, deleted or changes |
| + owner; they converge on their next reads, and the disagreement fails |
| + closed, since the edge serves a forward row only on its own read of the |
| + owner. `fleetArmInputs` keeps no read site and leaves the card. |
| `BoxProvisionConfig` replaces `boxProvisionConfig`, which was never on |
| the card: it reads its environment through its `getenv` parameter |
| (`hubArmed(getenv)`, `provisionTickConfig(getenv)`) and the owner map |