carlos / platform Public

Fleet public routes review R2: C08 names the destination after the platform-alias fold

FleetArmVerdict.Served recorded each row's own fleet, while Reload gives a
platform alias its source's entry. A home platform alias of an away source
went to away with C08 suppressed, and an unplaced platform alias of a home
source went to home with a false C08.

One resolver, with the dispatch arm kept apart from the destination:
DispatchArm is Reload's dispatch order moved out of its switch unchanged,
and foldPlatformAliases is Reload's platform-alias fold moved out
unchanged and made generic. Reload switches on DispatchArm and folds its
map with foldPlatformAliases. FleetVerdict.Arm holds the pre-fold fleet
rows Reload's fleet cases read. Served is every entry DispatchArm gives,
folded by the same function, kept where it goes to a fleet. C08 reads
Served unchanged.

Tests: the verdict parity guard now compares Reload's actual entry with
Served for every host, platform aliases included. A production-wired hub
test sends a home alias of an away source to away's box and an unplaced
alias of a home source to home's box, with Served naming each fleet. A
console test shows C08 for the first and not for the second. Mutations
caught: Served skips the fold; Served builds no entries for non-fleet arms.

Census re-proposed with the same claims file: 116 units (32 body, 56
sites, 22 new, 6 reads), seal af326671 -> bca6ef74. Spec §7 updated.
Astra's R2 findings are committed with this fix.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev d4b47ec3e559f79a2184ef4eae3b6907f7d9382b parent c000f28
11 files changed, +419 −82
  • docs/superpowers/notes/census-proposal-fleet-public-routes.md +6 −4
  • docs/superpowers/reviews/CODEX-FINDINGS-fleet-public-routes-branch-R2.md +76 −0
  • docs/superpowers/specs/2026-10-29-fleet-public-routes-design.md +18 −0
  • internal/console/apiinstances.go +4 −2
  • internal/console/fleetforward_test.go +46 −0
  • internal/edge/edge.go +26 −38
  • internal/edge/fleetalias_dest_test.go +51 −0
  • internal/edge/fleetforward.go +123 −10
  • internal/edge/fleetverdict_test.go +58 −21
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −1
  • internal/provision/testdata/plan14-root-reads-fleet-public-routes.tsv +10 −6

CI passed — run details

Intent

Human

<task-notification> <task-id>b5bpqhhvq</task-id> <tool-use-id>toolu_01GBj9boMFZzed2TLo6hCCR5</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/ba9fa944-a429-4788-9b3c-f2b2f42617f3/tasks/b5bpqhhvq.output</output-file> <status>completed</status> <summary>Background command "Commit R1 findings, write R2 brief, push, run Astra R2" completed (exit code 0)</summary> </task-notification>

Human

<task-notification> <task-id>bgchi78er</task-id> <tool-use-id>toolu_01JQrwc3HtCu5YXQ2E8KjQaT</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/ba9fa944-a429-4788-9b3c-f2b2f42617f3/tasks/bgchi78er.output</output-file> <status>completed</status> <summary>Background command "Wait for CI on the new tip" completed (exit code 0)</summary> </task-notification>

