| index a6029dbc9..b06df1f10 100644 |
| --- a/internal/provision/testdata/plan14-root-reads-linked-deployments-slice1.tsv |
| +++ b/internal/provision/testdata/plan14-root-reads-linked-deployments-slice1.tsv |
| @@ -1,6 +1,6 @@ |
| # Census overlay linked-deployments-slice1, written by census-propose (#369). census-ruling-linked-deployments-slice1, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-linked-deployments-slice1.md. |
| # 15 body, 8 sites, 8 envelope: each changed unit re-frozen at its existing disposition with its claim appended. |
| -# 39 new dispositions: 4 reads re-frozen at their disposition with the claim, 34 new units frozen accepted-legacy, 0 quiet units retired while they read nothing, 1 other. |
| +# 40 new dispositions: 4 reads re-frozen at their disposition with the claim, 35 new units frozen accepted-legacy, 0 quiet units retired while they read nothing, 1 other. |
| @legacy 1cb1c2d61f2c9cac86a37ae03cbc610d0a6adb9862c436283aae7af1203081a2 internal/edge/demo.go Edge.handleDemoRequest legacy accepted-legacy accepted-legacy;rev3=census-ruling-agent-start-demo-2;basis=demo.go:87-109 classifies request authority using the loaded refusal/upstream maps and checks the existing Route binding before protected dispatch. Five whole Route uses; malformed, unknown and expired names receive fixed policy-bearing refusals, never ordinary fallback. No new storage read.;rev3=census-ruling-agent-start-demo-3;basis=Check verified moved notices before route lookup so a purged source can still display its bounded notice. Census read-site delta: unchanged (5).;rev3=census-ruling-linked-deployments-slice1;basis=linked deployments slice 1 Task 8: the upstream comes from selectUpstream(r, host, path), which is lookupUpstreamPath(host, path) unless the request carries a link pin; same reads whole:Route@446,whole:Route@513,whole:Route@554,whole:Route@770,whole:Route@812 a6d6ab6a73419e8fd1e9e38b2b3be8dab387a2fc119ced5eb35fa73ed9feb581 |
| @legacy 22be9ee0cf964afa8a4748c7c1ccfab5f0982a634e1905b6eef02024cf4f2bc6 internal/edge/demo.go Edge.redirectDemoRequest legacy accepted-legacy accepted-legacy;rev3=census-ruling-agent-start-demo-2;basis=demo.go:87-102 answers a plain-HTTP demo request with a 308 to the same host and path over HTTPS, with demo policy headers, only after the loaded Route, alias and serving checks pass; reads only the already-loaded Route (whole value), never dispatches, counts or opens anything.;rev3=census-ruling-agent-start-demo-3;basis=Serve signed moved notices at the demo redirect entry before redirecting; retain exact-host validation. Census read-site delta: unchanged (3).;rev3=census-ruling-linked-deployments-slice1;basis=linked deployments slice 1 Task 8: the upstream comes from selectUpstream(r, host, path), which is lookupUpstreamPath(host, path) unless the request carries a link pin (never on :80); same reads whole:Route@296,whole:Route@338,whole:Route@432 db1a9db900e5f41fd5f4696bd72bac7b7f038fcfce1beae6a2cd0c3465f431bb |
| @legacy 692b495a9271d335562f5eafe3992156fe67947a51a727bca8116f4e16f3eff9 internal/edge/demo_traffic.go Edge.serveDemoTraffic legacy accepted-legacy accepted-legacy;rev3=census-ruling-agent-start-demo-2;basis=demo_traffic.go:128-334 reads the resolved Route and passes it to existing admission, metering, rate and activator helpers. Resident serving checks precede the inert moved hook (:143), retirement and durable request debit (:302); output debits use the writer below compression. Forwarders do not count or transform again. Existing expiry/control cancellations and five-second write bounds apply; no request-path console or bucket read.;rev3=census-ruling-edge-page-cache-1;basis=attaches the in-memory page mark holder to a demo's request when the route is an instance (up.route.Kind, the +registry:Kind and +whole:Route sites), as ServeHTTP does; nothing else; final fix wave: also wraps the app's writer in the page diagnostics writer (pageDiagnostics(r, host, up).wrap(appWriter)), which sets Carlos-Cache: bypass on a marked response and records nothing; in memory, no read added;rev3=census-ruling-linked-deployments-slice1;basis=linked deployments slice 1 Task 3: the demo route's request header scrub also deletes tunnelclient.LinkAppHeader (Carlos-Link-App), the hub-set link publication header, beside the tunnel markers it already deletes; a header delete on the cloned request, no read added registry:App@2655,registry:DemoExpiresAt@1390,registry:Kind@6523,whole:Route@1089,whole:Route@1393,whole:Route@1532,whole:Route@1619,whole:Route@1742,whole:Route@223,whole:Route@2266,whole:Route@2582,whole:Route@2647,whole:Route@2658,whole:Route@2744,whole:Route@2840,whole:Route@2914,whole:Route@2961,whole:Route@3019,whole:Route@3048,whole:Route@3267,whole:Route@3298,whole:Route@3330,whole:Route@3703,whole:Route@375,whole:Route@4367,whole:Route@4417,whole:Route@4469,whole:Route@454,whole:Route@4708,whole:Route@5473,whole:Route@6016,whole:Route@6526,whole:Route@6974 e967e257733b9d3afe3c2cf256b9ff2156b9b1b593ef37fe97df6f132abfd77e |
| @@ -16,7 +16,8 @@ |
| @legacy 016a166915f0e50879425a00398d783afebf2c3f2b138fe7303689dc5be0933a internal/registry/registry.go Registry.migrate legacy accepted-legacy accepted-legacy;rev3=census-ruling-self-serve-moves-1;basis=the registry's SQLite side, as carlos: in the agent (/opt/carlos/carlos agent, carlos-edge.service) and in the registry child (carlos __registry-child, which a root pass forks as the service user), on every registry open; a box CLI verb that opens the registry directly runs it as whoever runs the verb: census-ruling-seeded-instances's body with two more columns added to routes (incarnation and serving_seq, INTEGER NOT NULL DEFAULT 0, idempotent through the duplicate-column rule); self-serve moves 1 Task 7;rev3=census-ruling-rootfs-apps-2;basis=one more ALTER TABLE, routes ADD COLUMN runtime TEXT NOT NULL DEFAULT '', beside main's rate_limit, assets_off, asset_gen, incarnation and serving_seq (the last four from the merges of origin/main 3c33f2eb and 953b9fda); the same sixteen sites, no read added;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328/#329 plan 1 Task 4: three more ALTER TABLE statements in the existing loop, routes ADD COLUMN egress_allow, size and policy_expires_at, each TEXT NOT NULL DEFAULT '' and idempotent through the duplicate-column rule; the same sixteen sites, no read added.;rev3=census-ruling-region-ha-p1a;basis=one more ALTER TABLE in the existing loop: routes ADD COLUMN ha INTEGER NOT NULL DEFAULT 0, idempotent through the duplicate-column rule; the same sixteen sites, no read added;rev3=census-ruling-ha-p1a-433;basis=the registry's SQLite side as carlos (agent, registry child; a box CLI verb that opens the registry directly runs it as whoever runs it), on every registry open: the ALTER TABLE routes statements are now built from the one migration definition routeAddedColumns (addedColumn name, type, default; review r1 P2): for each entry without the Claim mark, "ALTER TABLE routes ADD COLUMN " + spec(), byte for byte the statements main runs, in main's order, under the same duplicate-column rule. +registry:Claim is that mark, +whole:addedColumn the struct. Every name, type and default is an in-binary literal; no statement added, removed or changed; no read added.;rev3=census-ruling-regional-domains-447;basis=#447 Task 4: one more CREATE TABLE IF NOT EXISTS regional_domains (host TEXT PRIMARY KEY, target, account, app, region TEXT NOT NULL DEFAULT '', created_at INTEGER NOT NULL DEFAULT 0), beside wildcard_domains; the added sites are that statement (+file:Exec, +registry:sql), an in-binary literal; additive, no existing statement changed;rev3=census-ruling-region-ha-p1b3b-t;basis=Create local HA duty/replay tables and revision triggers in the existing registry connection; no new database path.;rev3=census-ruling-agent-start-demo-3;basis=Create moved-notice storage as a single (id, wire) row; fingerprints include the stored wire bytes. Census read-site delta: +file:Exec, +registry:sql.;rev3=census-ruling-linked-deployments-slice1;basis=linked deployments slice 1 Task 1: calls migrateLinks after migrateHADuties (one CREATE TABLE IF NOT EXISTS link_channels, an in-binary literal); additive, no existing statement changed; linked deployments slice 1 Task 7: also runs migrateHomeLink (CREATE TABLE IF NOT EXISTS home_link and home_link_apps) after migrateLinks; additive, the box's own registry database, as carlos file:Exec@1124,file:Exec@1855,file:Exec@212,file:Exec@2409,file:Exec@3347,file:Exec@3626,file:Exec@4489,file:Exec@4665,file:Exec@51,file:Exec@761,registry:Claim@686,registry:sql@1124,registry:sql@1855,registry:sql@212,registry:sql@2409,registry:sql@3347,registry:sql@3626,registry:sql@4489,registry:sql@4665,registry:sql@51,registry:sql@761,whole:addedColumn@661 63fc63e2dd8bcd22c23e590d7e79f2996c31e0edc94aa1da2d48646f99c64ef2 |
| @legacy f859ac9ca9fc6e6e2f12190382770c2913ea39e0dd915557aa75b5396d3925f6 internal/edge/edge.go Edge.pinnedUpstream legacy accepted-legacy accepted-legacy;rev3=census-ruling-linked-deployments-slice1;basis=linked deployments slice 1 Task 8: new; a linked request's upstream: the exact in-memory routing-map entry for the pinned home host, admitted only when its route is that host's own row for the pinned account and app, an instance, not forward, demo or sidecar, served from this box; reads the route fields of the map entry the last Reload built, no registry, file or bucket read registry:Account@435,registry:App@466,registry:Host@156,registry:Kind@331,whole:Route@146 9e26e286bc9973a11697c46766f19587f791fb83cf4275d3ed6df2d638ec03a8 |
| @legacy a10d080a12c01e05c132febd9e72b6656c340866c1749be14ba9e1f142d8e1ea internal/edge/fleetforward.go linkServeEligible legacy accepted-legacy accepted-legacy;rev3=census-ruling-linked-deployments-slice1;basis=linked deployments slice 1 Task 3: new pure rule for a link-placed forward row: refused off the hub, when not inert, when it carries a fleet box, label or replica set, when its link is not in the active link owners, or when its raw Account is empty or not the link's owner; reads only the row and the owners map registry:Account@567,registry:Account@636,registry:Account@720,registry:FleetBox@277,registry:FleetBoxes@321,registry:FleetLabel@298 e15bfdfc2c2928ccd325b8844346be778eb5e186bd7898c2f21bf84c7574dde7 |
| -@legacy f860132d57fd2caeb25fa014f4623c9f134f49fb7035abbee16294698ec8c4a0 internal/host/link_client.go linkLoopState.pass legacy accepted-legacy accepted-legacy;rev3=census-ruling-linked-deployments-slice1;basis=linked deployments slice 1 Task 8: new; the home link loop's pass: reads HomeLink and HomeLinkApps from the agent's own registry, claims an unclaimed link with ClaimHomeLink(label) unless this is a fleet box (tunnelEnvComplete), and starts, keeps or cancels the link's tunnel by link ID, token, tunnel URL, conn_gen and the published set; no file or bucket read, nothing executed; fix round 1: a run the link row alone shows obsolete (link ID, token, tunnel URL or conn_gen changed) is cancelled before HomeLinkApps is read, so a failing set read cannot hold a revoked connection open; stops record the link state as reconnecting (replaced), empty (unlinked, fleet box) or nothing (another box holds the claim); same reads registry:BoxLabel@1004,registry:BoxLabel@429,registry:BoxLabel@858,registry:BoxLabel@961,registry:ConnGen@1520,registry:ID@1260,registry:ID@1718,registry:ID@561,registry:ID@932,registry:Name@1838,registry:Token@1339,registry:TunnelURL@1424,whole:HomeLink@2215,whole:HomeLink@338,whole:HomeLink@644,whole:HomeLink@763,whole:HomeLinkApp@1799,whole:HomeLinkApp@1825,whole:HomeLinkApp@1834,whole:HomeLinkApp@1848,whole:HomeLinkApp@1904,whole:HomeLinkApp@1910,whole:HomeLinkApp@1991,whole:HomeLinkApp@1998,whole:HomeLinkApp@2221 fa7441cf65bde320d4f58c08d43f927e9e8868960b303700fd26358e3668b29c |
| +@legacy ee295a36717cc4064d71e186b1915b9185e4aa42bff4cd209e7b5c9b63d4511b internal/host/link_client.go linkLoopState.dropObsolete legacy accepted-legacy accepted-legacy;rev3=census-ruling-linked-deployments-slice1;basis=linked deployments slice 1 Task 8 fix round 2: new; compares the running tunnel's link ID, token, tunnel URL and conn_gen with the HomeLink row just read and stops (cancels first, then records the state) when they differ; records reconnecting only when this box's label holds the row; reads only the row already read, no registry, file or bucket read of its own registry:BoxLabel@129,registry:ConnGen@431,registry:ID@210,registry:Token@276,registry:TunnelURL@348 3f6749b7121d1effc9cee94b6aed37718a8e7701aae5cb648ad1198da97169c3 |
| +@legacy 4c89c17ca8c4b8ccb9bfdb1b045405188eef76131c0dd5f20dc66e7766754caf internal/host/link_client.go linkLoopState.pass legacy accepted-legacy accepted-legacy;rev3=census-ruling-linked-deployments-slice1;basis=linked deployments slice 1 Task 8: new; the home link loop's pass: reads HomeLink and HomeLinkApps from the agent's own registry, claims an unclaimed link with ClaimHomeLink(label) unless this is a fleet box (tunnelEnvComplete), and starts, keeps or cancels the link's tunnel by link ID, token, tunnel URL, conn_gen and the published set; no file or bucket read, nothing executed; fix round 1: a run the link row alone shows obsolete (link ID, token, tunnel URL or conn_gen changed) is cancelled before HomeLinkApps is read, so a failing set read cannot hold a revoked connection open; stops record the link state as reconnecting (replaced), empty (unlinked, fleet box) or nothing (another box holds the claim); same reads; fix round 2: the obsolete-run comparison moved into dropObsolete, called right after the link row is read and again after the claim's re-read, so a replaced, rotated or revoked link is closed before a claim, re-read or published-set read is attempted; same kind of reads (the HomeLink row passed whole) registry:BoxLabel@1077,registry:BoxLabel@1180,registry:BoxLabel@1223,registry:BoxLabel@625,registry:ID@1151,registry:ID@1398,registry:ID@757,registry:Name@1518,whole:HomeLink@1066,whole:HomeLink@1895,whole:HomeLink@338,whole:HomeLink@615,whole:HomeLink@840,whole:HomeLink@959,whole:HomeLinkApp@1479,whole:HomeLinkApp@1505,whole:HomeLinkApp@1514,whole:HomeLinkApp@1528,whole:HomeLinkApp@1584,whole:HomeLinkApp@1590,whole:HomeLinkApp@1671,whole:HomeLinkApp@1678,whole:HomeLinkApp@1901 c7f5a19669fc5e24a26d3b97456fd9af29e9aecf03f3c483fa630b1fc22eb6f3 |
| @legacy 2a3a9d15fb722558e494553cb2b35373b688a0cacc948a8714c4531c8743d25e internal/host/link_client.go linkLoopState.start legacy accepted-legacy accepted-legacy;rev3=census-ruling-linked-deployments-slice1;basis=linked deployments slice 1 Task 8: new; starts tunnelclient.Loop for the link (channel name from the link ID, the stored token and tunnel URL) serving linkHandler, and records its state with SetHomeLinkState while it is the running loop; no file or bucket read; fix round 1: the run is made current under the loop's lock before its tunnel starts, and its OnState goes through reportState, which writes SetHomeLinkState only while that run is still current; one fewer read site (the link ID in the state callback's log line moved to reportState) registry:ConnGen@221,registry:ID@167,registry:ID@337,registry:ID@416,registry:Token@183,registry:Token@642,registry:TunnelURL@200,registry:TunnelURL@425,registry:TunnelURL@596,whole:HomeLinkApp@237,whole:HomeLinkApp@254,whole:HomeLinkApp@454 db8518154691958ef28b923401c208758c03925d23c2ff64ffb291effe6c013a |
| @legacy e14481c06286c23fa3ff9f20d51f906ae9fdfb69c56063c28b1a4d59d44e66ae internal/host/link_client.go linkSetNarrowed legacy accepted-legacy accepted-legacy;rev3=census-ruling-linked-deployments-slice1;basis=linked deployments slice 1 Task 8: new; compares two in-memory published sets by name; no read whole:HomeLinkApp@112,whole:HomeLinkApp@130,whole:HomeLinkApp@135,whole:HomeLinkApp@92 acf871a54433606a3d9a43fdc646108df576a8d6b25bdf6f8bbfa15f8e2dbcc6 |
| @legacy 6ddce06ad2bfd7fc901dc0f2e9de3aaac45f241045fc6dfe185af49d82960d8e internal/host/link_handler.go linkHandler.ServeHTTP legacy accepted-legacy accepted-legacy;rev3=census-ruling-linked-deployments-slice1;basis=linked deployments slice 1 Task 8: new; the link channel's handler: reads the one Carlos-Link-App value, looks it up with HomeLinkAppByName in the agent's own registry on every request, refuses a missing or unpublished name with 404, and hands a published one to edge.ServeLinked with the row's home account, app and host; the request's Host never selects; no file or bucket read registry:HomeAccount@1279,registry:HomeAccount@705,registry:HomeApp@1301,registry:HomeApp@730,registry:HomeHost@1256,registry:HomeHost@683,whole:HomeLinkApp@669 4a5cacac0f6fba9392d40246171f2dd4d38dcc99dd29f2bfccb8f19fe94c49a8 |
| @@ -76,7 +77,8 @@ internal/registry/forward.go Registry.DeleteForward legacy accepted-legacy accep |
| internal/registry/registry.go Registry.migrate legacy accepted-legacy accepted-legacy;rev3=census-ruling-self-serve-moves-1;basis=the registry's SQLite side, as carlos: in the agent (/opt/carlos/carlos agent, carlos-edge.service) and in the registry child (carlos __registry-child, which a root pass forks as the service user), on every registry open; a box CLI verb that opens the registry directly runs it as whoever runs the verb: census-ruling-seeded-instances's body with two more columns added to routes (incarnation and serving_seq, INTEGER NOT NULL DEFAULT 0, idempotent through the duplicate-column rule); self-serve moves 1 Task 7;rev3=census-ruling-rootfs-apps-2;basis=one more ALTER TABLE, routes ADD COLUMN runtime TEXT NOT NULL DEFAULT '', beside main's rate_limit, assets_off, asset_gen, incarnation and serving_seq (the last four from the merges of origin/main 3c33f2eb and 953b9fda); the same sixteen sites, no read added;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328/#329 plan 1 Task 4: three more ALTER TABLE statements in the existing loop, routes ADD COLUMN egress_allow, size and policy_expires_at, each TEXT NOT NULL DEFAULT '' and idempotent through the duplicate-column rule; the same sixteen sites, no read added.;rev3=census-ruling-region-ha-p1a;basis=one more ALTER TABLE in the existing loop: routes ADD COLUMN ha INTEGER NOT NULL DEFAULT 0, idempotent through the duplicate-column rule; the same sixteen sites, no read added;rev3=census-ruling-ha-p1a-433;basis=the registry's SQLite side as carlos (agent, registry child; a box CLI verb that opens the registry directly runs it as whoever runs it), on every registry open: the ALTER TABLE routes statements are now built from the one migration definition routeAddedColumns (addedColumn name, type, default; review r1 P2): for each entry without the Claim mark, "ALTER TABLE routes ADD COLUMN " + spec(), byte for byte the statements main runs, in main's order, under the same duplicate-column rule. +registry:Claim is that mark, +whole:addedColumn the struct. Every name, type and default is an in-binary literal; no statement added, removed or changed; no read added.;rev3=census-ruling-regional-domains-447;basis=#447 Task 4: one more CREATE TABLE IF NOT EXISTS regional_domains (host TEXT PRIMARY KEY, target, account, app, region TEXT NOT NULL DEFAULT '', created_at INTEGER NOT NULL DEFAULT 0), beside wildcard_domains; the added sites are that statement (+file:Exec, +registry:sql), an in-binary literal; additive, no existing statement changed;rev3=census-ruling-region-ha-p1b3b-t;basis=Create local HA duty/replay tables and revision triggers in the existing registry connection; no new database path.;rev3=census-ruling-agent-start-demo-3;basis=Create moved-notice storage as a single (id, wire) row; fingerprints include the stored wire bytes. Census read-site delta: +file:Exec, +registry:sql.;rev3=census-ruling-linked-deployments-slice1;basis=linked deployments slice 1 Task 1: calls migrateLinks after migrateHADuties (one CREATE TABLE IF NOT EXISTS link_channels, an in-binary literal); additive, no existing statement changed; linked deployments slice 1 Task 7: also runs migrateHomeLink (CREATE TABLE IF NOT EXISTS home_link and home_link_apps) after migrateLinks; additive, the box's own registry database, as carlos file:Exec@1124,file:Exec@1855,file:Exec@212,file:Exec@2409,file:Exec@3347,file:Exec@3626,file:Exec@4489,file:Exec@4665,file:Exec@51,file:Exec@761,registry:Claim@686,registry:sql@1124,registry:sql@1855,registry:sql@212,registry:sql@2409,registry:sql@3347,registry:sql@3626,registry:sql@4489,registry:sql@4665,registry:sql@51,registry:sql@761,whole:addedColumn@661 63fc63e2dd8bcd22c23e590d7e79f2996c31e0edc94aa1da2d48646f99c64ef2 |
| internal/edge/edge.go Edge.pinnedUpstream legacy accepted-legacy accepted-legacy;rev3=census-ruling-linked-deployments-slice1;basis=linked deployments slice 1 Task 8: new; a linked request's upstream: the exact in-memory routing-map entry for the pinned home host, admitted only when its route is that host's own row for the pinned account and app, an instance, not forward, demo or sidecar, served from this box; reads the route fields of the map entry the last Reload built, no registry, file or bucket read registry:Account@435,registry:App@466,registry:Host@156,registry:Kind@331,whole:Route@146 9e26e286bc9973a11697c46766f19587f791fb83cf4275d3ed6df2d638ec03a8 |
| internal/edge/fleetforward.go linkServeEligible legacy accepted-legacy accepted-legacy;rev3=census-ruling-linked-deployments-slice1;basis=linked deployments slice 1 Task 3: new pure rule for a link-placed forward row: refused off the hub, when not inert, when it carries a fleet box, label or replica set, when its link is not in the active link owners, or when its raw Account is empty or not the link's owner; reads only the row and the owners map registry:Account@567,registry:Account@636,registry:Account@720,registry:FleetBox@277,registry:FleetBoxes@321,registry:FleetLabel@298 e15bfdfc2c2928ccd325b8844346be778eb5e186bd7898c2f21bf84c7574dde7 |
| -internal/host/link_client.go linkLoopState.pass legacy accepted-legacy accepted-legacy;rev3=census-ruling-linked-deployments-slice1;basis=linked deployments slice 1 Task 8: new; the home link loop's pass: reads HomeLink and HomeLinkApps from the agent's own registry, claims an unclaimed link with ClaimHomeLink(label) unless this is a fleet box (tunnelEnvComplete), and starts, keeps or cancels the link's tunnel by link ID, token, tunnel URL, conn_gen and the published set; no file or bucket read, nothing executed; fix round 1: a run the link row alone shows obsolete (link ID, token, tunnel URL or conn_gen changed) is cancelled before HomeLinkApps is read, so a failing set read cannot hold a revoked connection open; stops record the link state as reconnecting (replaced), empty (unlinked, fleet box) or nothing (another box holds the claim); same reads registry:BoxLabel@1004,registry:BoxLabel@429,registry:BoxLabel@858,registry:BoxLabel@961,registry:ConnGen@1520,registry:ID@1260,registry:ID@1718,registry:ID@561,registry:ID@932,registry:Name@1838,registry:Token@1339,registry:TunnelURL@1424,whole:HomeLink@2215,whole:HomeLink@338,whole:HomeLink@644,whole:HomeLink@763,whole:HomeLinkApp@1799,whole:HomeLinkApp@1825,whole:HomeLinkApp@1834,whole:HomeLinkApp@1848,whole:HomeLinkApp@1904,whole:HomeLinkApp@1910,whole:HomeLinkApp@1991,whole:HomeLinkApp@1998,whole:HomeLinkApp@2221 fa7441cf65bde320d4f58c08d43f927e9e8868960b303700fd26358e3668b29c |
| +internal/host/link_client.go linkLoopState.dropObsolete legacy accepted-legacy accepted-legacy;rev3=census-ruling-linked-deployments-slice1;basis=linked deployments slice 1 Task 8 fix round 2: new; compares the running tunnel's link ID, token, tunnel URL and conn_gen with the HomeLink row just read and stops (cancels first, then records the state) when they differ; records reconnecting only when this box's label holds the row; reads only the row already read, no registry, file or bucket read of its own registry:BoxLabel@129,registry:ConnGen@431,registry:ID@210,registry:Token@276,registry:TunnelURL@348 3f6749b7121d1effc9cee94b6aed37718a8e7701aae5cb648ad1198da97169c3 |
| +internal/host/link_client.go linkLoopState.pass legacy accepted-legacy accepted-legacy;rev3=census-ruling-linked-deployments-slice1;basis=linked deployments slice 1 Task 8: new; the home link loop's pass: reads HomeLink and HomeLinkApps from the agent's own registry, claims an unclaimed link with ClaimHomeLink(label) unless this is a fleet box (tunnelEnvComplete), and starts, keeps or cancels the link's tunnel by link ID, token, tunnel URL, conn_gen and the published set; no file or bucket read, nothing executed; fix round 1: a run the link row alone shows obsolete (link ID, token, tunnel URL or conn_gen changed) is cancelled before HomeLinkApps is read, so a failing set read cannot hold a revoked connection open; stops record the link state as reconnecting (replaced), empty (unlinked, fleet box) or nothing (another box holds the claim); same reads; fix round 2: the obsolete-run comparison moved into dropObsolete, called right after the link row is read and again after the claim's re-read, so a replaced, rotated or revoked link is closed before a claim, re-read or published-set read is attempted; same kind of reads (the HomeLink row passed whole) registry:BoxLabel@1077,registry:BoxLabel@1180,registry:BoxLabel@1223,registry:BoxLabel@625,registry:ID@1151,registry:ID@1398,registry:ID@757,registry:Name@1518,whole:HomeLink@1066,whole:HomeLink@1895,whole:HomeLink@338,whole:HomeLink@615,whole:HomeLink@840,whole:HomeLink@959,whole:HomeLinkApp@1479,whole:HomeLinkApp@1505,whole:HomeLinkApp@1514,whole:HomeLinkApp@1528,whole:HomeLinkApp@1584,whole:HomeLinkApp@1590,whole:HomeLinkApp@1671,whole:HomeLinkApp@1678,whole:HomeLinkApp@1901 c7f5a19669fc5e24a26d3b97456fd9af29e9aecf03f3c483fa630b1fc22eb6f3 |
| internal/host/link_client.go linkLoopState.start legacy accepted-legacy accepted-legacy;rev3=census-ruling-linked-deployments-slice1;basis=linked deployments slice 1 Task 8: new; starts tunnelclient.Loop for the link (channel name from the link ID, the stored token and tunnel URL) serving linkHandler, and records its state with SetHomeLinkState while it is the running loop; no file or bucket read; fix round 1: the run is made current under the loop's lock before its tunnel starts, and its OnState goes through reportState, which writes SetHomeLinkState only while that run is still current; one fewer read site (the link ID in the state callback's log line moved to reportState) registry:ConnGen@221,registry:ID@167,registry:ID@337,registry:ID@416,registry:Token@183,registry:Token@642,registry:TunnelURL@200,registry:TunnelURL@425,registry:TunnelURL@596,whole:HomeLinkApp@237,whole:HomeLinkApp@254,whole:HomeLinkApp@454 db8518154691958ef28b923401c208758c03925d23c2ff64ffb291effe6c013a |
| internal/host/link_client.go linkSetNarrowed legacy accepted-legacy accepted-legacy;rev3=census-ruling-linked-deployments-slice1;basis=linked deployments slice 1 Task 8: new; compares two in-memory published sets by name; no read whole:HomeLinkApp@112,whole:HomeLinkApp@130,whole:HomeLinkApp@135,whole:HomeLinkApp@92 acf871a54433606a3d9a43fdc646108df576a8d6b25bdf6f8bbfa15f8e2dbcc6 |
| internal/host/link_handler.go linkHandler.ServeHTTP legacy accepted-legacy accepted-legacy;rev3=census-ruling-linked-deployments-slice1;basis=linked deployments slice 1 Task 8: new; the link channel's handler: reads the one Carlos-Link-App value, looks it up with HomeLinkAppByName in the agent's own registry on every request, refuses a missing or unpublished name with 404, and hands a published one to edge.ServeLinked with the row's home account, app and host; the request's Host never selects; no file or bucket read registry:HomeAccount@1279,registry:HomeAccount@705,registry:HomeApp@1301,registry:HomeApp@730,registry:HomeHost@1256,registry:HomeHost@683,whole:HomeLinkApp@669 4a5cacac0f6fba9392d40246171f2dd4d38dcc99dd29f2bfccb8f19fe94c49a8 |
| @@ -121,9 +123,9 @@ internal/regionlabel/regionlabel.go ForRoute legacy accepted-legacy accepted-leg |
| 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;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Task 5, rule 3), merged with main's ErrNotForward refusals (kept unchanged): the written row also carries FleetLabel = rt.FleetLabel and FleetBox = rt.FleetLabel; its conflict arm (forwardKept) writes fleet_label from the call and fleet_box as the call's label when set, else kept while the region is unchanged. The hub's forward phase in the agent, not root.;rev3=census-ruling-stateless-replicas-1;basis=Carry declarative Stateless into forward rows under existing transaction and shape guards; projection only.;rev3=census-ruling-agent-start-demo-1;basis=Reads and carries the four demo fields in the existing forward INSERT; the guarded conflict SQL refuses downgrade or identity change.;rev3=census-ruling-stateless-replicas-2;basis=Validates canonical set projection, writes explicit declarative columns and clears single-box binding; all forbidden columns zero. Same transaction/read source. merge of origin/main 6be08467: Retain main demo columns and immutable descriptor conflict guard alongside set validation/projection; merge-only existing route fields.;rev3=census-ruling-linked-deployments-slice1;basis=linked deployments slice 1 Task 1: also accepts a Region that LinkPlacement parses (link/ + 12 hex), refusing a link row with a FleetLabel (ErrNotForward); the existing in-transaction SELECT also reads the held row's region and refuses a different placement class (ErrHostHeld); a link row additionally needs an active link_channels row of its account in the same transaction (linkAdmits, ErrLinkInactive). Same transaction and statement; the added reads are the argument and the box's own registry database, as carlos file:Exec@2052,file:QueryRow@1631,registry:Account@1092,registry:Account@1989,registry:App@1069,registry:Channel@1145,registry:Copies@1392,registry:DemoExpiresAt@960,registry:DemoHost@901,registry:DemoID@880,registry:DemoLifetime@928,registry:FleetBox@1513,registry:FleetBoxes@1369,registry:FleetBoxes@1490,registry:FleetLabel@1280,registry:FleetLabel@1310,registry:FleetLabel@1525,registry:FleetLabel@540,registry:Host@1693,registry:Host@250,registry:Host@287,registry:Host@500,registry:Host@660,registry:Host@993,registry:Kind@259,registry:RateLimit@1172,registry:Region@1119,registry:Region@130,registry:Region@1898,registry:Region@509,registry:Region@82,registry:ReplicaIncarnation@1460,registry:ReplicaRevision@1420,registry:Slug@1045,registry:Stateless@1340,registry:remote@737,registry:remote@767,whole:Route@2085,whole:Route@822,whole:Route@830,whole:remoteClient@739,whole:remoteClient@769 92749de50752ac228f653180d60ea0b177331657a7062598c8b877b35c694106 |
| internal/registry/registry.go Registry.Fingerprint legacy accepted-legacy accepted-legacy;rev3=census-ruling-self-serve-moves-1;basis=the registry's SQLite side, as carlos: in the agent (/opt/carlos/carlos agent, carlos-edge.service) and in the registry child (carlos __registry-child, which a root pass forks as the service user); the remote arm, unchanged, in the process that holds a remote handle: census-ruling-seeded-instances's body with the row's lifetime pair (incarnation, serving_seq) folded into the edge's change poll, each only when non-zero, so a registry with no pair digests as before; self-serve moves 1 Task 7;rev3=census-ruling-regional-domains-447;basis=#447 Task 4: hashes regional_domains (host, target, account, app, region; created_at not) over the same fresh connection, with a section marker written only when a row exists, so a registry with no regional rows digests as before; the one added site is that SELECT (+file:Query) on the box's own registry database, as carlos; no file path read;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): review R1 finding 1: the routes SELECT also reads host, kind, account, app, platform and fingerprintForwardInert (one CASE over the ForwardForbidden columns), and every row folds host, kind, account and app (tagged, quoted), platform when set, and forward_inert=0 for a forward row that is not inert, so a rowid reused by another hostname, an in-place account or app rewrite, or a stray forbidden column moves the edge's change poll. Same one SELECT per table on the same fresh connection to the box's own registry database, as carlos; no table, file or bucket read added; a digest, never a decision.;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Task 5): the SELECT also reads fleet_label and, only when it is set, hashes "fleet_label=<q>" into the digest, so labelling a row moves the edge's reload fingerprint. Read sites unchanged (33). Registry side, not root; an unlabelled registry's digest is byte-identical.;rev3=census-ruling-stateless-replicas-1;basis=Read the additive stateless projection in the existing registry SELECT and hash only when set; no new read source.;rev3=census-ruling-agent-start-demo-1;basis=Existing SELECT reads four more demo columns; only a marked row adds them to the hash, so ordinary hashes remain unchanged.;rev3=census-ruling-stateless-replicas-2;basis=Four additive projection columns join the existing routes SELECT and hash only when nonzero; no new query or file read. merge of origin/main 6be08467: Union main demo identity and expiry with replica columns in the same SELECT and hash; merge-only body change.;rev3=census-ruling-agent-start-demo-3;basis=Hash moved-notice wire bytes so notice-only changes invalidate an edge route snapshot. Census read-site delta: +file:QueryRow.;rev3=census-ruling-edge-page-cache-1;basis=selects the new pages_off column with the rest and folds "pages_off=1" into the hash only when set, as assets_off, so a registry that never sets it fingerprints as before; same routes SELECT, no new table; read sites unchanged (34); no read added;rev3=census-ruling-linked-deployments-slice1;basis=linked deployments slice 1 Task 1: hashes link_channels (link_id, account, token_hash, status, generation; connected, seen_at, seq and created_at not) over the same fresh connection, with a section marker written only when a row exists, so a registry with no links digests as before; the one added site is that SELECT (+file:Query) on the box's own registry database, as carlos; a digest, never a decision; linked deployments slice 1 Task 7: also folds home_link (id, serving_url, tunnel_url, the token's sha256 never the token, account, apps_domain, box_label, conn_gen; state and created_at not) and home_link_apps (name, home_account, home_app, home_host) through fingerprintHomeLink over the same fresh connection, each section marker written only when a row exists, so a registry with no link digests as before; no file path read; a digest, never a decision file:Exec@284,file:Open@188,file:Query@10785,file:Query@11990,file:Query@368,file:Query@6655,file:Query@7134,file:Query@8120,file:Query@8816,file:Query@9728,file:QueryRow@12907,registry:ClaimIncarnation@1729,registry:ClaimIncarnation@5563,registry:ClaimIncarnation@5640,registry:ClaimOwner@1773,registry:ClaimOwner@5764,registry:ClaimOwner@5829,registry:ClaimRowID@1792,registry:ClaimRowID@5856,registry:ClaimRowID@5922,registry:ClaimStamp@1754,registry:ClaimStamp@5673,registry:ClaimStamp@5737,registry:Incarnation@1848,registry:Incarnation@6143,registry:Incarnation@6207,registry:ServingSeq@1867,registry:ServingSeq@6234,registry:ServingSeq@6297,registry:Text@158,registry:path@207,registry:remote@55,registry:remote@87,whole:remoteClient@57,whole:remoteClient@89 992e25925704805387f5c460a886c0ee9ba7eb57a06aa5ca384e94b677ea491f |
| @coverage . 52c69727a1e337a47920a1c9f37d9808f1df8d14dbefd29db86f9892bdf10b7d |
| -@coverage internal/edge 9c0eb8a58548921c20de856c13fe990efd7902b15af404dcb6f57cd364f99182 |
| +@coverage internal/edge ae50155c5f75eecb67afd1070d65edbb6d0b8f9ad98f34b4e0da065b7c59e012 |
| @coverage internal/gate 17307a6623f6149db163fc8de9139f8d824b36d70d2da635c712aee3671e582a |
| -@coverage internal/host 18a1996c7aaeaddd6beaefb8197e80cb2c5818e92062ecb51c8943a1869b0e99 |
| +@coverage internal/host 9a1b98f6896147e930776114271105b245546a5b96551872002810ff9ae5403d |
| @coverage internal/provision 6c3f9188cfe17a2f7f87d78cf5f60e9104f5bcd55941947129a5bcea3e4c586c |
| @coverage internal/regionlabel 8d831085b7e3ce7bb1ea1f20f443b4529c5b7177de18e7c4889e4ca330aa6a00 |
| @coverage internal/registry d160203302b7508294b6568f2a452e32c64921b5b1a1196ec358ee1128e335ba |