| index 5260d266e..9a3b2eff3 100644 |
| --- a/internal/provision/testdata/plan14-root-reads-managed-fleets-1b.tsv |
| +++ b/internal/provision/testdata/plan14-root-reads-managed-fleets-1b.tsv |
| @@ -17,7 +17,7 @@ |
| @legacy 703ac9e03a2580df07f0caf0c03d98a5ead2c5b43a05a3ab708f5eaf6ee359e0 internal/activator/startrule.go ExecBackend.supersededEntries legacy accepted-legacy accepted-legacy;rev3=census-ruling-managed-fleets-1b;basis=new (Task 3): os.ReadDir of <DataDir>/.superseded/<host> (host checked by supersededHostDir: no separators, not . or ..), names sorted; absent is none, any other error returned. The agent's own data directory. Agent, not root. file:ReadDir@176 1bd4e1d569938d80cc0316dbb3169dd1a6b452aeba6a24179e40492242ceb8b7 |
| @legacy 96e4843961f7ec05d4502ea484d6a24cc312bafe6179cae5dfab7fdbea8c7b6d internal/activator/startrule.go localCopyNames legacy accepted-legacy accepted-legacy;rev3=census-ruling-managed-fleets-1b;basis=new (Task 3): os.ReadDir of the instance directory (to find .seed-sd_*.tmp leftovers) and os.Lstat of a fixed list of the copy's names (marker, db, -wal, -shm, litestream dirs, seed marker); Lstat follows nothing. Agent as carlos, not root. file:Lstat@517,file:ReadDir@266 8bbf81cdcab7e5d7db21e73ad21cbecc96e456325b176d817b02e73fccc6c71a |
| @legacy 64260bd6a23948742d528dc112705b79650558c91599c7d8a063969f21f189c5 internal/activator/wakeidentity.go FleetRecordFrom legacy accepted-legacy accepted-legacy;rev3=census-ruling-managed-fleets-1b;basis=new (controller ruling after branch review R1): returns the agent's record reader over a deployment store: one provision.GetRecord(ctx, s, rt.Account, rt.App, rt.Host), which refuses a body that disagrees with its path and a retired record; a nil store answers errNoRecordStore. The agent's own deployment store (bucket or store door), read-only. Agent, not root. registry:Account@283,registry:App@295,registry:Host@303 82ded91f7371fc6054f7137b92247144205eae46cc8946695154bd8a7eadaba9 |
| -@legacy d111c9786447b832b657441e66ef0c930a311bb924ca7618efa0016b7dee99a4 internal/activator/wakeidentity.go Service.routeCurrentUnderLease legacy accepted-legacy accepted-legacy;rev3=census-ruling-managed-fleets-1b;basis=new (controller ruling after branch review R1): doWake's one decision under the lease of whether rt is still this box's route and current: the box registry's row (a.Routes.Get) checked by leaseRouteChanged, then, only for a labelled row (rt.Assigned set) on a fleet box (a.FleetRecord set), one record read that must name a.FleetLabel at rt.Assigned; an unreadable record refuses (errRecordUnreadUnderLease). Answers an error or nil; writes nothing. Agent, not root; it only refuses. registry:Assigned@343,registry:Assigned@606,registry:Assigned@811,registry:Host@151,registry:Host@239,registry:Host@508,registry:Host@731,whole:Route@287,whole:Route@291,whole:Route@435 cc5cb8d50103f6e9e92e1b2c39cc3308c22630c7417c757518b62b16aebbe1f1 |
| +@legacy 1489d61ee2888308f81f10fa159904597bcc790ad7b4e3543e87cb25ba8377b8 internal/activator/wakeidentity.go Service.routeCurrentUnderLease legacy accepted-legacy accepted-legacy;rev3=census-ruling-managed-fleets-1b;basis=new (controller ruling after branch review R1, and Paul's R2 ruling): doWake's one decision under the lease of whether rt is still this box's route and current: the box registry's row (a.Routes.Get) checked by leaseRouteChanged; then, only for a labelled row (rt.Assigned set), by the box's fleet state a.Fleet: not on a fleet, nothing more; on a fleet with a known label, one record read that must name the label at rt.Assigned (an unreadable record or a nil reader refuses, errRecordUnreadUnderLease); on a fleet with an invalid identity, or any other state, a refusal naming the identity error (errFleetIdentityUnknown). Answers an error or nil; writes nothing. Agent, not root; it only refuses. registry:Assigned@1168,registry:Assigned@1368,registry:Assigned@343,registry:Host@1075,registry:Host@1293,registry:Host@151,registry:Host@239,registry:Host@666,registry:Host@799,registry:Host@918,whole:Route@1002,whole:Route@287,whole:Route@291 bdd858d661a65443a79fa473552c21991db8107404ff2a5d455b40ca5e68aa45 |
| @legacy 856c0aa2bc30e659dc31dd2be2c9a982af5602540cac1da82241084795159db6 internal/activator/wakeidentity.go leaseRouteChanged legacy accepted-legacy accepted-legacy;rev3=census-ruling-managed-fleets-1b;basis=new (branch review R1 P1-1): a pure comparison of the row a wake began from (began) with the row doWake read under the lease (now): nil now is a row that is gone; then wakeRouteChanged's identity checks; then Assigned and Moved; then Region. It answers an error naming the change, wrapping errRouteChangedUnderLease, or nil. No read beyond its arguments. Agent, not root; it only refuses. registry:Assigned@350,registry:Assigned@368,registry:Assigned@562,registry:Assigned@587,registry:Host@164,registry:Host@523,registry:Host@731,registry:Moved@384,registry:Moved@399,registry:Moved@576,registry:Moved@603,registry:Region@622,registry:Region@638,registry:Region@770,registry:Region@782,whole:Route@234,whole:Route@242,whole:Route@91 400dc18f833f75f03dd20890b57d43daf6da2c32eeb0994581196d86c2f298fe |
| @legacy 1db5b7254db5c5c0a54334a12b81c4481a9ca1dfe4ca9a567f7fabc27095ff93 internal/edge/edge.go fleetBoxOf legacy accepted-legacy accepted-legacy;rev3=census-ruling-managed-fleets-1b;basis=new (Task 5, rule 3): answers (t.FleetLabel, true) when the forward row's label is set, else (t.FleetBox, false). Pure function of the row. The edge in the agent, not root. registry:FleetBox@115,registry:FleetLabel@55,registry:FleetLabel@85 65482a633bd6f3f3b4e23f9655dbcdf503ca9e77833b48417530b0c08e2d6564 |
| @legacy 82e65476dda2d235493ff1a8feb317358ca13249852549e665e3dcb73f1cba30 internal/registry/fleets.go Registry.MarkFleetBoxLabelled legacy accepted-legacy accepted-legacy;rev3=census-ruling-managed-fleets-1b;basis=new (Task 6b): one UPDATE fleet_boxes SET labelled_at = ?, rev = rev + 1 for an active box not yet marked, then a SELECT 1 check; validates fleet and label (ValidTunnelName) and at > 0; remote form over the registry transport. Called by the console only (fleetrelabel.go, apiinstances.go). Not root. file:Exec@511,file:QueryRow@724,registry:remote@113,registry:remote@83,registry:sql@511,registry:sql@724,whole:remoteClient@115,whole:remoteClient@85 906fbe4515dbf94bcc9a66a46cbaec13e970d45330cd7efe15a8693de8d1521d |
| @@ -35,10 +35,10 @@ |
| @legacy a6ace0b354932db168db0dbd27b16c6fc68c522800f15d76ac53213929f59268 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-managed-fleets-1b;basis=managed fleets 1b (Task 5, rule 3): the two fleet proxy builds pass the row to fleetBoxOf(t) instead of reading t.FleetBox (-registry:FleetBox x2, +whole:Route x2); fleetBoxOf answers FleetLabel as authoritative when set, else FleetBox; an authoritative box has no fallback to another of the fleet's channels (503 errFleetDark instead). The edge in the agent, not root; it routes to fewer channels, never more. registry:Alias@23639,registry:Alias@23726,registry:Alias@24306,registry:Health@12592,registry:Health@12718,registry:Host@10273,registry:Host@10330,registry:Host@10366,registry:Host@11014,registry:Host@13201,registry:Host@13296,registry:Host@13584,registry:Host@13610,registry:Host@13662,registry:Host@18115,registry:Host@20022,registry:Host@20330,registry:Host@20357,registry:Host@21158,registry:Host@21730,registry:Host@24060,registry:Host@24109,registry:Host@4537,registry:Host@4591,registry:Host@4641,registry:Host@5508,registry:Kind@16451,registry:Kind@16473,registry:Prefix@21705,registry:Socket@11078,registry:Socket@20338,registry:Status@4462,registry:Target@21717,registry:Tunnel@8889,registry:Version@16432,registry:Version@16534,whole:RegionalDomain@24776,whole:Route@10421,whole:Route@10529,whole:Route@11134,whole:Route@130,whole:Route@13735,whole:Route@13799,whole:Route@13850,whole:Route@20390,whole:Route@20397,whole:Route@20493,whole:Route@21593,whole:Route@22761,whole:Route@24768,whole:Route@3217,whole:Route@3275,whole:Route@5537,whole:Route@6413,whole:Route@6521,whole:Route@8951,whole:RouteAlias@23610,whole:RoutePath@21136 9725995383ae7c27bb9643adfe93de08e486b3442870e32d116ecbce830a87d5 |
| @legacy 5014cf7b0b2ab31b3846237afbc69de77d8282627177fdf3326a0c2cffeb2f20 internal/registry/fleets.go Registry.migrateFleets legacy accepted-legacy accepted-legacy;rev3=J1,J4;basis=route-and-input;rev3=census-ruling-fleet-secrets-key;basis=fleet secrets key (#366): four more idempotent migration statements: ALTER TABLE fleets ADD COLUMN for secrets_pubkey, secrets_key_fp, secrets_key_set_at, secrets_key_set_by (duplicate column ignored) and CREATE UNIQUE INDEX IF NOT EXISTS fleets_secrets_key_fp ON fleets (secrets_key_fp) WHERE secrets_key_fp != ''; CREATE TABLE IF NOT EXISTS fleet_secrets_key_fps (fp primary key, fleet, account, at), the permanent reservation of every registered fingerprint to its fleet, and an idempotent backfill INSERT ... SELECT of the fleets rows' current non-empty fingerprints ON CONFLICT(fp) DO NOTHING; fixed SQL, no new read of any input;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Task 6b): two more idempotent statements, ALTER TABLE fleet_boxes ADD COLUMN draining_since INTEGER and labelled_at INTEGER (duplicate column ignored), the +file:Exec and +registry:sql sites. Fixed SQL, no input. Registry side, not root. file:Exec@1207,file:Exec@1699,file:Exec@1933,file:Exec@2471,file:Exec@2686,file:Exec@313,file:Exec@57,file:Exec@735,registry:sql@1207,registry:sql@1699,registry:sql@1933,registry:sql@2471,registry:sql@2686,registry:sql@313,registry:sql@57,registry:sql@735 7d2d5e945297abc2a6c97c2b75895e5c6602200a2bea505c4858f7d5a2d0da86 |
| internal/activator/activator.go Service.wake legacy accepted-legacy accepted-legacy;rev3=census-ruling-carlos-run;basis=Re-digested at the pre-land merge: the body includes main's own change under census ruling 292, with no further change from this branch. the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body; the stop now carries its reason for a run it interrupts (beginStopLocked's why argument); read sites unchanged, offsets moved;rev3=census-ruling-wake-latency-1;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=logs that timer's breakdown to the journal after a successful wake (w.steps.String(), e.host, w.wakeTook); no read added;rev3=census-ruling-plans-4d-lapse;basis=cancels a wake whose row the turned-off hook names, like a fence, unless it is a move's active probe (plans 4d). One more whole-row read: the row handed to the hook (a.disabled). Only refuses.;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Tasks 7 and 8: a refusal before the lease is reported once per change (noteRootfsRefusal) instead of a wake-failure event; the proc, generation and replica are installed through installProcLocked (which puts a resident under its lease watch before the fence); residency notes the outcome (noteResidentWakeLocked); same generation values;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R [pf R3.5]: the wake's context ceiling is wakeCeilingFor(e.route): the old 5 minutes for a binary row, 5 minutes plus runs.MaxTimeout for a rootfs row (room for a release inside the wake); new site +whole:Route (e.route to wakeCeilingFor, which reads Runtime only); no other change;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (branch review R1 P1-1): the wake's context is also cancelled before doWake when RetireExcept has marked the entry retired (e.retired, in memory under a.mu), as it is for a fence or a shutdown. Read sites unchanged (13). Agent, not root; it only refuses more. registry:Socket@7696,registry:Socket@7857,whole:Route@1047,whole:Route@2499,whole:Route@2590,whole:Route@2647,whole:Route@417,whole:Route@5944,whole:Route@7649,whole:Route@7698,whole:Route@7859,whole:Route@9182,whole:Route@9203 c61d54e942227517281b14652f2e04231961cfe327ab0d94762b0c34b146f4ce |
| -internal/activator/activator.go type Service authority B,C,D,F,J4 rev3=PROPOSED-seed; existing activator lifecycle and due-wake state plus owned seed exclusion and incarnation-keyed diagnostics; normal refusal and preparation ordering remain authoritative; PROPOSED-plans-2-box-limits adds the idleFor hook field, which only narrows idle windows;rev3=census-ruling-plans-4c-box-throttle;basis=gains the maxRunFor hook field beside idleFor (plans 4c). No read added.;rev3=census-ruling-plans-4d-lapse;basis=gains the disabledFor hook field beside maxRunFor (plans 4d). No read added.;rev3=census-ruling-remote-instance-metrics;basis=gains tenancySeq, hostTenants and hostMixed, in-memory fields for Tenancies; no read added;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos: one more field, markers (markerRetry: an atomic running flag and the last log time) for retryOwedMarkers; no read added; merge of origin/main d7ae1d76: main's fields are kept as main has them (census-ruling-remote-instance-metrics: tenancySeq, hostTenants, hostMixed); this branch's change is the same as above;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Tasks 7 and 8: new fields for rootfs admission (rootfsArmed, rootfsSwept), the per-host gate ask and refusal memo, and residency state (lister, backoff, start ceiling, cursor, test seam); no read;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R: one new field, releaseOps (host to the in-memory release record, under a.mu); no read;rev3=census-ruling-rootfs-apps-3-workers;basis=rootfs Plan 3 Group W: one new field, leaseNow (a clock seam for a worker start's headroom against the lease deadline, nil is the real clock); no read;rev3=census-ruling-region-ha-p1b2;basis=region HA P1b-2: gains the holder cache and its single-flight state; no read;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (controller ruling after branch review R1): two fields, FleetRecord (a func reading a labelled route's instance record from the deployment store; nil on a platform box) and FleetLabel (this box's fleet label), set by the agent before Start and read only by routeCurrentUnderLease. No read in the declaration. Agent, not root. 6978c147c156d9de7dbe4fdb2cc48f3c51e2ae175d3551461a8f0c677ac3e2a9 |
| +internal/activator/activator.go type Service authority B,C,D,F,J4 rev3=PROPOSED-seed; existing activator lifecycle and due-wake state plus owned seed exclusion and incarnation-keyed diagnostics; normal refusal and preparation ordering remain authoritative; PROPOSED-plans-2-box-limits adds the idleFor hook field, which only narrows idle windows;rev3=census-ruling-plans-4c-box-throttle;basis=gains the maxRunFor hook field beside idleFor (plans 4c). No read added.;rev3=census-ruling-plans-4d-lapse;basis=gains the disabledFor hook field beside maxRunFor (plans 4d). No read added.;rev3=census-ruling-remote-instance-metrics;basis=gains tenancySeq, hostTenants and hostMixed, in-memory fields for Tenancies; no read added;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos: one more field, markers (markerRetry: an atomic running flag and the last log time) for retryOwedMarkers; no read added; merge of origin/main d7ae1d76: main's fields are kept as main has them (census-ruling-remote-instance-metrics: tenancySeq, hostTenants, hostMixed); this branch's change is the same as above;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Tasks 7 and 8: new fields for rootfs admission (rootfsArmed, rootfsSwept), the per-host gate ask and refusal memo, and residency state (lister, backoff, start ceiling, cursor, test seam); no read;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R: one new field, releaseOps (host to the in-memory release record, under a.mu); no read;rev3=census-ruling-rootfs-apps-3-workers;basis=rootfs Plan 3 Group W: one new field, leaseNow (a clock seam for a worker start's headroom against the lease deadline, nil is the real clock); no read;rev3=census-ruling-region-ha-p1b2;basis=region HA P1b-2: gains the holder cache and its single-flight state; no read;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (controller ruling after branch review R1, and Paul's R2 ruling): one field, Fleet (activator.FleetWake: the box's fleet state, not on a fleet by default, on a fleet with a known label and a record reader, or on a fleet with an invalid identity), set by the agent before Start and read only by routeCurrentUnderLease. No read in the declaration. Agent, not root. 415ec6dae7f2367684d32f0fb69591dc54c0048a08699c46767aeb696d6611e2 |
| internal/activator/hawake.go ExecBackend.acquireClassified legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1a;basis=new: the acquire's classification: a legacy route (sidecar, hand-added or not an instance) takes lease.Acquire and refuses on an HA-format lock; otherwise isHA (a record read error fails the wake, never falls back to legacy); not HA takes lease.Acquire, and an HA-format lock there marks the host HA for good and continues; HA requires haContained before any lock request, then lease.AcquireHA with the same-box proof; held and refused leases map to errLeaseHeld and errLeaseRefused (leaseError); +registry:Host, +whole:Route x7;rev3=census-ruling-region-ha-p1b1;basis=region HA P1b-1: the HA acquire's Proofs gain OwnerTerminated (b.ownerTerminated(ctx, rt)) beside SameBoxEmpty; one more whole:Route site passes the route to ownerTerminated; nothing new is read; the proof is consulted only by hafresh.DecideAcquire for another box's expired HA lock;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Task 7, two-box fleet test): the two legacy acquires call b.acquireLegacy(ctx, prefix), which is acquireLegacyLease exactly when ExecBackend.LeaseIdentity is nil and LeaseTTL is 0 (the agent never sets them), otherwise lease.AcquireAs with that identity and TTL. The classification, the HA path and every refusal are unchanged. Read sites unchanged (9). Agent, not root. registry:Host@106,whole:Route@1137,whole:Route@1256,whole:Route@1301,whole:Route@1595,whole:Route@195,whole:Route@533,whole:Route@584,whole:Route@834 4f88f46a65d1a65a9c7cecf6ba7da4c3924eab47cf3406b5ffefc07e31bc4b3b |
| internal/host/agent.go provisionTickConfig legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-ha-p1a-433;basis=the agent (carlos-edge.service, user carlos) and the edges file loop's eligibility: the same CARLOS_POOLS read, now parsed by provision.ParseBoxPools (internal/provision, envelope re-pinned), the one parser boxPools also uses. "@shared" (provision.SharedPoolToken, never a valid pool name) is the shared "" pool; other tokens are literal as before; empty elements and repeats dropped. No read added.;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Task 4, rule 2): sets ReconcileConfig.FleetBox to the box's own fleet label from resolveFleetIdentity(getenv), only when the identity resolves and region == PlacementTarget(identity.Fleet); otherwise it stays "" (the box admits only unlabelled records). The same environment the fleet loops already read; read sites unchanged (2). Agent config, not root. data-literal@207,data-literal@248 86de660d3664f06ffdd19bf997ef6c8116c7d711f0a99e7dae16a38a1681e119 |
| -internal/host/agent.go runAgent authority B,C,D,F rev3=census-ruling-self-serve-moves-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): builds the box's lifetime judge once (newBoxJudge, nil with host claims on) and hands it to the seed placement, the moves and runs workers and every loop it starts; read sites unchanged, offsets moved; B,C,D,F authority retained; self-serve moves 1 Task 8: derives the box's lifetimes switch from the judge once (lifetimes := boxJudge != nil) and hands it to the edges file loop; read sites unchanged, offsets moved;rev3=census-ruling-plans-4d-lapse;basis=arms two more plans hooks from the same snapshot: e.SetPlanDisabledFor(planDisabledFor) beside SetPlanGovernedFor, and svc.SetDisabledFor(planDisabledRoute) beside SetMaxRunFor (plans 4d); the reads live in those units (plans-4d-units decision); read sites unchanged, offsets moved;rev3=census-ruling-rootfs-apps-2;basis=main's body as of the merge of origin/main 9b81d97b (with main's plan rate ceiling, edge request records, regional box names, self-serve moves plan 1, plans 4d-1 lapse and its other later changes under main's own census rulings) plus the rootfs placement wiring in the activator start: an agentRootfs built from eb.NestedOK, CARLOS_DEPLOYMENT_SINGLE_TENANT, CARLOS_POOLS, the claim flag, swapArming's answer, the control client's /ready/rootfs and, on a fleet box whose identity resolved, fleetOwnerCheck over the deploy store main already opens for the fleet label (fleetStore), then arm and armedRootfs.Store; this body reads nothing new itself; the closures it wires read later, at a rootfs wake and each status tick: GET /ready/rootfs over the control socket, NestedOK's checks, and release.FleetOwnerKey for the judged row's own account and this box's fleet from the deploy store;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328 plan 2 Tasks 7 and 11, #329 plan 3 Task 7 and plan 1 Task 7's policy cache: the control client is built once and handed to eb.Control, to the status tick (egressStatus) and to a new egressNudgeLoop goroutine; armSizeSource(svc, "/sys/fs/cgroup") after the activator Service; armPolicyCache() after armChangeIndex; statusLoop takes egressStatus. The reads are those units' own (decision rows); this body reads nothing new: the same five sites, offsets moved, in the agent; B,C,D,F authority retained.;rev3=census-ruling-remote-instance-metrics;basis=builds the metrics loop's owners closure (metricsOwners over the agent's registry, the activator and cgm.Leftover) when an activator exists and hands it to metricsLoop; reads nothing new itself;rev3=census-ruling-edge-asset-cache-3;basis=adds file:Statfs. runAgent keeps its authority (B,C,D,F). The new site is assetcache.Statfs, an exported assetcache.FS interface value (var Statfs FS = statfsFS{}), not a function value and not a call in runAgent: the ready hook passes it to armEdgeAssetCache as the store's filesystem, and armEdgeAssetCache calls its Space method on the configured data directory (dataDir(): $CARLOS_DATA_DIR, else /data), which calls unix.Statfs there (statfsFS.Space, accepted legacy at census-ruling-edge-asset-cache-2). No request-supplied pathname reaches it.;rev3=census-ruling-remote-metrics-nested;basis=main's body (merged origin/main acfa4f80, under main's own census rulings) plus: snapshots the nested layout (snapshotNestedUnits over /sys/fs/cgroup/carlos.slice/carlos-instances.slice) once at start, before the activator, and hands the metrics loop a unitSources struct (stamped units, routeHostNames, that root and the snapshot); reads nothing new itself;rev3=census-ruling-region-ha-p1a;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): wires region HA P1a into the activator: cfg.Record = haRecordFacts(openDeployStore, boxJudge) (the box's lifetime judge this body already builds with newBoxJudge, nil with host claims on; CI fix) and cfg.Self = lease.CurrentSelf; eb.Lifetimes (the process's lifetime index), eb.Registry, eb.StartupSwept (seedSweptAtStart.Load), eb.FilesStore from newProductionFilesStore (now lease.NewFilesStore, rootaws-loaded, a log line on failure) and lease.SetObligationDir(<data>/.ha-owed) (logged on failure; HA acquires then refuse); this body reads nothing new itself, the same five sites; the reads are those units' own (haRecordFacts and lease's SetObligationDir are new rows on this card); merge of origin/main d7ae1d76: main's own later changes to this body are kept as main has them, under main's rulings (census-ruling-remote-instance-metrics: the metricsOwners closure for metricsLoop; census-ruling-edge-asset-cache-3: the +file:Statfs site, assetcache.Statfs handed to the asset ready hook); this branch's change is the same as above;rev3=census-ruling-region-ha-p1b1;basis=region HA P1b-1: builds one termfence.Confirmer (Self from lease.CurrentSelf at each call, EC2 DescribeInstances method only, client from rootaws.LoadDefaultConfig with retries off, built lazily on first use) and sets eb.OwnerTerminated; this body reads nothing new itself, the same six sites;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 7: the startup Sweep literal hands its answer to startupSwept, which logs as before and, only on a clean sweep, marks rootfs admission swept (MarkRootfsSwept); same Sweep call, no read added;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (controller ruling after branch review R1): on a fleet box (identErr == nil) sets svc.FleetLabel = identity.Label and svc.FleetRecord = activator.FleetRecordFrom(fleetStore), the deployment store the fleet loops already opened (nil when it did not open, which refuses every labelled wake). Read sites unchanged (6). Agent, not root; a platform box is unchanged. file:Exec@17043,file:Open@1150,file:Statfs@43141,registry:App@11199,whole:Route@11191,whole:Route@27396 3340d4414334dc94ca754c78803c46f40fb3edf2e9dc45def5a62a1d75ff35ae |
| +internal/host/agent.go runAgent authority B,C,D,F rev3=census-ruling-self-serve-moves-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): builds the box's lifetime judge once (newBoxJudge, nil with host claims on) and hands it to the seed placement, the moves and runs workers and every loop it starts; read sites unchanged, offsets moved; B,C,D,F authority retained; self-serve moves 1 Task 8: derives the box's lifetimes switch from the judge once (lifetimes := boxJudge != nil) and hands it to the edges file loop; read sites unchanged, offsets moved;rev3=census-ruling-plans-4d-lapse;basis=arms two more plans hooks from the same snapshot: e.SetPlanDisabledFor(planDisabledFor) beside SetPlanGovernedFor, and svc.SetDisabledFor(planDisabledRoute) beside SetMaxRunFor (plans 4d); the reads live in those units (plans-4d-units decision); read sites unchanged, offsets moved;rev3=census-ruling-rootfs-apps-2;basis=main's body as of the merge of origin/main 9b81d97b (with main's plan rate ceiling, edge request records, regional box names, self-serve moves plan 1, plans 4d-1 lapse and its other later changes under main's own census rulings) plus the rootfs placement wiring in the activator start: an agentRootfs built from eb.NestedOK, CARLOS_DEPLOYMENT_SINGLE_TENANT, CARLOS_POOLS, the claim flag, swapArming's answer, the control client's /ready/rootfs and, on a fleet box whose identity resolved, fleetOwnerCheck over the deploy store main already opens for the fleet label (fleetStore), then arm and armedRootfs.Store; this body reads nothing new itself; the closures it wires read later, at a rootfs wake and each status tick: GET /ready/rootfs over the control socket, NestedOK's checks, and release.FleetOwnerKey for the judged row's own account and this box's fleet from the deploy store;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328 plan 2 Tasks 7 and 11, #329 plan 3 Task 7 and plan 1 Task 7's policy cache: the control client is built once and handed to eb.Control, to the status tick (egressStatus) and to a new egressNudgeLoop goroutine; armSizeSource(svc, "/sys/fs/cgroup") after the activator Service; armPolicyCache() after armChangeIndex; statusLoop takes egressStatus. The reads are those units' own (decision rows); this body reads nothing new: the same five sites, offsets moved, in the agent; B,C,D,F authority retained.;rev3=census-ruling-remote-instance-metrics;basis=builds the metrics loop's owners closure (metricsOwners over the agent's registry, the activator and cgm.Leftover) when an activator exists and hands it to metricsLoop; reads nothing new itself;rev3=census-ruling-edge-asset-cache-3;basis=adds file:Statfs. runAgent keeps its authority (B,C,D,F). The new site is assetcache.Statfs, an exported assetcache.FS interface value (var Statfs FS = statfsFS{}), not a function value and not a call in runAgent: the ready hook passes it to armEdgeAssetCache as the store's filesystem, and armEdgeAssetCache calls its Space method on the configured data directory (dataDir(): $CARLOS_DATA_DIR, else /data), which calls unix.Statfs there (statfsFS.Space, accepted legacy at census-ruling-edge-asset-cache-2). No request-supplied pathname reaches it.;rev3=census-ruling-remote-metrics-nested;basis=main's body (merged origin/main acfa4f80, under main's own census rulings) plus: snapshots the nested layout (snapshotNestedUnits over /sys/fs/cgroup/carlos.slice/carlos-instances.slice) once at start, before the activator, and hands the metrics loop a unitSources struct (stamped units, routeHostNames, that root and the snapshot); reads nothing new itself;rev3=census-ruling-region-ha-p1a;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): wires region HA P1a into the activator: cfg.Record = haRecordFacts(openDeployStore, boxJudge) (the box's lifetime judge this body already builds with newBoxJudge, nil with host claims on; CI fix) and cfg.Self = lease.CurrentSelf; eb.Lifetimes (the process's lifetime index), eb.Registry, eb.StartupSwept (seedSweptAtStart.Load), eb.FilesStore from newProductionFilesStore (now lease.NewFilesStore, rootaws-loaded, a log line on failure) and lease.SetObligationDir(<data>/.ha-owed) (logged on failure; HA acquires then refuse); this body reads nothing new itself, the same five sites; the reads are those units' own (haRecordFacts and lease's SetObligationDir are new rows on this card); merge of origin/main d7ae1d76: main's own later changes to this body are kept as main has them, under main's rulings (census-ruling-remote-instance-metrics: the metricsOwners closure for metricsLoop; census-ruling-edge-asset-cache-3: the +file:Statfs site, assetcache.Statfs handed to the asset ready hook); this branch's change is the same as above;rev3=census-ruling-region-ha-p1b1;basis=region HA P1b-1: builds one termfence.Confirmer (Self from lease.CurrentSelf at each call, EC2 DescribeInstances method only, client from rootaws.LoadDefaultConfig with retries off, built lazily on first use) and sets eb.OwnerTerminated; this body reads nothing new itself, the same six sites;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 7: the startup Sweep literal hands its answer to startupSwept, which logs as before and, only on a clean sweep, marks rootfs admission swept (MarkRootfsSwept); same Sweep call, no read added;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (controller ruling after branch review R1, and Paul's R2 ruling): sets svc.Fleet = fleetWakeFor(os.Getenv, identity, identErr, fleetStore) from the identity it already resolves once and the deployment store the fleet loops already opened, and logs an ERROR naming the identity error when the box is on a fleet with an invalid identity. fleetWakeFor reads CARLOS_REGION and CARLOS_FLEET from the same environment. Read sites unchanged (6). Agent, not root; a platform box is unchanged. file:Exec@17043,file:Open@1150,file:Statfs@43334,registry:App@11199,whole:Route@11191,whole:Route@27589 e90fef1c5e2f13c7e6a453caf07e0785ad6530403214cd318e9ea616b65e190d |
| internal/provision/reconcile.go Reconcile legacy accepted-legacy accepted-legacy;rev3=census-ruling-self-serve-moves-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos), from its reconcile loops: each listed record is observed through the box's lifetime judge (ObserveWith: the record, then its host incarnation slot) before the shape, channel and scope checks, a stale record is left out and an unjudgeable one protected; the removal phase observes a row's own record key when the pass holds none for it under that key, and deletes a held row whose record is gone or stale through DeleteIfHold; a nil judge (claims on) is main's body; registry read sites unchanged, offsets moved; fix round 1: the removal phase observes a row's own key only under an account the listing trusts, so a retired or unmaterialised account's row keeps record gone, and the pass arms its own context with the judge; Task 7: under a judge an existing provisioned row of the record's own app and account follows the existing-row rules (heldByVanishedPredecessor and retireHeldPredecessor's DeleteIfHold first, the record then minted on the same pass; the hold; installRowLifetime), each a separate write under the host's hold lock; registry read sites unchanged, offsets moved;rev3=census-ruling-instance-egress-sizes-328-329;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=#328/#329 plan 1 Task 7: the pass reads its apps' policy objects (control/app-policy/<sqid>/<app>.json in the bucket) through the agent's PolicyCache, each verified with ReleasePub by apppolicy.VerifyKey (ed25519 over the policy's own domain line, bound to the account and app, unexpired, not future-dated; anything else is no policy), and carries the columns into its rows. New kinds registry:EgressAllow, registry:Size and registry:PolicyExpiresAt, one site each, all the assignment of a fresh row's columns (nr) from policies.cols; plus one whole:Route site, the existing row handed to policies.forRow. Other read sites unchanged, offsets moved; the agent's own pass, no root decision;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos, from its reconcile loops: after the scan, hands the in-scope records to cfg.Lifetimes (the box's lifetime index): Merge after a failed read or partial listing, Replace after a complete one, nothing on a dry run or with no index; the scan, judge and removal phases unchanged; the same 166 sites, no read added;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Tasks 2 and 5 (D5, spec §5.0): a seeded record over a row with a runtime is skipped and logged; a row with a runtime (or a new record with one) takes no seed; runtime and a rootfs row's hibernation are never converged from a record (a mismatch is logged; a record claiming a runtime its row lacks is not applied); reads Runtime of the record and the row; the box writes less; fix wave 1 (ceea6353, whole-branch P1-2): before minting a row for a record with no runtime and no row (both mint paths), the pass reads the app's kind marker once per app per pass (release.ReadAppKindMarker: one GET of the create-only kind.json from the release store s, through freshStore, validated by readAppKindMarker); a rootfs marker leaves the record unmaterialized and logged (an older console stripped its runtime), and a marker that cannot be read defers the mint this pass; a refusal before minting only, registry read sites unchanged, the box writes less; fix wave 2 (whole-branch r2 P1): the kind-marker read and its refusal apply only to a socket-backed instance record (DerivesPaths), so a static or upstream-backed record of a rootfs app, which carries no runtime by design, is minted as before with no read; fewer reads, registry read sites unchanged;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 10: the forward phase on the hub (FleetOwners set): the scan keeps the fleet-placed records it skips and counts records per host; a trash-only marker prefetch; disputed (failed-GET) hosts; armed, a host an in-scope and a fleet record both name is given neither, its journal waits and the removal phase keeps its row (+registry:Account, +registry:App, +registry:Host x2: the collision guard, its log line and report mark); the instance loop leaves a forward host; retirable excludes forward rows. Same record keys; writes only the registry (PutForward, DeleteForward); no bucket write.;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Task 4, rules 2 and 9): after inScope, a record failing cfg.ownsRecord (on a fleet box, labelled for another box: rec.FleetBox != "" and != cfg.FleetBox) is skipped as out of scope, so it is never minted here; in the removal phase such a record no longer keeps the row (inScope && ownsRecord), so the row goes as record gone. Off a fleet ownsRecord is always true. Read sites unchanged (178). The agent's reconcile loops, not root; it mints less, never more. registry:Account@36563,registry:Account@37828,registry:Account@55907,registry:Account@55953,registry:Account@56797,registry:Account@57174,registry:Account@57400,registry:Account@57467,registry:Account@57513,registry:Account@57606,registry:Account@57648,registry:Account@58296,registry:Account@58554,registry:Account@59285,registry:Account@59333,registry:Account@59742,registry:Account@59788,registry:Account@60033,registry:Account@60458,registry:Account@60946,registry:Account@61682,registry:Account@61875,registry:Account@62221,registry:Account@62786,registry:App@36536,registry:App@37801,registry:App@55927,registry:App@55965,registry:App@56809,registry:App@57186,registry:App@57412,registry:App@57487,registry:App@57525,registry:App@57626,registry:App@58308,registry:App@58566,registry:App@59297,registry:App@59345,registry:App@59762,registry:App@59800,registry:App@60045,registry:App@60470,registry:App@60958,registry:App@61694,registry:App@61887,registry:App@62233,registry:App@62798,registry:ClaimOwnership@37150,registry:DBPath@46007,registry:DBPath@46022,registry:DBPath@46268,registry:DBPath@46871,registry:DBPath@46884,registry:EgressAllow@35649,registry:Gate@42352,registry:Gate@42492,registry:Gate@42779,registry:Hibernate@41024,registry:Hibernate@41222,registry:Hibernate@41287,registry:Hibernate@41626,registry:Hibernate@41977,registry:Hibernate@42287,registry:HoldOp@61427,registry:HoldOp@61518,registry:HoldOp@61653,registry:HoldOp@62029,registry:Host@26749,registry:Host@55886,registry:Host@56773,registry:Host@57150,registry:Host@57314,registry:Host@57420,registry:Host@58316,registry:Host@58522,registry:Host@59625,registry:Host@59897,registry:Host@60012,registry:Host@60335,registry:Host@60432,registry:Host@60823,registry:Host@60920,registry:Host@61134,registry:Host@61509,registry:Host@61644,registry:Host@61848,registry:Host@61921,registry:Host@62020,registry:Host@62195,registry:Host@62270,registry:Host@62356,registry:Host@62763,registry:Kind@37292,registry:Kind@37555,registry:Kind@45925,registry:Kind@45938,registry:Kind@46048,registry:Kind@46061,registry:Kind@46782,registry:Kind@46793,registry:Kind@55010,registry:Kind@61125,registry:Kind@61635,registry:Kind@62011,registry:Kind@62186,registry:Kind@62347,registry:PolicyExpiresAt@35674,registry:Pool@55096,registry:Provisioned@36512,registry:Provisioned@37777,registry:Provisioned@55055,registry:RateLimit@42865,registry:RateLimit@43016,registry:RateLimit@43303,registry:Region@55085,registry:Replication@41711,registry:Replication@41838,registry:Runtime@29314,registry:Runtime@29492,registry:Runtime@31697,registry:Runtime@40391,registry:Runtime@40445,registry:Runtime@40649,registry:Seed@44405,registry:SeedSource@43888,registry:Size@35665,registry:Socket@45973,registry:Socket@45988,registry:Socket@46285,registry:Socket@46841,registry:Socket@46854,registry:Unit@45891,registry:Unit@45904,registry:Unit@46808,registry:Unit@46819,whole:ClaimOwnership@37153,whole:ClaimOwnership@37170,whole:Route@26731,whole:Route@26742,whole:Route@26760,whole:Route@27949,whole:Route@29809,whole:Route@29816,whole:Route@29856,whole:Route@30217,whole:Route@30555,whole:Route@31002,whole:Route@31053,whole:Route@31090,whole:Route@32762,whole:Route@32971,whole:Route@33310,whole:Route@33319,whole:Route@33365,whole:Route@35598,whole:Route@36157,whole:Route@36628,whole:Route@36638,whole:Route@36995,whole:Route@37002,whole:Route@37070,whole:Route@37393,whole:Route@38426,whole:Route@41377,whole:Route@46117,whole:Route@47703,whole:Route@47748,whole:Route@47758,whole:Route@48628,whole:Route@49655,whole:Route@55121,whole:Route@55269,whole:Route@56366,whole:Route@56725,whole:Route@57107,whole:Route@62108,whole:Route@62693,whole:Route@62743 ae12f8f6b360ea5015ea05fcffad003a8f01ec8939f5df6c6b0548e17a558325 |
| internal/provision/reconcile.go RouteFor authority C,E3 rev3=census-ruling-self-serve-moves-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos); also root, in the claim root's landing registration (ClaimRootHTTP.rootLandingRoute) and the relocation install (relocationRecord): census-ruling-seeded-instances's body with two more fields from the record: the row's lifetime pair (rec.Incarnation, rec.MoveSeq), so a row minted outside a move takes the record's lifetime and its last move's sequence (0, 0 for a fieldless record with no move history); every caller gets it, the root ones included: the root callers (ClaimRootHTTP.rootLandingRoute, relocationRecord) now mint (0, move_seq) on a claims-on record, a non-zero sequence once that record has had an offline move (move_seq advances on claims-on offline moves too), which moves Fingerprint and SnapshotFingerprint once for that row; main's C,E3 authority retained; self-serve moves 1 Task 7 (fix round 1: root callers named);rev3=census-ruling-region-ha-p1a;basis=the agent's reconcile passes, and also root's callers (rootupdates.go, rootinventory_install.go and relocationinstall.go on HEAD): one more field copied from the record, HA: rec.HA, so a row minted from a record stamped HA carries the sticky born-HA mark; the record is the console-written instance record each caller already read; root's own code reads nothing of Route.HA, and Fingerprint does not include it (SnapshotFingerprint does, for a set mark); the same nine sites, no read added;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 2: the row is minted with the record's Runtime (the console-written instance record, guarded by WriteRecord's runtimeFixed); a rootfs row always gets the nested socket and db path under dataDir and no seed or seed source; the paths are computed from the host, not read from the record;rev3=census-ruling-fresh-box-446;basis=#446: a born-HA record mints the nested paths whatever nested says, as a rootfs row already does; same reads;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Task 2, rule 6): the route also carries Assigned = rec.FleetBoxAt and Moved = rec.FleetBoxMoved, copied from the record it is handed. Read sites unchanged (13). In the agent; in root's claim landing registration (ClaimRootHTTP.rootLandingRoute, shelved claims code) the canonical route gains these two copied fields, which no root check compares (the comparison at rootinventory.go and ValidateAgentInventory read neither). No new input to root. registry:Addr@2700,registry:Addrs@2709,registry:DBPath@1673,registry:DBPath@2196,registry:DBPath@2618,registry:Health@2719,registry:Hibernate@2140,registry:Seed@2664,registry:SeedSource@2673,registry:Socket@1635,registry:Socket@2158,registry:Socket@2581,whole:Route@2757 4c187a903f969750a510d339c63c6ef9a40504e8e04be91c60d63656dd38e037 |
| internal/provision/seedreconcile.go retireAbortedSeedRow legacy accepted-legacy accepted-legacy;rev3=census-ruling-seeded-instances;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): retires the row this box minted for a --from seed that was aborted after its publish landed, through the pass's ordinary retire, once it is shown to be the record's own provisioned row in scope;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 10 (Task 7 carry): its guard adds rt.IsForward(), so a forward row is never handed to the aborted-seed retirement; read sites unchanged (15); it retires less, never more.;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Task 4): its guard adds !cfg.ownsRecord(rec), so a seed of a record labelled for another fleet box is left aborted and not retired here. Read sites unchanged (15); it retires less, never more. Agent, not root. registry:Account@275,registry:App@304,registry:Host@1108,registry:Host@521,registry:Host@785,registry:Host@959,registry:Kind@1099,registry:Kind@129,registry:Kind@776,registry:Kind@950,registry:Pool@216,registry:Provisioned@174,registry:Region@205,whole:Route@241,whole:Route@856 0e2da8776a317dd66895990101561a41b6fe06a312b3a9ef2381f1e99d0b0ae4 |
| @@ -53,7 +53,7 @@ internal/activator/startrule.go ExecBackend.startAllowed legacy accepted-legacy |
| internal/activator/startrule.go ExecBackend.supersededEntries legacy accepted-legacy accepted-legacy;rev3=census-ruling-managed-fleets-1b;basis=new (Task 3): os.ReadDir of <DataDir>/.superseded/<host> (host checked by supersededHostDir: no separators, not . or ..), names sorted; absent is none, any other error returned. The agent's own data directory. Agent, not root. file:ReadDir@176 1bd4e1d569938d80cc0316dbb3169dd1a6b452aeba6a24179e40492242ceb8b7 |
| internal/activator/startrule.go localCopyNames legacy accepted-legacy accepted-legacy;rev3=census-ruling-managed-fleets-1b;basis=new (Task 3): os.ReadDir of the instance directory (to find .seed-sd_*.tmp leftovers) and os.Lstat of a fixed list of the copy's names (marker, db, -wal, -shm, litestream dirs, seed marker); Lstat follows nothing. Agent as carlos, not root. file:Lstat@517,file:ReadDir@266 8bbf81cdcab7e5d7db21e73ad21cbecc96e456325b176d817b02e73fccc6c71a |
| internal/activator/wakeidentity.go FleetRecordFrom legacy accepted-legacy accepted-legacy;rev3=census-ruling-managed-fleets-1b;basis=new (controller ruling after branch review R1): returns the agent's record reader over a deployment store: one provision.GetRecord(ctx, s, rt.Account, rt.App, rt.Host), which refuses a body that disagrees with its path and a retired record; a nil store answers errNoRecordStore. The agent's own deployment store (bucket or store door), read-only. Agent, not root. registry:Account@283,registry:App@295,registry:Host@303 82ded91f7371fc6054f7137b92247144205eae46cc8946695154bd8a7eadaba9 |
| -internal/activator/wakeidentity.go Service.routeCurrentUnderLease legacy accepted-legacy accepted-legacy;rev3=census-ruling-managed-fleets-1b;basis=new (controller ruling after branch review R1): doWake's one decision under the lease of whether rt is still this box's route and current: the box registry's row (a.Routes.Get) checked by leaseRouteChanged, then, only for a labelled row (rt.Assigned set) on a fleet box (a.FleetRecord set), one record read that must name a.FleetLabel at rt.Assigned; an unreadable record refuses (errRecordUnreadUnderLease). Answers an error or nil; writes nothing. Agent, not root; it only refuses. registry:Assigned@343,registry:Assigned@606,registry:Assigned@811,registry:Host@151,registry:Host@239,registry:Host@508,registry:Host@731,whole:Route@287,whole:Route@291,whole:Route@435 cc5cb8d50103f6e9e92e1b2c39cc3308c22630c7417c757518b62b16aebbe1f1 |
| +internal/activator/wakeidentity.go Service.routeCurrentUnderLease legacy accepted-legacy accepted-legacy;rev3=census-ruling-managed-fleets-1b;basis=new (controller ruling after branch review R1, and Paul's R2 ruling): doWake's one decision under the lease of whether rt is still this box's route and current: the box registry's row (a.Routes.Get) checked by leaseRouteChanged; then, only for a labelled row (rt.Assigned set), by the box's fleet state a.Fleet: not on a fleet, nothing more; on a fleet with a known label, one record read that must name the label at rt.Assigned (an unreadable record or a nil reader refuses, errRecordUnreadUnderLease); on a fleet with an invalid identity, or any other state, a refusal naming the identity error (errFleetIdentityUnknown). Answers an error or nil; writes nothing. Agent, not root; it only refuses. registry:Assigned@1168,registry:Assigned@1368,registry:Assigned@343,registry:Host@1075,registry:Host@1293,registry:Host@151,registry:Host@239,registry:Host@666,registry:Host@799,registry:Host@918,whole:Route@1002,whole:Route@287,whole:Route@291 bdd858d661a65443a79fa473552c21991db8107404ff2a5d455b40ca5e68aa45 |
| internal/activator/wakeidentity.go leaseRouteChanged legacy accepted-legacy accepted-legacy;rev3=census-ruling-managed-fleets-1b;basis=new (branch review R1 P1-1): a pure comparison of the row a wake began from (began) with the row doWake read under the lease (now): nil now is a row that is gone; then wakeRouteChanged's identity checks; then Assigned and Moved; then Region. It answers an error naming the change, wrapping errRouteChangedUnderLease, or nil. No read beyond its arguments. Agent, not root; it only refuses. registry:Assigned@350,registry:Assigned@368,registry:Assigned@562,registry:Assigned@587,registry:Host@164,registry:Host@523,registry:Host@731,registry:Moved@384,registry:Moved@399,registry:Moved@576,registry:Moved@603,registry:Region@622,registry:Region@638,registry:Region@770,registry:Region@782,whole:Route@234,whole:Route@242,whole:Route@91 400dc18f833f75f03dd20890b57d43daf6da2c32eeb0994581196d86c2f298fe |
| internal/edge/edge.go fleetBoxOf legacy accepted-legacy accepted-legacy;rev3=census-ruling-managed-fleets-1b;basis=new (Task 5, rule 3): answers (t.FleetLabel, true) when the forward row's label is set, else (t.FleetBox, false). Pure function of the row. The edge in the agent, not root. registry:FleetBox@115,registry:FleetLabel@55,registry:FleetLabel@85 65482a633bd6f3f3b4e23f9655dbcdf503ca9e77833b48417530b0c08e2d6564 |
| internal/registry/fleets.go Registry.MarkFleetBoxLabelled legacy accepted-legacy accepted-legacy;rev3=census-ruling-managed-fleets-1b;basis=new (Task 6b): one UPDATE fleet_boxes SET labelled_at = ?, rev = rev + 1 for an active box not yet marked, then a SELECT 1 check; validates fleet and label (ValidTunnelName) and at > 0; remote form over the registry transport. Called by the console only (fleetrelabel.go, apiinstances.go). Not root. file:Exec@511,file:QueryRow@724,registry:remote@113,registry:remote@83,registry:sql@511,registry:sql@724,whole:remoteClient@115,whole:remoteClient@85 906fbe4515dbf94bcc9a66a46cbaec13e970d45330cd7efe15a8693de8d1521d |
| @@ -74,9 +74,9 @@ internal/activator/backend_exec.go ExecBackend.restorePlain legacy accepted-lega |
| 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-managed-fleets-1b;basis=managed fleets 1b (Task 5, rule 3): the two fleet proxy builds pass the row to fleetBoxOf(t) instead of reading t.FleetBox (-registry:FleetBox x2, +whole:Route x2); fleetBoxOf answers FleetLabel as authoritative when set, else FleetBox; an authoritative box has no fallback to another of the fleet's channels (503 errFleetDark instead). The edge in the agent, not root; it routes to fewer channels, never more. registry:Alias@23639,registry:Alias@23726,registry:Alias@24306,registry:Health@12592,registry:Health@12718,registry:Host@10273,registry:Host@10330,registry:Host@10366,registry:Host@11014,registry:Host@13201,registry:Host@13296,registry:Host@13584,registry:Host@13610,registry:Host@13662,registry:Host@18115,registry:Host@20022,registry:Host@20330,registry:Host@20357,registry:Host@21158,registry:Host@21730,registry:Host@24060,registry:Host@24109,registry:Host@4537,registry:Host@4591,registry:Host@4641,registry:Host@5508,registry:Kind@16451,registry:Kind@16473,registry:Prefix@21705,registry:Socket@11078,registry:Socket@20338,registry:Status@4462,registry:Target@21717,registry:Tunnel@8889,registry:Version@16432,registry:Version@16534,whole:RegionalDomain@24776,whole:Route@10421,whole:Route@10529,whole:Route@11134,whole:Route@130,whole:Route@13735,whole:Route@13799,whole:Route@13850,whole:Route@20390,whole:Route@20397,whole:Route@20493,whole:Route@21593,whole:Route@22761,whole:Route@24768,whole:Route@3217,whole:Route@3275,whole:Route@5537,whole:Route@6413,whole:Route@6521,whole:Route@8951,whole:RouteAlias@23610,whole:RoutePath@21136 9725995383ae7c27bb9643adfe93de08e486b3442870e32d116ecbce830a87d5 |
| internal/registry/fleets.go Registry.migrateFleets legacy accepted-legacy accepted-legacy;rev3=J1,J4;basis=route-and-input;rev3=census-ruling-fleet-secrets-key;basis=fleet secrets key (#366): four more idempotent migration statements: ALTER TABLE fleets ADD COLUMN for secrets_pubkey, secrets_key_fp, secrets_key_set_at, secrets_key_set_by (duplicate column ignored) and CREATE UNIQUE INDEX IF NOT EXISTS fleets_secrets_key_fp ON fleets (secrets_key_fp) WHERE secrets_key_fp != ''; CREATE TABLE IF NOT EXISTS fleet_secrets_key_fps (fp primary key, fleet, account, at), the permanent reservation of every registered fingerprint to its fleet, and an idempotent backfill INSERT ... SELECT of the fleets rows' current non-empty fingerprints ON CONFLICT(fp) DO NOTHING; fixed SQL, no new read of any input;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Task 6b): two more idempotent statements, ALTER TABLE fleet_boxes ADD COLUMN draining_since INTEGER and labelled_at INTEGER (duplicate column ignored), the +file:Exec and +registry:sql sites. Fixed SQL, no input. Registry side, not root. file:Exec@1207,file:Exec@1699,file:Exec@1933,file:Exec@2471,file:Exec@2686,file:Exec@313,file:Exec@57,file:Exec@735,registry:sql@1207,registry:sql@1699,registry:sql@1933,registry:sql@2471,registry:sql@2686,registry:sql@313,registry:sql@57,registry:sql@735 7d2d5e945297abc2a6c97c2b75895e5c6602200a2bea505c4858f7d5a2d0da86 |
| @coverage . 72c07efa951bb35eac60f704e1afeb7da4224608ced01e395f9fd433c4ee5374 |
| -@coverage internal/activator 5da685ac59810f875045024ef5a06c1e44070e666c978c0919eb5f6cd845c78e |
| +@coverage internal/activator e4b12ea58c39000f84f3c687891933573b64d0cbcf4c45e22f3cb39a9124b651 |
| @coverage internal/edge 095d70162367b564b90e8b1361d42fad0fd01c5779062098cf2a0446b72c575d |
| -@coverage internal/host 7bc18dca53c5776d97abd9c7c7208c90b040f95c810f7d8734351bd3df3afa04 |
| +@coverage internal/host 6cf3cb862ebba88827c26b18dee152c4a85d6ff397e9ebecebaffdee734bea5b |
| @coverage internal/lease 772314b303f47818872d5540226c4043508b9849dbfcc4a2edf2ed90ff5ce4b7 |
| @coverage internal/provision 9600992800511e93ba9b756c2fa12c00a5e499530c4c2fa054003cca642e5601 |
| @coverage internal/registry 25b3f1d118d7c64b1c8255e8dacb204ffed1a37b87dcdebbd28d0aaa10aeb718 |