Attributed to this commit: 32.8 g CO₂e (4,235,176 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on design-fleet-public-routes, never backward from it. A turn that produced more than one commit books all of its tokens to the last one, and a concurrent session on this branch can add to the same figure. Some of it was priced using the shared default rate, because no model-specific factor row exists yet for at least one model involved. The Carbon view has the repo total, which is never derived from this attribution.

diff --git a/docs/superpowers/notes/census-proposal-fleet-public-routes.md b/docs/superpowers/notes/census-proposal-fleet-public-routes.md
index 9c8862255..68d81b087 100644
--- a/docs/superpowers/notes/census-proposal-fleet-public-routes.md
+++ b/docs/superpowers/notes/census-proposal-fleet-public-routes.md
@@ -1,6 +1,6 @@
# Census approval: fleet-public-routes
-Ruling `census-ruling-fleet-public-routes`. The independent reviewer approves or rejects every change below, 27 with a new disposition; nothing goes to the census owner (Paul, #280, 2026-10-26).
+Ruling `census-ruling-fleet-public-routes`. The independent reviewer approves or rejects every change below, 29 with a new disposition; nothing goes to the census owner (Paul, #280, 2026-10-26).
| unit | change | read sites | what changed |
|---|---|---|---|
@@ -46,7 +46,7 @@ Ruling `census-ruling-fleet-public-routes`. The independent reviewer approves or
| `internal/domains/aliases.go` `ReconcileAliasesReport` | sites | +registry:Host, +whole:Route | fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 6 fix rounds 2-3: AliasReport.FleetRefused (edge.FleetArmVerdict's refused set) is called once on the pass's own listing; a Wildcard claim whose primary is fleet-refused derives no wildcard_domains row (an earlier one goes with the ordinary removal); the catch-all alias is derived as before (+registry:Host, +whole:Route). Rows already read; writes less, never more; no root pass calls it. |
| `internal/domains/reconcile.go` `Reconcile` | sites | +whole:Route ×3 | fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 7: the whole-app trash loop keeps every forward row (keptLive = append(keptLive, rt), +whole:Route x3) ahead of DeleteIfUnchanged, so a trashed fleet app's forward row is retired by the forward phase alone. Deletes less, never more. |
| `internal/edge/assetcatch.go` `Edge.localAssetCatch` | sites | +whole:Route | fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 4: a forward row is never caught locally (IsForward(), +whole:Route). Only narrows. |
-| `internal/edge/edge.go` `Edge.Reload` | sites | +registry:FleetBox, +registry:Host ×8, -registry:Region, +whole:Route ×3 | fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Tasks 4 and 6: the forward case (fleetProxy toward the binding's FleetBox, throttled refusal); one refusal check before the switch from FleetArmVerdict (sidecar not judged; a non-ready forward row refused; a forward row always judged by FleetServeEligible, any other row only where tunnels are on; an alias of a refused source refused with it); the accountless note; path rows of a forward host not folded; no alias folded onto a refused row; refusedHosts held through every fold. ListFleets and FleetChannelAuth read before the loop (+registry:FleetBox, +registry:Host x7, +whole:Route x3). Serving only; the hub's agent, not root. Review R1 finding 2: the switch reads verdict.Served (FleetArmVerdict) by host; the forward case and the fleet-placed case take their fleet from it (served.Fleet) instead of FleetPlacement(t.Region), and an admitted forward row not Served continues rather than falling through (+registry:Host, -registry:Region); the same rows take the same arms; no read added. |
+| `internal/edge/edge.go` `Edge.Reload` | sites | +registry:FleetBox, +registry:Host ×8, -registry:Kind ×2, -registry:Region, -registry:Socket, -registry:Tunnel, +whole:Route ×4 | fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Tasks 4 and 6: the forward case (fleetProxy toward the binding's FleetBox, throttled refusal); one refusal check before the switch from FleetArmVerdict (sidecar not judged; a non-ready forward row refused; a forward row always judged by FleetServeEligible, any other row only where tunnels are on; an alias of a refused source refused with it); the accountless note; path rows of a forward host not folded; no alias folded onto a refused row; refusedHosts held through every fold. ListFleets and FleetChannelAuth read before the loop (+registry:FleetBox, +registry:Host x7, +whole:Route x3). Serving only; the hub's agent, not root. Review R1 finding 2: the switch reads verdict.Served (FleetArmVerdict) by host; the forward case and the fleet-placed case take their fleet from it (served.Fleet) instead of FleetPlacement(t.Region), and an admitted forward row not Served continues rather than falling through (+registry:Host, -registry:Region); the same rows take the same arms; no read added. Review R2: the switch is on DispatchArm(t, viaFleet, tunnels) (the order moved there unchanged: forward only when in Arm, own Tunnel, fleet, socket, addrs, static, status, else continue), the fleet cases read verdict.Arm (renamed from Served), and the platform-alias fold is foldPlatformAliases with the same take (source entry, own paths, alias marks) and the same refusal log (-registry:Kind x2, -registry:Socket, -registry:Tunnel, +whole:Route: those reads moved into DispatchArm); same rows, same arms, same entries; no read added. |
| `internal/edge/edge.go` `Edge.ServeHTTP` | sites | +whole:Route ×2 | fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 4: loginPost and cacheable treat a forward row as not this box's to answer (IsForward(), +whole:Route x2): no login form and no shared cache for a forward host. Serving only. |
| `internal/edge/planthrottle.go` `Edge.planThrottleOf` | sites | +whole:Route | fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 5: the kind selector admits a forward row as an instance (IsForward(), +whole:Route); fromTunnel exemptions unchanged. Only slows. |
| `internal/edge/planthrottle.go` `Edge.trackUpgrade` | sites | +whole:Route | fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 5: the kind selector admits a forward row as an instance (IsForward(), +whole:Route); fromTunnel exemptions unchanged. |
@@ -202,8 +202,10 @@ New dispositions, which census-propose wrote and the reviewer checks against the
- new `cli.go:refuseForwardRoute`: reads +whole:Route ×2; written legacy, accepted-legacy, frozen
- new `cli.go:refuseForwardTargets`: reads +registry:App, +whole:Route ×4; written legacy, accepted-legacy, frozen
- new `cli.go:refuseForwardWrite`: reads +whole:Route; written legacy, accepted-legacy, frozen
-- new `internal/edge/fleetforward.go:FleetArmVerdict`: reads +registry:App, +registry:Host ×4, +registry:Region, +registry:Status, +registry:Tunnel, +whole:Route ×3; written legacy, accepted-legacy, frozen
+- new `internal/edge/fleetforward.go:DispatchArm`: reads +registry:Kind ×2, +registry:Socket, +registry:Tunnel; written legacy, accepted-legacy, frozen
+- new `internal/edge/fleetforward.go:FleetArmVerdict`: reads +registry:App, +registry:Host ×8, +registry:Region, +registry:Status ×2, +registry:Tunnel, +whole:Route ×6; written legacy, accepted-legacy, frozen
- new `internal/edge/fleetforward.go:FleetServeEligible`: reads +registry:Account ×7, +registry:Region ×2, +registry:Tunnel, +whole:Route; written legacy, accepted-legacy, frozen
+- new `internal/edge/fleetforward.go:foldPlatformAliases`: reads +whole:Route; written legacy, accepted-legacy, frozen
- new `internal/host/hub.go:fleetRefusedFor`: reads +whole:Route; written legacy, accepted-legacy, frozen
- new `internal/host/hub.go:hubFleetOwners`: reads +registry:Account, +registry:Name, +whole:Fleet ×2; written legacy, accepted-legacy, frozen
- new `internal/provision/forward.go:forwardCurrent`: reads +registry:Account ×2, +registry:App ×2, +registry:Channel ×2, +registry:Provisioned ×2, +registry:RateLimit ×2, +registry:Region ×2, +registry:Slug ×2, +registry:Status ×2; written legacy, accepted-legacy, frozen
@@ -226,6 +228,6 @@ New dispositions, which census-propose wrote and the reviewer checks against the
- reads `internal/registry/recoveryhandover.go:Registry.RebindClaimRows`: +registry:Host ×2, +registry:Route ×4, -registry:sql, +whole:Route ×4, +whole:claimTransaction ×2; keeps legacy, task accepted-legacy
- reads `internal/registry/registry.go:upsertRoute`: +registry:Host; keeps legacy, task accepted-legacy
-Seal: `af326671321edda76c7e6217a47892605a9e3b886fa880ad6d049c2f28f63873` → `5f70d8e114f38d493088b6a6076d66026520e813b33484f3f42fa59d71d0da60`.
+Seal: `af326671321edda76c7e6217a47892605a9e3b886fa880ad6d049c2f28f63873` → `bca6ef741a96b72767b1747789cd01b3111d61b68548cbe368258c31f3d53a2e`.
Overlay: `internal/provision/testdata/plan14-root-reads-fleet-public-routes.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`.
diff --git a/docs/superpowers/reviews/CODEX-FINDINGS-fleet-public-routes-branch-R2.md b/docs/superpowers/reviews/CODEX-FINDINGS-fleet-public-routes-branch-R2.md
new file mode 100644
index 000000000..ef4483812
--- /dev/null
+++ b/docs/superpowers/reviews/CODEX-FINDINGS-fleet-public-routes-branch-R2.md
@@ -0,0 +1,76 @@
+R1 P1 — **resolved**: route identity and forward inertness now invalidate the fingerprint.
+R1 P2 — **partly**: C08 uses the shared decision, but that decision omits the destination changes made by platform-alias folding.
+
+Reviewed `c000f28ba35ed7860aa8d45f3a95aab264cff08c`, round 2 of 3. **No P1; one P2.**
+
+1. **P2 — C08’s shared destination can disagree with Reload after platform-alias folding.**
+
+ **Evidence:** [FleetArmVerdict](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-fleet-public-routes/internal/edge/fleetforward.go:175) records each row’s own fleet at lines 175–176. Its platform-alias handling at lines 179–185 propagates refusals but never inherits the source’s served destination. [Reload](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-fleet-public-routes/internal/edge/edge.go:1163), however, replaces a platform alias’s entry with its source’s entry at lines 1163–1175. [forwardHeldReason](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-fleet-public-routes/internal/console/apiinstances.go:305) trusts the earlier destination.
+
+ **Failure scenario, source-verified:** Account `bah` owns fleets `home` and `away`. Two ready `shop` rows share socket `/s`: a non-platform source placed on `away`, and a platform alias placed on `home`. Both pass eligibility. `Served[alias]` names `home`, but Reload’s platform fold copies the source’s `away` entry. For a record at the alias hostname placed on `home`, C08 is suppressed although requests go toward `away`. Conversely, an unplaced platform alias folded onto a `home` source gets a false C08.
+
+ The [parity test](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-fleet-public-routes/internal/edge/fleetverdict_test.go:170) excludes aliases from its positive dispatch comparison, so it does not establish the claimed equivalence for these cases.
+
+ **Concrete fix:** Derive C08’s effective destination through the same platform-fold resolution that Reload uses. Keep dispatch-arm membership distinct from the destination after folding. Add production-wired regressions for both scenarios, checking the selected fleet and C08.
+
+ **Invariant / fault family:** C08 must describe the destination actually served. This continues R1 P2’s shared-decision-consistency family. Stopping rule 2 applies; recommend enforcing this invariant in one shared resolver with a guard test.
+
+The dispatch-switch replacement itself remains equivalent: readiness and refusals are unchanged, explicit tunnels retain precedence, and admitted non-forward fleet rows take the same fleet arm. The subsequent platform fold also behaves as before. The defect is the destination reported to C08.
+
+The fix report’s four concerns:
+
+| Concern | Judgment |
+|---|---|
+| Missing fleet produces loosely fitting C08 copy | **follow-up**; the destination is unavailable, and the approved copy remains unchanged. |
+| Three fingerprint goldens re-pinned | **legitimate**; independent recomputation matched both old and new values, with identity fields alone explaining each change. Snapshot goldens are unchanged. |
+| Unhashed `Runtime` outside fleet admission | **follow-up**; the pre-existing `ActivatorOwned` dependency remains. The fingerprint is complete for fleet admission, not every Reload behavior. |
+| Reload dispatch equivalence | **confirmed**, with the C08 folding defect above. |
+
+Fingerprint request cost is unchanged: no additional query, connection, bucket read or timer. Local work increases by six selected values and the forbidden-column CASE; CPU cost was not measured.
+
+Deferred-minor triage:
+
+| Item | Disposition |
+|---|---|
+| Task 1: isolated fleet-membership subquery witness | follow-up |
+| Task 2: kept-column update-list coverage | follow-up |
+| Task 2: `dns_checked_at` preservation test | follow-up |
+| Task 2: empty Host/non-fleet Region validation | follow-up |
+| Task 2: non-forward-input sentinel | follow-up |
+| Task 2: forbidden-field count typo | follow-up |
+| Task 5: upgrade-context cancellation assertion | follow-up |
+| Task 5: upgrade assertions and box exemption | follow-up |
+| Task 5: plain HTTP throttle integration | follow-up |
+| Task 5: box-side exemption mutation tests | follow-up |
+| Task 5: rate-limit comment | follow-up |
+| Task 11: partial C08 dispatch decision | **must fix before merge** — finding above |
+| Task 11: mismatched forward rows suppress C08 | **resolved** |
+| Task 11: stale comment, duplicate loop, long comment | follow-up |
+| Task 11: test-report noise | follow-up |
+| Task 12: independently read owner-map comments | follow-up |
+| Task 12: edges-file removal PUT budget witness | follow-up |
+| Task 12: counting-store optional interfaces | follow-up |
+| Task 12: baseline wording | follow-up |
+| Task 12: old census-basis function spelling | resolved |
+| Task 13: certificates surviving retirement | follow-up |
+| Task 13: catch-all retirement, alias inputs, rate bound, noise, gate-origin assertions | follow-up |
+| Task 13: foreign-account publication exclusion | follow-up; R1 coverage assessment stands |
+| Reload’s inline owner-map construction | follow-up |
+
+Census verdicts below approve the root-input dispositions at this commit. They do not clear the C08 correctness finding. R1 verdicts stand for unchanged entries.
+
+| Unit / envelope | Verdict | Lines read and basis |
+|---|---|---|
+| `Registry.Fingerprint` | **APPROVE** | `internal/registry/registry.go:3815–4074`. Same registry path, remote operation and query set; additional values affect only the digest. |
+| `var fingerprintForwardInert` | **APPROVE** | `internal/registry/forward.go:128–253`. SQL derives solely from compiled column metadata and matches the forbidden-field zero checks. No caller-controlled SQL fragment. |
+| `FleetArmVerdict` | **APPROVE** | `internal/edge/fleetforward.go:57–188`; `platformalias.go:43–67`. Refusal authority is unchanged; new destination metadata adds no root input authority. C08 remains subject to the P2. |
+| `Edge.Reload` | **APPROVE** | `internal/edge/edge.go:730–999,1119–1225`. Same admitted rows, tunnel precedence and fleet destinations; forward rows cannot fall through. No new root path or command. |
+| Envelope `internal/edge` | **APPROVE** | Changed production bodies above, including the platform-fold interaction at `edge.go:1155–1175`. No authority expansion. |
+| Envelope `internal/registry` | **APPROVE** | `forward.go:239–253`, `registry.go:3815–4074`. Metadata-built read expression and digest encoding only; writer guards remain intact. |
+| 9B8 `Server.handleAPIInstanceList` re-pin | **APPROVE** | `internal/console/apiinstances.go:1307–1336`; `internal/provision/fleet_public_routes_census_test.go:75–101`. Same record-key scope and response assembly; no new bucket writer or write authority. |
+
+No files changed. GOCACHE remained unset. Focused Go tests could not start because the read-only sandbox prevented creation of Go’s work directory under the existing TMPDIR. No full suites ran. Source checks and independent golden recomputation completed; `git diff --check` was clean.
+
+With no P1, stopping rule 1 ends review here. Apply the P2 within the existing budget, including the required census and newly changed security-behavior checks.
+
+READY AFTER FIXES
\ No newline at end of file
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 debf2c41e..808bf386d 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
@@ -1416,6 +1416,24 @@ Units, by file (N = new, R = removed, otherwise a changed body or sites):
console's `instanceHealth` and `forwardHeldReason` are outside the root
scope; `handleAPIInstanceList` is re-pinned in 9B8 (below).
+ Whole-branch review round 2's fix (C08 must name the destination after
+ the platform-alias fold), re-proposed under the same NAME: 116 units (32
+ body, 56 sites, 22 new, 6 reads), seal `af326671...` to `bca6ef74...`.
+ `internal/edge/fleetforward.go` `DispatchArm` (new, `+registry:Kind` x2,
+ `+registry:Socket`, `+registry:Tunnel`): Reload's dispatch order moved
+ out of its switch unchanged. `foldPlatformAliases` (new, `+whole:Route`):
+ Reload's platform-alias fold moved out unchanged, generic over the entry
+ type. `FleetArmVerdict` (still `new`; now `+registry:App`,
+ `+registry:Host` x8, `+registry:Region`, `+registry:Status` x2,
+ `+registry:Tunnel`, `+whole:Route` x6): the pre-fold fleet rows are
+ `Arm`, and `Served` is every entry `DispatchArm` gives, folded by
+ `foldPlatformAliases`, kept where it goes to a fleet. `Edge.Reload`
+ (`sites`, now `+registry:FleetBox`, `+registry:Host` x8,
+ `-registry:Kind` x2, `-registry:Region`, `-registry:Socket`,
+ `-registry:Tunnel`, `+whole:Route` x4) switches on `DispatchArm`, reads
+ `verdict.Arm`, and folds with `foldPlatformAliases`. Envelope
+ `internal/edge` re-pinned. No 9B8 site changes.
+
Root's own row readers (adopt, capability, named units, restart, stage,
rootfs, `layoutReversalIncomplete`) change no code and select by
`Kind == "instance"`, `IsSidecar()`, `Unit`, `Runtime`, `Backing`,
diff --git a/internal/console/apiinstances.go b/internal/console/apiinstances.go
index 4514eb7c5..c0c79ece3 100644
--- a/internal/console/apiinstances.go
+++ b/internal/console/apiinstances.go
@@ -272,8 +272,10 @@ type instanceListRecord struct {
}
// hubRouting is the console box's registry as its edge routes it: the rows
-// by host, and the fleet arm's Served answer (edge.FleetArmVerdict) over the
-// same listing and the same registry's fleets table. The console's box is
+// by host, and the fleet arm's Served answer (edge.FleetArmVerdict: where
+// each host's entry goes after the platform-alias fold, so a platform alias
+// goes where its source goes) over the same listing and the same registry's
+// fleets table. The console's box is
// the hub (plan ruling P-3), so the verdict is the one that box's Reload
// makes: hub and tunnels both on.
type hubRouting struct {
diff --git a/internal/console/fleetforward_test.go b/internal/console/fleetforward_test.go
index 857fc13ca..c4dd2b0b6 100644
--- a/internal/console/fleetforward_test.go
+++ b/internal/console/fleetforward_test.go
@@ -334,6 +334,52 @@ func TestHeldHostFollowsTheFleetArm(t *testing.T) {
}
}
+// Whole-branch review round 2: C08 reads the destination after the edge's
+// platform-alias fold, where a platform alias takes its source's entry. A
+// record placed on home whose host is a platform alias placed on home, but
+// whose source is on away, is held: requests go toward away. A record
+// placed on home whose host is an unplaced platform alias of a source on
+// home is not: requests go toward home.
+func TestHeldHostFollowsThePlatformAliasFold(t *testing.T) {
+ fx := newConsoleFixture(t)
+ if _, err := fx.st.CreateAppIn(OpsAccountID, "shop", "paul@keymail.dev", time.Now()); err != nil {
+ t.Fatal(err)
+ }
+ created := time.Now().UTC().Add(-10 * time.Second)
+ home, away := registry.PlacementTarget("home"), registry.PlacementTarget("away")
+ toAway := fprRecord(t, fx, "toaway", home, created)
+ toHome := fprRecord(t, fx, "tohome", home, created)
+ reg := openTestReg(t, fx)
+ fprFleets(t, reg, map[string]string{"home": fx.sqid, "away": fx.sqid})
+ row := func(host, slug, region, socket string, platform bool) registry.Route {
+ return registry.Route{Host: host, Slug: slug, Kind: "instance", App: "shop", Account: fx.sqid,
+ Region: region, Socket: socket, Channel: "stable", Status: "ready", Platform: platform}
+ }
+ for _, rt := range []registry.Route{
+ row("src-away.example.com", "src-away", away, "/run/carlos/away.sock", false),
+ row(toAway.Host, "toaway", home, "/run/carlos/away.sock", true),
+ row("src-home.example.com", "src-home", home, "/run/carlos/home.sock", false),
+ row(toHome.Host, "tohome", "", "/run/carlos/home.sock", true),
+ } {
+ if err := reg.Upsert(rt); err != nil {
+ t.Fatalf("%s: %v", rt.Host, err)
+ }
+ }
+ reg.Close()
+ token := cliToken(t, fx, "paul@keymail.dev", "code-fpr-fold")
+
+ rows, body := fprListed(t, fx, token)
+ for slug, want := range map[string]string{"toaway": fmt.Sprintf(fprHeldWords, "home"), "tohome": ""} {
+ row, ok := rows[fprHost(slug)]
+ if !ok {
+ t.Fatalf("%s not listed: %s", slug, body)
+ }
+ if got := fprString(t, row, "route_held"); got != want {
+ t.Errorf("%s route_held = %q, want %q", slug, got, want)
+ }
+ }
+}
+
// Controller ruling 1 (Task 11 review): an unplace leaves no fleet behind.
// The placement column is "" both for an app never placed and for one
// unplaced, and appPlacement and the startup backfill read the app's rows
diff --git a/internal/edge/edge.go b/internal/edge/edge.go
index 8f9b16d37..a953c2455 100644
--- a/internal/edge/edge.go
+++ b/internal/edge/edge.go
@@ -829,13 +829,15 @@ func (e *Edge) Reload() error {
// genManaged: an activator-managed instance reached through its
// current generation (appSocketProxy), generations on only.
genManaged := false
- // served is the fleet arm's positive answer for this row
- // (FleetArmVerdict's Served): both fleet cases below take their fleet
- // from it, and nothing else reaches a fleet's tunnel, so a host is
- // served through a fleet exactly when the verdict says so. The
- // console's held-host reason (FPR-C08) reads the same answer.
- served, viaFleet := verdict.Served[t.Host]
- switch {
+ // served is the fleet arm's answer for this row (FleetArmVerdict's
+ // Arm): both fleet cases below take their fleet from it, and nothing
+ // else reaches a fleet's tunnel. The arm itself is DispatchArm, the
+ // one statement of this switch's order, which FleetArmVerdict also
+ // asks to know which rows have an entry before the platform-alias
+ // fold below (its Served, the destination after that fold, is what
+ // the console's held-host reason FPR-C08 reads).
+ served, viaFleet := verdict.Arm[t.Host]
+ switch DispatchArm(t, viaFleet, e.tunnels != nil) {
// A forward row (fleet public routes spec §4.2) is the hub's row for
// an app placed on a fleet: it runs nothing here, and the only way it
// is ever served is through its fleet's tunnel. FIRST, ahead of the
@@ -846,11 +848,8 @@ func (e *Edge) Reload() error {
// it) and never falls through. Eligibility is FleetServeEligible, the
// one rule: the hub only, inert, on a fleet in this box's fleets
// table, its raw account the fleet's owner. An admitted forward row
- // is always Served; one that is not is never served by another arm.
- case t.IsForward():
- if !viaFleet {
- continue
- }
+ // is always in Arm; one that is not is ArmNone, never another arm.
+ case ArmForward:
p := fleetProxy(served.Fleet, t.FleetBox, e.tunnels)
p.ModifyResponse = e.responseModifier(t)
proxy = p
@@ -892,7 +891,7 @@ func (e *Edge) Reload() error {
// though t.Addr may hold a perfectly working backend. Deliberate: once
// a hub exists, a `-tunnel` binding is the newest operator intent and
// wins outright rather than silently falling back to a stale Addr.
- case t.Tunnel != "" && e.tunnels != nil:
+ case ArmTunnel:
p := tunnelProxy(t.Tunnel, e.tunnels)
p.ModifyResponse = e.responseModifier(t)
proxy = p
@@ -914,10 +913,10 @@ func (e *Edge) Reload() error {
// its traffic would go. An accountless row is the pre-account
// compatibility case: served, and logged.
//
- // Served holds exactly the fleet-placed rows with no Tunnel, ready and
+ // Arm holds exactly the fleet-placed rows with no Tunnel, ready and
// not refused, on an edge whose tunnels are on: the rows this case
// has always taken.
- case viaFleet:
+ case ArmFleet:
if why, noted := verdict.Noted[t.Host]; noted {
e.logThrottled("fleet-accountless "+t.Host, fmt.Sprintf("route %s: %s", t.Host, why))
}
@@ -925,7 +924,7 @@ func (e *Edge) Reload() error {
p.ModifyResponse = e.responseModifier(t)
proxy = p
viaTunnel = true
- case t.Socket != "":
+ case ArmSocket:
// An activator-managed instance's process binds a generation
// socket, not t.Socket, once generations are on (spec §7.1):
// every new connection asks the activator for the current one.
@@ -962,7 +961,7 @@ func (e *Edge) Reload() error {
// nothing is checking. It is a config gap, not a serving failure —
// mint always writes both columns together (provision), so this is
// only reachable via a hand-written row.
- case len(t.AddrList()) > 0:
+ case ArmAddrs:
addrs := t.AddrList()
var p *httputil.ReverseProxy
switch {
@@ -991,9 +990,9 @@ func (e *Edge) Reload() error {
}
p.ModifyResponse = e.responseModifier(t)
proxy = p
- case t.Kind == "static":
+ case ArmStatic:
proxy = e.staticHandlerFor(t)
- case t.Kind == "status":
+ case ArmStatus:
proxy = e.statusHandlerFor(t)
default:
continue // no backend to reach
@@ -1152,27 +1151,16 @@ func (e *Edge) Reload() error {
// app's target through the alias (Astra r2 P1). A refused alias, or one
// whose instance has no entry here, is not served: never a direct proxy
// around the instance.
- sources, refused := PlatformAliasFold(routes)
- for host := range refused {
- if _, ok := m[host]; ok {
- delete(m, host)
- e.logThrottled("platform-alias-refused "+host, fmt.Sprintf(
- "platform alias %s is not served: its socket is not one ready route of its own account and app", host))
- }
- }
- for host, src := range sources {
- own, ok := m[host]
- if !ok {
- continue
- }
- up, srcOK := m[src]
- if !srcOK {
- delete(m, host)
- continue
- }
+ //
+ // The fold is foldPlatformAliases, the same one FleetArmVerdict applies
+ // to its destinations, so its Served names where these entries go.
+ for _, host := range foldPlatformAliases(m, routes, func(own, up upstream) upstream {
up.paths = own.paths
up.alias, up.platformAlias = true, true
- m[host] = up
+ return up
+ }) {
+ e.logThrottled("platform-alias-refused "+host, fmt.Sprintf(
+ "platform alias %s is not served: its socket is not one ready route of its own account and app", host))
}
// Attached hostnames (#151): each alias resolves to the primary's OWN
// entry — same proxy value, same route (so activator keying, version
diff --git a/internal/edge/fleetalias_dest_test.go b/internal/edge/fleetalias_dest_test.go
new file mode 100644
index 000000000..0cbff8421
--- /dev/null
+++ b/internal/edge/fleetalias_dest_test.go
@@ -0,0 +1,51 @@
+package edge
+
+// Fleet public routes, whole-branch review round 2: a platform alias is
+// served with its source's entry (the platform-alias fold), so the fleet a
+// request for it reaches is its source's, whatever the alias row's own
+// placement. FleetArmVerdict's Served names that same fleet: the
+// destination after the fold, not the row's own.
+
+import (
+ "testing"
+
+ "github.com/carlosframework/platform/internal/registry"
+)
+
+// The hub serves a platform alias placed on home, whose source is placed on
+// away, through away's box, and Served says away. An unplaced platform alias
+// whose source is on home goes through home's box, and Served says home.
+func TestPlatformAliasGoesTowardItsSourcesFleet(t *testing.T) {
+ row := func(host, region, socket string, platform bool) registry.Route {
+ return registry.Route{Host: host, Kind: "instance", Socket: socket, Status: "ready",
+ Region: region, Account: fwdOwner, App: "shop", Platform: platform}
+ }
+ home, away := registry.PlacementTarget("home"), registry.PlacementTarget("away")
+ hubURL, hub, _ := forwardHubAndBox(t, []registry.Route{
+ row("src.away.example.com", away, "/run/carlos/away.sock", false),
+ row("alias.home.example.com", home, "/run/carlos/away.sock", true),
+ row("src.home.example.com", home, "/run/carlos/home.sock", false),
+ row("alias.none.example.com", "", "/run/carlos/home.sock", true),
+ }, nil, namedHandler("box-1"))
+ stop2 := startFakeRemoteHost(t, hubURL, "away/box-2", fwdBox2Tok, namedHandler("box-2"))
+ t.Cleanup(stop2)
+ waitForTunnelState(t, hub.tunnels, "away/box-2", "connected", e2eReconnectBound)
+
+ routes, err := hub.reg.List()
+ if err != nil {
+ t.Fatal(err)
+ }
+ v := FleetArmVerdict(routes, map[string]string{"home": fwdOwner, "away": fwdOwner}, true, true)
+ for host, want := range map[string]struct{ fleet, box string }{
+ "alias.home.example.com": {"away", "box-2"},
+ "alias.none.example.com": {"home", "box-1"},
+ } {
+ resp, body := fwdDo(t, hubURL, "GET", host, "/", "", nil)
+ if resp.StatusCode != 200 || string(body) != want.box {
+ t.Errorf("GET %s = %d %q, want %s's %s", host, resp.StatusCode, body, want.fleet, want.box)
+ }
+ if got := v.Served[host]; got != (FleetServed{Fleet: want.fleet, App: "shop", Account: fwdOwner}) {
+ t.Errorf("Served[%s] = %+v, want toward fleet %s", host, got, want.fleet)
+ }
+ }
+}
diff --git a/internal/edge/fleetforward.go b/internal/edge/fleetforward.go
index be6bbfe70..5e12b092f 100644
--- a/internal/edge/fleetforward.go
+++ b/internal/edge/fleetforward.go
@@ -107,14 +107,95 @@ type FleetVerdict struct {
// Noted maps a served fleet-placed host to a log fragment: the
// accountless compatibility case.
Noted map[string]string
- // Served maps every host the fleet arm serves to where it sends it
- // (FleetServed). Reload's two fleet cases take the fleet from it and
- // serve nothing else through a fleet, so a host is here exactly when
- // Reload sends it through a fleet's tunnel; the console's held-host
- // reason (FPR-C08) reads it for the same answer.
+ // Arm maps every row the fleet arm takes, by its host, to that row's
+ // own fleet (FleetServed): which dispatch arm, before any fold.
+ // Reload's two fleet cases (DispatchArm's ArmForward and ArmFleet) take
+ // the fleet from it and nothing else reaches a fleet's tunnel.
+ Arm map[string]FleetServed
+ // Served maps every host Reload's map sends through a fleet's tunnel
+ // to where it goes: Arm after the platform-alias fold
+ // (foldPlatformAliases, the same fold Reload applies to its map), so a
+ // platform alias goes where its source goes, whatever its own row
+ // says. The console's held-host reason (FPR-C08) reads it.
Served map[string]FleetServed
}
+// Arm is the dispatch arm Reload's switch sends a row down (DispatchArm).
+type Arm int
+
+// The dispatch arms, in Reload's order.
+const (
+ ArmNone Arm = iota // no backend: not served
+ ArmForward // an admitted forward row, through its fleet
+ ArmTunnel // the row's own Tunnel binding
+ ArmFleet // a fleet-placed row with no Tunnel, through its fleet
+ ArmSocket // a unix socket
+ ArmAddrs // TCP upstreams (AddrList)
+ ArmStatic // the edge's static handler
+ ArmStatus // the edge's status handler
+)
+
+// DispatchArm is the one statement of Reload's dispatch order for a row it
+// serves at all (not a sidecar, ready, not refused): a forward row only
+// through the fleet arm, and only when fleetArm (FleetVerdict.Arm holds
+// it); then the row's own Tunnel where tunnels are on; then the fleet arm;
+// then socket, TCP upstreams, static and status. Reload switches on it,
+// and FleetArmVerdict asks it which rows have an entry before the
+// platform-alias fold.
+func DispatchArm(rt registry.Route, fleetArm, tunnels bool) Arm {
+ switch {
+ case rt.IsForward():
+ if fleetArm {
+ return ArmForward
+ }
+ return ArmNone
+ case rt.Tunnel != "" && tunnels:
+ return ArmTunnel
+ case fleetArm:
+ return ArmFleet
+ case rt.Socket != "":
+ return ArmSocket
+ case len(rt.AddrList()) > 0:
+ return ArmAddrs
+ case rt.Kind == "static":
+ return ArmStatic
+ case rt.Kind == "status":
+ return ArmStatus
+ }
+ return ArmNone
+}
+
+// foldPlatformAliases is the platform-alias fold (#338 follow-up,
+// PlatformAliasFold) over a map of entries by host, written once for
+// Reload's routing map and FleetArmVerdict's destinations: every alias
+// PlatformAliasFold refuses leaves the map (returned, for the caller's
+// log); every alias it resolves that has an entry takes take(own, its
+// source's entry), or leaves the map when its source has none. A source is
+// never itself a platform alias, so the order of the folds does not
+// matter.
+func foldPlatformAliases[V any](m map[string]V, routes []registry.Route, take func(own, src V) V) (refused []string) {
+ sources, refusedSet := PlatformAliasFold(routes)
+ for host := range refusedSet {
+ if _, ok := m[host]; ok {
+ delete(m, host)
+ refused = append(refused, host)
+ }
+ }
+ for host, src := range sources {
+ own, ok := m[host]
+ if !ok {
+ continue
+ }
+ up, srcOK := m[src]
+ if !srcOK {
+ delete(m, host)
+ continue
+ }
+ m[host] = take(own, up)
+ }
+ return refused
+}
+
// FleetServed is where the fleet arm sends a served row: its fleet, the
// row's app, and the account it is served for, the fleet's owner in the
// owners map (FleetServeEligible has matched the row's own account to it,
@@ -145,12 +226,15 @@ type FleetServed struct{ Fleet, App, Account string }
// refused with it (it is served with its source's own entry,
// PlatformAliasFold), so whatever is attached to or claimed on it goes too.
//
-// A row judged and not refused is Served when Reload's switch sends it
+// A row judged and not refused is in Arm when Reload's switch sends it
// through the fleet arm: a forward row (its case comes first), or a
// fleet-placed row with no Tunnel (a Tunnel takes the tunnel arm ahead of
-// the fleet arm). A host the alias step refuses is not Served.
+// the fleet arm). A host the alias step refuses is not in Arm. Served is
+// then every row Reload gives an entry (DispatchArm, over the rows it does
+// not skip), with its fleet when its arm is a fleet's, after
+// foldPlatformAliases, keeping the hosts whose entry goes to a fleet.
func FleetArmVerdict(routes []registry.Route, owners map[string]string, hub, tunnels bool) FleetVerdict {
- v := FleetVerdict{Refused: map[string]string{}, Noted: map[string]string{}, Served: map[string]FleetServed{}}
+ v := FleetVerdict{Refused: map[string]string{}, Noted: map[string]string{}, Arm: map[string]FleetServed{}, Served: map[string]FleetServed{}}
for _, rt := range routes {
if rt.IsSidecar() {
continue
@@ -173,7 +257,7 @@ func FleetArmVerdict(routes []registry.Route, owners map[string]string, hub, tun
v.Noted[rt.Host] = why
}
if fleet, placed := registry.FleetPlacement(rt.Region); placed && (rt.IsForward() || rt.Tunnel == "") {
- v.Served[rt.Host] = FleetServed{Fleet: fleet, App: rt.App, Account: owners[fleet]}
+ v.Arm[rt.Host] = FleetServed{Fleet: fleet, App: rt.App, Account: owners[fleet]}
}
}
sources, _ := PlatformAliasFold(routes)
@@ -182,7 +266,36 @@ func FleetArmVerdict(routes []registry.Route, owners map[string]string, hub, tun
if _, own := v.Refused[host]; !own {
v.Refused[host] = fmt.Sprintf("platform alias of %s, which is refused", src)
}
- delete(v.Served, host)
+ delete(v.Arm, host)
+ }
+ }
+ // The entries Reload's loop builds, each with its fleet when it goes
+ // to one, folded as Reload folds its map.
+ type entry struct {
+ at FleetServed
+ fleet bool
+ }
+ entries := map[string]entry{}
+ for _, rt := range routes {
+ if rt.IsSidecar() || rt.Status != "ready" {
+ continue
+ }
+ if _, refused := v.Refused[rt.Host]; refused {
+ continue
+ }
+ at, fleetArm := v.Arm[rt.Host]
+ switch DispatchArm(rt, fleetArm, tunnels) {
+ case ArmNone:
+ case ArmForward, ArmFleet:
+ entries[rt.Host] = entry{at: at, fleet: true}
+ default:
+ entries[rt.Host] = entry{}
+ }
+ }
+ foldPlatformAliases(entries, routes, func(_, src entry) entry { return src })
+ for host, e := range entries {
+ if e.fleet {
+ v.Served[host] = e.at
}
}
return v
diff --git a/internal/edge/fleetverdict_test.go b/internal/edge/fleetverdict_test.go
index d1ea3671c..5be5eb6e5 100644
--- a/internal/edge/fleetverdict_test.go
+++ b/internal/edge/fleetverdict_test.go
@@ -23,11 +23,15 @@ import (
// a refused one or the other way round.
//
// Served (whole-branch review round 1, finding 2) is pinned the same way:
-// for each case the hosts the fleet arm serves, each toward fleet home for
-// app shop of home's owner, and Reload sends exactly those hosts through a
-// fleet (their own entry, over a reverse channel, with no Tunnel of their
-// own). An accountless hand row is served for the owner; a Tunnel row takes
-// its own arm and is not Served.
+// for each case the hosts the fleet arm serves and the fleet each goes
+// toward (app shop of the fleet's owner), and for every fixture host,
+// platform aliases included, Reload's actual entry goes through exactly
+// that fleet or through none (review round 2: the destination after the
+// platform-alias fold). An accountless hand row is served for the owner; a
+// Tunnel row takes its own arm and is not Served. A platform alias placed
+// on home whose source is on away goes toward away, and an unplaced
+// platform alias whose source is on home goes toward home: the fold gives
+// the alias its source's entry.
func TestFleetArmVerdictIsWhatReloadRefuses(t *testing.T) {
const anchor = "anchor.example.com"
hand := func(host, account string) registry.Route {
@@ -47,6 +51,16 @@ func TestFleetArmVerdictIsWhatReloadRefuses(t *testing.T) {
sidecar.Kind, sidecar.Socket = "sidecar", ""
tunnel := hand("tunnel.baj.example.com", fwdOther)
tunnel.Tunnel, tunnel.Socket = "t1", ""
+ // Platform aliases folded onto a source on another fleet, and onto
+ // a source on home from no placement.
+ srcAway := hand("src.away.example.com", fwdOwner)
+ srcAway.Region, srcAway.Socket = registry.PlacementTarget("away"), "/run/carlos/away.sock"
+ aliasHome := hand("alias.home.example.com", fwdOwner)
+ aliasHome.Platform, aliasHome.Socket = true, srcAway.Socket
+ srcHome := hand("src.home.example.com", fwdOwner)
+ srcHome.Socket = "/run/carlos/home.sock"
+ aliasNone := hand("alias.none.example.com", fwdOwner)
+ aliasNone.Platform, aliasNone.Region, aliasNone.Socket = true, "", srcHome.Socket
return []registry.Route{
{Host: anchor, Kind: "service", Addr: "10.0.0.1:3000", Status: "ready"},
forwardRow("shop.bah.example.com", "home", fwdOwner),
@@ -59,24 +73,38 @@ func TestFleetArmVerdictIsWhatReloadRefuses(t *testing.T) {
creating,
sidecar,
tunnel,
+ srcAway,
+ aliasHome,
+ srcHome,
+ aliasNone,
}
}
all := []string{"shop.bah.example.com", "shop.baj.example.com", "idle.bah.example.com", "hand.bah.example.com",
"hand.none.example.com", "hand.baj.example.com", "apex.baj.example.com", "creating.baj.example.com",
- "side.baj.example.com", "tunnel.baj.example.com"}
+ "side.baj.example.com", "tunnel.baj.example.com",
+ "src.away.example.com", "alias.home.example.com", "src.home.example.com", "alias.none.example.com"}
+ // The fleet arm's hosts on a box with tunnels on and not the hub: the
+ // fleet-placed hand rows the owner may serve and the platform aliases
+ // folded onto them, each toward its source's fleet.
+ handServed := map[string]string{
+ "hand.bah.example.com": "home", "hand.none.example.com": "home",
+ "src.away.example.com": "away", "alias.home.example.com": "away",
+ "src.home.example.com": "home", "alias.none.example.com": "home",
+ }
+ hubServed := maps.Clone(handServed)
+ hubServed["shop.bah.example.com"] = "home"
cases := []struct {
name, tunnelHost, fleet string
- refused, served []string
+ refused []string
+ served map[string]string
}{
// The not-ready hand row of a non-owner is not judged (readiness
// first), the not-ready forward row is refused, and the platform
// alias inherits its refused source.
{"hub", "tunnel.example.com", "", []string{"shop.baj.example.com", "idle.bah.example.com",
- "hand.baj.example.com", "apex.baj.example.com"},
- []string{"shop.bah.example.com", "hand.bah.example.com", "hand.none.example.com"}},
+ "hand.baj.example.com", "apex.baj.example.com"}, hubServed},
{"tunnels on, not the hub", "tunnel.example.com", "home", []string{"shop.bah.example.com", "shop.baj.example.com",
- "idle.bah.example.com", "hand.baj.example.com", "apex.baj.example.com"},
- []string{"hand.bah.example.com", "hand.none.example.com"}},
+ "idle.bah.example.com", "hand.baj.example.com", "apex.baj.example.com"}, handServed},
{"no tunnels", "", "", []string{"shop.bah.example.com", "shop.baj.example.com", "idle.bah.example.com"}, nil},
}
for _, c := range cases {
@@ -84,8 +112,10 @@ func TestFleetArmVerdictIsWhatReloadRefuses(t *testing.T) {
t.Setenv("CARLOS_TUNNEL_HOST", c.tunnelHost)
t.Setenv("CARLOS_FLEET", c.fleet)
reg := openReg(t)
- if err := reg.UpsertFleet(registry.Fleet{Name: "home", Account: fwdOwner, Bucket: "home-data"}); err != nil {
- t.Fatal(err)
+ for _, f := range []string{"home", "away"} {
+ if err := reg.UpsertFleet(registry.Fleet{Name: f, Account: fwdOwner, Bucket: f + "-data"}); err != nil {
+ t.Fatal(err)
+ }
}
for _, rt := range rows() {
put := reg.Upsert
@@ -121,7 +151,7 @@ func TestFleetArmVerdictIsWhatReloadRefuses(t *testing.T) {
})
var owners map[string]string
if tunnels {
- owners = map[string]string{"home": fwdOwner}
+ owners = map[string]string{"home": fwdOwner, "away": fwdOwner}
}
hub := tunnels && HubArmed(func(k string) string {
return map[string]string{"CARLOS_TUNNEL_HOST": c.tunnelHost, "CARLOS_FLEET": c.fleet}[k]
@@ -137,11 +167,11 @@ func TestFleetArmVerdictIsWhatReloadRefuses(t *testing.T) {
t.Errorf("%s refused with no reason", h)
}
}
- if got, want := slices.Sorted(maps.Keys(v.Served)), slices.Sorted(slices.Values(c.served)); !slices.Equal(got, want) {
+ if got, want := slices.Sorted(maps.Keys(v.Served)), slices.Sorted(maps.Keys(c.served)); !slices.Equal(got, want) {
t.Fatalf("served = %v, want %v", got, want)
}
for h, at := range v.Served {
- if want := (FleetServed{Fleet: "home", App: "shop", Account: fwdOwner}); at != want {
+ if want := (FleetServed{Fleet: c.served[h], App: "shop", Account: fwdOwner}); at != want {
t.Errorf("%s served toward %+v, want %+v", h, at, want)
}
}
@@ -165,11 +195,18 @@ func TestFleetArmVerdictIsWhatReloadRefuses(t *testing.T) {
if served := e.Allowed(h); served == refused {
t.Errorf("%s: Reload serves %v, the verdict refuses %v", h, served, refused)
}
- _, wantFleet := v.Served[h]
- up, ok := e.lookupUpstream(h)
- viaFleet := ok && !up.alias && up.route.Host == h && up.viaTunnel && up.route.Tunnel == ""
- if viaFleet != wantFleet {
- t.Errorf("%s: Reload sends it through a fleet %v, the verdict serves it %v", h, viaFleet, wantFleet)
+ // Reload's actual destination: an entry over a reverse channel
+ // with no Tunnel of its own is the fleet arm's, toward its
+ // route's fleet; a platform alias's entry is its source's.
+ reloadFleet, reloadApp := "", ""
+ if up, ok := e.lookupUpstream(h); ok && up.viaTunnel && up.route.Tunnel == "" {
+ reloadFleet, _ = registry.FleetPlacement(up.route.Region)
+ reloadApp = up.route.App
+ }
+ at := v.Served[h]
+ if reloadFleet != at.Fleet || reloadApp != at.App {
+ t.Errorf("%s: Reload sends it toward fleet %q (app %q), the verdict serves it toward %q (app %q)",
+ h, reloadFleet, reloadApp, at.Fleet, at.App)
}
}
})
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv
index e973a238c..4005745f0 100644
--- a/internal/provision/testdata/plan14-root-reads-chain.tsv
+++ b/internal/provision/testdata/plan14-root-reads-chain.tsv
@@ -41,4 +41,4 @@ plan14-root-reads-region-ha-p1b2.tsv 5b559ba7a42084908cb0fec08083bb2b9b3c9d96003
plan14-root-reads-analytics-agents.tsv 5b559ba7a42084908cb0fec08083bb2b9b3c9d960036fd10418f81e56304bb64
plan14-root-reads-region-ha-dead-holder-backoff.tsv 8f6a1865b0abcea9d4fb68232cc2a25263a106ec87f73bd4b3f2fb388971ebe5
plan14-root-reads-managed-fleets-1c-451.tsv af326671321edda76c7e6217a47892605a9e3b886fa880ad6d049c2f28f63873
-plan14-root-reads-fleet-public-routes.tsv 5f70d8e114f38d493088b6a6076d66026520e813b33484f3f42fa59d71d0da60
+plan14-root-reads-fleet-public-routes.tsv bca6ef741a96b72767b1747789cd01b3111d61b68548cbe368258c31f3d53a2e
diff --git a/internal/provision/testdata/plan14-root-reads-fleet-public-routes.tsv b/internal/provision/testdata/plan14-root-reads-fleet-public-routes.tsv
index fc3d944e4..189a4321e 100644
--- a/internal/provision/testdata/plan14-root-reads-fleet-public-routes.tsv
+++ b/internal/provision/testdata/plan14-root-reads-fleet-public-routes.tsv
@@ -1,7 +1,7 @@
# Census overlay fleet-public-routes, written by census-propose (#369). census-ruling-fleet-public-routes, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-fleet-public-routes.md.
# 32 body, 56 sites, 7 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
# 1 removed: each unit's declaration, or each envelope's directory, is absent from the scanned tree, so its row goes, a frozen declaration is retired as absent, and an envelope is retired.
-# 27 new dispositions: 6 reads re-frozen at their disposition with the claim, 20 new units frozen accepted-legacy, 0 quiet units retired while they read nothing, 1 other.
+# 29 new dispositions: 6 reads re-frozen at their disposition with the claim, 22 new units frozen accepted-legacy, 0 quiet units retired while they read nothing, 1 other.
@legacy a4eac75b57a105de11c2b97abbfb34bc4df00c54dbe39e73a1fb7280ba6c0098 internal/host/agent.go countExpiredCanaries legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 7: a forward row is skipped (IsForward(), a method call) before its channel pointer is read; read sites unchanged (6); it reads less, never more. registry:App@653,registry:Channel@661,registry:Platform@405,whole:Route@256,whole:Route@453,whole:Route@648 afc7dfc2f1bdbc41cd1824cae07ef235976a40819139ffa71a5117b80bdff16d
@legacy cd29e6d0c4d4725bd90e1c125f7b885dda2456c4cb18a6ed8ce9a754e1c6aef5 internal/host/fleetbind.go ReconcileFleetBindings legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): §4.5: runs on the hub only (hubArmed); a binding whose object key is not fleetBindingKey(b.Fleet, b.Host) is skipped and logged before anything else; the stamp is SetFleetBoxIf, one conditional write judging placement, kind and active fleet membership at the instant of the write (SetFleetBox removed); a write that changes nothing is logged. Read sites unchanged (3); it stamps less, never more. registry:FleetBox@2104,registry:Region@1896,whole:Route@1030 45f326099ae129e3407f032edb98845d3a7b67f3fd2558c8498326481d4cfd0b
@legacy d61db25a94590c95afa7ba6b6df6d25ee51dd19187003cfaae0828ebfe23fb77 internal/host/plans_pass.go planThrottleFor legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-4c-units;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos), as a hook armed in runAgent: planIdleFor's and planRateCeilingFor's twin, it reads the row's account (release.RouteAccount) and kind and the plans pass's in-memory cache; returns the account's published throttle while it is in force, for instance rows only. Only slows; no root decision (plans 4c).;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 5: a forward row is admitted where an instance row was (IsForward(), a method call), so the owner's throttle applies on the hub; read sites unchanged (2). Only slows; no root decision. registry:Kind@69,whole:Route@275 5e52fa6cb3618e4ddb25b1f24952227e5c29c9545617c809b2a7efe2b9322000
@@ -35,8 +35,10 @@
@legacy ec27d4dab8ef2788909404d17e10af89c502455d8fbad84d81371c8ab94d2542 cli.go refuseForwardRoute legacy accepted-legacy accepted-legacy;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 3: refuses one row with FPR-C01 when it is a forward row (+whole:Route x2); a refusal only. whole:Route@127,whole:Route@50 dac303211dc7ee2ee7a810ab702f806d44c6292499088fd34c22a35567061140
@legacy a0ce2c8e02fe616047d2d5b86eb2b3b13c1fdcf5969864905276b04fce7551fb cli.go refuseForwardTargets legacy accepted-legacy accepted-legacy;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 3 fix round 1: the --host row, or every row the --app batch selects (appAccount filter), checked for a forward row before anything else (+registry:App, +whole:Route x4); a refusal only. registry:App@343,whole:Route@194,whole:Route@329,whole:Route@415,whole:Route@492 a0bd197f71a7d8ea4b3268a4dc3e8fd8693fa04cc3e452c0df5dea21efb8fa0a
@legacy 8a885806806d4eef1c2d6a691d41c8cdba3befc754ad53d07762e5834f7650c5 cli.go refuseForwardWrite legacy accepted-legacy accepted-legacy;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 3 fix round 1: on a registry ErrForwardRow, reads the row again to name it in FPR-C01 (+whole:Route); a refusal only. whole:Route@204 cbc07e525e9b7a473a0bf220837cd890f5a97c42bfaba5c450ed8a5df94178f1
-@legacy 70cbae270f9d9e9eed90bc1275d6e1735574070bdf11b1ddd93ae1c7ac6a5d69 internal/edge/fleetforward.go FleetArmVerdict legacy accepted-legacy accepted-legacy;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 6 fix round 3: the single fleet-arm refusal decision over one listing, used by Edge.Reload, the edges-file writer and the alias pass (parity by construction); returns the refused set with reasons and the accountless notes (+registry:Host x3, +registry:Status, +whole:Route x3). Pure; no I/O. Review R1 finding 2: also returns Served, each admitted row Reload sends through the fleet arm (a forward row, or a fleet-placed row with no Tunnel) with its fleet, app and the fleet owner from owners; a host the alias step refuses is dropped from it (+registry:App, +registry:Host, +registry:Region, +registry:Tunnel on the listing it already holds). Pure; no I/O. registry:App@770,registry:Host@349,registry:Host@532,registry:Host@591,registry:Host@728,registry:Region@656,registry:Status@289,registry:Tunnel@697,whole:Route@237,whole:Route@491,whole:Route@842 982dd96a6e3f0869d51df98ab4628c38672c364e0fcae20e5516e01a6e3be3bb
+@legacy 2f53ee28ffe99b416d79b33b12959b4bb240318e2ee17e1a2b174ac29f1eee67 internal/edge/fleetforward.go DispatchArm legacy accepted-legacy accepted-legacy;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): review R2: Reload's dispatch order as one function over a row it serves (forward only when admitted to the fleet arm, own Tunnel where tunnels are on, fleet arm, socket, AddrList, static, status, else none), moved out of Reload's switch unchanged; read by Reload and FleetArmVerdict. Pure; no I/O. registry:Kind@339,registry:Kind@385,registry:Socket@249,registry:Tunnel@162 cab5eaa5f2b59c73e61d591ce53235eb1643ba808750d9934e258ddf91d020cc
+@legacy d77eac5b84098d2e9d148bb191dca2c7b19ac9fb32a0b9192d2121bfdb811bea internal/edge/fleetforward.go FleetArmVerdict legacy accepted-legacy accepted-legacy;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 6 fix round 3: the single fleet-arm refusal decision over one listing, used by Edge.Reload, the edges-file writer and the alias pass (parity by construction); returns the refused set with reasons and the accountless notes (+registry:Host x3, +registry:Status, +whole:Route x3). Pure; no I/O. Review R1 finding 2: also returns Served, each admitted row Reload sends through the fleet arm (a forward row, or a fleet-placed row with no Tunnel) with its fleet, app and the fleet owner from owners; a host the alias step refuses is dropped from it (+registry:App, +registry:Host, +registry:Region, +registry:Tunnel on the listing it already holds). Pure; no I/O. Review R2: the pre-fold fleet rows are now Arm; Served is the destination after the platform-alias fold: every ready, unrefused, non-sidecar row DispatchArm gives an entry, with its Arm fleet when its arm is a fleet's, folded by foldPlatformAliases (Reload's own fold), keeping the hosts that go to a fleet (+registry:Host, +registry:Status, +whole:Route on the listing it already holds). Pure; no I/O; refusals unchanged. registry:App@798,registry:Host@1436,registry:Host@1496,registry:Host@1607,registry:Host@1667,registry:Host@380,registry:Host@563,registry:Host@622,registry:Host@756,registry:Region@687,registry:Status@1368,registry:Status@320,registry:Tunnel@728,whole:Route@1336,whole:Route@1526,whole:Route@1723,whole:Route@268,whole:Route@522,whole:Route@870 de6c02372456132aed89af9fdb5c724fdbfd19b7fbc203c50f3b1f2061ae7d46
@legacy 5dcd674831b838b030c4aaa934b44834cea72c528729832e5ccda9fa9589bb67 internal/edge/fleetforward.go FleetServeEligible legacy accepted-legacy accepted-legacy;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 4 (§4.4 tenancy): a forward row is eligible only on a hub, inert, fleet-placed, its fleet in the fleets table and its raw Account non-empty and equal to the owner; a non-forward fleet-placed row: empty raw Account served and noted, else release.RouteAccount must equal the owner; raw field before RouteAccount (+registry:Account x7, +registry:Region x2, +registry:Tunnel, +whole:Route). Pure; no I/O. registry:Account@1009,registry:Account@1107,registry:Account@1363,registry:Account@594,registry:Account@665,registry:Account@751,registry:Account@853,registry:Region@145,registry:Region@432,registry:Tunnel@810,whole:Route@1285 d9524bf630586a737e856f0b46e3b065129969f033f084a3b7adea0d2fb8da32
+@legacy 36c53a5870aaf91a2757971fa5c675a1ccbc9711bdafd142c952447ff4392c2a internal/edge/fleetforward.go foldPlatformAliases legacy accepted-legacy accepted-legacy;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): review R2: Reload's platform-alias fold moved out unchanged and made generic over the entry type (PlatformAliasFold over the listing; a refused alias leaves the map and is returned for the log; a resolved alias with an entry takes take(own, source) or leaves when the source has none), applied by Reload to its routing map and by FleetArmVerdict to its destinations. Pure; no I/O. whole:Route@161 ba741559c4eb061f18886c2399d3dee0171fdb232a68a94c847b75a2cdc839d8
@legacy 5d02b78d4b6dbe612d783abda323606b3dccf1fe71970cb70695b5e5f3f7cc02 internal/host/hub.go fleetRefusedFor legacy accepted-legacy accepted-legacy;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 6 fix round 3: a thin adapter passing FleetArmVerdict's refused set through for the writer and the alias pass (+whole:Route); decides nothing. whole:Route@309 1137627ca597b364ec0f126096a1dde081871f6515b42df573e576a40c48ca11
@legacy 319d6e342562d5d773fb6efdd980594fc832709fcaae7c26afd20327e97d2170 internal/host/hub.go hubFleetOwners legacy accepted-legacy accepted-legacy;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 12: the hub's owner map (ReconcileConfig.FleetOwners and the edge fleet-arm inputs), the registry fleets table read on each call: Fleet.Name -> Fleet.Account (+registry:Account, +registry:Name, +whole:Fleet x2). Agent-side; no root decision. registry:Account@328,registry:Name@318,whole:Fleet@270,whole:Fleet@299 a0bbc70cbcecd50c89b4c1d41fe8f19d2e7b91b4258c4c75956c9a26cce7708d
@legacy 7cff643f70fca647f67debef3deb04499a0261ebb59db2b5cfed5f7de8e0b833 internal/provision/forward.go forwardCurrent legacy accepted-legacy accepted-legacy;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 10: compares the existing forward row's declared fields with the wanted one (+registry:Account, App, Channel, Provisioned, RateLimit, Region, Slug, Status, each x2). Pure. registry:Account@239,registry:Account@259,registry:App@209,registry:App@225,registry:Channel@313,registry:Channel@333,registry:Provisioned@131,registry:Provisioned@155,registry:RateLimit@351,registry:RateLimit@373,registry:Region@277,registry:Region@296,registry:Slug@177,registry:Slug@194,registry:Status@114,registry:Status@95 46831ecef3dcbb328e8f3126929c60139b5c961d8abe1122fb0815940d7662ea
@@ -66,7 +68,7 @@
@legacy 6efde31b74d6732e1a3142489302a8cceb0c607ccc9eadad9bb96f500376640b internal/domains/aliases.go ReconcileAliasesReport legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-edge-asset-cache-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos), in its alias pass (aliasPassReporting in runAgent; ReconcileAliases, now a wrapper, is its other caller): main's ReconcileAliases body, moved here with the same reads and writes, plus a completeness report (AliasReport) set false at every point that already logged a failure and carried on, and when relevantDropped names a listed claim the pass could not rule out; the box's asset authority clock advances only after a complete pass; one more whole:Route and whole:RouteAlias site each, the routes and alias rows the pass already read handed to relevantDropped; no registry, file or bucket read added; no root pass calls it; no root decision;rev3=census-ruling-regional-domains-447;basis=#447 Task 4: in the alias pass inside the agent: reads the existing regional_domains rows (reg.ListRegional) beside the alias rows, derives a regional claim's rows through deriveRegional for AliasReport.Region (the caller's ReconcileConfig.Region, set by aliasPassReporting) and its wildcard parent when bound, skipping the alias, paths and catch-all halves for it, writes them through writeRegional, and keeps an unread regional claim's wildcard parent while the kept apex row still binds a target RegionalTarget accepts on the routes this pass read (same account and app, per-box cap); claims are read as before (the listing and per-claim GETs it already does); the added reads are the registry's regional rows and fields of rows the pass already holds;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 6 fix rounds 2-3: AliasReport.FleetRefused (edge.FleetArmVerdict's refused set) is called once on the pass's own listing; a Wildcard claim whose primary is fleet-refused derives no wildcard_domains row (an earlier one goes with the ordinary removal); the catch-all alias is derived as before (+registry:Host, +whole:Route). Rows already read; writes less, never more; no root pass calls it. registry:Account@18794,registry:Account@18809,registry:Account@18927,registry:Account@19279,registry:Account@19292,registry:Alias@16881,registry:Alias@16921,registry:Alias@16991,registry:App@13561,registry:App@13761,registry:App@13917,registry:App@14118,registry:App@18822,registry:App@18833,registry:App@18940,registry:App@19305,registry:App@19314,registry:App@3612,registry:App@3808,registry:App@7432,registry:App@7631,registry:Host@14484,registry:Host@18604,registry:Host@18679,registry:Host@18702,registry:Host@18754,registry:Host@19088,registry:Host@19160,registry:Host@19264,registry:Host@19575,registry:Host@19628,registry:Host@19700,registry:Host@20234,registry:Host@20347,registry:Host@20406,registry:Host@20487,registry:Host@724,registry:Prefix@20242,registry:Prefix@20361,registry:Prefix@20414,registry:Prefix@20495,registry:Region@18949,registry:Status@10295,registry:Target@18774,registry:Target@18879,whole:RegionalDomain@17568,whole:RegionalDomain@17586,whole:RegionalDomain@18532,whole:RegionalDomain@18570,whole:RegionalDomain@18591,whole:RegionalDomain@18614,whole:RegionalDomain@18741,whole:RegionalDomain@2323,whole:Route@10077,whole:Route@10239,whole:Route@1127,whole:Route@13530,whole:Route@13605,whole:Route@13752,whole:Route@13814,whole:Route@13957,whole:Route@14113,whole:Route@15366,whole:Route@16461,whole:Route@16469,whole:Route@18872,whole:Route@18923,whole:Route@2304,whole:Route@2955,whole:Route@3652,whole:Route@3803,whole:Route@3859,whole:Route@677,whole:Route@6778,whole:Route@706,whole:Route@717,whole:Route@735,whole:Route@7476,whole:Route@7622,whole:Route@935,whole:Route@9625,whole:RouteAlias@1135,whole:RouteAlias@16477,whole:RouteAlias@16856,whole:RoutePath@11822,whole:RoutePath@20127,whole:RoutePath@20169,whole:RoutePath@20304,whole:RoutePath@20334,whole:WildcardDomain@14680,whole:WildcardDomain@18638,whole:WildcardDomain@18667,whole:WildcardDomain@19148,whole:WildcardDomain@19170,whole:WildcardDomain@19194,whole:WildcardDomain@19243,whole:WildcardDomain@19406,whole:WildcardDomain@19534,whole:WildcardDomain@19563,whole:WildcardDomain@2537 dbeec4dda10804908e22d0b5094828c96042d4943722bbefbfec792350cd2916
@legacy e490713bd4bc272c91a24bc595a1188bf4863ae2dd2e7345f715c79fc2059091 internal/domains/reconcile.go Reconcile legacy accepted-legacy accepted-legacy;rev3=census-ruling-self-serve-moves-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos), from its domains loop: the seeded-instances body (a trashed app's route kept while an import on its host is journaled, deleted only if the row is still the one listed); self-serve moves 1 Task 4 removes the claims-off 1d auto-purge, so a claims-off box destroys no app objects and a host-claim box only requests the claim's purge as before; the registry reads are unchanged;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 7: the whole-app trash loop keeps every forward row (keptLive = append(keptLive, rt), +whole:Route x3) ahead of DeleteIfUnchanged, so a trashed fleet app's forward row is retired by the forward phase alone. Deletes less, never more. registry:Account@5579,registry:Account@5775,registry:App@10407,registry:App@11743,registry:App@13982,registry:App@5380,registry:App@5528,registry:App@7482,registry:App@7539,registry:App@7740,registry:App@7953,registry:App@8191,registry:App@8381,registry:Canary@10351,registry:Canary@13029,registry:Canary@13873,registry:Channel@11798,registry:Channel@13006,registry:Channel@13904,registry:Channel@13991,registry:Channel@14294,registry:Host@10314,registry:Host@10993,registry:Host@14029,registry:Host@14114,registry:Host@14285,registry:Host@5650,registry:Host@5736,registry:Host@7589,registry:Host@7731,registry:Host@7944,registry:Host@8182,registry:Host@8372,registry:Kind@12672,registry:Platform@10335,registry:Platform@13858,whole:Route@10296,whole:Route@10402,whole:Route@10463,whole:Route@10669,whole:Route@10685,whole:Route@10811,whole:Route@10839,whole:Route@11005,whole:Route@11021,whole:Route@11029,whole:Route@11728,whole:Route@11781,whole:Route@11938,whole:Route@11954,whole:Route@12999,whole:Route@13069,whole:Route@13238,whole:Route@13254,whole:Route@13262,whole:Route@13813,whole:Route@13844,whole:Route@13977,whole:Route@14132,whole:Route@14146,whole:Route@14152,whole:Route@14324,whole:Route@14338,whole:Route@14344,whole:Route@14352,whole:Route@14361,whole:Route@5366,whole:Route@5380,whole:Route@5510,whole:Route@5528,whole:Route@5579,whole:Route@5650,whole:Route@5736,whole:Route@5775,whole:Route@7144,whole:Route@7176,whole:Route@7426,whole:Route@7444,whole:Route@7454,whole:Route@7534,whole:Route@7760,whole:Route@7778,whole:Route@7788,whole:Route@7854,whole:Route@7971,whole:Route@7989,whole:Route@7999,whole:Route@8204,whole:Route@8222,whole:Route@8232,whole:Route@8410,whole:Route@8428,whole:Route@8438,whole:Route@8448,whole:Route@8457 befcac49b400761e731737246e8e8256b42ad980649be7db67e61b9895d8bd5d
@legacy 845e5a176dba6bd251eae8a73880debebff4d3deb62e2a8120fe317476458ec9 internal/edge/assetcatch.go Edge.localAssetCatch legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-asset-cache-3;basis=in the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): new (asset cache plan 3 Task 5): the local catch decision on a box with a route row for the host. It catches only when armed, for GET or HEAD, on a row of the edge's own route snapshot that is not the status host and has no password gate and no import gate (the row's Kind, Gate and ImportGate), and for a path under a prefix the box's asset policy holds for the host (LocalAssets.For, the edges file writer's settled snapshot, no registry read per call). It only narrows: a gated or import-gated row is never caught, so a stored body is never served past a gate; no root decision;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 4: a forward row is never caught locally (IsForward(), +whole:Route). Only narrows. registry:Gate@748,registry:ImportGate@771,registry:Kind@719,whole:Route@722,whole:Route@751,whole:Route@774,whole:Route@803 242c568f4647d930d66341493bf8dfd6b171b6772a2daa05188962cee5e73b60
-@legacy 3e1e690b8376f2ad61b8bbacaed7d60f0a1bf0ebf32f004ae446fb31bd32aef4 internal/edge/edge.go Edge.Reload legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-design-edge-rate-limit-358;basis=each route's upstream entry gains rate: e.parseRateSettings(t), the row's rate_limit column parsed once per reload; the one added site is that whole:Route pass of t (parseRateSettings is a new unit, classified in the decisions overlay); no other read added;rev3=census-ruling-certwarm-wake;basis=the single reload hook call becomes runReloadHooks(), which runs every registered hook in order (#386); no read added, same 57 sites (56 before #358 landed on main);rev3=census-ruling-edge-asset-cache-3;basis=each tenant reverse proxy built in the switch (the tunnel, fleet, socket and TCP arms, every *httputil.ReverseProxy) is installed behind assetScrubbedProxy, which hands the proxy an assetInformationalScrub writer so an app's 1xx (103) loses the asset cache's reserved headers (X-Carlos-Asset-Fill, -Fill-Ack, -Expires, Carlos-Cache) on every local path, as the backhaul already does (final review F6); a type check of the proxy it just built and a wrapper around it; static and status handlers untouched; read sites unchanged (57), offsets moved; no read added;rev3=census-ruling-alias-wake-338;basis=#338 follow-up: after the path fold, a resolved platform alias takes its source's own upstream entry (same proxy, route, hibernating: the existing activator wake, lease and fence), keeping its own prefix map (none for a minted apex) and never inheriting the source's (Astra r2 P1); a refused alias, or one whose source has no entry, is dropped from the map (not served, not Allowed); the attached-hostname fold clears platformAlias;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 5: the activator-managed test (generation proxy, hib, no-activator 404) is Route.ActivatorOwned instead of Kind and Hibernate inline, so a resident rootfs instance goes through the activator; binary rows unchanged;rev3=census-ruling-edge-roll-blip;basis=the tcpProxy and multiProxy calls pass e.hold (the per-Edge localHold set once in newEdge): a loopback TCP upstream that refuses is redialled for up to 13 s and a probed route with a local upstream waits for prober readmission instead of answering 502/503 (#434 part B); edge-side dial policy only, no read added, same 52 sites;rev3=census-ruling-regional-domains-447;basis=#447 Task 5: after the alias fold, reads the regional_domains rows (e.reg.ListRegional; an error aborts the reload as every registry read here does) and applies them with foldRegional against the routes slice the same reload read; the added reads are that one registry list and the routes already read;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Tasks 4 and 6: the forward case (fleetProxy toward the binding's FleetBox, throttled refusal); one refusal check before the switch from FleetArmVerdict (sidecar not judged; a non-ready forward row refused; a forward row always judged by FleetServeEligible, any other row only where tunnels are on; an alias of a refused source refused with it); the accountless note; path rows of a forward host not folded; no alias folded onto a refused row; refusedHosts held through every fold. ListFleets and FleetChannelAuth read before the loop (+registry:FleetBox, +registry:Host x7, +whole:Route x3). Serving only; the hub's agent, not root. Review R1 finding 2: the switch reads verdict.Served (FleetArmVerdict) by host; the forward case and the fleet-placed case take their fleet from it (served.Fleet) instead of FleetPlacement(t.Region), and an admitted forward row not Served continues rather than falling through (+registry:Host, -registry:Region); the same rows take the same arms; no read added. registry:Account@3193,registry:Alias@23566,registry:Alias@23653,registry:Alias@24233,registry:FleetBox@10308,registry:FleetBox@6319,registry:Health@12453,registry:Health@12579,registry:Host@10163,registry:Host@10220,registry:Host@10256,registry:Host@10862,registry:Host@13062,registry:Host@13157,registry:Host@13445,registry:Host@13471,registry:Host@13523,registry:Host@17994,registry:Host@19901,registry:Host@20209,registry:Host@20236,registry:Host@21037,registry:Host@21609,registry:Host@23987,registry:Host@24036,registry:Host@4586,registry:Host@4640,registry:Host@4690,registry:Host@5420,registry:Kind@13619,registry:Kind@13679,registry:Kind@16330,registry:Kind@16352,registry:Name@3183,registry:Prefix@21584,registry:Socket@10415,registry:Socket@10926,registry:Socket@20217,registry:Status@4511,registry:Target@21596,registry:Tunnel@8720,registry:Tunnel@8776,registry:Version@16311,registry:Version@16413,whole:Fleet@3135,whole:Fleet@3164,whole:RegionalDomain@24703,whole:Route@10372,whole:Route@10982,whole:Route@130,whole:Route@13596,whole:Route@13669,whole:Route@13729,whole:Route@20269,whole:Route@20276,whole:Route@20372,whole:Route@21472,whole:Route@22487,whole:Route@24695,whole:Route@3266,whole:Route@3324,whole:Route@6383,whole:Route@8838,whole:RouteAlias@23537,whole:RoutePath@21015 ef7588339f3ea374264e6b2f463a6f00ec18d94e57df83de9075f27a711236a0
+@legacy d701a814d664a63e29cb62cebd95bab4998a2398e97965d85a373284346b3d62 internal/edge/edge.go Edge.Reload legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-design-edge-rate-limit-358;basis=each route's upstream entry gains rate: e.parseRateSettings(t), the row's rate_limit column parsed once per reload; the one added site is that whole:Route pass of t (parseRateSettings is a new unit, classified in the decisions overlay); no other read added;rev3=census-ruling-certwarm-wake;basis=the single reload hook call becomes runReloadHooks(), which runs every registered hook in order (#386); no read added, same 57 sites (56 before #358 landed on main);rev3=census-ruling-edge-asset-cache-3;basis=each tenant reverse proxy built in the switch (the tunnel, fleet, socket and TCP arms, every *httputil.ReverseProxy) is installed behind assetScrubbedProxy, which hands the proxy an assetInformationalScrub writer so an app's 1xx (103) loses the asset cache's reserved headers (X-Carlos-Asset-Fill, -Fill-Ack, -Expires, Carlos-Cache) on every local path, as the backhaul already does (final review F6); a type check of the proxy it just built and a wrapper around it; static and status handlers untouched; read sites unchanged (57), offsets moved; no read added;rev3=census-ruling-alias-wake-338;basis=#338 follow-up: after the path fold, a resolved platform alias takes its source's own upstream entry (same proxy, route, hibernating: the existing activator wake, lease and fence), keeping its own prefix map (none for a minted apex) and never inheriting the source's (Astra r2 P1); a refused alias, or one whose source has no entry, is dropped from the map (not served, not Allowed); the attached-hostname fold clears platformAlias;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 5: the activator-managed test (generation proxy, hib, no-activator 404) is Route.ActivatorOwned instead of Kind and Hibernate inline, so a resident rootfs instance goes through the activator; binary rows unchanged;rev3=census-ruling-edge-roll-blip;basis=the tcpProxy and multiProxy calls pass e.hold (the per-Edge localHold set once in newEdge): a loopback TCP upstream that refuses is redialled for up to 13 s and a probed route with a local upstream waits for prober readmission instead of answering 502/503 (#434 part B); edge-side dial policy only, no read added, same 52 sites;rev3=census-ruling-regional-domains-447;basis=#447 Task 5: after the alias fold, reads the regional_domains rows (e.reg.ListRegional; an error aborts the reload as every registry read here does) and applies them with foldRegional against the routes slice the same reload read; the added reads are that one registry list and the routes already read;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Tasks 4 and 6: the forward case (fleetProxy toward the binding's FleetBox, throttled refusal); one refusal check before the switch from FleetArmVerdict (sidecar not judged; a non-ready forward row refused; a forward row always judged by FleetServeEligible, any other row only where tunnels are on; an alias of a refused source refused with it); the accountless note; path rows of a forward host not folded; no alias folded onto a refused row; refusedHosts held through every fold. ListFleets and FleetChannelAuth read before the loop (+registry:FleetBox, +registry:Host x7, +whole:Route x3). Serving only; the hub's agent, not root. Review R1 finding 2: the switch reads verdict.Served (FleetArmVerdict) by host; the forward case and the fleet-placed case take their fleet from it (served.Fleet) instead of FleetPlacement(t.Region), and an admitted forward row not Served continues rather than falling through (+registry:Host, -registry:Region); the same rows take the same arms; no read added. Review R2: the switch is on DispatchArm(t, viaFleet, tunnels) (the order moved there unchanged: forward only when in Arm, own Tunnel, fleet, socket, addrs, static, status, else continue), the fleet cases read verdict.Arm (renamed from Served), and the platform-alias fold is foldPlatformAliases with the same take (source entry, own paths, alias marks) and the same refusal log (-registry:Kind x2, -registry:Socket, -registry:Tunnel, +whole:Route: those reads moved into DispatchArm); same rows, same arms, same entries; no read added. registry:Account@3193,registry:Alias@23594,registry:Alias@23681,registry:Alias@24261,registry:FleetBox@10420,registry:FleetBox@6459,registry:Health@12547,registry:Health@12673,registry:Host@10275,registry:Host@10332,registry:Host@10368,registry:Host@10969,registry:Host@13156,registry:Host@13251,registry:Host@13539,registry:Host@13565,registry:Host@13617,registry:Host@18070,registry:Host@19977,registry:Host@20285,registry:Host@20312,registry:Host@21113,registry:Host@21685,registry:Host@24015,registry:Host@24064,registry:Host@4586,registry:Host@4640,registry:Host@4690,registry:Host@5557,registry:Kind@16406,registry:Kind@16428,registry:Name@3183,registry:Prefix@21660,registry:Socket@11033,registry:Socket@20293,registry:Status@4511,registry:Target@21672,registry:Tunnel@8891,registry:Version@16387,registry:Version@16489,whole:Fleet@3135,whole:Fleet@3164,whole:RegionalDomain@24731,whole:Route@10484,whole:Route@11089,whole:Route@130,whole:Route@13690,whole:Route@13754,whole:Route@13805,whole:Route@20345,whole:Route@20352,whole:Route@20448,whole:Route@21548,whole:Route@22716,whole:Route@24723,whole:Route@3266,whole:Route@3324,whole:Route@5586,whole:Route@6523,whole:Route@8953,whole:RouteAlias@23565,whole:RoutePath@21091 b53f05355a50c46af2370179ace6ac23e0375c1736dc5374fc43ca5c4d72fc58
@legacy a5b9d730d59372ca746b85678d6c23297d18fc4df6ac1c3e10142624c0e7f2e8 internal/edge/edge.go Edge.ServeHTTP legacy accepted-legacy accepted-legacy;rev3=census-ruling-seeded-instances;basis=the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body with the import gate checked after the door's scope and a gated row left out of the response cache; serving only;rev3=census-ruling-edge-request-records;basis=one more call in the observer defer, observeRecords(up.route, ...), passing on the route the defer already holds; no new kind of read;rev3=census-ruling-design-edge-rate-limit-358;basis=calls rateAdmit twice, and an admitted request holds a slot on both paths: on the upgrade path before the activator or proxy (the handshake holds its slot through slotWriter, given back at the first final answer or at the reverse proxy's hijack on a 101, so an open WebSocket is not counted; released by a defer), and on the ordinary path after the response-cache check and before the activator and proxy (an admitted request holds a slot through slotWriter, released by a defer); a refusal is a 429 written there and returns; the upgrade path's comment now names slotWriter as its one wrapper; one comment on the door mark reworded; read sites unchanged (22: main's 21 plus edge-request-records' observeRecords pass of the route), offsets moved; no read added;rev3=census-ruling-plans-4c-box-throttle;basis=calls planThrottleAdmit before the response cache, and on an upgrade trackUpgrade then planUpgradeAdmit (plans 4c, Astra findings 1 and 2); the new reads live in those units (plans-4c-units decision). The same read sites here.;rev3=census-ruling-plans-4d-lapse;basis=calls planDisabledAdmit right after the import gate, passing the final upstream's route and the request host; a turned-off route gets the fixed disabled page before the meter, gate, cache and activator (plans 4d). The new read lives in that unit (plans-4d-units decision); one more whole-row pass here.;rev3=census-ruling-edge-protection-2;basis=runs the guard, a pure in-memory matcher on r.URL.Path and RawQuery (internal/edgeguard), once per request after the meter and observer defer and before the password gate, the upgrade branch, the cache and the activator, for a request that is not a door call, a backhauled door hop or a tunnel delivery; a matched block answers a 404 itself through guardDecide; the two new sites are one expression, up.route.Kind == "static" (a static route this box serves checks only the hard tier here and leaves the probe tier to serveTree), a read of the route row the edge already resolved; no new kind of read;rev3=census-ruling-edge-asset-cache-3;basis=the asset cache's three hooks (asset cache plan 3): the request's reserved asset headers are deleted at entry (the fill assertion kept only beside a verified hop); on the exact-remote and lookup-miss branches the far catch (serveAssetFar) is tried before backhaulTo and backhaul; after the observer defer and main's hard and probe checks, a verified hop with a valid fill assertion is answered by serveAssetFillForHop; after the upgrade branch and before gzip and the shared cache, the local catch (serveAssetLocal); the observer defer skips only the usage meter for an acknowledged home fill (out.unbilled); the new reads live in the new units of the edge-asset-cache-3-decisions overlay; the same route row and read sites (25); no read added;rev3=census-ruling-regional-domains-447;basis=#447 Task 5: straight after lookupUpstreamPath it calls regionalGate (regional.go), which for an entry built from a regional_domains row answers 503 to a hop or a deny entry before any arm that can leave the box (the exact-home backhaul, the far asset catch, the door dial, the miss backhaul), and lets a star match through only to the exact-home arm when ExactHome names another box for that distinct exact name; after the exact-home arm a regional deny entry the arm did not answer is refused (regionalRefuse, 503); refusals only, on the route map the edge already holds; read sites unchanged (25);rev3=census-ruling-static-headers;basis=the shared response cache is no longer looked up or filled for a static-kind route: one more read of the route row the edge already resolved (up.route.Kind == "static") in the cacheable expression; a refusal only, nothing new opened or followed;rev3=census-ruling-region-ha-p1b2;basis=region HA P1b-2 (N-HA10): one call, frontForwardHA, right after the route lookup's !ok block and before the login POST; same reads;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 4: loginPost and cacheable treat a forward row as not this box's to answer (IsForward(), +whole:Route x2): no login form and no shared cache for a forward host. Serving only. registry:Gate@19424,registry:Gate@19484,registry:Gate@19542,registry:Host@19527,registry:ImportGate@25256,registry:Kind@15087,registry:Kind@17557,registry:Kind@25198,registry:Kind@25227,whole:Route@11116,whole:Route@12895,whole:Route@13107,whole:Route@13299,whole:Route@15090,whole:Route@16393,whole:Route@16488,whole:Route@16564,whole:Route@16608,whole:Route@17560,whole:Route@19427,whole:Route@19487,whole:Route@19530,whole:Route@19545,whole:Route@21178,whole:Route@25201,whole:Route@25230,whole:Route@25259,whole:Route@25291,whole:Route@27118 fc5d1d3cf4100ae1634d9b2ff14d01a67a0dc548891757efdcada3b9c85fe4b2
@legacy cf3f4d519ad3c4d3b6e9b28d8f7bc3c726ac989733cc2c17933a29bd83c96b3d internal/edge/planthrottle.go Edge.planThrottleOf legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-4c-units;basis=the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos), serving only: asks the plan throttle hook (planThrottleFor, passed the row) whether an instance row's account is slowed down; door, hop-door and tunnel callers exempt as from the rate limit; reads only the row's kind (plans 4c).;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 5: the kind selector admits a forward row as an instance (IsForward(), +whole:Route); fromTunnel exemptions unchanged. Only slows. registry:Kind@130,whole:Route@133,whole:Route@165,whole:Route@380 b9d5f5afde26cd0f574bfd71c57c87ee599ae55b6585db53a61c9b65694ad4cc
@legacy 47b416f22b8d2016809666b5ab86d60c792f055f014c29594c8636f5cfee0633 internal/edge/planthrottle.go Edge.trackUpgrade legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-4c-units;basis=the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos), serving only: for an instance row whose account plans govern (planGoverned, passed the row), wraps the upgrade request in a cancellable context registered under release.RouteAccount(row), so CloseAccountUpgrades can end it (plans 4c).;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 5: the kind selector admits a forward row as an instance (IsForward(), +whole:Route); fromTunnel exemptions unchanged. registry:Kind@129,whole:Route@132,whole:Route@164,whole:Route@195,whole:Route@262 bfe61c428884d63fca40d81c8dd7ffe5b3ebec22d5197bffc67ac0f5e0dc4fa5
@@ -145,8 +147,10 @@ cli.go forwardRouteRefusal legacy accepted-legacy accepted-legacy;rev3=census-ru
cli.go refuseForwardRoute legacy accepted-legacy accepted-legacy;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 3: refuses one row with FPR-C01 when it is a forward row (+whole:Route x2); a refusal only. whole:Route@127,whole:Route@50 dac303211dc7ee2ee7a810ab702f806d44c6292499088fd34c22a35567061140
cli.go refuseForwardTargets legacy accepted-legacy accepted-legacy;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 3 fix round 1: the --host row, or every row the --app batch selects (appAccount filter), checked for a forward row before anything else (+registry:App, +whole:Route x4); a refusal only. registry:App@343,whole:Route@194,whole:Route@329,whole:Route@415,whole:Route@492 a0bd197f71a7d8ea4b3268a4dc3e8fd8693fa04cc3e452c0df5dea21efb8fa0a
cli.go refuseForwardWrite legacy accepted-legacy accepted-legacy;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 3 fix round 1: on a registry ErrForwardRow, reads the row again to name it in FPR-C01 (+whole:Route); a refusal only. whole:Route@204 cbc07e525e9b7a473a0bf220837cd890f5a97c42bfaba5c450ed8a5df94178f1
-internal/edge/fleetforward.go FleetArmVerdict legacy accepted-legacy accepted-legacy;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 6 fix round 3: the single fleet-arm refusal decision over one listing, used by Edge.Reload, the edges-file writer and the alias pass (parity by construction); returns the refused set with reasons and the accountless notes (+registry:Host x3, +registry:Status, +whole:Route x3). Pure; no I/O. Review R1 finding 2: also returns Served, each admitted row Reload sends through the fleet arm (a forward row, or a fleet-placed row with no Tunnel) with its fleet, app and the fleet owner from owners; a host the alias step refuses is dropped from it (+registry:App, +registry:Host, +registry:Region, +registry:Tunnel on the listing it already holds). Pure; no I/O. registry:App@770,registry:Host@349,registry:Host@532,registry:Host@591,registry:Host@728,registry:Region@656,registry:Status@289,registry:Tunnel@697,whole:Route@237,whole:Route@491,whole:Route@842 982dd96a6e3f0869d51df98ab4628c38672c364e0fcae20e5516e01a6e3be3bb
+internal/edge/fleetforward.go DispatchArm legacy accepted-legacy accepted-legacy;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): review R2: Reload's dispatch order as one function over a row it serves (forward only when admitted to the fleet arm, own Tunnel where tunnels are on, fleet arm, socket, AddrList, static, status, else none), moved out of Reload's switch unchanged; read by Reload and FleetArmVerdict. Pure; no I/O. registry:Kind@339,registry:Kind@385,registry:Socket@249,registry:Tunnel@162 cab5eaa5f2b59c73e61d591ce53235eb1643ba808750d9934e258ddf91d020cc
+internal/edge/fleetforward.go FleetArmVerdict legacy accepted-legacy accepted-legacy;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 6 fix round 3: the single fleet-arm refusal decision over one listing, used by Edge.Reload, the edges-file writer and the alias pass (parity by construction); returns the refused set with reasons and the accountless notes (+registry:Host x3, +registry:Status, +whole:Route x3). Pure; no I/O. Review R1 finding 2: also returns Served, each admitted row Reload sends through the fleet arm (a forward row, or a fleet-placed row with no Tunnel) with its fleet, app and the fleet owner from owners; a host the alias step refuses is dropped from it (+registry:App, +registry:Host, +registry:Region, +registry:Tunnel on the listing it already holds). Pure; no I/O. Review R2: the pre-fold fleet rows are now Arm; Served is the destination after the platform-alias fold: every ready, unrefused, non-sidecar row DispatchArm gives an entry, with its Arm fleet when its arm is a fleet's, folded by foldPlatformAliases (Reload's own fold), keeping the hosts that go to a fleet (+registry:Host, +registry:Status, +whole:Route on the listing it already holds). Pure; no I/O; refusals unchanged. registry:App@798,registry:Host@1436,registry:Host@1496,registry:Host@1607,registry:Host@1667,registry:Host@380,registry:Host@563,registry:Host@622,registry:Host@756,registry:Region@687,registry:Status@1368,registry:Status@320,registry:Tunnel@728,whole:Route@1336,whole:Route@1526,whole:Route@1723,whole:Route@268,whole:Route@522,whole:Route@870 de6c02372456132aed89af9fdb5c724fdbfd19b7fbc203c50f3b1f2061ae7d46
internal/edge/fleetforward.go FleetServeEligible legacy accepted-legacy accepted-legacy;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 4 (§4.4 tenancy): a forward row is eligible only on a hub, inert, fleet-placed, its fleet in the fleets table and its raw Account non-empty and equal to the owner; a non-forward fleet-placed row: empty raw Account served and noted, else release.RouteAccount must equal the owner; raw field before RouteAccount (+registry:Account x7, +registry:Region x2, +registry:Tunnel, +whole:Route). Pure; no I/O. registry:Account@1009,registry:Account@1107,registry:Account@1363,registry:Account@594,registry:Account@665,registry:Account@751,registry:Account@853,registry:Region@145,registry:Region@432,registry:Tunnel@810,whole:Route@1285 d9524bf630586a737e856f0b46e3b065129969f033f084a3b7adea0d2fb8da32
+internal/edge/fleetforward.go foldPlatformAliases legacy accepted-legacy accepted-legacy;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): review R2: Reload's platform-alias fold moved out unchanged and made generic over the entry type (PlatformAliasFold over the listing; a refused alias leaves the map and is returned for the log; a resolved alias with an entry takes take(own, source) or leaves when the source has none), applied by Reload to its routing map and by FleetArmVerdict to its destinations. Pure; no I/O. whole:Route@161 ba741559c4eb061f18886c2399d3dee0171fdb232a68a94c847b75a2cdc839d8
internal/host/hub.go fleetRefusedFor legacy accepted-legacy accepted-legacy;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 6 fix round 3: a thin adapter passing FleetArmVerdict's refused set through for the writer and the alias pass (+whole:Route); decides nothing. whole:Route@309 1137627ca597b364ec0f126096a1dde081871f6515b42df573e576a40c48ca11
internal/host/hub.go hubFleetOwners legacy accepted-legacy accepted-legacy;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 12: the hub's owner map (ReconcileConfig.FleetOwners and the edge fleet-arm inputs), the registry fleets table read on each call: Fleet.Name -> Fleet.Account (+registry:Account, +registry:Name, +whole:Fleet x2). Agent-side; no root decision. registry:Account@328,registry:Name@318,whole:Fleet@270,whole:Fleet@299 a0bbc70cbcecd50c89b4c1d41fe8f19d2e7b91b4258c4c75956c9a26cce7708d
internal/provision/forward.go forwardCurrent legacy accepted-legacy accepted-legacy;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 10: compares the existing forward row's declared fields with the wanted one (+registry:Account, App, Channel, Provisioned, RateLimit, Region, Slug, Status, each x2). Pure. registry:Account@239,registry:Account@259,registry:App@209,registry:App@225,registry:Channel@313,registry:Channel@333,registry:Provisioned@131,registry:Provisioned@155,registry:RateLimit@351,registry:RateLimit@373,registry:Region@277,registry:Region@296,registry:Slug@177,registry:Slug@194,registry:Status@114,registry:Status@95 46831ecef3dcbb328e8f3126929c60139b5c961d8abe1122fb0815940d7662ea
@@ -177,7 +181,7 @@ cli.go runRouteUnit legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-ro
internal/domains/aliases.go ReconcileAliasesReport legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-edge-asset-cache-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos), in its alias pass (aliasPassReporting in runAgent; ReconcileAliases, now a wrapper, is its other caller): main's ReconcileAliases body, moved here with the same reads and writes, plus a completeness report (AliasReport) set false at every point that already logged a failure and carried on, and when relevantDropped names a listed claim the pass could not rule out; the box's asset authority clock advances only after a complete pass; one more whole:Route and whole:RouteAlias site each, the routes and alias rows the pass already read handed to relevantDropped; no registry, file or bucket read added; no root pass calls it; no root decision;rev3=census-ruling-regional-domains-447;basis=#447 Task 4: in the alias pass inside the agent: reads the existing regional_domains rows (reg.ListRegional) beside the alias rows, derives a regional claim's rows through deriveRegional for AliasReport.Region (the caller's ReconcileConfig.Region, set by aliasPassReporting) and its wildcard parent when bound, skipping the alias, paths and catch-all halves for it, writes them through writeRegional, and keeps an unread regional claim's wildcard parent while the kept apex row still binds a target RegionalTarget accepts on the routes this pass read (same account and app, per-box cap); claims are read as before (the listing and per-claim GETs it already does); the added reads are the registry's regional rows and fields of rows the pass already holds;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 6 fix rounds 2-3: AliasReport.FleetRefused (edge.FleetArmVerdict's refused set) is called once on the pass's own listing; a Wildcard claim whose primary is fleet-refused derives no wildcard_domains row (an earlier one goes with the ordinary removal); the catch-all alias is derived as before (+registry:Host, +whole:Route). Rows already read; writes less, never more; no root pass calls it. registry:Account@18794,registry:Account@18809,registry:Account@18927,registry:Account@19279,registry:Account@19292,registry:Alias@16881,registry:Alias@16921,registry:Alias@16991,registry:App@13561,registry:App@13761,registry:App@13917,registry:App@14118,registry:App@18822,registry:App@18833,registry:App@18940,registry:App@19305,registry:App@19314,registry:App@3612,registry:App@3808,registry:App@7432,registry:App@7631,registry:Host@14484,registry:Host@18604,registry:Host@18679,registry:Host@18702,registry:Host@18754,registry:Host@19088,registry:Host@19160,registry:Host@19264,registry:Host@19575,registry:Host@19628,registry:Host@19700,registry:Host@20234,registry:Host@20347,registry:Host@20406,registry:Host@20487,registry:Host@724,registry:Prefix@20242,registry:Prefix@20361,registry:Prefix@20414,registry:Prefix@20495,registry:Region@18949,registry:Status@10295,registry:Target@18774,registry:Target@18879,whole:RegionalDomain@17568,whole:RegionalDomain@17586,whole:RegionalDomain@18532,whole:RegionalDomain@18570,whole:RegionalDomain@18591,whole:RegionalDomain@18614,whole:RegionalDomain@18741,whole:RegionalDomain@2323,whole:Route@10077,whole:Route@10239,whole:Route@1127,whole:Route@13530,whole:Route@13605,whole:Route@13752,whole:Route@13814,whole:Route@13957,whole:Route@14113,whole:Route@15366,whole:Route@16461,whole:Route@16469,whole:Route@18872,whole:Route@18923,whole:Route@2304,whole:Route@2955,whole:Route@3652,whole:Route@3803,whole:Route@3859,whole:Route@677,whole:Route@6778,whole:Route@706,whole:Route@717,whole:Route@735,whole:Route@7476,whole:Route@7622,whole:Route@935,whole:Route@9625,whole:RouteAlias@1135,whole:RouteAlias@16477,whole:RouteAlias@16856,whole:RoutePath@11822,whole:RoutePath@20127,whole:RoutePath@20169,whole:RoutePath@20304,whole:RoutePath@20334,whole:WildcardDomain@14680,whole:WildcardDomain@18638,whole:WildcardDomain@18667,whole:WildcardDomain@19148,whole:WildcardDomain@19170,whole:WildcardDomain@19194,whole:WildcardDomain@19243,whole:WildcardDomain@19406,whole:WildcardDomain@19534,whole:WildcardDomain@19563,whole:WildcardDomain@2537 dbeec4dda10804908e22d0b5094828c96042d4943722bbefbfec792350cd2916
internal/domains/reconcile.go Reconcile legacy accepted-legacy accepted-legacy;rev3=census-ruling-self-serve-moves-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos), from its domains loop: the seeded-instances body (a trashed app's route kept while an import on its host is journaled, deleted only if the row is still the one listed); self-serve moves 1 Task 4 removes the claims-off 1d auto-purge, so a claims-off box destroys no app objects and a host-claim box only requests the claim's purge as before; the registry reads are unchanged;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 7: the whole-app trash loop keeps every forward row (keptLive = append(keptLive, rt), +whole:Route x3) ahead of DeleteIfUnchanged, so a trashed fleet app's forward row is retired by the forward phase alone. Deletes less, never more. registry:Account@5579,registry:Account@5775,registry:App@10407,registry:App@11743,registry:App@13982,registry:App@5380,registry:App@5528,registry:App@7482,registry:App@7539,registry:App@7740,registry:App@7953,registry:App@8191,registry:App@8381,registry:Canary@10351,registry:Canary@13029,registry:Canary@13873,registry:Channel@11798,registry:Channel@13006,registry:Channel@13904,registry:Channel@13991,registry:Channel@14294,registry:Host@10314,registry:Host@10993,registry:Host@14029,registry:Host@14114,registry:Host@14285,registry:Host@5650,registry:Host@5736,registry:Host@7589,registry:Host@7731,registry:Host@7944,registry:Host@8182,registry:Host@8372,registry:Kind@12672,registry:Platform@10335,registry:Platform@13858,whole:Route@10296,whole:Route@10402,whole:Route@10463,whole:Route@10669,whole:Route@10685,whole:Route@10811,whole:Route@10839,whole:Route@11005,whole:Route@11021,whole:Route@11029,whole:Route@11728,whole:Route@11781,whole:Route@11938,whole:Route@11954,whole:Route@12999,whole:Route@13069,whole:Route@13238,whole:Route@13254,whole:Route@13262,whole:Route@13813,whole:Route@13844,whole:Route@13977,whole:Route@14132,whole:Route@14146,whole:Route@14152,whole:Route@14324,whole:Route@14338,whole:Route@14344,whole:Route@14352,whole:Route@14361,whole:Route@5366,whole:Route@5380,whole:Route@5510,whole:Route@5528,whole:Route@5579,whole:Route@5650,whole:Route@5736,whole:Route@5775,whole:Route@7144,whole:Route@7176,whole:Route@7426,whole:Route@7444,whole:Route@7454,whole:Route@7534,whole:Route@7760,whole:Route@7778,whole:Route@7788,whole:Route@7854,whole:Route@7971,whole:Route@7989,whole:Route@7999,whole:Route@8204,whole:Route@8222,whole:Route@8232,whole:Route@8410,whole:Route@8428,whole:Route@8438,whole:Route@8448,whole:Route@8457 befcac49b400761e731737246e8e8256b42ad980649be7db67e61b9895d8bd5d
internal/edge/assetcatch.go Edge.localAssetCatch legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-asset-cache-3;basis=in the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): new (asset cache plan 3 Task 5): the local catch decision on a box with a route row for the host. It catches only when armed, for GET or HEAD, on a row of the edge's own route snapshot that is not the status host and has no password gate and no import gate (the row's Kind, Gate and ImportGate), and for a path under a prefix the box's asset policy holds for the host (LocalAssets.For, the edges file writer's settled snapshot, no registry read per call). It only narrows: a gated or import-gated row is never caught, so a stored body is never served past a gate; no root decision;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 4: a forward row is never caught locally (IsForward(), +whole:Route). Only narrows. registry:Gate@748,registry:ImportGate@771,registry:Kind@719,whole:Route@722,whole:Route@751,whole:Route@774,whole:Route@803 242c568f4647d930d66341493bf8dfd6b171b6772a2daa05188962cee5e73b60
-internal/edge/edge.go Edge.Reload legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-design-edge-rate-limit-358;basis=each route's upstream entry gains rate: e.parseRateSettings(t), the row's rate_limit column parsed once per reload; the one added site is that whole:Route pass of t (parseRateSettings is a new unit, classified in the decisions overlay); no other read added;rev3=census-ruling-certwarm-wake;basis=the single reload hook call becomes runReloadHooks(), which runs every registered hook in order (#386); no read added, same 57 sites (56 before #358 landed on main);rev3=census-ruling-edge-asset-cache-3;basis=each tenant reverse proxy built in the switch (the tunnel, fleet, socket and TCP arms, every *httputil.ReverseProxy) is installed behind assetScrubbedProxy, which hands the proxy an assetInformationalScrub writer so an app's 1xx (103) loses the asset cache's reserved headers (X-Carlos-Asset-Fill, -Fill-Ack, -Expires, Carlos-Cache) on every local path, as the backhaul already does (final review F6); a type check of the proxy it just built and a wrapper around it; static and status handlers untouched; read sites unchanged (57), offsets moved; no read added;rev3=census-ruling-alias-wake-338;basis=#338 follow-up: after the path fold, a resolved platform alias takes its source's own upstream entry (same proxy, route, hibernating: the existing activator wake, lease and fence), keeping its own prefix map (none for a minted apex) and never inheriting the source's (Astra r2 P1); a refused alias, or one whose source has no entry, is dropped from the map (not served, not Allowed); the attached-hostname fold clears platformAlias;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 5: the activator-managed test (generation proxy, hib, no-activator 404) is Route.ActivatorOwned instead of Kind and Hibernate inline, so a resident rootfs instance goes through the activator; binary rows unchanged;rev3=census-ruling-edge-roll-blip;basis=the tcpProxy and multiProxy calls pass e.hold (the per-Edge localHold set once in newEdge): a loopback TCP upstream that refuses is redialled for up to 13 s and a probed route with a local upstream waits for prober readmission instead of answering 502/503 (#434 part B); edge-side dial policy only, no read added, same 52 sites;rev3=census-ruling-regional-domains-447;basis=#447 Task 5: after the alias fold, reads the regional_domains rows (e.reg.ListRegional; an error aborts the reload as every registry read here does) and applies them with foldRegional against the routes slice the same reload read; the added reads are that one registry list and the routes already read;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Tasks 4 and 6: the forward case (fleetProxy toward the binding's FleetBox, throttled refusal); one refusal check before the switch from FleetArmVerdict (sidecar not judged; a non-ready forward row refused; a forward row always judged by FleetServeEligible, any other row only where tunnels are on; an alias of a refused source refused with it); the accountless note; path rows of a forward host not folded; no alias folded onto a refused row; refusedHosts held through every fold. ListFleets and FleetChannelAuth read before the loop (+registry:FleetBox, +registry:Host x7, +whole:Route x3). Serving only; the hub's agent, not root. Review R1 finding 2: the switch reads verdict.Served (FleetArmVerdict) by host; the forward case and the fleet-placed case take their fleet from it (served.Fleet) instead of FleetPlacement(t.Region), and an admitted forward row not Served continues rather than falling through (+registry:Host, -registry:Region); the same rows take the same arms; no read added. registry:Account@3193,registry:Alias@23566,registry:Alias@23653,registry:Alias@24233,registry:FleetBox@10308,registry:FleetBox@6319,registry:Health@12453,registry:Health@12579,registry:Host@10163,registry:Host@10220,registry:Host@10256,registry:Host@10862,registry:Host@13062,registry:Host@13157,registry:Host@13445,registry:Host@13471,registry:Host@13523,registry:Host@17994,registry:Host@19901,registry:Host@20209,registry:Host@20236,registry:Host@21037,registry:Host@21609,registry:Host@23987,registry:Host@24036,registry:Host@4586,registry:Host@4640,registry:Host@4690,registry:Host@5420,registry:Kind@13619,registry:Kind@13679,registry:Kind@16330,registry:Kind@16352,registry:Name@3183,registry:Prefix@21584,registry:Socket@10415,registry:Socket@10926,registry:Socket@20217,registry:Status@4511,registry:Target@21596,registry:Tunnel@8720,registry:Tunnel@8776,registry:Version@16311,registry:Version@16413,whole:Fleet@3135,whole:Fleet@3164,whole:RegionalDomain@24703,whole:Route@10372,whole:Route@10982,whole:Route@130,whole:Route@13596,whole:Route@13669,whole:Route@13729,whole:Route@20269,whole:Route@20276,whole:Route@20372,whole:Route@21472,whole:Route@22487,whole:Route@24695,whole:Route@3266,whole:Route@3324,whole:Route@6383,whole:Route@8838,whole:RouteAlias@23537,whole:RoutePath@21015 ef7588339f3ea374264e6b2f463a6f00ec18d94e57df83de9075f27a711236a0
+internal/edge/edge.go Edge.Reload legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-design-edge-rate-limit-358;basis=each route's upstream entry gains rate: e.parseRateSettings(t), the row's rate_limit column parsed once per reload; the one added site is that whole:Route pass of t (parseRateSettings is a new unit, classified in the decisions overlay); no other read added;rev3=census-ruling-certwarm-wake;basis=the single reload hook call becomes runReloadHooks(), which runs every registered hook in order (#386); no read added, same 57 sites (56 before #358 landed on main);rev3=census-ruling-edge-asset-cache-3;basis=each tenant reverse proxy built in the switch (the tunnel, fleet, socket and TCP arms, every *httputil.ReverseProxy) is installed behind assetScrubbedProxy, which hands the proxy an assetInformationalScrub writer so an app's 1xx (103) loses the asset cache's reserved headers (X-Carlos-Asset-Fill, -Fill-Ack, -Expires, Carlos-Cache) on every local path, as the backhaul already does (final review F6); a type check of the proxy it just built and a wrapper around it; static and status handlers untouched; read sites unchanged (57), offsets moved; no read added;rev3=census-ruling-alias-wake-338;basis=#338 follow-up: after the path fold, a resolved platform alias takes its source's own upstream entry (same proxy, route, hibernating: the existing activator wake, lease and fence), keeping its own prefix map (none for a minted apex) and never inheriting the source's (Astra r2 P1); a refused alias, or one whose source has no entry, is dropped from the map (not served, not Allowed); the attached-hostname fold clears platformAlias;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 5: the activator-managed test (generation proxy, hib, no-activator 404) is Route.ActivatorOwned instead of Kind and Hibernate inline, so a resident rootfs instance goes through the activator; binary rows unchanged;rev3=census-ruling-edge-roll-blip;basis=the tcpProxy and multiProxy calls pass e.hold (the per-Edge localHold set once in newEdge): a loopback TCP upstream that refuses is redialled for up to 13 s and a probed route with a local upstream waits for prober readmission instead of answering 502/503 (#434 part B); edge-side dial policy only, no read added, same 52 sites;rev3=census-ruling-regional-domains-447;basis=#447 Task 5: after the alias fold, reads the regional_domains rows (e.reg.ListRegional; an error aborts the reload as every registry read here does) and applies them with foldRegional against the routes slice the same reload read; the added reads are that one registry list and the routes already read;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Tasks 4 and 6: the forward case (fleetProxy toward the binding's FleetBox, throttled refusal); one refusal check before the switch from FleetArmVerdict (sidecar not judged; a non-ready forward row refused; a forward row always judged by FleetServeEligible, any other row only where tunnels are on; an alias of a refused source refused with it); the accountless note; path rows of a forward host not folded; no alias folded onto a refused row; refusedHosts held through every fold. ListFleets and FleetChannelAuth read before the loop (+registry:FleetBox, +registry:Host x7, +whole:Route x3). Serving only; the hub's agent, not root. Review R1 finding 2: the switch reads verdict.Served (FleetArmVerdict) by host; the forward case and the fleet-placed case take their fleet from it (served.Fleet) instead of FleetPlacement(t.Region), and an admitted forward row not Served continues rather than falling through (+registry:Host, -registry:Region); the same rows take the same arms; no read added. Review R2: the switch is on DispatchArm(t, viaFleet, tunnels) (the order moved there unchanged: forward only when in Arm, own Tunnel, fleet, socket, addrs, static, status, else continue), the fleet cases read verdict.Arm (renamed from Served), and the platform-alias fold is foldPlatformAliases with the same take (source entry, own paths, alias marks) and the same refusal log (-registry:Kind x2, -registry:Socket, -registry:Tunnel, +whole:Route: those reads moved into DispatchArm); same rows, same arms, same entries; no read added. registry:Account@3193,registry:Alias@23594,registry:Alias@23681,registry:Alias@24261,registry:FleetBox@10420,registry:FleetBox@6459,registry:Health@12547,registry:Health@12673,registry:Host@10275,registry:Host@10332,registry:Host@10368,registry:Host@10969,registry:Host@13156,registry:Host@13251,registry:Host@13539,registry:Host@13565,registry:Host@13617,registry:Host@18070,registry:Host@19977,registry:Host@20285,registry:Host@20312,registry:Host@21113,registry:Host@21685,registry:Host@24015,registry:Host@24064,registry:Host@4586,registry:Host@4640,registry:Host@4690,registry:Host@5557,registry:Kind@16406,registry:Kind@16428,registry:Name@3183,registry:Prefix@21660,registry:Socket@11033,registry:Socket@20293,registry:Status@4511,registry:Target@21672,registry:Tunnel@8891,registry:Version@16387,registry:Version@16489,whole:Fleet@3135,whole:Fleet@3164,whole:RegionalDomain@24731,whole:Route@10484,whole:Route@11089,whole:Route@130,whole:Route@13690,whole:Route@13754,whole:Route@13805,whole:Route@20345,whole:Route@20352,whole:Route@20448,whole:Route@21548,whole:Route@22716,whole:Route@24723,whole:Route@3266,whole:Route@3324,whole:Route@5586,whole:Route@6523,whole:Route@8953,whole:RouteAlias@23565,whole:RoutePath@21091 b53f05355a50c46af2370179ace6ac23e0375c1736dc5374fc43ca5c4d72fc58
internal/edge/edge.go Edge.ServeHTTP legacy accepted-legacy accepted-legacy;rev3=census-ruling-seeded-instances;basis=the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body with the import gate checked after the door's scope and a gated row left out of the response cache; serving only;rev3=census-ruling-edge-request-records;basis=one more call in the observer defer, observeRecords(up.route, ...), passing on the route the defer already holds; no new kind of read;rev3=census-ruling-design-edge-rate-limit-358;basis=calls rateAdmit twice, and an admitted request holds a slot on both paths: on the upgrade path before the activator or proxy (the handshake holds its slot through slotWriter, given back at the first final answer or at the reverse proxy's hijack on a 101, so an open WebSocket is not counted; released by a defer), and on the ordinary path after the response-cache check and before the activator and proxy (an admitted request holds a slot through slotWriter, released by a defer); a refusal is a 429 written there and returns; the upgrade path's comment now names slotWriter as its one wrapper; one comment on the door mark reworded; read sites unchanged (22: main's 21 plus edge-request-records' observeRecords pass of the route), offsets moved; no read added;rev3=census-ruling-plans-4c-box-throttle;basis=calls planThrottleAdmit before the response cache, and on an upgrade trackUpgrade then planUpgradeAdmit (plans 4c, Astra findings 1 and 2); the new reads live in those units (plans-4c-units decision). The same read sites here.;rev3=census-ruling-plans-4d-lapse;basis=calls planDisabledAdmit right after the import gate, passing the final upstream's route and the request host; a turned-off route gets the fixed disabled page before the meter, gate, cache and activator (plans 4d). The new read lives in that unit (plans-4d-units decision); one more whole-row pass here.;rev3=census-ruling-edge-protection-2;basis=runs the guard, a pure in-memory matcher on r.URL.Path and RawQuery (internal/edgeguard), once per request after the meter and observer defer and before the password gate, the upgrade branch, the cache and the activator, for a request that is not a door call, a backhauled door hop or a tunnel delivery; a matched block answers a 404 itself through guardDecide; the two new sites are one expression, up.route.Kind == "static" (a static route this box serves checks only the hard tier here and leaves the probe tier to serveTree), a read of the route row the edge already resolved; no new kind of read;rev3=census-ruling-edge-asset-cache-3;basis=the asset cache's three hooks (asset cache plan 3): the request's reserved asset headers are deleted at entry (the fill assertion kept only beside a verified hop); on the exact-remote and lookup-miss branches the far catch (serveAssetFar) is tried before backhaulTo and backhaul; after the observer defer and main's hard and probe checks, a verified hop with a valid fill assertion is answered by serveAssetFillForHop; after the upgrade branch and before gzip and the shared cache, the local catch (serveAssetLocal); the observer defer skips only the usage meter for an acknowledged home fill (out.unbilled); the new reads live in the new units of the edge-asset-cache-3-decisions overlay; the same route row and read sites (25); no read added;rev3=census-ruling-regional-domains-447;basis=#447 Task 5: straight after lookupUpstreamPath it calls regionalGate (regional.go), which for an entry built from a regional_domains row answers 503 to a hop or a deny entry before any arm that can leave the box (the exact-home backhaul, the far asset catch, the door dial, the miss backhaul), and lets a star match through only to the exact-home arm when ExactHome names another box for that distinct exact name; after the exact-home arm a regional deny entry the arm did not answer is refused (regionalRefuse, 503); refusals only, on the route map the edge already holds; read sites unchanged (25);rev3=census-ruling-static-headers;basis=the shared response cache is no longer looked up or filled for a static-kind route: one more read of the route row the edge already resolved (up.route.Kind == "static") in the cacheable expression; a refusal only, nothing new opened or followed;rev3=census-ruling-region-ha-p1b2;basis=region HA P1b-2 (N-HA10): one call, frontForwardHA, right after the route lookup's !ok block and before the login POST; same reads;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 4: loginPost and cacheable treat a forward row as not this box's to answer (IsForward(), +whole:Route x2): no login form and no shared cache for a forward host. Serving only. registry:Gate@19424,registry:Gate@19484,registry:Gate@19542,registry:Host@19527,registry:ImportGate@25256,registry:Kind@15087,registry:Kind@17557,registry:Kind@25198,registry:Kind@25227,whole:Route@11116,whole:Route@12895,whole:Route@13107,whole:Route@13299,whole:Route@15090,whole:Route@16393,whole:Route@16488,whole:Route@16564,whole:Route@16608,whole:Route@17560,whole:Route@19427,whole:Route@19487,whole:Route@19530,whole:Route@19545,whole:Route@21178,whole:Route@25201,whole:Route@25230,whole:Route@25259,whole:Route@25291,whole:Route@27118 fc5d1d3cf4100ae1634d9b2ff14d01a67a0dc548891757efdcada3b9c85fe4b2
internal/edge/planthrottle.go Edge.planThrottleOf legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-4c-units;basis=the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos), serving only: asks the plan throttle hook (planThrottleFor, passed the row) whether an instance row's account is slowed down; door, hop-door and tunnel callers exempt as from the rate limit; reads only the row's kind (plans 4c).;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 5: the kind selector admits a forward row as an instance (IsForward(), +whole:Route); fromTunnel exemptions unchanged. Only slows. registry:Kind@130,whole:Route@133,whole:Route@165,whole:Route@380 b9d5f5afde26cd0f574bfd71c57c87ee599ae55b6585db53a61c9b65694ad4cc
internal/edge/planthrottle.go Edge.trackUpgrade legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-4c-units;basis=the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos), serving only: for an instance row whose account plans govern (planGoverned, passed the row), wraps the upgrade request in a cancellable context registered under release.RouteAccount(row), so CloseAccountUpgrades can end it (plans 4c).;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 5: the kind selector admits a forward row as an instance (IsForward(), +whole:Route); fromTunnel exemptions unchanged. registry:Kind@129,whole:Route@132,whole:Route@164,whole:Route@195,whole:Route@262 bfe61c428884d63fca40d81c8dd7ffe5b3ebec22d5197bffc67ac0f5e0dc4fa5
@@ -227,7 +231,7 @@ internal/release/rootupdates.go RootUpdateInputs.routes authority E3,J1 rev3=PRO
@removed internal/registry/registry.go Registry.SetFleetBox H3 census-ruling-fleet-public-routes;absent;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 1: removed, not moved; replaced by Registry.SetFleetBoxIf (forward.go, new unit on this card), which judges placement, kind and active fleet membership at the write; ReconcileFleetBindings (on this card) is its one caller.
@coverage . f97deea5d64c8e2911dc0be0645da98ce9ece8d2d3dc8f2c77f49098576b5afb
@coverage internal/domains 26080bce26f249af3a5013450e37c80900fee7ab615ecd549fb800479f8e27f7
-@coverage internal/edge 7765c6eec38cbd3b41bf34303b1a22e414e874a90e24d6ca827b4d92a4a66860
+@coverage internal/edge 4ffdc0607cd3d365357b4bb64e39313cd1493236314b31869773b7681c75ebe7
@coverage internal/host 8c766e110f1da37300835e8682bfac8e6106a133ff7853186c1f0717019a4223
@coverage internal/provision 1ef99d05ab30bb923af6e70d490dd9d6bd0b2ddeecc239c2ceebb023e27524ef
@coverage internal/registry 69fc3cbe539d79eb1d73c2b9956cdcc9e9c1e86c3e1224ce09b0b036c74c3b07