carlos / platform Public

census: propose the tunnel-websockets overlay (#471 Task 9)

make census-propose NAME=tunnel-websockets, claims taken from spec §7's
per-task census text. Five units: new loginPassesThrough,
UpgradeConn.Read and upgradedConn.Read; reads Edge.Reload and
Edge.ServeHTTP. Envelopes re-pinned: internal/apperr, internal/edge,
internal/tunnelclient. Seal 1379d066… -> 949bc734….
Awaiting the reviewer's verdicts on #280.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev d21e40f19d7f691d61ee674f26bdd360b0e65160 parent aa744f8
3 files changed, +36 −0
  • docs/superpowers/notes/census-proposal-tunnel-websockets.md +19 −0
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −0
  • internal/provision/testdata/plan14-root-reads-tunnel-websockets.tsv +16 −0

CI cancelled — superseded by a newer push — run details

diff --git a/docs/superpowers/notes/census-proposal-tunnel-websockets.md b/docs/superpowers/notes/census-proposal-tunnel-websockets.md
new file mode 100644
index 000000000..1dd1dc8c6
--- /dev/null
+++ b/docs/superpowers/notes/census-proposal-tunnel-websockets.md
@@ -0,0 +1,19 @@
+# Census approval: tunnel-websockets
+
+Ruling `census-ruling-tunnel-websockets`. The independent reviewer approves or rejects every change below, 5 with a new disposition; nothing goes to the census owner (Paul, #280, 2026-10-26).
+
+Envelopes re-pinned: `internal/apperr`, `internal/edge`, `internal/tunnelclient`.
+
+Review: a model from the other family than the author reads the branch's diff against main on the amadan.net remote (`origin` or `amadan`, whichever points at amadan.net) and gives a verdict for every unit and every re-pinned envelope above. For a unit, compare the change with its recorded disposition and basis below; for an envelope, read every changed function in the package and what it reaches. Reject if the change lets root open, run, query or follow anything it did not before from a path or input a tenant, an app or a box agent can create, write or name; if it weakens a check, refusal, validation, argument or environment the basis relies on; or if the diff cannot settle either. Otherwise approve. Record each verdict on #280 with the tip. A rejected unit goes back to the author to correct; nothing escalates to the census owner.
+
+New dispositions, which census-propose wrote and the reviewer checks against the unit's reads and the diff:
+
+- new `internal/edge/edge.go:loginPassesThrough`: reads +registry:Gate ×2, +registry:Host ×2, +whole:Route ×4; written legacy, accepted-legacy, frozen
+- new `internal/tunnelclient/upgrade.go:UpgradeConn.Read`: reads +file:Read ×2; written legacy, accepted-legacy, frozen
+- new `internal/tunnelclient/upgrade.go:upgradedConn.Read`: reads +file:Read ×2; written legacy, accepted-legacy, frozen
+- reads `internal/edge/edge.go:Edge.Reload`: +registry:Account, +registry:App, +registry:Tunnel; keeps legacy, task accepted-legacy
+- reads `internal/edge/edge.go:Edge.ServeHTTP`: +file:ReadAll, +registry:Gate, +whole:Route; keeps legacy, task accepted-legacy
+
+Seal: `1379d066c8dd2335d95d5f6e9c7bce65ff57f00b2b287a308d9b3f47911ae5e7` → `949bc734a293366e6b2700244af5110dd6e84b5432023e991c09e806afd62483`.
+
+Overlay: `internal/provision/testdata/plan14-root-reads-tunnel-websockets.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`.
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv
index 1ab671e64..8f4052188 100644
--- a/internal/provision/testdata/plan14-root-reads-chain.tsv
+++ b/internal/provision/testdata/plan14-root-reads-chain.tsv
@@ -43,3 +43,4 @@ plan14-root-reads-region-ha-dead-holder-backoff.tsv 8f6a1865b0abcea9d4fb68232cc2
plan14-root-reads-managed-fleets-1c-451.tsv af326671321edda76c7e6217a47892605a9e3b886fa880ad6d049c2f28f63873
plan14-root-reads-fleet-public-routes.tsv bca6ef741a96b72767b1747789cd01b3111d61b68548cbe368258c31f3d53a2e
plan14-root-reads-fleet-routes-followups.tsv 1379d066c8dd2335d95d5f6e9c7bce65ff57f00b2b287a308d9b3f47911ae5e7
+plan14-root-reads-tunnel-websockets.tsv 949bc734a293366e6b2700244af5110dd6e84b5432023e991c09e806afd62483
diff --git a/internal/provision/testdata/plan14-root-reads-tunnel-websockets.tsv b/internal/provision/testdata/plan14-root-reads-tunnel-websockets.tsv
new file mode 100644
index 000000000..ed65bd04a
--- /dev/null
+++ b/internal/provision/testdata/plan14-root-reads-tunnel-websockets.tsv
@@ -0,0 +1,16 @@
+# Census overlay tunnel-websockets, written by census-propose (#369). census-ruling-tunnel-websockets, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-tunnel-websockets.md.
+# 0 body, 0 sites, 3 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
+# 5 new dispositions: 2 reads re-frozen at their disposition with the claim, 3 new units frozen accepted-legacy, 0 quiet units retired while they read nothing, 0 other.
+@legacy 128b44d49294dadc290d6838ed402dcbadcbf2dabb162281192a5c3bd993f92e internal/edge/edge.go loginPassesThrough legacy accepted-legacy accepted-legacy;rev3=census-ruling-tunnel-websockets;basis=New: true only when front is an ungated ArmTunnel row and target, the route next selected, is that same row (same host, same tenancy, still ungated). Reads fields of two in-memory route entries; no file, no root-owned state, nothing opened or followed, no new channel or account selectable (spec 7, Task 6). registry:Gate@201,registry:Gate@97,registry:Host@125,registry:Host@146,whole:Route@103,whole:Route@132,whole:Route@152,whole:Route@208 718ab739409de7cde3f02fa4034547f1ccee4bd1812c34d9d997ac7e8ee0b9ae
+@legacy 9d252ddf95cac883f835b2b290f16a87f92bbb2cc8c0b4826d6809ac06f1622b internal/tunnelclient/upgrade.go UpgradeConn.Read legacy accepted-legacy accepted-legacy;rev3=census-ruling-tunnel-websockets;basis=New: the hub side of an upgraded stream reads the bytes that came with the in-band 101 from memory, then the HTTP/2 response body from the box (c.body.Read); the scanner matches the name Read. No file and no root-owned state (spec 7, Task 2). file:Read@150,file:Read@22 8f7d57265ee64e2eb6d3dac1d75784fc822a6ebd1c068e3ddd9c81be040a3fb8
+@legacy 8b25a0f16cee36909942d98954b5aa42a9b247fc6c2732a9f062bee0998df9a8 internal/tunnelclient/upgrade.go upgradedConn.Read legacy accepted-legacy accepted-legacy;rev3=census-ruling-tunnel-websockets;basis=New: the box side of an upgraded stream reads the HTTP/2 request body the hub sends (c.body.Read); the scanner matches the name Read. No file and no root-owned state (spec 7, Task 1). file:Read@112,file:Read@23 43bdc779b5ef4d052e753657314ae81186a201fd21c027a9e5f47338424ffb39
+@legacy b6b97c5782734f9e77e8eea0433ccf2c2b949f75e93859221d5ab6b3effddccc 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.;rev3=census-ruling-fleet-routes-followups;basis=the owners map is now e.reg.FleetOwners() instead of ListFleets folded inline: the same fresh-connection ListFleets read and the same name->account map (-registry:Account, -registry:Name, -whole:Fleet x2 move into Registry.FleetOwners); no read added; same error path (abort the reload);rev3=census-ruling-tunnel-websockets;basis=The ArmTunnel arm now records its tenancy (Account, App, Tunnel) copied from the row t that Reload already lists; no new registry query, no file read. Also the reload mutex taken first and held to return, five nil-in-production test hooks, and the sweepUpgrades call after the swap, which reads only the map Reload has just built (spec 7, Tasks 3 and 4). registry:Account@9397,registry:Alias@24152,registry:Alias@24239,registry:Alias@24819,registry:App@9413,registry:FleetBox@10869,registry:FleetBox@6728,registry:Health@13091,registry:Health@13217,registry:Host@10724,registry:Host@10781,registry:Host@10817,registry:Host@11513,registry:Host@13700,registry:Host@13795,registry:Host@14083,registry:Host@14109,registry:Host@14161,registry:Host@18614,registry:Host@20521,registry:Host@20829,registry:Host@20856,registry:Host@21671,registry:Host@22243,registry:Host@24573,registry:Host@24622,registry:Host@4701,registry:Host@4755,registry:Host@4805,registry:Host@5826,registry:Kind@16950,registry:Kind@16972,registry:Prefix@22218,registry:Socket@11577,registry:Socket@20837,registry:Status@4626,registry:Target@22230,registry:Tunnel@9257,registry:Tunnel@9428,registry:Version@16931,registry:Version@17033,whole:RegionalDomain@25461,whole:Route@10933,whole:Route@11633,whole:Route@14234,whole:Route@14298,whole:Route@14349,whole:Route@20889,whole:Route@20896,whole:Route@20992,whole:Route@22106,whole:Route@23274,whole:Route@25453,whole:Route@294,whole:Route@3381,whole:Route@3439,whole:Route@5855,whole:Route@6792,whole:Route@9319,whole:RouteAlias@24123,whole:RoutePath@21649 4c14b0659562ff342ef3c58377ca67127e285148afb3fb88d1351ca679ad56e7
+@legacy c5a4cf851500e7ea545918f27f3ff8552d228c236679ac3d16a264585f8fdf33 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.;rev3=census-ruling-tunnel-websockets;basis=Deletes the Carlos-Upgrade marker header from incoming requests and puts the upgrade admission (host, path, the entry tenancy, all in hand) on a tunnel arm request. For a login POST on an ungated ArmTunnel row it reads the visitor request body (bounded by gate.MaxFormBody, 413 past it; a request body, not a file) and resolves next against the entry Reload built (Gate, Route); the bytes pass on only when loginPassesThrough holds (spec 7, Tasks 3, 5 and 6). file:ReadAll@13033,registry:Gate@12007,registry:Gate@21874,registry:Gate@21934,registry:Gate@21992,registry:Host@21977,registry:ImportGate@28133,registry:Kind@17537,registry:Kind@20007,registry:Kind@28075,registry:Kind@28104,whole:Route@11902,whole:Route@12013,whole:Route@15345,whole:Route@15557,whole:Route@15749,whole:Route@17540,whole:Route@18843,whole:Route@18938,whole:Route@19014,whole:Route@19058,whole:Route@20010,whole:Route@21877,whole:Route@21937,whole:Route@21980,whole:Route@21995,whole:Route@24055,whole:Route@28078,whole:Route@28107,whole:Route@28136,whole:Route@28168,whole:Route@29995 befe0a0287656f6075bdd8c9f66844d8d90aef84d8e0e231a4ce640d0300e9cc
+internal/edge/edge.go loginPassesThrough legacy accepted-legacy accepted-legacy;rev3=census-ruling-tunnel-websockets;basis=New: true only when front is an ungated ArmTunnel row and target, the route next selected, is that same row (same host, same tenancy, still ungated). Reads fields of two in-memory route entries; no file, no root-owned state, nothing opened or followed, no new channel or account selectable (spec 7, Task 6). registry:Gate@201,registry:Gate@97,registry:Host@125,registry:Host@146,whole:Route@103,whole:Route@132,whole:Route@152,whole:Route@208 718ab739409de7cde3f02fa4034547f1ccee4bd1812c34d9d997ac7e8ee0b9ae
+internal/tunnelclient/upgrade.go UpgradeConn.Read legacy accepted-legacy accepted-legacy;rev3=census-ruling-tunnel-websockets;basis=New: the hub side of an upgraded stream reads the bytes that came with the in-band 101 from memory, then the HTTP/2 response body from the box (c.body.Read); the scanner matches the name Read. No file and no root-owned state (spec 7, Task 2). file:Read@150,file:Read@22 8f7d57265ee64e2eb6d3dac1d75784fc822a6ebd1c068e3ddd9c81be040a3fb8
+internal/tunnelclient/upgrade.go upgradedConn.Read legacy accepted-legacy accepted-legacy;rev3=census-ruling-tunnel-websockets;basis=New: the box side of an upgraded stream reads the HTTP/2 request body the hub sends (c.body.Read); the scanner matches the name Read. No file and no root-owned state (spec 7, Task 1). file:Read@112,file:Read@23 43bdc779b5ef4d052e753657314ae81186a201fd21c027a9e5f47338424ffb39
+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.;rev3=census-ruling-fleet-routes-followups;basis=the owners map is now e.reg.FleetOwners() instead of ListFleets folded inline: the same fresh-connection ListFleets read and the same name->account map (-registry:Account, -registry:Name, -whole:Fleet x2 move into Registry.FleetOwners); no read added; same error path (abort the reload);rev3=census-ruling-tunnel-websockets;basis=The ArmTunnel arm now records its tenancy (Account, App, Tunnel) copied from the row t that Reload already lists; no new registry query, no file read. Also the reload mutex taken first and held to return, five nil-in-production test hooks, and the sweepUpgrades call after the swap, which reads only the map Reload has just built (spec 7, Tasks 3 and 4). registry:Account@9397,registry:Alias@24152,registry:Alias@24239,registry:Alias@24819,registry:App@9413,registry:FleetBox@10869,registry:FleetBox@6728,registry:Health@13091,registry:Health@13217,registry:Host@10724,registry:Host@10781,registry:Host@10817,registry:Host@11513,registry:Host@13700,registry:Host@13795,registry:Host@14083,registry:Host@14109,registry:Host@14161,registry:Host@18614,registry:Host@20521,registry:Host@20829,registry:Host@20856,registry:Host@21671,registry:Host@22243,registry:Host@24573,registry:Host@24622,registry:Host@4701,registry:Host@4755,registry:Host@4805,registry:Host@5826,registry:Kind@16950,registry:Kind@16972,registry:Prefix@22218,registry:Socket@11577,registry:Socket@20837,registry:Status@4626,registry:Target@22230,registry:Tunnel@9257,registry:Tunnel@9428,registry:Version@16931,registry:Version@17033,whole:RegionalDomain@25461,whole:Route@10933,whole:Route@11633,whole:Route@14234,whole:Route@14298,whole:Route@14349,whole:Route@20889,whole:Route@20896,whole:Route@20992,whole:Route@22106,whole:Route@23274,whole:Route@25453,whole:Route@294,whole:Route@3381,whole:Route@3439,whole:Route@5855,whole:Route@6792,whole:Route@9319,whole:RouteAlias@24123,whole:RoutePath@21649 4c14b0659562ff342ef3c58377ca67127e285148afb3fb88d1351ca679ad56e7
+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.;rev3=census-ruling-tunnel-websockets;basis=Deletes the Carlos-Upgrade marker header from incoming requests and puts the upgrade admission (host, path, the entry tenancy, all in hand) on a tunnel arm request. For a login POST on an ungated ArmTunnel row it reads the visitor request body (bounded by gate.MaxFormBody, 413 past it; a request body, not a file) and resolves next against the entry Reload built (Gate, Route); the bytes pass on only when loginPassesThrough holds (spec 7, Tasks 3, 5 and 6). file:ReadAll@13033,registry:Gate@12007,registry:Gate@21874,registry:Gate@21934,registry:Gate@21992,registry:Host@21977,registry:ImportGate@28133,registry:Kind@17537,registry:Kind@20007,registry:Kind@28075,registry:Kind@28104,whole:Route@11902,whole:Route@12013,whole:Route@15345,whole:Route@15557,whole:Route@15749,whole:Route@17540,whole:Route@18843,whole:Route@18938,whole:Route@19014,whole:Route@19058,whole:Route@20010,whole:Route@21877,whole:Route@21937,whole:Route@21980,whole:Route@21995,whole:Route@24055,whole:Route@28078,whole:Route@28107,whole:Route@28136,whole:Route@28168,whole:Route@29995 befe0a0287656f6075bdd8c9f66844d8d90aef84d8e0e231a4ce640d0300e9cc
+@coverage internal/apperr 20c26734c206fe9f03e799ebb659a8d3c82446e3cc495fa1dc2ed60746c90c34
+@coverage internal/edge bf9c806ca5749c149e7dca3e0e292f7cc537b77d9aa375a076b7c448390b4915
+@coverage internal/tunnelclient d7145dfb64fc307d28386127cc827be3ecdc417657ba93bfc815a9459cd05cb5