| new file mode 100644 |
| index 000000000..55d895ca3 |
| --- /dev/null |
| +++ b/internal/provision/testdata/plan14-root-reads-fleet-routes-followups.tsv |
| @@ -0,0 +1,17 @@ |
| +# Census overlay fleet-routes-followups, written by census-propose (#369). census-ruling-fleet-routes-followups, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-fleet-routes-followups.md. |
| +# 0 body, 2 sites, 3 envelope: each changed unit re-frozen at its existing disposition with its claim appended. |
| +# 4 new dispositions: 1 reads re-frozen at their disposition with the claim, 1 new units frozen accepted-legacy, 1 quiet units retired while they read nothing, 1 other. |
| +@legacy 1390307beb444f133a32c53182280cf12b141d7625a291e9369e73c34bd1de00 internal/registry/fleets.go Registry.FleetOwners legacy accepted-legacy accepted-legacy;rev3=census-ruling-fleet-routes-followups;basis=new: ListFleets folded to fleet name -> owning account (reads Fleet.Name and Fleet.Account), the fold Edge.Reload and hubFleetOwners each did inline; no new query, connection or remote method (ListFleets is unchanged) registry:Account@226,registry:Name@216,whole:Fleet@170,whole:Fleet@198 65f9562910b29675b8c48338d888ecd7210017228fe28245d9c1c21c8a5fb8b2 |
| +@legacy 113b7211acd13e4de3aa2f9dd2a872519e10515cbc62e92d34564f902c3cb084 internal/registry/forward.go var putForwardSQL 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 2: PutForward's statement, its conflict arm built once from the ForwardForbidden literal (+registry:Column, +registry:Type, +whole:ForwardColumn); reads only a package literal.;rev3=census-ruling-fleet-routes-followups;basis=the conflict arm is built from the package literal forwardKept (column, OnConflict) plus ForwardForbidden instead of an inline string list; the generated SQL assigns the same columns the same values as before (checked by TestPutForwardSetsEveryColumnButHost against PRAGMA); reads only package literals registry:Column@182,registry:Column@336,registry:OnConflict@140,registry:OnConflict@197,registry:Type@276,whole:ForwardColumn@237,whole:ForwardColumn@83,whole:forwardKeptColumn@121,whole:forwardKeptColumn@66 4df872e1a8d3dd06ac717a88fe32e2cafd12fae4b7d63bd34d340537268f585e |
| +@legacy 9f1fa7dcf03a9ab26cb80edef4a65a8d62c7922495b21e722e283db14e4537b6 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) registry:Alias@23545,registry:Alias@23632,registry:Alias@24212,registry:FleetBox@10371,registry:FleetBox@6410,registry:Health@12498,registry:Health@12624,registry:Host@10226,registry:Host@10283,registry:Host@10319,registry:Host@10920,registry:Host@13107,registry:Host@13202,registry:Host@13490,registry:Host@13516,registry:Host@13568,registry:Host@18021,registry:Host@19928,registry:Host@20236,registry:Host@20263,registry:Host@21064,registry:Host@21636,registry:Host@23966,registry:Host@24015,registry:Host@4537,registry:Host@4591,registry:Host@4641,registry:Host@5508,registry:Kind@16357,registry:Kind@16379,registry:Prefix@21611,registry:Socket@10984,registry:Socket@20244,registry:Status@4462,registry:Target@21623,registry:Tunnel@8842,registry:Version@16338,registry:Version@16440,whole:RegionalDomain@24682,whole:Route@10435,whole:Route@11040,whole:Route@130,whole:Route@13641,whole:Route@13705,whole:Route@13756,whole:Route@20296,whole:Route@20303,whole:Route@20399,whole:Route@21499,whole:Route@22667,whole:Route@24674,whole:Route@3217,whole:Route@3275,whole:Route@5537,whole:Route@6474,whole:Route@8904,whole:RouteAlias@23516,whole:RoutePath@21042 88586bab6777f8ba12797b1e8b8d5dad7ca3d0b29c4703039b0a56041f8db6d0 |
| +@legacy 48da5748ec910f5f73c055224bd7b0521302ee49d73c31709d298aa3b14e7217 internal/registry/forward.go Registry.PutForward 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 2: the only writer of a forward row's declared columns: refuses an argument whose kind is not forward; copies only the declared fields from its argument (Status ready, Provisioned true; no forbidden column is ever written); inside one IMMEDIATE transaction refuses a host a non-forward row holds (ErrHostHeld); keeps FleetBox while Region is unchanged; preserves the observational columns (+file:Exec, +file:QueryRow, +registry:Account, App, Channel, RateLimit, Region, Slug, +registry:Host x3, +registry:Kind, +registry:remote x2, +whole:Route x3, +whole:remoteClient x2).;rev3=census-ruling-fleet-routes-followups;basis=refuses up front, with the new sentinel ErrNotForward and before any read or write, an rt that is not a forward row (as before, now a sentinel), has an empty Host, or whose Region is not a fleet placement (registry.FleetPlacement); +registry:Host x2 and +registry:Region x2 read only the argument in those checks; the transaction and statement are unchanged file:Exec@1166,file:QueryRow@942,registry:Account@693,registry:App@670,registry:Channel@746,registry:Host@197,registry:Host@234,registry:Host@419,registry:Host@594,registry:Host@996,registry:Kind@206,registry:RateLimit@773,registry:Region@428,registry:Region@720,registry:Region@84,registry:Slug@646,registry:remote@446,registry:remote@476,whole:Route@1199,whole:Route@531,whole:Route@539,whole:remoteClient@448,whole:remoteClient@478 e46e8df164ed32403309e37d8470bc4c96319890ccf66fc0d276e452fef7b8e2 |
| +internal/registry/fleets.go Registry.FleetOwners legacy accepted-legacy accepted-legacy;rev3=census-ruling-fleet-routes-followups;basis=new: ListFleets folded to fleet name -> owning account (reads Fleet.Name and Fleet.Account), the fold Edge.Reload and hubFleetOwners each did inline; no new query, connection or remote method (ListFleets is unchanged) registry:Account@226,registry:Name@216,whole:Fleet@170,whole:Fleet@198 65f9562910b29675b8c48338d888ecd7210017228fe28245d9c1c21c8a5fb8b2 |
| +internal/registry/forward.go var putForwardSQL 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 2: PutForward's statement, its conflict arm built once from the ForwardForbidden literal (+registry:Column, +registry:Type, +whole:ForwardColumn); reads only a package literal.;rev3=census-ruling-fleet-routes-followups;basis=the conflict arm is built from the package literal forwardKept (column, OnConflict) plus ForwardForbidden instead of an inline string list; the generated SQL assigns the same columns the same values as before (checked by TestPutForwardSetsEveryColumnButHost against PRAGMA); reads only package literals registry:Column@182,registry:Column@336,registry:OnConflict@140,registry:OnConflict@197,registry:Type@276,whole:ForwardColumn@237,whole:ForwardColumn@83,whole:forwardKeptColumn@121,whole:forwardKeptColumn@66 4df872e1a8d3dd06ac717a88fe32e2cafd12fae4b7d63bd34d340537268f585e |
| +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) registry:Alias@23545,registry:Alias@23632,registry:Alias@24212,registry:FleetBox@10371,registry:FleetBox@6410,registry:Health@12498,registry:Health@12624,registry:Host@10226,registry:Host@10283,registry:Host@10319,registry:Host@10920,registry:Host@13107,registry:Host@13202,registry:Host@13490,registry:Host@13516,registry:Host@13568,registry:Host@18021,registry:Host@19928,registry:Host@20236,registry:Host@20263,registry:Host@21064,registry:Host@21636,registry:Host@23966,registry:Host@24015,registry:Host@4537,registry:Host@4591,registry:Host@4641,registry:Host@5508,registry:Kind@16357,registry:Kind@16379,registry:Prefix@21611,registry:Socket@10984,registry:Socket@20244,registry:Status@4462,registry:Target@21623,registry:Tunnel@8842,registry:Version@16338,registry:Version@16440,whole:RegionalDomain@24682,whole:Route@10435,whole:Route@11040,whole:Route@130,whole:Route@13641,whole:Route@13705,whole:Route@13756,whole:Route@20296,whole:Route@20303,whole:Route@20399,whole:Route@21499,whole:Route@22667,whole:Route@24674,whole:Route@3217,whole:Route@3275,whole:Route@5537,whole:Route@6474,whole:Route@8904,whole:RouteAlias@23516,whole:RoutePath@21042 88586bab6777f8ba12797b1e8b8d5dad7ca3d0b29c4703039b0a56041f8db6d0 |
| +internal/registry/forward.go Registry.PutForward 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 2: the only writer of a forward row's declared columns: refuses an argument whose kind is not forward; copies only the declared fields from its argument (Status ready, Provisioned true; no forbidden column is ever written); inside one IMMEDIATE transaction refuses a host a non-forward row holds (ErrHostHeld); keeps FleetBox while Region is unchanged; preserves the observational columns (+file:Exec, +file:QueryRow, +registry:Account, App, Channel, RateLimit, Region, Slug, +registry:Host x3, +registry:Kind, +registry:remote x2, +whole:Route x3, +whole:remoteClient x2).;rev3=census-ruling-fleet-routes-followups;basis=refuses up front, with the new sentinel ErrNotForward and before any read or write, an rt that is not a forward row (as before, now a sentinel), has an empty Host, or whose Region is not a fleet placement (registry.FleetPlacement); +registry:Host x2 and +registry:Region x2 read only the argument in those checks; the transaction and statement are unchanged file:Exec@1166,file:QueryRow@942,registry:Account@693,registry:App@670,registry:Channel@746,registry:Host@197,registry:Host@234,registry:Host@419,registry:Host@594,registry:Host@996,registry:Kind@206,registry:RateLimit@773,registry:Region@428,registry:Region@720,registry:Region@84,registry:Slug@646,registry:remote@446,registry:remote@476,whole:Route@1199,whole:Route@531,whole:Route@539,whole:remoteClient@448,whole:remoteClient@478 e46e8df164ed32403309e37d8470bc4c96319890ccf66fc0d276e452fef7b8e2 |
| +@remove internal/host/hub.go hubFleetOwners |
| +@removed internal/host/hub.go hubFleetOwners H3 census-ruling-fleet-routes-followups;basis=now calls reg.FleetOwners() and wraps its error as before; its own read sites moved into Registry.FleetOwners; comment reworded (phase and edge converge and fail closed) |
| +@coverage internal/edge 37fbc2d03adfb340d819820d2613e8787652a45b60467ac04fc2ed4fe6bfc7c6 |
| +@coverage internal/host 52a048a60bfc9fdbf61e1f317a24748c35b20a564a33a2a5e52067b996d71837 |
| +@coverage internal/registry 8f3e1414926911fa603c0f29ba0080fb5bf12f93e0f9ed5d5923d5e072c26f17 |
| +@fields A,Account,Accounts,AddedAt,Addr,Addrs,Alias,Aliases,Alive,AllowAbsent,App,Archives,Args,AssetGen,AssetsOff,At,Attempts,B,Backing,Bucket,BuildState,By,Callback,CallbackError,CallbackFailed,Canary,Caps,CertExpiresAt,Changed,Channel,CheckedAt,Claim,ClaimIncarnation,ClaimOwner,ClaimOwnership,ClaimRowID,ClaimStamp,Class,Column,Contents,CreatedAt,DBPath,DNSCheckedAt,DNSStatus,Deadline,Default,Demand,Digest,DoneBefore,Due,DueAt,EgressAllow,Env,EnvBefore,Environment,Error,ErrorKind,ExcludeHosts,ExpectGood,ExpectOp,ExpectPair,Expected,F,Failed,FenceGen,Field,Fleet,FleetBox,FleetBoxes,Fleets,From,FromDB,FromOp,FromSock,Gate,GoodDemand,GoodDigest,GoodVersion,HA,Hash,Health,Held,Hibernate,HoldOp,Host,Hosts,ID,Id,IdValue,Idle,IdleSeconds,ImportGate,Incarnation,Journal,Keep,KeyFP,Kind,Label,LastAt,LastError,LastMs,LastStatus,Limit,MaxRun,MaxRunSeconds,Method,Ms,Name,Next,NextAt,NextDue,NextGood,NextValue,Now,Number,Number64,Observed,ObservedValue,Old,On,OnConflict,Op,Original,Owner,Ownership,P,Pair,Path,Paths,Platform,PolicyExpiresAt,Pool,Prefix,Prev,PrevVersion,Provisioned,Pub,RDs,RateLimit,RecordKey,Region,Regional,Registration,Replica,Replicas,Replication,Retirement,Route,Routes,Row,Rows,Runtime,SecretsKeyFP,SecretsKeySetAt,SecretsKeySetBy,SecretsPub,Seed,SeedID,SeedSource,ServingSeq,ServingVersion,Size,Slug,Socket,Spec,Sqid,State,Status,StatusNamed,Steering,StringMap,T,TValue,Tags,Target,Targets,Text,Timer,Timers,Times,To,ToDB,ToOp,ToSock,TokenHash,Tunnel,Type,Unit,UpdateSettings,Ver,Version,W,WakeIncarnation,Wildcards,closed,conn,connect,ctx,d,dec,done,enc,full,input,mu,output,path,readOnly,remote,sql,wait |