carlos / platform Public

census: re-propose stateless-replicas-4-drill3 with the R24 drain (#511)

Adds runAgent (the tunnel drain channel, closed in the edge's existing
shutdown-started callback; no read added) to the drill 3 overlay, and
re-pins the internal/edge, internal/host and internal/tunnelclient
envelopes. make census-card is clean (seal 8d1de8d6).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 03458374c621509b7b0840260839f058209e84cc parent 1650e31
2 files changed, +8 −3
  • docs/superpowers/notes/census-proposal-stateless-replicas-4-drill3.md +3 −1
  • internal/provision/testdata/plan14-root-reads-stateless-replicas-4-drill3.tsv +5 −2

CI failed — run details

Intent

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

diff --git a/docs/superpowers/notes/census-proposal-stateless-replicas-4-drill3.md b/docs/superpowers/notes/census-proposal-stateless-replicas-4-drill3.md
index c19892a36..149d1ba4b 100644
--- a/docs/superpowers/notes/census-proposal-stateless-replicas-4-drill3.md
+++ b/docs/superpowers/notes/census-proposal-stateless-replicas-4-drill3.md
@@ -6,9 +6,10 @@ Ruling `census-ruling-stateless-replicas-4-drill3`. The independent reviewer app
|---|---|---|---|
| `internal/edge/replicaprober.go` `replicaProber.record` | body | unchanged (2) | drill 3 R23: after recordProbe, the accepted job also latches risen (job.risen = risen || count.up), the in-memory fact Risen reads; no read added, same two sites |
| `internal/edge/reqrecords.go` `Edge.observeRecords` | body | unchanged (2) | drill 3 H2: a response whose counting writer saw a successful Hijack and no status (an upgrade the reverse proxy relayed) is filed as status 101 instead of 200, so the minute counts leave websocket dials out of the 2xx class; in-memory into the log sink as before; no read added |
+| `internal/host/agent.go` `runAgent` | body | unchanged (6) | drill 3 R24: makes one in-memory channel, closes it (once) inside the edge's existing shutdown-started callback after ingress.shutdownStarted, and passes it to tunnelLoop, which drains only a fleet channel name (<fleet>/<label>, both ValidTunnelName): the box's tunnel then sends a graceful GOAWAY and refuses new streams, and Loop stops re-dialing. No read added, same six sites; touches no admission, lease, ingress drain, listener or file; the agent process, no root decision |
| `internal/edge/edge.go` `Edge.Reload` | sites | +registry:Host, +whole:Route | drill 3 R23: keeps the map it replaces (e.current(), the in-memory map only Reload publishes, under reloadMu) and, for an ArmReplica row, hands the listed row t and that host's previous entry to replicaHandoffFor; the result is set on the new replica transport and the upstream entry; +registry:Host and +whole:Route are the already-listed row t; no registry query, file or store read added; the edge process as carlos, no root decision |
-Envelopes re-pinned: `internal/edge`.
+Envelopes re-pinned: `internal/edge`, `internal/host`, `internal/tunnelclient`.
Review: a model from the other family than the author reads the branch's diff against main on the amadan.net remote (`origin` or `amadan`, whichever points at amadan.net) and gives a verdict for every unit and every re-pinned envelope above. For a unit, compare the change with its recorded disposition and basis below; for an envelope, read every changed function in the package and what it reaches. Reject if the change lets root open, run, query or follow anything it did not before from a path or input a tenant, an app or a box agent can create, write or name; if it weakens a check, refusal, validation, argument or environment the basis relies on; or if the diff cannot settle either. Otherwise approve. Record each verdict on #280 with the tip. A rejected unit goes back to the author to correct; nothing escalates to the census owner.
@@ -16,6 +17,7 @@ Recorded dispositions, which each change must still satisfy:
- `internal/edge/replicaprober.go` `replicaProber.record`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-stateless-replicas-3;basis=Final I1 fix, Q22: accept a revision-skewed result as normal health evidence after the unchanged current-job, cancellation, connection, owner, lifetime, box, boot and serving-evidence checks. Count fail/rise and refresh ObservedAt; stamp the accepted sample with the hub current route ReplicaRevision. The existing in-memory Route revision read moves from the skew refusal to that stamp. No new external read, path, bucket poll, membership authority or wake.
- `internal/edge/reqrecords.go` `Edge.observeRecords`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-edge-request-records;identity=the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=new: called from ServeHTTP's observer defer after observeAnalytics, with the route the defer already holds; returns at once when no recorder is wired or the request arrived over a tunnel (the forwarding box records it); otherwise builds the Response through requestResponse from that route and the request and hands it to the in-memory recorder, which files it into the box's log sink; its one scanned site is the route value passed in; it reads no file, no store and no box state, writes nothing outside the log sink, and makes no serving or root decision; the class of Edge.observeAnalytics (J1 root-route);rev3=census-ruling-edge-protection-2;basis=files one reqrec.Match in place of the Response when the request's outcome carries a guard verdict (kind block or watch, the verdict's rule tier, id, fragment and reference code; a block woke nothing), and the plain Response otherwise; still in-memory, its one scanned site is the route value passed in; no read added;rev3=census-ruling-probe-burst-limit;basis=the Match it files also carries the verdict's cool-down start and end (CooldownFrom, CooldownUntil, set only for the burst rule); RequestRecorder gains Trip; still in-memory into the log sink, the same one route site; no new root read or write kind;rev3=census-ruling-agent-start-demo-log-skip;basis=returns early when demoUnrecorded(rt, r): files no Response or Match for a demo; only suppresses an in-memory record; no new read
+- `internal/host/agent.go` `runAgent`: authority, task B,C,D,F. Basis: 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.;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 12: one call more beside armRunsPass, armInteractivePass(svc, reg, rolloutSink, boxJudge), in the same activator Configure hook, handing it the same box judge; fix round 1 (Astra P2, shutdown): after svc.Shutdown(ctx), shutdownInteractive(ctx) ends and joins every interactive session under the same shutdown budget; the worker's own reads are its units' (interactive.go); this body reads nothing new, the same six sites; merge of origin/main 6f1f6ca6: main's svc.Fleet = fleetWakeFor(...) and its invalid-identity ERROR line are kept as main has them (census-ruling-managed-fleets-1b); this branch's change is the same as above; read sites unchanged (6);rev3=census-ruling-fix-set-aside-exdev;basis=set-aside EXDEV fix: one field more on the agent ExecBackend literal, RawInstanceDir: layout.RawInstanceDir (a pure path join: <dataDir>/.instances/<InstanceID(host)>), so the start rule set-aside moves a copy out through the raw directory instead of through the nosymfollow bind; this body reads nothing new, the same six sites;rev3=census-ruling-durability-3a-escrow;basis=durability 3a Task 3: one more assignment beside eb.FilesStore: eb.EscrowKey = haEscrowKey(os.Getenv("CARLOS_SECRETS_KEY")), the agent's own environment parsed by appconfig.ParsePrivateKey as the moves pass parses it (unset or unparseable: a log line and nil, and HA publication refuses on the box). No path is opened or read, no read site added; the same six sites, offsets moved; B,C,D,F authority retained. Durability 3a Task 4: one more goroutine beside configSyncLoop: go escrowLoop(agentCtx, reg, svc), the escrow sweep every 30 s over the same registry and Service. This body reads nothing new itself; the same six sites, offsets moved; B,C,D,F authority retained. Durability 3a Task 5: one more call beside eb.EscrowKey: wireRawSecretPages(eb, PageOperator, metricsBoxLabel(os.Getenv, readMachineID())), which sets eb.OnRawSecret to page an operator (alerting.Page through PageOperator, LevelIncident) on its own goroutine with a 20 s timeout; metricsBoxLabel and readMachineID are the reads this body already makes for the moves refusal log; no new read site; the same six sites, offsets moved; B,C,D,F authority retained. Merge of origin/main 90c4d3aa: main's own later changes to this body are kept as main has them, under main's rulings; this branch's change is the same as above. Merge of origin/main 00bf5b8c (fleet set-aside EXDEV fix): main's change to this body is kept as main has it, under its own census ruling; this branch's change is unchanged.;rev3=census-ruling-probe-burst-limit;basis=two more sink wirings beside setAnalyticsSink: setProtectionSink(e.SetProtectionRecordOnly) and setAssetOwnersSource(e.AssetOwners), function values the telemetry pass calls; this body reads nothing new, the same six sites; authority B,C,D,F retained; no new root read or write kind;rev3=census-ruling-region-ha-p1b3a;basis=Arm HA placement exactly once on the existing Service before activatorStart and edges publication, wiring AwakeApps and the PageOperator callback; existing six read sites unchanged, no new root authority.;rev3=census-ruling-stateless-replicas-1;basis=Final review I3: start the concrete coordinator's renewal worker with agent setup; existing closeReplicaCoordinator shutdown cancels and joins it before release. No new read sites or credentials. Merge origin/main c59715e7: retain main's armHAPlacement(svc, PageOperator) wiring beside the existing activator setup; stateless coordinator and shutdown wiring remain. Same read sites; no new root read or credential.;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): in the edge-ready callback, calls act.SetHeldWakeHook(e.HeldWake) when act is non-nil (installing the non-blocking wake callback) and stores e.HeldStreamsForStatus in heldStreamsSource. Wiring of in-memory callbacks only; no read added.;rev3=census-ruling-region-ha-p1b3b-t;basis=Wire Service.SetDutyView to the live edge DutySnapshot in the ready callback. No new read; no new loop or cloud operation. B2 wires the registry as the persistent DutyStore before service startup; no new cloud or filesystem path. B3b: arm one journal-backed termination consumer before service startup using agentCtx and the shared confirmer; expose edge tick and join at edge shutdown. No new direct read sites.;rev3=census-ruling-agent-start-demo-1;basis=Passes the existing registry, data store and hibernation prefix into the demo worker, and the existing instance-control client into the demo before-exec hook. No alternate data store or polling loop. Merge resolution against origin/main 9bd45488 retains main's HA departure controller, lifecycle and duty wiring alongside the demo data store and worker; no read site added by the resolution.;rev3=census-ruling-region-ha-p3a;basis=P3a Task 3: install closed fixed admission before every launch source, bind activator/backend and edge, wire the real termination Started lifecycle and role reader after the change index; close before cancellation/child shutdown. No new external reads or cloud authority. Fix R1: move bind/lifecycle/edge-option wiring into wireAgentAdmission and worker listing into runWorkerBootPassAfterAdmission. Worker boot waits for admission before listing then uses unchanged bounded wakes and per-host serialization; whole Route read moves to the helper. No new storage, cloud, or root execution authority. Preserve merged main's agent wiring and census basis; the branch removes one whole Route use by moving worker iteration to the helper, with no added read kind.;rev3=census-ruling-stateless-replicas-2;basis=Slice 3b: arms a fleet-only worker using the existing registry, activator, backend and authenticated console transport. Owned worker stops and joins at shutdown. No new bucket reader. merge of origin/main 9b8b2c50: retain HA duty/departure lifecycle, wake-slot and existing agent wiring alongside the replica placement worker; no new read introduced by resolution. merge of origin/main 6be08467: Retain main demo configuration, admission, build and expiry wiring alongside the replica worker; merge-only body change, no additional read. merge of origin/main 7920cccf: Retain main box-role/group admission wiring and boot publication beside the owned replica worker and shutdown; main moves the boot registry List into runWorkerBootPassAfterAdmission, removing its inline whole Route site. No new read introduced by conflict resolution.;rev3=census-ruling-stateless-replicas-3;basis=Task 1 fix round 1 M3: retain the private snapshot source and cancel/join ownership, but use the replica-health-specific retry loop. It logs its first failure only and retains the existing exponential backoff capped at 30 seconds; unsupported builds return nil. Existing five direct read sites unchanged; no new credentials, bucket reader or app lifecycle action. Fix round 1 Q20: publish Edge.ReplicaSnapshots as a separate in-memory status source, leaving the tenant-visible Upstreams source unchanged. No new external reader or authority.;rev3=census-ruling-region-ha-p3b;basis=Load root-written group marker/configuration, configure signed boot binding and agent receipt completer, wire cancellable admission into departure work and expose cached GroupReaderSnapshot. New indirect boot reads use protected root files; agent-owned receipt controls duplicate initial completion only, never root restart permission. Same five direct sites. Merge 45cebde4 retains the replica health socket lifecycle and setReplicaSource beside GroupReaderSnapshot; no extra read beyond main.;rev3=census-ruling-agent-start-demo-2;basis=agent.go:309-329 opens demo-traffic.db beside the operator-configured registry when a demo domain exists, closes it at shutdown and wires drain-before-purge; :1010-1019 shares the worker and write gate; :1164-1177 installs the fleet identity and closed-until-worker serving callback. One added whole Route pass; the new indirect filesystem/SQL reads are claimed in openDemoTraffic and worker/store units. No request chooses the database pathname.;rev3=census-ruling-region-ha-p1b3b-s;basis=Wire the service duty view to authoritative cached sidecar manifest placement in LifetimeIndex and the edge sidecar projection; missing policy denies duty. Existing instance duty wiring remains.;rev3=census-ruling-region-ha-g2-t3;basis=T3a: wire eb.Page = PageOperator beside OwnerTerminated before departures arm, so suspect-holder pages work if departure setup fails; no new read; existing nine sites and authority unchanged; pages through the existing sink. T3b: publish the same backend through an atomic pointer for the metrics observer, and clear it on return; no new external read or authority.;rev3=census-ruling-agent-start-demo-3;basis=Wire the claim activator and root snapshot client into the demo worker; pass moved readiness to status reporting. Census read-site delta: unchanged (9).;rev3=census-ruling-region-ha-g2-fixes;basis=Wire local pool evidence, live withdrawal activator, startup ingress scan and alias publication, and edge lookup; no new direct sites; new indirect record/claim reads use existing store/judge paths described in ingress helpers.;rev3=census-ruling-region-ha-g2r-fixes;basis=W3: starts the existing record-view backstop loop with a departure-inventory listener (non-blocking, coalesced signal) even without an armed RecordView; it requests the existing full pass (backstopFullDue) there. Same nine read sites; no new read or authority.;rev3=census-ruling-region-ha-graceful-terminate-t2;basis=Derive one signal-time deadline with a 90-second budget; cap departure stop and startup/seed/service shutdown joins by it. No read added.;rev3=census-ruling-static-sweep-periodic;basis=in the edge-ready callback, publishes e.LargestStaticTree in staticTreeSource for the disk alert line (diskAlertFrac in the metrics loop); in-memory wiring only, no read added; read sites unchanged (9);rev3=census-ruling-edge-page-cache-1;basis=wires the exec backend's CurrentInputs into the edge cache (wireCurrentInputs) and, in the ready hook after armEdgeAssetCache (whose returned store it now keeps), calls armEdgePageCache, which does nothing unless CARLOS_PAGE_CACHE=1; read sites unchanged (9); no read added;rev3=census-ruling-gvisor-demos;basis=Capture sandbox resolution and refusal once; log errors once; gate route admission and BeforeExec before process launch. No new root read. Task 5: pass the once-captured sandbox effective mode/config error into ExecBackend, UnitBackend and the immutable Client expectation. Same startup environment/registry reads; swapArming declines gVisor before placement. Task 8: arm read-only status projection with the existing Client.SandboxStatus callback. Agent status now queries the existing root /ready endpoint; no new root authority or guest-file input. Merge2 e8a1ddde: retain main wireCurrentInputs and armEdgePageCache through the existing asset-store ready hook alongside branch once-captured sandbox mode, wake gates and root status wiring. No new direct read; main page-cache helpers retain their own census overlays.;rev3=census-ruling-region-ha-held-build;basis=wires the drain state: svc.SetDrainingSource(boxDrain.IsDraining), svc.SetPeerDrainView(e.PeerDraining), e.SetPeerDrainedHook(svc.DropHoldersNaming); in-memory only; no read added; region HA held-requests Task 5: on group members, starts the drain driver over the activator, the edge and boxDrain, and serves its root-only drain socket; no read added beyond the socket's own Branch review r1: the drain state follows the root start fence on group members (the fence reader is the existing fenceLocation.read, a root-owned fixed path); e.SetPeerUndrainedHook(svc.AllowHoldersNaming) beside the drained hook (memory only); the drain socket serves only the agent's own user. No read added.;rev3=census-ruling-security-review-mitigations;basis=Wire the cached operator flat-layout choice into the exec backend's new-resident refusal; no read source added, existing authority retained.;rev3=census-ruling-w6-ingress-drain;basis=agent (user carlos), not root. Builds the ingress drain (newIngressDrain) with arming read at ask time from os.Getenv (CARLOS_REGION_HA, CARLOS_INGRESS_TARGET_GROUPS, both from the root-owned host.env), the fixed admission and lease.CurrentSelf (existing IMDS identity); its reader is awstg.Load, the box role's credentials calling ELB DescribeTargetHealth/DescribeTargetGroupAttributes (new AWS reads, by the agent). Wires admission.closeStartsForIngressDrain, the lbhealth drain condition, ingress.setEdge, and ingress.shutdownStarted in WithShutdownStarted. The drain socket (/run/carlos/.ha-drain/drain.sock, agent-user only, existing) is now also served on a fixed box with the drain configured (was group members only), routing /v1/ingress/* to the ingress drain and the group drain verbs to 404 there. armHADepartures now takes fixtureDepartureGetenv() and MakeQueue fixtureDepartureQueue(), which in a production (non-rootrunner) build are os.Getenv and nil, as before. Read sites unchanged (9).;rev3=census-ruling-stateless-replicas-4-task1;basis=Arms the fleet-only replica swap worker next to the placement worker: same console URL and fleet token as the existing replicaCoordinatorAPI, the existing activator Service; stops and joins at shutdown. No new read site, credential or bucket reader.;rev3=census-ruling-stateless-replicas-4-task2;basis=Task 2: sets deployWorker.step to the rollout scheduler answer for the record permit (replicaStepOf over armedRollout), an in-memory callback; no read site, credential or bucket reader added.;rev3=census-ruling-stateless-replicas-4-task2-fix2;basis=Task 2 fix round 2: the swap worker step is armedReplicaStep, the same lazy scheduler lookup as before as a named function; no read site added.;rev3=census-ruling-stateless-replicas-4-merge-main;basis=Merge of main 5fac2ff1: both sides changed it. Main (01d6ca78, linked-deployments-slice1) starts linkLoop beside tunnelLoop; this branch keeps its replica coordinator wiring. Both kept as-is; no read added.;rev3=census-ruling-stateless-replicas-4-final;basis=#511 final wave item 2: wires the swap worker's drive (armedReplicaDrive, the armed rollout manager's DriveReplicaRelease); no read added;rev3=census-ruling-stateless-replicas-4-merge-main2;basis=Merge of main af871da0 (v0.34.49): both sides changed it. Main (178dcfe5, member-backups-2a) moves the inline duty-view closure into armDutyView/dutyView and starts verifyAssignLoop; its sites drop by registry:Host and whole:Route x2 as main recorded them. This branch keeps its replica coordinator, swap worker and drive wiring. Both kept as-is; no read added.
- `internal/edge/edge.go` `Edge.Reload`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-design-edge-rate-limit-358;basis=each route's upstream entry gains rate: e.parseRateSettings(t), the row's rate_limit column parsed once per reload; the one added site is that whole:Route pass of t (parseRateSettings is a new unit, classified in the decisions overlay); no other read added;rev3=census-ruling-certwarm-wake;basis=the single reload hook call becomes runReloadHooks(), which runs every registered hook in order (#386); no read added, same 57 sites (56 before #358 landed on main);rev3=census-ruling-edge-asset-cache-3;basis=each tenant reverse proxy built in the switch (the tunnel, fleet, socket and TCP arms, every *httputil.ReverseProxy) is installed behind assetScrubbedProxy, which hands the proxy an assetInformationalScrub writer so an app's 1xx (103) loses the asset cache's reserved headers (X-Carlos-Asset-Fill, -Fill-Ack, -Expires, Carlos-Cache) on every local path, as the backhaul already does (final review F6); a type check of the proxy it just built and a wrapper around it; static and status handlers untouched; read sites unchanged (57), offsets moved; no read added;rev3=census-ruling-alias-wake-338;basis=#338 follow-up: after the path fold, a resolved platform alias takes its source's own upstream entry (same proxy, route, hibernating: the existing activator wake, lease and fence), keeping its own prefix map (none for a minted apex) and never inheriting the source's (Astra r2 P1); a refused alias, or one whose source has no entry, is dropped from the map (not served, not Allowed); the attached-hostname fold clears platformAlias;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 5: the activator-managed test (generation proxy, hib, no-activator 404) is Route.ActivatorOwned instead of Kind and Hibernate inline, so a resident rootfs instance goes through the activator; binary rows unchanged;rev3=census-ruling-edge-roll-blip;basis=the tcpProxy and multiProxy calls pass e.hold (the per-Edge localHold set once in newEdge): a loopback TCP upstream that refuses is redialled for up to 13 s and a probed route with a local upstream waits for prober readmission instead of answering 502/503 (#434 part B); edge-side dial policy only, no read added, same 52 sites;rev3=census-ruling-regional-domains-447;basis=#447 Task 5: after the alias fold, reads the regional_domains rows (e.reg.ListRegional; an error aborts the reload as every registry read here does) and applies them with foldRegional against the routes slice the same reload read; the added reads are that one registry list and the routes already read;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Tasks 4 and 6: the forward case (fleetProxy toward the binding's FleetBox, throttled refusal); one refusal check before the switch from FleetArmVerdict (sidecar not judged; a non-ready forward row refused; a forward row always judged by FleetServeEligible, any other row only where tunnels are on; an alias of a refused source refused with it); the accountless note; path rows of a forward host not folded; no alias folded onto a refused row; refusedHosts held through every fold. ListFleets and FleetChannelAuth read before the loop (+registry:FleetBox, +registry:Host x7, +whole:Route x3). Serving only; the hub's agent, not root. Review R1 finding 2: the switch reads verdict.Served (FleetArmVerdict) by host; the forward case and the fleet-placed case take their fleet from it (served.Fleet) instead of FleetPlacement(t.Region), and an admitted forward row not Served continues rather than falling through (+registry:Host, -registry:Region); the same rows take the same arms; no read added. Review R2: the switch is on DispatchArm(t, viaFleet, tunnels) (the order moved there unchanged: forward only when in Arm, own Tunnel, fleet, socket, addrs, static, status, else continue), the fleet cases read verdict.Arm (renamed from Served), and the platform-alias fold is foldPlatformAliases with the same take (source entry, own paths, alias marks) and the same refusal log (-registry:Kind x2, -registry:Socket, -registry:Tunnel, +whole:Route: those reads moved into DispatchArm); same rows, same arms, same entries; no read added.;rev3=census-ruling-fleet-routes-followups;basis=the owners map is now e.reg.FleetOwners() instead of ListFleets folded inline: the same fresh-connection ListFleets read and the same name->account map (-registry:Account, -registry:Name, -whole:Fleet x2 move into Registry.FleetOwners); no read added; same error path (abort the reload);rev3=census-ruling-tunnel-websockets;basis=The ArmTunnel arm now records its tenancy (Account, App, Tunnel) copied from the row t that Reload already lists; no new registry query, no file read. Also the reload mutex taken first and held to return, five nil-in-production test hooks, and the sweepUpgrades call after the swap, which reads only the map Reload has just built (spec 7, Tasks 3 and 4).;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.;rev3=census-ruling-edge-held-streams;basis=the edge in the agent (carlos-edge.service, user carlos): after the new upstream map is published, closes the held streams of any host the new map no longer holds (absent, not hibernating, route no longer Hibernate). Reads the freshly built in-memory map m and the in-memory held set; no read added beyond the rebuild Reload already does.;rev3=census-ruling-devbox-identity;basis=#486 A: only the devbox edge created by newDevboxEdge (carlos-devbox service user, not root) enables the new proxy hooks. Saves the existing DispatchArm result and reads t.Socket from an already-listed route when that arm is ArmSocket, passing it to configureDevboxProxy for per-request expected-owner validation and visitor-header rewriting. Adds one registry:Socket field site; no new registry query or file open, and ordinary fleet/agent edges leave the hook disabled. Final fix wave: its devbox-only outgoing-header/trailer hooks now also strip case-insensitive underscore/hyphen aliases through stripVisitorHeaders; no new read.;rev3=census-ruling-agent-start-demo-1;basis=Checks demo route eligibility and filters the final folded map using the existing registry listing; no new registry or store query. Merge resolution against origin/main 9bd45488 retains main's devbox proxy hooks (reading the existing route Socket) alongside demo filtering; no additional registry query.;rev3=census-ruling-stateless-replicas-3;basis=Task 3: dispatch admitted stateless set rows through replicaProxy before legacy fleetBoxOf. Read Host and supplied whole Route values from the existing listing to build and filter the set probe inputs after all registry reads and alias folds; synchronize before map publication. Tenancy comes only from FleetArmVerdict. No new external read; no set row reaches legacy fallback, local addresses, provision.Health or hibernation on the hub. Fix round 1 M2: comment and whitespace correction only; read sites and routing behavior unchanged.;rev3=census-ruling-agent-start-demo-2;basis=edge.go:1175-1177 passes an already-listed demo Route to demoProxy; :1358 passes existing Route and RouteAlias slices to demoRefusalNames; :1401 publishes refusal names before upstreams. Adds whole-value uses only, no new registry query; retained names refuse fallback after filtering.;rev3=census-ruling-demo-api-site-route;basis=Build a dedicated demo API proxy from the selected existing socket, TCP or probed console transport in the same atomic route snapshot, before ordinary wrappers. Reads existing route Host twice, Version and two whole Route values for exact operator-configured console eligibility. No additional registry query or external read.;rev3=census-ruling-agent-start-demo-3;basis=Refresh the verified moved snapshot from registry on reload before route-independent serving. Census read-site delta: unchanged (87).;rev3=census-ruling-region-ha-g2-fixes;basis=Derive blocked ingress names from already listed unready/held/import-gated/sidecar and fleet-refused rows; added field reads only.;rev3=census-ruling-edge-page-cache-1;basis=keeps every row this reload already read from the registry (e.pageRoutes, e.pageRoutesRead = routes, true, under reloadMu) for the page reload hook; the +whole:Route sites are that assignment of the same slice; no new read;rev3=census-ruling-held-move-speed;basis=the six tenant reverse proxies' ModifyResponse is now classifyMoveStreams(e.responseModifier(t)): MarkMoveStream first reads the response head (status 101, or Content-Type text/event-stream) and sets a flag on the request's in-memory StreamEnd, then responseModifier runs unchanged (byte-identical to main). The hook never wraps or touches the body, so the trailer scrubs keep the proxy as their one closer (Astra r2 F2.1: the graceful boundary end and its watcher were cut). No read added;rev3=census-ruling-linked-deployments-slice1;basis=linked deployments slice 1 Task 3: with tunnels on, the pass also reads LinkChannelAuth and LinkOwners from the box's own registry (fresh connection, as FleetChannelAuth and FleetOwners) and merges each well-formed link channel's hash into the set SetDynamicAuth takes; the verdict judges link-placed forward rows by the link owners; an admitted one takes the new ArmLink case (linkProxy down the link's channel, tenancy with the link); the door's fleet snapshot stays fleet owners only and link owners go to a separate snapshot; +whole:Route is the row handed to the new case's responseModifier; the edge process as carlos, no root decision; linked deployments slice 1 Task 8: each upstream entry also records localBackend (ArmSocket, or an instance the activator runs here), from values the pass already holds; no read added; linked deployments slice 1 Task 11: the LinkChannelAuth read (the same fresh-connection read) moves to the top of the pass, before List, and its map is applied at once through the hub's new SetLinkAuth (the link half of the credential set only; fleet entries untouched), so a link revocation or rotation closes the home connection on the old hash even when a later read or step of the same reload fails; the same map is still merged into the set SetDynamicAuth takes; no read added, one moved; the edge process as carlos, no root decision; Task 11 fix round 1: comments only (the reload hook contract now says the link credentials are applied before afterRead); no code or read changed; final review fix: the store of the unread linkAccounts snapshot is deleted (fleetAccounts unchanged); no read added or moved
New dispositions, which census-propose wrote and the reviewer checks against the unit's reads and the diff:
diff --git a/internal/provision/testdata/plan14-root-reads-stateless-replicas-4-drill3.tsv b/internal/provision/testdata/plan14-root-reads-stateless-replicas-4-drill3.tsv
index 27d686bdc..8ce0e3b27 100644
--- a/internal/provision/testdata/plan14-root-reads-stateless-replicas-4-drill3.tsv
+++ b/internal/provision/testdata/plan14-root-reads-stateless-replicas-4-drill3.tsv
@@ -1,5 +1,5 @@
# Census overlay stateless-replicas-4-drill3, written by census-propose (#369). census-ruling-stateless-replicas-4-drill3, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-stateless-replicas-4-drill3.md.
-# 2 body, 1 sites, 1 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
+# 3 body, 1 sites, 3 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
# 3 new dispositions: 0 reads re-frozen at their disposition with the claim, 3 new units frozen accepted-legacy, 0 quiet units retired while they read nothing, 0 other.
@legacy d706cfbb2b293bf47277fd350effdf32cac35fca0833ca58343f5e032db31879 internal/edge/replicaprober.go replicaProber.record legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-3;basis=Final I1 fix, Q22: accept a revision-skewed result as normal health evidence after the unchanged current-job, cancellation, connection, owner, lifetime, box, boot and serving-evidence checks. Count fail/rise and refresh ObservedAt; stamp the accepted sample with the hub current route ReplicaRevision. The existing in-memory Route revision read moves from the skew refusal to that stamp. No new external read, path, bucket poll, membership authority or wake.;rev3=census-ruling-stateless-replicas-4-drill3;basis=drill 3 R23: after recordProbe, the accepted job also latches risen (job.risen = risen || count.up), the in-memory fact Risen reads; no read added, same two sites registry:ReplicaRevision@1184,whole:Route@1186 a2b10c975ea1f21a782fafc540350789e5ca479811bd410ed4953eabda95cac0
@legacy bec30c790a44d6e0f74e1aaa60b857bf5ff0d5a4552d4f8e480880e65abfb8e7 internal/edge/reqrecords.go Edge.observeRecords legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-request-records;identity=the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=new: called from ServeHTTP's observer defer after observeAnalytics, with the route the defer already holds; returns at once when no recorder is wired or the request arrived over a tunnel (the forwarding box records it); otherwise builds the Response through requestResponse from that route and the request and hands it to the in-memory recorder, which files it into the box's log sink; its one scanned site is the route value passed in; it reads no file, no store and no box state, writes nothing outside the log sink, and makes no serving or root decision; the class of Edge.observeAnalytics (J1 root-route);rev3=census-ruling-edge-protection-2;basis=files one reqrec.Match in place of the Response when the request's outcome carries a guard verdict (kind block or watch, the verdict's rule tier, id, fragment and reference code; a block woke nothing), and the plain Response otherwise; still in-memory, its one scanned site is the route value passed in; no read added;rev3=census-ruling-probe-burst-limit;basis=the Match it files also carries the verdict's cool-down start and end (CooldownFrom, CooldownUntil, set only for the burst rule); RequestRecorder gains Trip; still in-memory into the log sink, the same one route site; no new root read or write kind;rev3=census-ruling-agent-start-demo-log-skip;basis=returns early when demoUnrecorded(rt, r): files no Response or Match for a demo; only suppresses an in-memory record; no new read;rev3=census-ruling-stateless-replicas-4-drill3;basis=drill 3 H2: a response whose counting writer saw a successful Hijack and no status (an upgrade the reverse proxy relayed) is filed as status 101 instead of 200, so the minute counts leave websocket dials out of the 2xx class; in-memory into the log sink as before; no read added whole:Route@185,whole:Route@886 a408f74e18c51771e3d24294c49d513098487fa82ba0be40b188235ba3516978
@@ -9,8 +9,11 @@
@legacy db89ddf0782fd935c6bd9c957aec0003d69279326f3faed74247b54fb52e35a9 internal/edge/edge.go Edge.Reload legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-design-edge-rate-limit-358;basis=each route's upstream entry gains rate: e.parseRateSettings(t), the row's rate_limit column parsed once per reload; the one added site is that whole:Route pass of t (parseRateSettings is a new unit, classified in the decisions overlay); no other read added;rev3=census-ruling-certwarm-wake;basis=the single reload hook call becomes runReloadHooks(), which runs every registered hook in order (#386); no read added, same 57 sites (56 before #358 landed on main);rev3=census-ruling-edge-asset-cache-3;basis=each tenant reverse proxy built in the switch (the tunnel, fleet, socket and TCP arms, every *httputil.ReverseProxy) is installed behind assetScrubbedProxy, which hands the proxy an assetInformationalScrub writer so an app's 1xx (103) loses the asset cache's reserved headers (X-Carlos-Asset-Fill, -Fill-Ack, -Expires, Carlos-Cache) on every local path, as the backhaul already does (final review F6); a type check of the proxy it just built and a wrapper around it; static and status handlers untouched; read sites unchanged (57), offsets moved; no read added;rev3=census-ruling-alias-wake-338;basis=#338 follow-up: after the path fold, a resolved platform alias takes its source's own upstream entry (same proxy, route, hibernating: the existing activator wake, lease and fence), keeping its own prefix map (none for a minted apex) and never inheriting the source's (Astra r2 P1); a refused alias, or one whose source has no entry, is dropped from the map (not served, not Allowed); the attached-hostname fold clears platformAlias;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 5: the activator-managed test (generation proxy, hib, no-activator 404) is Route.ActivatorOwned instead of Kind and Hibernate inline, so a resident rootfs instance goes through the activator; binary rows unchanged;rev3=census-ruling-edge-roll-blip;basis=the tcpProxy and multiProxy calls pass e.hold (the per-Edge localHold set once in newEdge): a loopback TCP upstream that refuses is redialled for up to 13 s and a probed route with a local upstream waits for prober readmission instead of answering 502/503 (#434 part B); edge-side dial policy only, no read added, same 52 sites;rev3=census-ruling-regional-domains-447;basis=#447 Task 5: after the alias fold, reads the regional_domains rows (e.reg.ListRegional; an error aborts the reload as every registry read here does) and applies them with foldRegional against the routes slice the same reload read; the added reads are that one registry list and the routes already read;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Tasks 4 and 6: the forward case (fleetProxy toward the binding's FleetBox, throttled refusal); one refusal check before the switch from FleetArmVerdict (sidecar not judged; a non-ready forward row refused; a forward row always judged by FleetServeEligible, any other row only where tunnels are on; an alias of a refused source refused with it); the accountless note; path rows of a forward host not folded; no alias folded onto a refused row; refusedHosts held through every fold. ListFleets and FleetChannelAuth read before the loop (+registry:FleetBox, +registry:Host x7, +whole:Route x3). Serving only; the hub's agent, not root. Review R1 finding 2: the switch reads verdict.Served (FleetArmVerdict) by host; the forward case and the fleet-placed case take their fleet from it (served.Fleet) instead of FleetPlacement(t.Region), and an admitted forward row not Served continues rather than falling through (+registry:Host, -registry:Region); the same rows take the same arms; no read added. Review R2: the switch is on DispatchArm(t, viaFleet, tunnels) (the order moved there unchanged: forward only when in Arm, own Tunnel, fleet, socket, addrs, static, status, else continue), the fleet cases read verdict.Arm (renamed from Served), and the platform-alias fold is foldPlatformAliases with the same take (source entry, own paths, alias marks) and the same refusal log (-registry:Kind x2, -registry:Socket, -registry:Tunnel, +whole:Route: those reads moved into DispatchArm); same rows, same arms, same entries; no read added.;rev3=census-ruling-fleet-routes-followups;basis=the owners map is now e.reg.FleetOwners() instead of ListFleets folded inline: the same fresh-connection ListFleets read and the same name->account map (-registry:Account, -registry:Name, -whole:Fleet x2 move into Registry.FleetOwners); no read added; same error path (abort the reload);rev3=census-ruling-tunnel-websockets;basis=The ArmTunnel arm now records its tenancy (Account, App, Tunnel) copied from the row t that Reload already lists; no new registry query, no file read. Also the reload mutex taken first and held to return, five nil-in-production test hooks, and the sweepUpgrades call after the swap, which reads only the map Reload has just built (spec 7, Tasks 3 and 4).;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.;rev3=census-ruling-edge-held-streams;basis=the edge in the agent (carlos-edge.service, user carlos): after the new upstream map is published, closes the held streams of any host the new map no longer holds (absent, not hibernating, route no longer Hibernate). Reads the freshly built in-memory map m and the in-memory held set; no read added beyond the rebuild Reload already does.;rev3=census-ruling-devbox-identity;basis=#486 A: only the devbox edge created by newDevboxEdge (carlos-devbox service user, not root) enables the new proxy hooks. Saves the existing DispatchArm result and reads t.Socket from an already-listed route when that arm is ArmSocket, passing it to configureDevboxProxy for per-request expected-owner validation and visitor-header rewriting. Adds one registry:Socket field site; no new registry query or file open, and ordinary fleet/agent edges leave the hook disabled. Final fix wave: its devbox-only outgoing-header/trailer hooks now also strip case-insensitive underscore/hyphen aliases through stripVisitorHeaders; no new read.;rev3=census-ruling-agent-start-demo-1;basis=Checks demo route eligibility and filters the final folded map using the existing registry listing; no new registry or store query. Merge resolution against origin/main 9bd45488 retains main's devbox proxy hooks (reading the existing route Socket) alongside demo filtering; no additional registry query.;rev3=census-ruling-stateless-replicas-3;basis=Task 3: dispatch admitted stateless set rows through replicaProxy before legacy fleetBoxOf. Read Host and supplied whole Route values from the existing listing to build and filter the set probe inputs after all registry reads and alias folds; synchronize before map publication. Tenancy comes only from FleetArmVerdict. No new external read; no set row reaches legacy fallback, local addresses, provision.Health or hibernation on the hub. Fix round 1 M2: comment and whitespace correction only; read sites and routing behavior unchanged.;rev3=census-ruling-agent-start-demo-2;basis=edge.go:1175-1177 passes an already-listed demo Route to demoProxy; :1358 passes existing Route and RouteAlias slices to demoRefusalNames; :1401 publishes refusal names before upstreams. Adds whole-value uses only, no new registry query; retained names refuse fallback after filtering.;rev3=census-ruling-demo-api-site-route;basis=Build a dedicated demo API proxy from the selected existing socket, TCP or probed console transport in the same atomic route snapshot, before ordinary wrappers. Reads existing route Host twice, Version and two whole Route values for exact operator-configured console eligibility. No additional registry query or external read.;rev3=census-ruling-agent-start-demo-3;basis=Refresh the verified moved snapshot from registry on reload before route-independent serving. Census read-site delta: unchanged (87).;rev3=census-ruling-region-ha-g2-fixes;basis=Derive blocked ingress names from already listed unready/held/import-gated/sidecar and fleet-refused rows; added field reads only.;rev3=census-ruling-edge-page-cache-1;basis=keeps every row this reload already read from the registry (e.pageRoutes, e.pageRoutesRead = routes, true, under reloadMu) for the page reload hook; the +whole:Route sites are that assignment of the same slice; no new read;rev3=census-ruling-held-move-speed;basis=the six tenant reverse proxies' ModifyResponse is now classifyMoveStreams(e.responseModifier(t)): MarkMoveStream first reads the response head (status 101, or Content-Type text/event-stream) and sets a flag on the request's in-memory StreamEnd, then responseModifier runs unchanged (byte-identical to main). The hook never wraps or touches the body, so the trailer scrubs keep the proxy as their one closer (Astra r2 F2.1: the graceful boundary end and its watcher were cut). No read added;rev3=census-ruling-linked-deployments-slice1;basis=linked deployments slice 1 Task 3: with tunnels on, the pass also reads LinkChannelAuth and LinkOwners from the box's own registry (fresh connection, as FleetChannelAuth and FleetOwners) and merges each well-formed link channel's hash into the set SetDynamicAuth takes; the verdict judges link-placed forward rows by the link owners; an admitted one takes the new ArmLink case (linkProxy down the link's channel, tenancy with the link); the door's fleet snapshot stays fleet owners only and link owners go to a separate snapshot; +whole:Route is the row handed to the new case's responseModifier; the edge process as carlos, no root decision; linked deployments slice 1 Task 8: each upstream entry also records localBackend (ArmSocket, or an instance the activator runs here), from values the pass already holds; no read added; linked deployments slice 1 Task 11: the LinkChannelAuth read (the same fresh-connection read) moves to the top of the pass, before List, and its map is applied at once through the hub's new SetLinkAuth (the link half of the credential set only; fleet entries untouched), so a link revocation or rotation closes the home connection on the old hash even when a later read or step of the same reload fails; the same map is still merged into the set SetDynamicAuth takes; no read added, one moved; the edge process as carlos, no root decision; Task 11 fix round 1: comments only (the reload hook contract now says the link credentials are applied before afterRead); no code or read changed; final review fix: the store of the unread linkAccounts snapshot is deleted (fleetAccounts unchanged); no read added or moved;rev3=census-ruling-stateless-replicas-4-drill3;basis=drill 3 R23: keeps the map it replaces (e.current(), the in-memory map only Reload publishes, under reloadMu) and, for an ArmReplica row, hands the listed row t and that host's previous entry to replicaHandoffFor; the result is set on the new replica transport and the upstream entry; +registry:Host and +whole:Route are the already-listed row t; no registry query, file or store read added; the edge process as carlos, no root decision registry:Account@12872,registry:Alias@28250,registry:Alias@28337,registry:Alias@28917,registry:App@12888,registry:Health@16655,registry:Health@16781,registry:Hibernate@33353,registry:HoldOp@32149,registry:Host@14199,registry:Host@14256,registry:Host@14292,registry:Host@15056,registry:Host@17264,registry:Host@17359,registry:Host@17647,registry:Host@17673,registry:Host@17725,registry:Host@20555,registry:Host@20588,registry:Host@22611,registry:Host@24518,registry:Host@24826,registry:Host@24853,registry:Host@25769,registry:Host@26341,registry:Host@28671,registry:Host@28720,registry:Host@31585,registry:Host@31610,registry:Host@31627,registry:Host@32226,registry:Host@6218,registry:Host@6587,registry:Host@6641,registry:Host@6691,registry:Host@7805,registry:Host@8040,registry:Host@8132,registry:ImportGate@32168,registry:Kind@20947,registry:Kind@20969,registry:Prefix@26316,registry:Socket@15120,registry:Socket@20826,registry:Socket@24834,registry:Status@32125,registry:Status@6512,registry:Target@26328,registry:Tunnel@12711,registry:Tunnel@12903,registry:Version@20678,registry:Version@20928,registry:Version@21030,whole:RegionalDomain@29614,whole:Route@10250,whole:Route@1045,whole:Route@12793,whole:Route@14347,whole:Route@14475,whole:Route@15196,whole:Route@17818,whole:Route@17883,whole:Route@17934,whole:Route@20605,whole:Route@20612,whole:Route@20736,whole:Route@24914,whole:Route@24921,whole:Route@25035,whole:Route@26204,whole:Route@27372,whole:Route@29606,whole:Route@29662,whole:Route@29702,whole:Route@31491,whole:Route@31525,whole:Route@31613,whole:Route@31692,whole:Route@32111,whole:Route@33355,whole:Route@33412,whole:Route@33443,whole:Route@5238,whole:Route@5296,whole:Route@6226,whole:Route@7834,whole:Route@8079,whole:Route@8287,whole:Route@8421,whole:Route@8444,whole:Route@8459,whole:Route@9305,whole:Route@9433,whole:RouteAlias@28221,whole:RouteAlias@29670,whole:RoutePath@25747 b7be66189d8b67210efa5accd17578ffdedf7113fbbed52a2485ca27b81173f9
internal/edge/replicaprober.go replicaProber.record legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-3;basis=Final I1 fix, Q22: accept a revision-skewed result as normal health evidence after the unchanged current-job, cancellation, connection, owner, lifetime, box, boot and serving-evidence checks. Count fail/rise and refresh ObservedAt; stamp the accepted sample with the hub current route ReplicaRevision. The existing in-memory Route revision read moves from the skew refusal to that stamp. No new external read, path, bucket poll, membership authority or wake.;rev3=census-ruling-stateless-replicas-4-drill3;basis=drill 3 R23: after recordProbe, the accepted job also latches risen (job.risen = risen || count.up), the in-memory fact Risen reads; no read added, same two sites registry:ReplicaRevision@1184,whole:Route@1186 a2b10c975ea1f21a782fafc540350789e5ca479811bd410ed4953eabda95cac0
internal/edge/reqrecords.go Edge.observeRecords legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-request-records;identity=the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=new: called from ServeHTTP's observer defer after observeAnalytics, with the route the defer already holds; returns at once when no recorder is wired or the request arrived over a tunnel (the forwarding box records it); otherwise builds the Response through requestResponse from that route and the request and hands it to the in-memory recorder, which files it into the box's log sink; its one scanned site is the route value passed in; it reads no file, no store and no box state, writes nothing outside the log sink, and makes no serving or root decision; the class of Edge.observeAnalytics (J1 root-route);rev3=census-ruling-edge-protection-2;basis=files one reqrec.Match in place of the Response when the request's outcome carries a guard verdict (kind block or watch, the verdict's rule tier, id, fragment and reference code; a block woke nothing), and the plain Response otherwise; still in-memory, its one scanned site is the route value passed in; no read added;rev3=census-ruling-probe-burst-limit;basis=the Match it files also carries the verdict's cool-down start and end (CooldownFrom, CooldownUntil, set only for the burst rule); RequestRecorder gains Trip; still in-memory into the log sink, the same one route site; no new root read or write kind;rev3=census-ruling-agent-start-demo-log-skip;basis=returns early when demoUnrecorded(rt, r): files no Response or Match for a demo; only suppresses an in-memory record; no new read;rev3=census-ruling-stateless-replicas-4-drill3;basis=drill 3 H2: a response whose counting writer saw a successful Hijack and no status (an upgrade the reverse proxy relayed) is filed as status 101 instead of 200, so the minute counts leave websocket dials out of the 2xx class; in-memory into the log sink as before; no read added whole:Route@185,whole:Route@886 a408f74e18c51771e3d24294c49d513098487fa82ba0be40b188235ba3516978
+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.;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 12: one call more beside armRunsPass, armInteractivePass(svc, reg, rolloutSink, boxJudge), in the same activator Configure hook, handing it the same box judge; fix round 1 (Astra P2, shutdown): after svc.Shutdown(ctx), shutdownInteractive(ctx) ends and joins every interactive session under the same shutdown budget; the worker's own reads are its units' (interactive.go); this body reads nothing new, the same six sites; merge of origin/main 6f1f6ca6: main's svc.Fleet = fleetWakeFor(...) and its invalid-identity ERROR line are kept as main has them (census-ruling-managed-fleets-1b); this branch's change is the same as above; read sites unchanged (6);rev3=census-ruling-fix-set-aside-exdev;basis=set-aside EXDEV fix: one field more on the agent ExecBackend literal, RawInstanceDir: layout.RawInstanceDir (a pure path join: <dataDir>/.instances/<InstanceID(host)>), so the start rule set-aside moves a copy out through the raw directory instead of through the nosymfollow bind; this body reads nothing new, the same six sites;rev3=census-ruling-durability-3a-escrow;basis=durability 3a Task 3: one more assignment beside eb.FilesStore: eb.EscrowKey = haEscrowKey(os.Getenv("CARLOS_SECRETS_KEY")), the agent's own environment parsed by appconfig.ParsePrivateKey as the moves pass parses it (unset or unparseable: a log line and nil, and HA publication refuses on the box). No path is opened or read, no read site added; the same six sites, offsets moved; B,C,D,F authority retained. Durability 3a Task 4: one more goroutine beside configSyncLoop: go escrowLoop(agentCtx, reg, svc), the escrow sweep every 30 s over the same registry and Service. This body reads nothing new itself; the same six sites, offsets moved; B,C,D,F authority retained. Durability 3a Task 5: one more call beside eb.EscrowKey: wireRawSecretPages(eb, PageOperator, metricsBoxLabel(os.Getenv, readMachineID())), which sets eb.OnRawSecret to page an operator (alerting.Page through PageOperator, LevelIncident) on its own goroutine with a 20 s timeout; metricsBoxLabel and readMachineID are the reads this body already makes for the moves refusal log; no new read site; the same six sites, offsets moved; B,C,D,F authority retained. Merge of origin/main 90c4d3aa: main's own later changes to this body are kept as main has them, under main's rulings; this branch's change is the same as above. Merge of origin/main 00bf5b8c (fleet set-aside EXDEV fix): main's change to this body is kept as main has it, under its own census ruling; this branch's change is unchanged.;rev3=census-ruling-probe-burst-limit;basis=two more sink wirings beside setAnalyticsSink: setProtectionSink(e.SetProtectionRecordOnly) and setAssetOwnersSource(e.AssetOwners), function values the telemetry pass calls; this body reads nothing new, the same six sites; authority B,C,D,F retained; no new root read or write kind;rev3=census-ruling-region-ha-p1b3a;basis=Arm HA placement exactly once on the existing Service before activatorStart and edges publication, wiring AwakeApps and the PageOperator callback; existing six read sites unchanged, no new root authority.;rev3=census-ruling-stateless-replicas-1;basis=Final review I3: start the concrete coordinator's renewal worker with agent setup; existing closeReplicaCoordinator shutdown cancels and joins it before release. No new read sites or credentials. Merge origin/main c59715e7: retain main's armHAPlacement(svc, PageOperator) wiring beside the existing activator setup; stateless coordinator and shutdown wiring remain. Same read sites; no new root read or credential.;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): in the edge-ready callback, calls act.SetHeldWakeHook(e.HeldWake) when act is non-nil (installing the non-blocking wake callback) and stores e.HeldStreamsForStatus in heldStreamsSource. Wiring of in-memory callbacks only; no read added.;rev3=census-ruling-region-ha-p1b3b-t;basis=Wire Service.SetDutyView to the live edge DutySnapshot in the ready callback. No new read; no new loop or cloud operation. B2 wires the registry as the persistent DutyStore before service startup; no new cloud or filesystem path. B3b: arm one journal-backed termination consumer before service startup using agentCtx and the shared confirmer; expose edge tick and join at edge shutdown. No new direct read sites.;rev3=census-ruling-agent-start-demo-1;basis=Passes the existing registry, data store and hibernation prefix into the demo worker, and the existing instance-control client into the demo before-exec hook. No alternate data store or polling loop. Merge resolution against origin/main 9bd45488 retains main's HA departure controller, lifecycle and duty wiring alongside the demo data store and worker; no read site added by the resolution.;rev3=census-ruling-region-ha-p3a;basis=P3a Task 3: install closed fixed admission before every launch source, bind activator/backend and edge, wire the real termination Started lifecycle and role reader after the change index; close before cancellation/child shutdown. No new external reads or cloud authority. Fix R1: move bind/lifecycle/edge-option wiring into wireAgentAdmission and worker listing into runWorkerBootPassAfterAdmission. Worker boot waits for admission before listing then uses unchanged bounded wakes and per-host serialization; whole Route read moves to the helper. No new storage, cloud, or root execution authority. Preserve merged main's agent wiring and census basis; the branch removes one whole Route use by moving worker iteration to the helper, with no added read kind.;rev3=census-ruling-stateless-replicas-2;basis=Slice 3b: arms a fleet-only worker using the existing registry, activator, backend and authenticated console transport. Owned worker stops and joins at shutdown. No new bucket reader. merge of origin/main 9b8b2c50: retain HA duty/departure lifecycle, wake-slot and existing agent wiring alongside the replica placement worker; no new read introduced by resolution. merge of origin/main 6be08467: Retain main demo configuration, admission, build and expiry wiring alongside the replica worker; merge-only body change, no additional read. merge of origin/main 7920cccf: Retain main box-role/group admission wiring and boot publication beside the owned replica worker and shutdown; main moves the boot registry List into runWorkerBootPassAfterAdmission, removing its inline whole Route site. No new read introduced by conflict resolution.;rev3=census-ruling-stateless-replicas-3;basis=Task 1 fix round 1 M3: retain the private snapshot source and cancel/join ownership, but use the replica-health-specific retry loop. It logs its first failure only and retains the existing exponential backoff capped at 30 seconds; unsupported builds return nil. Existing five direct read sites unchanged; no new credentials, bucket reader or app lifecycle action. Fix round 1 Q20: publish Edge.ReplicaSnapshots as a separate in-memory status source, leaving the tenant-visible Upstreams source unchanged. No new external reader or authority.;rev3=census-ruling-region-ha-p3b;basis=Load root-written group marker/configuration, configure signed boot binding and agent receipt completer, wire cancellable admission into departure work and expose cached GroupReaderSnapshot. New indirect boot reads use protected root files; agent-owned receipt controls duplicate initial completion only, never root restart permission. Same five direct sites. Merge 45cebde4 retains the replica health socket lifecycle and setReplicaSource beside GroupReaderSnapshot; no extra read beyond main.;rev3=census-ruling-agent-start-demo-2;basis=agent.go:309-329 opens demo-traffic.db beside the operator-configured registry when a demo domain exists, closes it at shutdown and wires drain-before-purge; :1010-1019 shares the worker and write gate; :1164-1177 installs the fleet identity and closed-until-worker serving callback. One added whole Route pass; the new indirect filesystem/SQL reads are claimed in openDemoTraffic and worker/store units. No request chooses the database pathname.;rev3=census-ruling-region-ha-p1b3b-s;basis=Wire the service duty view to authoritative cached sidecar manifest placement in LifetimeIndex and the edge sidecar projection; missing policy denies duty. Existing instance duty wiring remains.;rev3=census-ruling-region-ha-g2-t3;basis=T3a: wire eb.Page = PageOperator beside OwnerTerminated before departures arm, so suspect-holder pages work if departure setup fails; no new read; existing nine sites and authority unchanged; pages through the existing sink. T3b: publish the same backend through an atomic pointer for the metrics observer, and clear it on return; no new external read or authority.;rev3=census-ruling-agent-start-demo-3;basis=Wire the claim activator and root snapshot client into the demo worker; pass moved readiness to status reporting. Census read-site delta: unchanged (9).;rev3=census-ruling-region-ha-g2-fixes;basis=Wire local pool evidence, live withdrawal activator, startup ingress scan and alias publication, and edge lookup; no new direct sites; new indirect record/claim reads use existing store/judge paths described in ingress helpers.;rev3=census-ruling-region-ha-g2r-fixes;basis=W3: starts the existing record-view backstop loop with a departure-inventory listener (non-blocking, coalesced signal) even without an armed RecordView; it requests the existing full pass (backstopFullDue) there. Same nine read sites; no new read or authority.;rev3=census-ruling-region-ha-graceful-terminate-t2;basis=Derive one signal-time deadline with a 90-second budget; cap departure stop and startup/seed/service shutdown joins by it. No read added.;rev3=census-ruling-static-sweep-periodic;basis=in the edge-ready callback, publishes e.LargestStaticTree in staticTreeSource for the disk alert line (diskAlertFrac in the metrics loop); in-memory wiring only, no read added; read sites unchanged (9);rev3=census-ruling-edge-page-cache-1;basis=wires the exec backend's CurrentInputs into the edge cache (wireCurrentInputs) and, in the ready hook after armEdgeAssetCache (whose returned store it now keeps), calls armEdgePageCache, which does nothing unless CARLOS_PAGE_CACHE=1; read sites unchanged (9); no read added;rev3=census-ruling-gvisor-demos;basis=Capture sandbox resolution and refusal once; log errors once; gate route admission and BeforeExec before process launch. No new root read. Task 5: pass the once-captured sandbox effective mode/config error into ExecBackend, UnitBackend and the immutable Client expectation. Same startup environment/registry reads; swapArming declines gVisor before placement. Task 8: arm read-only status projection with the existing Client.SandboxStatus callback. Agent status now queries the existing root /ready endpoint; no new root authority or guest-file input. Merge2 e8a1ddde: retain main wireCurrentInputs and armEdgePageCache through the existing asset-store ready hook alongside branch once-captured sandbox mode, wake gates and root status wiring. No new direct read; main page-cache helpers retain their own census overlays.;rev3=census-ruling-region-ha-held-build;basis=wires the drain state: svc.SetDrainingSource(boxDrain.IsDraining), svc.SetPeerDrainView(e.PeerDraining), e.SetPeerDrainedHook(svc.DropHoldersNaming); in-memory only; no read added; region HA held-requests Task 5: on group members, starts the drain driver over the activator, the edge and boxDrain, and serves its root-only drain socket; no read added beyond the socket's own Branch review r1: the drain state follows the root start fence on group members (the fence reader is the existing fenceLocation.read, a root-owned fixed path); e.SetPeerUndrainedHook(svc.AllowHoldersNaming) beside the drained hook (memory only); the drain socket serves only the agent's own user. No read added.;rev3=census-ruling-security-review-mitigations;basis=Wire the cached operator flat-layout choice into the exec backend's new-resident refusal; no read source added, existing authority retained.;rev3=census-ruling-w6-ingress-drain;basis=agent (user carlos), not root. Builds the ingress drain (newIngressDrain) with arming read at ask time from os.Getenv (CARLOS_REGION_HA, CARLOS_INGRESS_TARGET_GROUPS, both from the root-owned host.env), the fixed admission and lease.CurrentSelf (existing IMDS identity); its reader is awstg.Load, the box role's credentials calling ELB DescribeTargetHealth/DescribeTargetGroupAttributes (new AWS reads, by the agent). Wires admission.closeStartsForIngressDrain, the lbhealth drain condition, ingress.setEdge, and ingress.shutdownStarted in WithShutdownStarted. The drain socket (/run/carlos/.ha-drain/drain.sock, agent-user only, existing) is now also served on a fixed box with the drain configured (was group members only), routing /v1/ingress/* to the ingress drain and the group drain verbs to 404 there. armHADepartures now takes fixtureDepartureGetenv() and MakeQueue fixtureDepartureQueue(), which in a production (non-rootrunner) build are os.Getenv and nil, as before. Read sites unchanged (9).;rev3=census-ruling-stateless-replicas-4-task1;basis=Arms the fleet-only replica swap worker next to the placement worker: same console URL and fleet token as the existing replicaCoordinatorAPI, the existing activator Service; stops and joins at shutdown. No new read site, credential or bucket reader.;rev3=census-ruling-stateless-replicas-4-task2;basis=Task 2: sets deployWorker.step to the rollout scheduler answer for the record permit (replicaStepOf over armedRollout), an in-memory callback; no read site, credential or bucket reader added.;rev3=census-ruling-stateless-replicas-4-task2-fix2;basis=Task 2 fix round 2: the swap worker step is armedReplicaStep, the same lazy scheduler lookup as before as a named function; no read site added.;rev3=census-ruling-stateless-replicas-4-merge-main;basis=Merge of main 5fac2ff1: both sides changed it. Main (01d6ca78, linked-deployments-slice1) starts linkLoop beside tunnelLoop; this branch keeps its replica coordinator wiring. Both kept as-is; no read added.;rev3=census-ruling-stateless-replicas-4-final;basis=#511 final wave item 2: wires the swap worker's drive (armedReplicaDrive, the armed rollout manager's DriveReplicaRelease); no read added;rev3=census-ruling-stateless-replicas-4-merge-main2;basis=Merge of main af871da0 (v0.34.49): both sides changed it. Main (178dcfe5, member-backups-2a) moves the inline duty-view closure into armDutyView/dutyView and starts verifyAssignLoop; its sites drop by registry:Host and whole:Route x2 as main recorded them. This branch keeps its replica coordinator, swap worker and drive wiring. Both kept as-is; no read added.;rev3=census-ruling-stateless-replicas-4-drill3;basis=drill 3 R24: makes one in-memory channel, closes it (once) inside the edge's existing shutdown-started callback after ingress.shutdownStarted, and passes it to tunnelLoop, which drains only a fleet channel name (<fleet>/<label>, both ValidTunnelName): the box's tunnel then sends a graceful GOAWAY and refuses new streams, and Loop stops re-dialing. No read added, same six sites; touches no admission, lease, ingress drain, listener or file; the agent process, no root decision file:Exec@20408,file:Open@2191,file:Statfs@55741,registry:App@13287,whole:Route@13279,whole:Route@49382 8e83586a7ad088f6a864b7e19a44576512d471c6ba86784592af4f58a40bd7ba
internal/edge/replicaprober.go replicaProber.Risen legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-4-drill3;basis=new, drill 3 R23: under the prober lock, reads the already-synced in-memory route p.routes[host] (its FleetBoxes) and each job's risen flag and incarnation; no registry query, file or store read; serving only registry:FleetBoxes@198,whole:Route@110 30330d0ee9dabbb57a754c7fde1664865b211a1bf85d73baeffa259ac4bf653c
internal/edge/replicaproxy.go replicaAttemptBody.Read legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-4-drill3;basis=new, drill 3 R22: one replica attempt's view of the inbound request body; Read forwards to that body (the scanner's file:Read is io.Reader.Read on it) and marks the attempt read; opens no file and reads no state file:Read@29,file:Read@87 6f9666c79921c0d76435baa0349bc94371c7daa8f3c5770c70172333a3dec252
internal/edge/replicaproxy.go replicaHandoffFor legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-4-drill3;basis=new, drill 3 R23: a pure function of the listed set row t, the fleet arm verdict, the previous in-memory map entry and Risen; returns the replaced forward row's box only when it is in the set, for the same host, account, app, fleet and incarnation; reads Host, ReplicaIncarnation and whole Route values already in memory; no registry query, file or store read registry:Host@134,registry:Host@153,registry:Host@615,registry:ReplicaIncarnation@471,registry:ReplicaIncarnation@623,registry:ReplicaIncarnation@731,whole:Route@139,whole:Route@390 3cdd2f0b4a2970764f1c131107a7ca45a8b3aac8fd4af43bab9f83f89721304e
internal/edge/edge.go Edge.Reload legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-design-edge-rate-limit-358;basis=each route's upstream entry gains rate: e.parseRateSettings(t), the row's rate_limit column parsed once per reload; the one added site is that whole:Route pass of t (parseRateSettings is a new unit, classified in the decisions overlay); no other read added;rev3=census-ruling-certwarm-wake;basis=the single reload hook call becomes runReloadHooks(), which runs every registered hook in order (#386); no read added, same 57 sites (56 before #358 landed on main);rev3=census-ruling-edge-asset-cache-3;basis=each tenant reverse proxy built in the switch (the tunnel, fleet, socket and TCP arms, every *httputil.ReverseProxy) is installed behind assetScrubbedProxy, which hands the proxy an assetInformationalScrub writer so an app's 1xx (103) loses the asset cache's reserved headers (X-Carlos-Asset-Fill, -Fill-Ack, -Expires, Carlos-Cache) on every local path, as the backhaul already does (final review F6); a type check of the proxy it just built and a wrapper around it; static and status handlers untouched; read sites unchanged (57), offsets moved; no read added;rev3=census-ruling-alias-wake-338;basis=#338 follow-up: after the path fold, a resolved platform alias takes its source's own upstream entry (same proxy, route, hibernating: the existing activator wake, lease and fence), keeping its own prefix map (none for a minted apex) and never inheriting the source's (Astra r2 P1); a refused alias, or one whose source has no entry, is dropped from the map (not served, not Allowed); the attached-hostname fold clears platformAlias;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 5: the activator-managed test (generation proxy, hib, no-activator 404) is Route.ActivatorOwned instead of Kind and Hibernate inline, so a resident rootfs instance goes through the activator; binary rows unchanged;rev3=census-ruling-edge-roll-blip;basis=the tcpProxy and multiProxy calls pass e.hold (the per-Edge localHold set once in newEdge): a loopback TCP upstream that refuses is redialled for up to 13 s and a probed route with a local upstream waits for prober readmission instead of answering 502/503 (#434 part B); edge-side dial policy only, no read added, same 52 sites;rev3=census-ruling-regional-domains-447;basis=#447 Task 5: after the alias fold, reads the regional_domains rows (e.reg.ListRegional; an error aborts the reload as every registry read here does) and applies them with foldRegional against the routes slice the same reload read; the added reads are that one registry list and the routes already read;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Tasks 4 and 6: the forward case (fleetProxy toward the binding's FleetBox, throttled refusal); one refusal check before the switch from FleetArmVerdict (sidecar not judged; a non-ready forward row refused; a forward row always judged by FleetServeEligible, any other row only where tunnels are on; an alias of a refused source refused with it); the accountless note; path rows of a forward host not folded; no alias folded onto a refused row; refusedHosts held through every fold. ListFleets and FleetChannelAuth read before the loop (+registry:FleetBox, +registry:Host x7, +whole:Route x3). Serving only; the hub's agent, not root. Review R1 finding 2: the switch reads verdict.Served (FleetArmVerdict) by host; the forward case and the fleet-placed case take their fleet from it (served.Fleet) instead of FleetPlacement(t.Region), and an admitted forward row not Served continues rather than falling through (+registry:Host, -registry:Region); the same rows take the same arms; no read added. Review R2: the switch is on DispatchArm(t, viaFleet, tunnels) (the order moved there unchanged: forward only when in Arm, own Tunnel, fleet, socket, addrs, static, status, else continue), the fleet cases read verdict.Arm (renamed from Served), and the platform-alias fold is foldPlatformAliases with the same take (source entry, own paths, alias marks) and the same refusal log (-registry:Kind x2, -registry:Socket, -registry:Tunnel, +whole:Route: those reads moved into DispatchArm); same rows, same arms, same entries; no read added.;rev3=census-ruling-fleet-routes-followups;basis=the owners map is now e.reg.FleetOwners() instead of ListFleets folded inline: the same fresh-connection ListFleets read and the same name->account map (-registry:Account, -registry:Name, -whole:Fleet x2 move into Registry.FleetOwners); no read added; same error path (abort the reload);rev3=census-ruling-tunnel-websockets;basis=The ArmTunnel arm now records its tenancy (Account, App, Tunnel) copied from the row t that Reload already lists; no new registry query, no file read. Also the reload mutex taken first and held to return, five nil-in-production test hooks, and the sweepUpgrades call after the swap, which reads only the map Reload has just built (spec 7, Tasks 3 and 4).;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.;rev3=census-ruling-edge-held-streams;basis=the edge in the agent (carlos-edge.service, user carlos): after the new upstream map is published, closes the held streams of any host the new map no longer holds (absent, not hibernating, route no longer Hibernate). Reads the freshly built in-memory map m and the in-memory held set; no read added beyond the rebuild Reload already does.;rev3=census-ruling-devbox-identity;basis=#486 A: only the devbox edge created by newDevboxEdge (carlos-devbox service user, not root) enables the new proxy hooks. Saves the existing DispatchArm result and reads t.Socket from an already-listed route when that arm is ArmSocket, passing it to configureDevboxProxy for per-request expected-owner validation and visitor-header rewriting. Adds one registry:Socket field site; no new registry query or file open, and ordinary fleet/agent edges leave the hook disabled. Final fix wave: its devbox-only outgoing-header/trailer hooks now also strip case-insensitive underscore/hyphen aliases through stripVisitorHeaders; no new read.;rev3=census-ruling-agent-start-demo-1;basis=Checks demo route eligibility and filters the final folded map using the existing registry listing; no new registry or store query. Merge resolution against origin/main 9bd45488 retains main's devbox proxy hooks (reading the existing route Socket) alongside demo filtering; no additional registry query.;rev3=census-ruling-stateless-replicas-3;basis=Task 3: dispatch admitted stateless set rows through replicaProxy before legacy fleetBoxOf. Read Host and supplied whole Route values from the existing listing to build and filter the set probe inputs after all registry reads and alias folds; synchronize before map publication. Tenancy comes only from FleetArmVerdict. No new external read; no set row reaches legacy fallback, local addresses, provision.Health or hibernation on the hub. Fix round 1 M2: comment and whitespace correction only; read sites and routing behavior unchanged.;rev3=census-ruling-agent-start-demo-2;basis=edge.go:1175-1177 passes an already-listed demo Route to demoProxy; :1358 passes existing Route and RouteAlias slices to demoRefusalNames; :1401 publishes refusal names before upstreams. Adds whole-value uses only, no new registry query; retained names refuse fallback after filtering.;rev3=census-ruling-demo-api-site-route;basis=Build a dedicated demo API proxy from the selected existing socket, TCP or probed console transport in the same atomic route snapshot, before ordinary wrappers. Reads existing route Host twice, Version and two whole Route values for exact operator-configured console eligibility. No additional registry query or external read.;rev3=census-ruling-agent-start-demo-3;basis=Refresh the verified moved snapshot from registry on reload before route-independent serving. Census read-site delta: unchanged (87).;rev3=census-ruling-region-ha-g2-fixes;basis=Derive blocked ingress names from already listed unready/held/import-gated/sidecar and fleet-refused rows; added field reads only.;rev3=census-ruling-edge-page-cache-1;basis=keeps every row this reload already read from the registry (e.pageRoutes, e.pageRoutesRead = routes, true, under reloadMu) for the page reload hook; the +whole:Route sites are that assignment of the same slice; no new read;rev3=census-ruling-held-move-speed;basis=the six tenant reverse proxies' ModifyResponse is now classifyMoveStreams(e.responseModifier(t)): MarkMoveStream first reads the response head (status 101, or Content-Type text/event-stream) and sets a flag on the request's in-memory StreamEnd, then responseModifier runs unchanged (byte-identical to main). The hook never wraps or touches the body, so the trailer scrubs keep the proxy as their one closer (Astra r2 F2.1: the graceful boundary end and its watcher were cut). No read added;rev3=census-ruling-linked-deployments-slice1;basis=linked deployments slice 1 Task 3: with tunnels on, the pass also reads LinkChannelAuth and LinkOwners from the box's own registry (fresh connection, as FleetChannelAuth and FleetOwners) and merges each well-formed link channel's hash into the set SetDynamicAuth takes; the verdict judges link-placed forward rows by the link owners; an admitted one takes the new ArmLink case (linkProxy down the link's channel, tenancy with the link); the door's fleet snapshot stays fleet owners only and link owners go to a separate snapshot; +whole:Route is the row handed to the new case's responseModifier; the edge process as carlos, no root decision; linked deployments slice 1 Task 8: each upstream entry also records localBackend (ArmSocket, or an instance the activator runs here), from values the pass already holds; no read added; linked deployments slice 1 Task 11: the LinkChannelAuth read (the same fresh-connection read) moves to the top of the pass, before List, and its map is applied at once through the hub's new SetLinkAuth (the link half of the credential set only; fleet entries untouched), so a link revocation or rotation closes the home connection on the old hash even when a later read or step of the same reload fails; the same map is still merged into the set SetDynamicAuth takes; no read added, one moved; the edge process as carlos, no root decision; Task 11 fix round 1: comments only (the reload hook contract now says the link credentials are applied before afterRead); no code or read changed; final review fix: the store of the unread linkAccounts snapshot is deleted (fleetAccounts unchanged); no read added or moved;rev3=census-ruling-stateless-replicas-4-drill3;basis=drill 3 R23: keeps the map it replaces (e.current(), the in-memory map only Reload publishes, under reloadMu) and, for an ArmReplica row, hands the listed row t and that host's previous entry to replicaHandoffFor; the result is set on the new replica transport and the upstream entry; +registry:Host and +whole:Route are the already-listed row t; no registry query, file or store read added; the edge process as carlos, no root decision registry:Account@12872,registry:Alias@28250,registry:Alias@28337,registry:Alias@28917,registry:App@12888,registry:Health@16655,registry:Health@16781,registry:Hibernate@33353,registry:HoldOp@32149,registry:Host@14199,registry:Host@14256,registry:Host@14292,registry:Host@15056,registry:Host@17264,registry:Host@17359,registry:Host@17647,registry:Host@17673,registry:Host@17725,registry:Host@20555,registry:Host@20588,registry:Host@22611,registry:Host@24518,registry:Host@24826,registry:Host@24853,registry:Host@25769,registry:Host@26341,registry:Host@28671,registry:Host@28720,registry:Host@31585,registry:Host@31610,registry:Host@31627,registry:Host@32226,registry:Host@6218,registry:Host@6587,registry:Host@6641,registry:Host@6691,registry:Host@7805,registry:Host@8040,registry:Host@8132,registry:ImportGate@32168,registry:Kind@20947,registry:Kind@20969,registry:Prefix@26316,registry:Socket@15120,registry:Socket@20826,registry:Socket@24834,registry:Status@32125,registry:Status@6512,registry:Target@26328,registry:Tunnel@12711,registry:Tunnel@12903,registry:Version@20678,registry:Version@20928,registry:Version@21030,whole:RegionalDomain@29614,whole:Route@10250,whole:Route@1045,whole:Route@12793,whole:Route@14347,whole:Route@14475,whole:Route@15196,whole:Route@17818,whole:Route@17883,whole:Route@17934,whole:Route@20605,whole:Route@20612,whole:Route@20736,whole:Route@24914,whole:Route@24921,whole:Route@25035,whole:Route@26204,whole:Route@27372,whole:Route@29606,whole:Route@29662,whole:Route@29702,whole:Route@31491,whole:Route@31525,whole:Route@31613,whole:Route@31692,whole:Route@32111,whole:Route@33355,whole:Route@33412,whole:Route@33443,whole:Route@5238,whole:Route@5296,whole:Route@6226,whole:Route@7834,whole:Route@8079,whole:Route@8287,whole:Route@8421,whole:Route@8444,whole:Route@8459,whole:Route@9305,whole:Route@9433,whole:RouteAlias@28221,whole:RouteAlias@29670,whole:RoutePath@25747 b7be66189d8b67210efa5accd17578ffdedf7113fbbed52a2485ca27b81173f9
-@coverage internal/edge f62eb7e401b12a5eb9d2da9c23714c864dfea20540234b61287b24a47053cd49
+@coverage internal/edge 7b50dc7b84bd6342a8d6adf50dd6acc9bbf0f1a43d190b87f6f9089a5e5ef0ae
+@coverage internal/host 9d2d3bb8d44e85eed05f63ba699101510ec88373b94eacb139c3b3db518fbb86
+@coverage internal/tunnelclient 84b140c614b56d977607e83fd0fd4dec5b4a168c620976b8a6828fad09d9ea45