carlos / platform Public

census: ha-1192 proposal (trashed departure hosts, drain, close-lost)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev d6295e86bbb60271170a828103222a6d899ed218 parent dd18ce5
4 files changed, +61 −0
  • docs/superpowers/notes/census-claims-ha-1192.tsv +7 −0
  • docs/superpowers/notes/census-proposal-ha-1192.md +33 −0
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −0
  • internal/provision/testdata/plan14-root-reads-ha-1192.tsv +20 −0

CI cancelled — superseded by a newer push — run details

diff --git a/docs/superpowers/notes/census-claims-ha-1192.tsv b/docs/superpowers/notes/census-claims-ha-1192.tsv
new file mode 100644
index 000000000..ba2f0fb77
--- /dev/null
+++ b/docs/superpowers/notes/census-claims-ha-1192.tsv
@@ -0,0 +1,7 @@
+internal/grouproll/roll.go:Engine.closeLost operator CLI only (refuses root): after its group and EC2 checks, lists control/edges/ once through the existing journaled edgesList and reads its own journal's validated row for box_ref; reports whether the lost member's record is listed; writes nothing to the bucket
+internal/host/agent.go:runAgent sets the group drain driver's departed hook to armedPeerDeparted (the armed departure controller's PeerDeparted: local registry identity + departure journal); no new read
+internal/host/hadepartures_scan.go:Controller.unservedRevoked also rechecks hosts recorded trashed through Controller.trashed (local route lookup, then release.TrashRetired on the deployment bucket: the app's deleted.json and production flag, keys built from the record's own account/app); a restored app revokes the discharge before the edges delete
+internal/host/hadepartures_wiring.go:armHADepartures wires DepartureConfig.TrashRetired: release.TrashRetired over a.OpenStore (the deployment bucket) with the box's CARLOS_RELEASE_PUBKEY via provisionTickConfig, the same marker and flag reads the reconcile already makes
+internal/host/hadepartures_scan.go:Controller.ScanPass records a matched host whose app is TrashRetired, with a released or expired lock, as result "trashed" (no import, lock untouched) instead of adopting it; only reads added are the trash marker and production flag, and only when the local registry has no route for the host
+internal/host/hadepartures_scan.go:Controller.complete excludes "trashed" hosts from the recovered count, as it does "unserved"
+internal/host/hadepartures_scan.go:Controller.trashed new: reads the local registry route for a departure host, then (only when there is none) DepartureConfig.TrashRetired: release.TrashRetired on the deployment bucket, the app's trash marker apps/<account>/<app>/deleted.json and its root-signed production flag, account/app taken from the host's instance record (validated by ReadAppTombstone: schema 1, path and body agree); memoized per app per pass; any error answers false (keeps the host)
diff --git a/docs/superpowers/notes/census-proposal-ha-1192.md b/docs/superpowers/notes/census-proposal-ha-1192.md
new file mode 100644
index 000000000..ae0500fb5
--- /dev/null
+++ b/docs/superpowers/notes/census-proposal-ha-1192.md
@@ -0,0 +1,33 @@
+# Census approval: ha-1192
+
+Ruling `census-ruling-ha-1192`. The independent reviewer approves or rejects every change below, 1 with a new disposition; nothing goes to the census owner (Paul, #280, 2026-10-26).
+
+| unit | change | read sites | what changed |
+|---|---|---|---|
+| `internal/grouproll/roll.go` `Engine.closeLost` | body | unchanged (1) | operator CLI only (refuses root): after its group and EC2 checks, lists control/edges/ once through the existing journaled edgesList and reads its own journal's validated row for box_ref; reports whether the lost member's record is listed; writes nothing to the bucket |
+| `internal/host/agent.go` `runAgent` | body | unchanged (8) | sets the group drain driver's departed hook to armedPeerDeparted (the armed departure controller's PeerDeparted: local registry identity + departure journal); no new read |
+| `internal/host/hadepartures_scan.go` `Controller.unservedRevoked` | body | unchanged (5) | also rechecks hosts recorded trashed through Controller.trashed (local route lookup, then release.TrashRetired on the deployment bucket: the app's deleted.json and production flag, keys built from the record's own account/app); a restored app revokes the discharge before the edges delete |
+| `internal/host/hadepartures_wiring.go` `armHADepartures` | body | unchanged (17) | wires DepartureConfig.TrashRetired: release.TrashRetired over a.OpenStore (the deployment bucket) with the box's CARLOS_RELEASE_PUBKEY via provisionTickConfig, the same marker and flag reads the reconcile already makes |
+| `internal/host/hadepartures_scan.go` `Controller.ScanPass` | sites | +registry:Hosts, +registry:Result, +whole:HADepartureHostScan ×2 | records a matched host whose app is TrashRetired, with a released or expired lock, as result "trashed" (no import, lock untouched) instead of adopting it; only reads added are the trash marker and production flag, and only when the local registry has no route for the host |
+| `internal/host/hadepartures_scan.go` `Controller.complete` | sites | +registry:Result | excludes "trashed" hosts from the recovered count, as it does "unserved" |
+
+Envelopes re-pinned: `internal/grouproll`, `internal/host`, `internal/provision`, `internal/release`.
+
+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.
+
+Recorded dispositions, which each change must still satisfy:
+
+- `internal/grouproll/roll.go` `Engine.closeLost`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-group-roll-verb;basis=lstats provider-divergence.json in the operator's own 0700 state directory to say it is kept
+- `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.;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; no read added, same six sites; touches no admission, lease, ingress drain, listener or file; the agent process, no root decision;rev3=census-ruling-edge-ppv2;basis=Agent (uid carlos), not root. memwatchLoop now gets edgeProxyCounters(&demoEdge) (in-process counters, no read). The drain socket's driver is newAgentDrainSocket(ingress, e, os.Getenv), which attaches the edge trust handler only when CARLOS_INGRESS_PROXY_SOURCES in the agent's environment (from the root-owned host.env) parses to a non-empty list; the socket is served when drainSocketServed: a group member or a configured ingress drain (both as before), or a box armed for PROXY protocol (new). The socket's path and agent-user-only permissions are unchanged. Read sites unchanged (6).;rev3=census-ruling-same-box-edge-fence;basis=Agent (uid carlos), not root. One added line: armEdgeFenceStatus(ctl.EdgeFence), beside the existing armExecSandboxStatus, so the layout report can ask root's /ready for the edge fence state over the control socket client the agent already holds. No read added.;rev3=census-ruling-platform-mail-submission;basis=Task 4: sets eb.Mail = mailsubmit.SocketForwarder{} on every box, and eb.MailSwitch to a mailSwitchCache's On that opens the deploy store itself through openDeployStore, retried at most once a minute with an error line until it opens (review round 1, Task 4 P3), armed for the serial-move refresh (armedMailSwitch). Task 6: also sets the ExecBackend's ManifestOf, the same staged-manifest read as TierOf (rt.App and RouteAccount(rt), hence +registry:App and +whole:Route), for the spawn-time check of decision 10, which logs and emits an event and never refuses. Agent, not root. Fable final P2-2: eb.MailSwitch is the cache's State (three-valued: on, off, unknown) in place of On; an unreadable switch is unknown, never off. No read added.;rev3=census-ruling-fleet-drain-followups;basis=P3 (#1008 T9): one call after armChangeIndex, requestBootFullPass(v, &backstopFullDue), which stores true in the existing in-memory backstopFullDue flag only when no record view is armed, so the fast loop runs its existing full pass on its first tick instead of instancesLoop a minute later; armed boxes unchanged. No read added; read sites unchanged (8); agent, not root.;rev3=census-ruling-fleet-first-reconcile-speed;basis=Startup timing log lines only: runDuties builds a step logger (newStartupLog, which reads the in-memory agent start time) and logs one line after the wait on the activator startup latch and after each existing duty before go fastConvergeLoop. One newStartupLog().at line in the edge ready hook before go tunnelLoop. No read added; read sites unchanged (8). Agent, not root.
+- `internal/host/hadepartures_scan.go` `Controller.unservedRevoked`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-region-ha-dr5;basis=DR-5 R2: rechecks unserved discharges before the edges delete; reads inventory records, scan Hosts, the in-memory view, policy and local journal rows via unserved(). No remote read.
+- `internal/host/hadepartures_wiring.go` `armHADepartures`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-region-ha-p1b3b-t;basis=B3 fix r1: Install proof adapter, adoption identity and suspicion callbacks before asynchronous startup. Lazily retry the same deployment/data clients; lifetime callback reads only the current host through ExecBackend.TerminationLifetime. Add bounded structured paging for unresolved per-iid records. No new bucket, tenant input path or acquire bypass. B4: Wire the shared lock reader and existing AdoptHost entry. Read local route, Pair and duty revision only after authoritative inventory eligibility; bind its record lifetime and refuse missing/mismatched local routes. No route synthesis or pool widening. B5: Publish the armed controller to the existing metrics sampler. No new loop, remote source or process authority.;rev3=census-ruling-region-ha-followups;basis=Inject the existing PageOperator function into the backend when HA departures are armed; no new read or paging transport.;rev3=census-ruling-region-ha-p3b;basis=Require group admission/BeginWork callbacks and pass them into the sole departure consumer, including the production adoption closure. Same store, identity and registry reads; consumer Started remains a lifecycle fact, not duty authority.;rev3=census-ruling-region-ha-p1b3b-s;basis=Carry the actual provisionTickConfig pools and inbound posture into CanAdopt; stamped sidecars use the existing production adopter. Legacy unresolved paging remains. No wider tenancy or new remote source.;rev3=census-ruling-region-ha-g2r-fixes;basis=W3: wires the controller's RequestInventory hook to the agent's early-backstop signal. No new store, read or loop.
+- `internal/host/hadepartures_scan.go` `Controller.ScanPass`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-region-ha-p1b3b-t;basis=B4: Read authoritative pre-filter inventory, exact canonical lock revisions through one page reader, local scan checkpoints and adoption receipts. Persist source identity before the sole AdoptHost importer; validate later successor identity/lifetime/generation and require a fresh full zero-match rescan. Unknown state, unsupported hosts and missing previously matched locks refuse completion. No process launch or tenancy expansion. Preserve checkpoints across walks of identical record bytes; persist the current inventory generation separately and recheck source freshness/completeness before every page and deletion. Placement changes cannot filter the lock census. Fix r1/P15: classify legacy and unrelated locks as zero only before any D match; keep strict successor checks for previously matched hosts and hold malformed HA identities. Compare read start to expiry. Resume authority-complete deletion without rescanning unchanged inventory; persist evidence and scan errors with bounded retry. B4 fix r2: Inventory-only waits request the existing hourly page only after observed evidence is older than ChangeIndexBackstop plus 10 percent. Freshness and completion gates are unchanged; no new read. B5: Route the unchanged AdoptHost callback through measured telemetry; no new authority or lock read.;rev3=census-ruling-region-ha-p3b;basis=Gate and register the existing departure scan with admission before any work. Existing registry/object reads remain, closed members do not import, and shutdown cancels/joins registered work; no new root input.;rev3=census-ruling-region-ha-g2r-fixes;basis=W3: when a departure is blocked only on inventory freshness, signals the bounded early backstop round (global 60 s spacing, three per evidence) instead of waiting for the 30 min backstop. FreshAfter/I3 gates unchanged; no walk inside the step; no new read.;rev3=census-ruling-region-ha-g3-fixes;basis=Track current record revisions across inventory publications; separate lease waits from blockers and persist Cursor as zero for rollback. Drop removed records from coverage while retaining adoption or validated-successor gates for current hosts. Use the bounded lock-prefix listing only after validating every current host prefix; preserve per-host reads for known duties and fall back to the existing 32-host scan when listing evidence is unavailable. Cache listing evidence only in this process under scanMu, invalidate it on blocked work or inventory changes, and permit 128 reads with proven listing coverage. Added reads include departure LastError, host scan state and registry Hosts; the new remote read is a bounded LIST of the configured lock prefix in the existing data bucket.;rev3=census-ruling-region-ha-dr5;basis=BASIS AMENDED by spec 7.5 (DR-5, approved by agent manager 8a3d302 for the region HA standing approval): the B4 completion gate "adoption or validated successor" becomes "adoption, validated successor, or unserved discharge". A host may be discharged unserved only when (1) its lock is a valid release marker naming the departed box or a held lock whose expiry this box read as passed, (2) this box would adopt it but for the pool (placement, HA, lifetime, kind and sidecar rules, not denied), and (3) the complete in-memory departure view shows no in-scope box that serves or may serve the pool, other than group members with a departure enrolled in this box journal (fixed refs never count as gone; unknown served_pools blocks). Every unserved discharge is rechecked at one finalization gate immediately before the conditional edges delete. An unserved host is never imported and its lock is never written, so no lease authority moves; the full zero-match rescan still runs, with unserved hosts the only allowed matches. Inputs: served_pools comes from edges files that only box roles write (already trusted by this scan for identity and by placement); a box agent that lies can at most let a departure finish without import, which it can already cause by deleting edges files with its own role. No new remote read; reads Hosts/Rescan/Result from the local journal. The rescan is due at once.
+- `internal/host/hadepartures_scan.go` `Controller.complete`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-region-ha-p1b3b-t;basis=B4: Read the durable departure/scan and current inventory, then conditionally delete only the retained exact edges key/revision. Reread uncertain results and refuse replacement identities. Persist deletion and acknowledged index phases before complete; queue receipts stay in memory and only complete rows acknowledge. Fresh process evidence is required before authority checkpoint reuse. Fix r1/P15: ignore the old scan-level ETag override and delete only the original departure ETag. Exact-key readback retries the same tag; a changed tag is never deleted and advances only with a different verified iid under the same ref/account/scope, otherwise holds and pages. Persist permission fault episodes; route completion faults through bounded retry. No new filesystem or executable input. B4 fix r4/P18 supersedes fixed-ref deletion: only the deterministic account/iid group reference may delete its retained exact ETag. Every other ref performs an exact-key GET and stays pending unless absent or the existing verified newer-incarnation check succeeds; the live replacement file is left intact. Group revision changes stay pending. No new key or authority read. B5: Increment completion counter only after the durable complete phase; C4 ordering stays after that commit.;rev3=census-ruling-region-ha-p3b;basis=Require registered admitted work before completing a departure or acknowledging it. Existing coverage, inventory, lease and successor reads remain; closed members defer rather than clear obligations.;rev3=census-ruling-region-ha-g2r-fixes;basis=W3: drops the per-departure nudge bookkeeping (moved to a fixed-size global limiter). Completion gates, exact-ETag deletion and reads unchanged.;rev3=census-ruling-region-ha-g3-fixes;basis=Require current inventory visit coverage and re-read group edges before conditional deletion. Verify identity and scope before rebinding a changed ETag; preserve fixed-ref retention and exact-ETag deletion. Reads scan EdgesETag and coverage state; no new object key or read source.;rev3=census-ruling-region-ha-dr2;basis=DR-2: after the edges phases, calls retireStatusSnapshot, which for a deterministic account/iid group reference only does one GET of status/boxes/<ref>.json in the deployment store and a conditional delete of that exact revision (ETag). Best-effort and time-bounded (at most 5 s, always leaving 2 s of the step for the completion save; Astra R1 P2): any failure or timeout is logged and never holds completion, paging or acknowledgement. Fixed refs untouched. No filesystem, executable or new authority read; no change to the edges deletion, completion gates or ordering.;rev3=census-ruling-region-ha-dr5;basis=DR-5: one finalization gate immediately before the conditional edges delete revalidates unserved discharges (unservedRevoked: local view, policy, journal only); on failure clears DeleteUncertain and resets to a fresh walk before any delete. The completion log counts imported hosts only. No new remote read.
+
+New dispositions, which census-propose wrote and the reviewer checks against the unit's reads and the diff:
+
+- new `internal/host/hadepartures_scan.go:Controller.trashed`: reads +registry:Account, +registry:App, +whole:Route; written legacy, accepted-legacy, frozen
+
+Seal: `7ca068c5c146a679b4726d74fe43cf9c47f97080f9c08b761a36a9a12a5a3c54` → `8df52839a0c961d3721f3a5c3247d06202dae4e00d011844b7117f8e918803d4`.
+
+Overlay: `internal/provision/testdata/plan14-root-reads-ha-1192.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`.
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv
index f4253ce83..4677cebda 100644
--- a/internal/provision/testdata/plan14-root-reads-chain.tsv
+++ b/internal/provision/testdata/plan14-root-reads-chain.tsv
@@ -240,3 +240,4 @@ plan14-root-reads-audit-aws-timeouts.tsv c3e74a3069651a7ae638b2ecba5e38c4dbaec28
plan14-root-reads-config-receipts-1.tsv 4abde13ec40d53a479684b7f1e2079fbedb6c40cb1a28819c97853cdab768b2f
plan14-root-reads-audit-edge-test-sleeps.tsv 4abde13ec40d53a479684b7f1e2079fbedb6c40cb1a28819c97853cdab768b2f
plan14-root-reads-ha-generations-floor.tsv 7ca068c5c146a679b4726d74fe43cf9c47f97080f9c08b761a36a9a12a5a3c54
+plan14-root-reads-ha-1192.tsv 8df52839a0c961d3721f3a5c3247d06202dae4e00d011844b7117f8e918803d4
diff --git a/internal/provision/testdata/plan14-root-reads-ha-1192.tsv b/internal/provision/testdata/plan14-root-reads-ha-1192.tsv
new file mode 100644
index 000000000..88609ee2a
--- /dev/null
+++ b/internal/provision/testdata/plan14-root-reads-ha-1192.tsv
@@ -0,0 +1,20 @@
+# Census overlay ha-1192, written by census-propose (#369). census-ruling-ha-1192, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-ha-1192.md.
+# 4 body, 2 sites, 4 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
+# 1 new dispositions: 0 reads re-frozen at their disposition with the claim, 1 new units frozen accepted-legacy, 0 quiet units retired while they read nothing, 0 other.
+@legacy 54abaed8aef438227c077c9953fd126eb0659601a6b0931cfc44b16b73e44008 internal/grouproll/roll.go Engine.closeLost legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=lstats provider-divergence.json in the operator's own 0700 state directory to say it is kept;rev3=census-ruling-ha-1192;basis=operator CLI only (refuses root): after its group and EC2 checks, lists control/edges/ once through the existing journaled edgesList and reads its own journal's validated row for box_ref; reports whether the lost member's record is listed; writes nothing to the bucket file:Lstat@1652 80623961d79ff087d2762245947ad8fd1580f01f0d17d61bb9e39408b3e3909b
+@legacy 3162289fa8c4b24a1288058cbd29564f400ac551ae2b6af7e615efd66f5deaf6 internal/host/hadepartures_scan.go Controller.unservedRevoked legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-dr5;basis=DR-5 R2: rechecks unserved discharges before the edges delete; reads inventory records, scan Hosts, the in-memory view, policy and local journal rows via unserved(). No remote read.;rev3=census-ruling-ha-1192;basis=also rechecks hosts recorded trashed through Controller.trashed (local route lookup, then release.TrashRetired on the deployment bucket: the app's deleted.json and production flag, keys built from the record's own account/app); a restored app revokes the discharge before the edges delete registry:Hosts@264,registry:Lifetime@292,registry:Result@345,whole:HADeparture@603,whole:HADepartureHostScan@266 128e67867ba015573eb135c054fff315ac9c85976995a56a1e02c9ec9fd7f210
+@legacy 311889a4155f477a01fb0aa4a7f93cf710fc47c577147252fbc87068514f4e9c internal/host/hadepartures_wiring.go armHADepartures legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1b3b-t;basis=B3 fix r1: Install proof adapter, adoption identity and suspicion callbacks before asynchronous startup. Lazily retry the same deployment/data clients; lifetime callback reads only the current host through ExecBackend.TerminationLifetime. Add bounded structured paging for unresolved per-iid records. No new bucket, tenant input path or acquire bypass. B4: Wire the shared lock reader and existing AdoptHost entry. Read local route, Pair and duty revision only after authoritative inventory eligibility; bind its record lifetime and refuse missing/mismatched local routes. No route synthesis or pool widening. B5: Publish the armed controller to the existing metrics sampler. No new loop, remote source or process authority.;rev3=census-ruling-region-ha-followups;basis=Inject the existing PageOperator function into the backend when HA departures are armed; no new read or paging transport.;rev3=census-ruling-region-ha-p3b;basis=Require group admission/BeginWork callbacks and pass them into the sole departure consumer, including the production adoption closure. Same store, identity and registry reads; consumer Started remains a lifecycle fact, not duty authority.;rev3=census-ruling-region-ha-p1b3b-s;basis=Carry the actual provisionTickConfig pools and inbound posture into CanAdopt; stamped sidecars use the existing production adopter. Legacy unresolved paging remains. No wider tenancy or new remote source.;rev3=census-ruling-region-ha-g2r-fixes;basis=W3: wires the controller's RequestInventory hook to the agent's early-backstop signal. No new store, read or loop.;rev3=census-ruling-ha-1192;basis=wires DepartureConfig.TrashRetired: release.TrashRetired over a.OpenStore (the deployment bucket) with the box's CARLOS_RELEASE_PUBKEY via provisionTickConfig, the same marker and flag reads the reconcile already makes registry:Account@4137,registry:Account@7899,registry:App@7926,registry:IID@4158,registry:Incarnation@8086,registry:Pool@7945,registry:Region@4148,registry:Region@7966,registry:Revision@8321,registry:Revision@8718,registry:ServingSeq@8114,whole:DutyState@8440,whole:Pair@8303,whole:Pair@8696,whole:Pair@8702,whole:Route@7886,whole:Route@8595 b8286e2eac2e77fa7159063f805c11ed871453196d6a7978f56745a636361133
+@legacy 617584322b1bf03ab5f8efbb6c2e2778bee223160a3d73ea68a1d15c761b08cb internal/host/hadepartures_scan.go Controller.trashed legacy accepted-legacy accepted-legacy;rev3=census-ruling-ha-1192;basis=new: reads the local registry route for a departure host, then (only when there is none) DepartureConfig.TrashRetired: release.TrashRetired on the deployment bucket, the app's trash marker apps/<account>/<app>/deleted.json and its root-signed production flag, account/app taken from the host's instance record (validated by ReadAppTombstone: schema 1, path and body agree); memoized per app per pass; any error answers false (keeps the host) registry:Account@261,registry:App@288,whole:Route@248 01b7ecbbb43befacfa4799b382763320aaaefa42716d7a61c528c4d303416027
+@legacy 9b57442e21f8d414f2b196d7980e059dc4c8616a092ba15ea6ad5609f0a64cfc internal/host/hadepartures_scan.go Controller.ScanPass legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1b3b-t;basis=B4: Read authoritative pre-filter inventory, exact canonical lock revisions through one page reader, local scan checkpoints and adoption receipts. Persist source identity before the sole AdoptHost importer; validate later successor identity/lifetime/generation and require a fresh full zero-match rescan. Unknown state, unsupported hosts and missing previously matched locks refuse completion. No process launch or tenancy expansion. Preserve checkpoints across walks of identical record bytes; persist the current inventory generation separately and recheck source freshness/completeness before every page and deletion. Placement changes cannot filter the lock census. Fix r1/P15: classify legacy and unrelated locks as zero only before any D match; keep strict successor checks for previously matched hosts and hold malformed HA identities. Compare read start to expiry. Resume authority-complete deletion without rescanning unchanged inventory; persist evidence and scan errors with bounded retry. B4 fix r2: Inventory-only waits request the existing hourly page only after observed evidence is older than ChangeIndexBackstop plus 10 percent. Freshness and completion gates are unchanged; no new read. B5: Route the unchanged AdoptHost callback through measured telemetry; no new authority or lock read.;rev3=census-ruling-region-ha-p3b;basis=Gate and register the existing departure scan with admission before any work. Existing registry/object reads remain, closed members do not import, and shutdown cancels/joins registered work; no new root input.;rev3=census-ruling-region-ha-g2r-fixes;basis=W3: when a departure is blocked only on inventory freshness, signals the bounded early backstop round (global 60 s spacing, three per evidence) instead of waiting for the 30 min backstop. FreshAfter/I3 gates unchanged; no walk inside the step; no new read.;rev3=census-ruling-region-ha-g3-fixes;basis=Track current record revisions across inventory publications; separate lease waits from blockers and persist Cursor as zero for rollback. Drop removed records from coverage while retaining adoption or validated-successor gates for current hosts. Use the bounded lock-prefix listing only after validating every current host prefix; preserve per-host reads for known duties and fall back to the existing 32-host scan when listing evidence is unavailable. Cache listing evidence only in this process under scanMu, invalidate it on blocked work or inventory changes, and permit 128 reads with proven listing coverage. Added reads include departure LastError, host scan state and registry Hosts; the new remote read is a bounded LIST of the configured lock prefix in the existing data bucket.;rev3=census-ruling-region-ha-dr5;basis=BASIS AMENDED by spec 7.5 (DR-5, approved by agent manager 8a3d302 for the region HA standing approval): the B4 completion gate "adoption or validated successor" becomes "adoption, validated successor, or unserved discharge". A host may be discharged unserved only when (1) its lock is a valid release marker naming the departed box or a held lock whose expiry this box read as passed, (2) this box would adopt it but for the pool (placement, HA, lifetime, kind and sidecar rules, not denied), and (3) the complete in-memory departure view shows no in-scope box that serves or may serve the pool, other than group members with a departure enrolled in this box journal (fixed refs never count as gone; unknown served_pools blocks). Every unserved discharge is rechecked at one finalization gate immediately before the conditional edges delete. An unserved host is never imported and its lock is never written, so no lease authority moves; the full zero-match rescan still runs, with unserved hosts the only allowed matches. Inputs: served_pools comes from edges files that only box roles write (already trusted by this scan for identity and by placement); a box agent that lies can at most let a departure finish without import, which it can already cause by deleting edges files with its own role. No new remote read; reads Hosts/Rescan/Result from the local journal. The rescan is due at once.;rev3=census-ruling-ha-1192;basis=records a matched host whose app is TrashRetired, with a released or expired lock, as result "trashed" (no import, lock untouched) instead of adopting it; only reads added are the trash marker and production flag, and only when the local registry has no route for the host registry:Cursor@2032,registry:Cursor@2122,registry:Cursor@9546,registry:Generation@2094,registry:Generation@8811,registry:Hosts@2306,registry:Hosts@2326,registry:Hosts@3357,registry:Hosts@3977,registry:Hosts@4045,registry:Hosts@6053,registry:Hosts@6440,registry:Hosts@7147,registry:Hosts@7259,registry:Hosts@7498,registry:Hosts@8256,registry:InventoryGeneration@1913,registry:LastError@2902,registry:Lifetime@4006,registry:NotBefore@2191,registry:NotBefore@3905,registry:NotBefore@4378,registry:NotBefore@4419,registry:NotBefore@4444,registry:NotBefore@6021,registry:NotBefore@6410,registry:NotBefore@7111,registry:NotBefore@7177,registry:NotBefore@9220,registry:NotBefore@9274,registry:NotBefore@9599,registry:Observed@5592,registry:Observed@5739,registry:Observed@6293,registry:Observed@6327,registry:Phase@1448,registry:Phase@2049,registry:Phase@2384,registry:Phase@5309,registry:Phase@634,registry:Phase@689,registry:Phase@729,registry:RecordDigest@3287,registry:RecordDigest@4340,registry:RecordDigest@6350,registry:Rescan@2137,registry:Rescan@4320,registry:Rescan@5478,registry:Rescan@7678,registry:Rescan@8997,registry:Rescan@9385,registry:Rescan@9438,registry:Result@5991,registry:Result@6385,registry:Result@7226,registry:Result@7464,registry:Result@8222,registry:Unresolved@2156,registry:Unresolved@3811,registry:Unresolved@8280,registry:Unresolved@8868,registry:Unresolved@9113,registry:Unresolved@9396,registry:Unresolved@9562,registry:Version@7954,registry:Visited@2073,registry:Visited@2219,registry:Visited@3262,registry:Visited@3762,registry:Visited@3838,registry:Visited@3932,registry:Visited@8307,registry:Visited@9628,registry:Waiting@2175,registry:Waiting@9128,registry:Waiting@9203,registry:Waiting@9417,registry:Waiting@9582,whole:HADeparture@10014,whole:HADeparture@1111,whole:HADeparture@1230,whole:HADeparture@1415,whole:HADeparture@1704,whole:HADeparture@2517,whole:HADeparture@2714,whole:HADeparture@2870,whole:HADeparture@3005,whole:HADeparture@350,whole:HADeparture@392,whole:HADeparture@5589,whole:HADeparture@6941,whole:HADeparture@7922,whole:HADeparture@8058,whole:HADeparture@8414,whole:HADeparture@914,whole:HADeparture@9845,whole:HADepartureHostScan@2308,whole:HADepartureHostScan@2328,whole:HADepartureHostScan@3359,whole:HADepartureHostScan@3979,whole:HADepartureHostScan@4047,whole:HADepartureHostScan@4081,whole:HADepartureHostScan@6055,whole:HADepartureHostScan@6071,whole:HADepartureHostScan@6112,whole:HADepartureHostScan@6442,whole:HADepartureHostScan@6458,whole:HADepartureHostScan@7149,whole:HADepartureHostScan@7165,whole:HADepartureHostScan@7261,whole:HADepartureHostScan@7277,whole:HADepartureHostScan@7500,whole:HADepartureHostScan@7516,whole:HADepartureHostScan@8258,whole:HADepartureHostScan@8274,whole:HADepartureScan@7859,whole:HADepartureScan@8802,whole:HADepartureScan@9779,whole:HADepartureVisit@2075,whole:HADepartureVisit@2221,whole:HADepartureVisit@3264,whole:HADepartureVisit@3764,whole:HADepartureVisit@3782,whole:HADepartureVisit@3840,whole:HADepartureVisit@3858,whole:HADepartureVisit@3934,whole:HADepartureVisit@3952,whole:HADepartureVisit@8309,whole:HADepartureVisit@8327,whole:HADepartureVisit@9630 d11e9de047f7f5dde6a4dbab412fea5c061b0d8c4fbb018685f1705ab5859693
+@legacy 80ef75f0d83091001e50f0d3a4826d7054623d3f05c77b84b979caf65974d583 internal/host/hadepartures_scan.go Controller.complete legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1b3b-t;basis=B4: Read the durable departure/scan and current inventory, then conditionally delete only the retained exact edges key/revision. Reread uncertain results and refuse replacement identities. Persist deletion and acknowledged index phases before complete; queue receipts stay in memory and only complete rows acknowledge. Fresh process evidence is required before authority checkpoint reuse. Fix r1/P15: ignore the old scan-level ETag override and delete only the original departure ETag. Exact-key readback retries the same tag; a changed tag is never deleted and advances only with a different verified iid under the same ref/account/scope, otherwise holds and pages. Persist permission fault episodes; route completion faults through bounded retry. No new filesystem or executable input. B4 fix r4/P18 supersedes fixed-ref deletion: only the deterministic account/iid group reference may delete its retained exact ETag. Every other ref performs an exact-key GET and stays pending unless absent or the existing verified newer-incarnation check succeeds; the live replacement file is left intact. Group revision changes stay pending. No new key or authority read. B5: Increment completion counter only after the durable complete phase; C4 ordering stays after that commit.;rev3=census-ruling-region-ha-p3b;basis=Require registered admitted work before completing a departure or acknowledging it. Existing coverage, inventory, lease and successor reads remain; closed members defer rather than clear obligations.;rev3=census-ruling-region-ha-g2r-fixes;basis=W3: drops the per-departure nudge bookkeeping (moved to a fixed-size global limiter). Completion gates, exact-ETag deletion and reads unchanged.;rev3=census-ruling-region-ha-g3-fixes;basis=Require current inventory visit coverage and re-read group edges before conditional deletion. Verify identity and scope before rebinding a changed ETag; preserve fixed-ref retention and exact-ETag deletion. Reads scan EdgesETag and coverage state; no new object key or read source.;rev3=census-ruling-region-ha-dr2;basis=DR-2: after the edges phases, calls retireStatusSnapshot, which for a deterministic account/iid group reference only does one GET of status/boxes/<ref>.json in the deployment store and a conditional delete of that exact revision (ETag). Best-effort and time-bounded (at most 5 s, always leaving 2 s of the step for the completion save; Astra R1 P2): any failure or timeout is logged and never holds completion, paging or acknowledgement. Fixed refs untouched. No filesystem, executable or new authority read; no change to the edges deletion, completion gates or ordering.;rev3=census-ruling-region-ha-dr5;basis=DR-5: one finalization gate immediately before the conditional edges delete revalidates unserved discharges (unservedRevoked: local view, policy, journal only); on failure clears DeleteUncertain and resets to a fresh walk before any delete. The completion log counts imported hosts only. No new remote read.;rev3=census-ruling-ha-1192;basis=excludes "trashed" hosts from the recovered count, as it does "unserved" registry:DeleteUncertain@3813,registry:DeleteUncertain@4544,registry:DeleteUncertain@4997,registry:EdgesETag@1894,registry:EdgesETag@2906,registry:Hosts@5848,registry:InventoryGeneration@1846,registry:PermissionAlerted@2426,registry:PermissionAlerted@3559,registry:PermissionAlerted@5141,registry:PermissionAlerted@5545,registry:PermissionAlerted@841,registry:PermissionAlerted@883,registry:Phase@1002,registry:Phase@1042,registry:Phase@1538,registry:Phase@262,registry:Phase@3692,registry:Phase@5259,registry:Phase@680,registry:Phase@950,registry:Phase@967,registry:Rescan@4574,registry:Result@5863,registry:Result@5896,registry:Version@665,registry:Visited@4595,whole:HADeparture@2846,whole:HADeparture@315,whole:HADeparture@442,whole:HADeparture@4423,whole:HADeparture@5671,whole:HADeparture@6057,whole:HADepartureHostScan@5850,whole:HADepartureScan@1718,whole:HADepartureScan@4426,whole:HADepartureScan@643,whole:HADepartureVisit@4597 f33013ac30442297b3e54f41180c4216262080cbeb373f9d1617ab7c47b64a2a
+internal/grouproll/roll.go Engine.closeLost legacy accepted-legacy accepted-legacy;rev3=census-ruling-group-roll-verb;basis=lstats provider-divergence.json in the operator's own 0700 state directory to say it is kept;rev3=census-ruling-ha-1192;basis=operator CLI only (refuses root): after its group and EC2 checks, lists control/edges/ once through the existing journaled edgesList and reads its own journal's validated row for box_ref; reports whether the lost member's record is listed; writes nothing to the bucket file:Lstat@1652 80623961d79ff087d2762245947ad8fd1580f01f0d17d61bb9e39408b3e3909b
+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; no read added, same six sites; touches no admission, lease, ingress drain, listener or file; the agent process, no root decision;rev3=census-ruling-edge-ppv2;basis=Agent (uid carlos), not root. memwatchLoop now gets edgeProxyCounters(&demoEdge) (in-process counters, no read). The drain socket's driver is newAgentDrainSocket(ingress, e, os.Getenv), which attaches the edge trust handler only when CARLOS_INGRESS_PROXY_SOURCES in the agent's environment (from the root-owned host.env) parses to a non-empty list; the socket is served when drainSocketServed: a group member or a configured ingress drain (both as before), or a box armed for PROXY protocol (new). The socket's path and agent-user-only permissions are unchanged. Read sites unchanged (6).;rev3=census-ruling-same-box-edge-fence;basis=Agent (uid carlos), not root. One added line: armEdgeFenceStatus(ctl.EdgeFence), beside the existing armExecSandboxStatus, so the layout report can ask root's /ready for the edge fence state over the control socket client the agent already holds. No read added.;rev3=census-ruling-platform-mail-submission;basis=Task 4: sets eb.Mail = mailsubmit.SocketForwarder{} on every box, and eb.MailSwitch to a mailSwitchCache's On that opens the deploy store itself through openDeployStore, retried at most once a minute with an error line until it opens (review round 1, Task 4 P3), armed for the serial-move refresh (armedMailSwitch). Task 6: also sets the ExecBackend's ManifestOf, the same staged-manifest read as TierOf (rt.App and RouteAccount(rt), hence +registry:App and +whole:Route), for the spawn-time check of decision 10, which logs and emits an event and never refuses. Agent, not root. Fable final P2-2: eb.MailSwitch is the cache's State (three-valued: on, off, unknown) in place of On; an unreadable switch is unknown, never off. No read added.;rev3=census-ruling-fleet-drain-followups;basis=P3 (#1008 T9): one call after armChangeIndex, requestBootFullPass(v, &backstopFullDue), which stores true in the existing in-memory backstopFullDue flag only when no record view is armed, so the fast loop runs its existing full pass on its first tick instead of instancesLoop a minute later; armed boxes unchanged. No read added; read sites unchanged (8); agent, not root.;rev3=census-ruling-fleet-first-reconcile-speed;basis=Startup timing log lines only: runDuties builds a step logger (newStartupLog, which reads the in-memory agent start time) and logs one line after the wait on the activator startup latch and after each existing duty before go fastConvergeLoop. One newStartupLog().at line in the edge ready hook before go tunnelLoop. No read added; read sites unchanged (8). Agent, not root.;rev3=census-ruling-ha-1192;basis=sets the group drain driver's departed hook to armedPeerDeparted (the armed departure controller's PeerDeparted: local registry identity + departure journal); no new read file:Exec@21625,file:Open@2191,file:Statfs@58031,registry:App@13287,registry:App@13665,whole:Route@13279,whole:Route@13657,whole:Route@51246 d7d631e7c13c6a48bec242a6c4ea9824eb8a81ebe83bc113cb3b1c7ee50314eb
+internal/host/hadepartures_scan.go Controller.unservedRevoked legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-dr5;basis=DR-5 R2: rechecks unserved discharges before the edges delete; reads inventory records, scan Hosts, the in-memory view, policy and local journal rows via unserved(). No remote read.;rev3=census-ruling-ha-1192;basis=also rechecks hosts recorded trashed through Controller.trashed (local route lookup, then release.TrashRetired on the deployment bucket: the app's deleted.json and production flag, keys built from the record's own account/app); a restored app revokes the discharge before the edges delete registry:Hosts@264,registry:Lifetime@292,registry:Result@345,whole:HADeparture@603,whole:HADepartureHostScan@266 128e67867ba015573eb135c054fff315ac9c85976995a56a1e02c9ec9fd7f210
+internal/host/hadepartures_wiring.go armHADepartures legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1b3b-t;basis=B3 fix r1: Install proof adapter, adoption identity and suspicion callbacks before asynchronous startup. Lazily retry the same deployment/data clients; lifetime callback reads only the current host through ExecBackend.TerminationLifetime. Add bounded structured paging for unresolved per-iid records. No new bucket, tenant input path or acquire bypass. B4: Wire the shared lock reader and existing AdoptHost entry. Read local route, Pair and duty revision only after authoritative inventory eligibility; bind its record lifetime and refuse missing/mismatched local routes. No route synthesis or pool widening. B5: Publish the armed controller to the existing metrics sampler. No new loop, remote source or process authority.;rev3=census-ruling-region-ha-followups;basis=Inject the existing PageOperator function into the backend when HA departures are armed; no new read or paging transport.;rev3=census-ruling-region-ha-p3b;basis=Require group admission/BeginWork callbacks and pass them into the sole departure consumer, including the production adoption closure. Same store, identity and registry reads; consumer Started remains a lifecycle fact, not duty authority.;rev3=census-ruling-region-ha-p1b3b-s;basis=Carry the actual provisionTickConfig pools and inbound posture into CanAdopt; stamped sidecars use the existing production adopter. Legacy unresolved paging remains. No wider tenancy or new remote source.;rev3=census-ruling-region-ha-g2r-fixes;basis=W3: wires the controller's RequestInventory hook to the agent's early-backstop signal. No new store, read or loop.;rev3=census-ruling-ha-1192;basis=wires DepartureConfig.TrashRetired: release.TrashRetired over a.OpenStore (the deployment bucket) with the box's CARLOS_RELEASE_PUBKEY via provisionTickConfig, the same marker and flag reads the reconcile already makes registry:Account@4137,registry:Account@7899,registry:App@7926,registry:IID@4158,registry:Incarnation@8086,registry:Pool@7945,registry:Region@4148,registry:Region@7966,registry:Revision@8321,registry:Revision@8718,registry:ServingSeq@8114,whole:DutyState@8440,whole:Pair@8303,whole:Pair@8696,whole:Pair@8702,whole:Route@7886,whole:Route@8595 b8286e2eac2e77fa7159063f805c11ed871453196d6a7978f56745a636361133
+internal/host/hadepartures_scan.go Controller.trashed legacy accepted-legacy accepted-legacy;rev3=census-ruling-ha-1192;basis=new: reads the local registry route for a departure host, then (only when there is none) DepartureConfig.TrashRetired: release.TrashRetired on the deployment bucket, the app's trash marker apps/<account>/<app>/deleted.json and its root-signed production flag, account/app taken from the host's instance record (validated by ReadAppTombstone: schema 1, path and body agree); memoized per app per pass; any error answers false (keeps the host) registry:Account@261,registry:App@288,whole:Route@248 01b7ecbbb43befacfa4799b382763320aaaefa42716d7a61c528c4d303416027
+internal/host/hadepartures_scan.go Controller.ScanPass legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1b3b-t;basis=B4: Read authoritative pre-filter inventory, exact canonical lock revisions through one page reader, local scan checkpoints and adoption receipts. Persist source identity before the sole AdoptHost importer; validate later successor identity/lifetime/generation and require a fresh full zero-match rescan. Unknown state, unsupported hosts and missing previously matched locks refuse completion. No process launch or tenancy expansion. Preserve checkpoints across walks of identical record bytes; persist the current inventory generation separately and recheck source freshness/completeness before every page and deletion. Placement changes cannot filter the lock census. Fix r1/P15: classify legacy and unrelated locks as zero only before any D match; keep strict successor checks for previously matched hosts and hold malformed HA identities. Compare read start to expiry. Resume authority-complete deletion without rescanning unchanged inventory; persist evidence and scan errors with bounded retry. B4 fix r2: Inventory-only waits request the existing hourly page only after observed evidence is older than ChangeIndexBackstop plus 10 percent. Freshness and completion gates are unchanged; no new read. B5: Route the unchanged AdoptHost callback through measured telemetry; no new authority or lock read.;rev3=census-ruling-region-ha-p3b;basis=Gate and register the existing departure scan with admission before any work. Existing registry/object reads remain, closed members do not import, and shutdown cancels/joins registered work; no new root input.;rev3=census-ruling-region-ha-g2r-fixes;basis=W3: when a departure is blocked only on inventory freshness, signals the bounded early backstop round (global 60 s spacing, three per evidence) instead of waiting for the 30 min backstop. FreshAfter/I3 gates unchanged; no walk inside the step; no new read.;rev3=census-ruling-region-ha-g3-fixes;basis=Track current record revisions across inventory publications; separate lease waits from blockers and persist Cursor as zero for rollback. Drop removed records from coverage while retaining adoption or validated-successor gates for current hosts. Use the bounded lock-prefix listing only after validating every current host prefix; preserve per-host reads for known duties and fall back to the existing 32-host scan when listing evidence is unavailable. Cache listing evidence only in this process under scanMu, invalidate it on blocked work or inventory changes, and permit 128 reads with proven listing coverage. Added reads include departure LastError, host scan state and registry Hosts; the new remote read is a bounded LIST of the configured lock prefix in the existing data bucket.;rev3=census-ruling-region-ha-dr5;basis=BASIS AMENDED by spec 7.5 (DR-5, approved by agent manager 8a3d302 for the region HA standing approval): the B4 completion gate "adoption or validated successor" becomes "adoption, validated successor, or unserved discharge". A host may be discharged unserved only when (1) its lock is a valid release marker naming the departed box or a held lock whose expiry this box read as passed, (2) this box would adopt it but for the pool (placement, HA, lifetime, kind and sidecar rules, not denied), and (3) the complete in-memory departure view shows no in-scope box that serves or may serve the pool, other than group members with a departure enrolled in this box journal (fixed refs never count as gone; unknown served_pools blocks). Every unserved discharge is rechecked at one finalization gate immediately before the conditional edges delete. An unserved host is never imported and its lock is never written, so no lease authority moves; the full zero-match rescan still runs, with unserved hosts the only allowed matches. Inputs: served_pools comes from edges files that only box roles write (already trusted by this scan for identity and by placement); a box agent that lies can at most let a departure finish without import, which it can already cause by deleting edges files with its own role. No new remote read; reads Hosts/Rescan/Result from the local journal. The rescan is due at once.;rev3=census-ruling-ha-1192;basis=records a matched host whose app is TrashRetired, with a released or expired lock, as result "trashed" (no import, lock untouched) instead of adopting it; only reads added are the trash marker and production flag, and only when the local registry has no route for the host registry:Cursor@2032,registry:Cursor@2122,registry:Cursor@9546,registry:Generation@2094,registry:Generation@8811,registry:Hosts@2306,registry:Hosts@2326,registry:Hosts@3357,registry:Hosts@3977,registry:Hosts@4045,registry:Hosts@6053,registry:Hosts@6440,registry:Hosts@7147,registry:Hosts@7259,registry:Hosts@7498,registry:Hosts@8256,registry:InventoryGeneration@1913,registry:LastError@2902,registry:Lifetime@4006,registry:NotBefore@2191,registry:NotBefore@3905,registry:NotBefore@4378,registry:NotBefore@4419,registry:NotBefore@4444,registry:NotBefore@6021,registry:NotBefore@6410,registry:NotBefore@7111,registry:NotBefore@7177,registry:NotBefore@9220,registry:NotBefore@9274,registry:NotBefore@9599,registry:Observed@5592,registry:Observed@5739,registry:Observed@6293,registry:Observed@6327,registry:Phase@1448,registry:Phase@2049,registry:Phase@2384,registry:Phase@5309,registry:Phase@634,registry:Phase@689,registry:Phase@729,registry:RecordDigest@3287,registry:RecordDigest@4340,registry:RecordDigest@6350,registry:Rescan@2137,registry:Rescan@4320,registry:Rescan@5478,registry:Rescan@7678,registry:Rescan@8997,registry:Rescan@9385,registry:Rescan@9438,registry:Result@5991,registry:Result@6385,registry:Result@7226,registry:Result@7464,registry:Result@8222,registry:Unresolved@2156,registry:Unresolved@3811,registry:Unresolved@8280,registry:Unresolved@8868,registry:Unresolved@9113,registry:Unresolved@9396,registry:Unresolved@9562,registry:Version@7954,registry:Visited@2073,registry:Visited@2219,registry:Visited@3262,registry:Visited@3762,registry:Visited@3838,registry:Visited@3932,registry:Visited@8307,registry:Visited@9628,registry:Waiting@2175,registry:Waiting@9128,registry:Waiting@9203,registry:Waiting@9417,registry:Waiting@9582,whole:HADeparture@10014,whole:HADeparture@1111,whole:HADeparture@1230,whole:HADeparture@1415,whole:HADeparture@1704,whole:HADeparture@2517,whole:HADeparture@2714,whole:HADeparture@2870,whole:HADeparture@3005,whole:HADeparture@350,whole:HADeparture@392,whole:HADeparture@5589,whole:HADeparture@6941,whole:HADeparture@7922,whole:HADeparture@8058,whole:HADeparture@8414,whole:HADeparture@914,whole:HADeparture@9845,whole:HADepartureHostScan@2308,whole:HADepartureHostScan@2328,whole:HADepartureHostScan@3359,whole:HADepartureHostScan@3979,whole:HADepartureHostScan@4047,whole:HADepartureHostScan@4081,whole:HADepartureHostScan@6055,whole:HADepartureHostScan@6071,whole:HADepartureHostScan@6112,whole:HADepartureHostScan@6442,whole:HADepartureHostScan@6458,whole:HADepartureHostScan@7149,whole:HADepartureHostScan@7165,whole:HADepartureHostScan@7261,whole:HADepartureHostScan@7277,whole:HADepartureHostScan@7500,whole:HADepartureHostScan@7516,whole:HADepartureHostScan@8258,whole:HADepartureHostScan@8274,whole:HADepartureScan@7859,whole:HADepartureScan@8802,whole:HADepartureScan@9779,whole:HADepartureVisit@2075,whole:HADepartureVisit@2221,whole:HADepartureVisit@3264,whole:HADepartureVisit@3764,whole:HADepartureVisit@3782,whole:HADepartureVisit@3840,whole:HADepartureVisit@3858,whole:HADepartureVisit@3934,whole:HADepartureVisit@3952,whole:HADepartureVisit@8309,whole:HADepartureVisit@8327,whole:HADepartureVisit@9630 d11e9de047f7f5dde6a4dbab412fea5c061b0d8c4fbb018685f1705ab5859693
+internal/host/hadepartures_scan.go Controller.complete legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1b3b-t;basis=B4: Read the durable departure/scan and current inventory, then conditionally delete only the retained exact edges key/revision. Reread uncertain results and refuse replacement identities. Persist deletion and acknowledged index phases before complete; queue receipts stay in memory and only complete rows acknowledge. Fresh process evidence is required before authority checkpoint reuse. Fix r1/P15: ignore the old scan-level ETag override and delete only the original departure ETag. Exact-key readback retries the same tag; a changed tag is never deleted and advances only with a different verified iid under the same ref/account/scope, otherwise holds and pages. Persist permission fault episodes; route completion faults through bounded retry. No new filesystem or executable input. B4 fix r4/P18 supersedes fixed-ref deletion: only the deterministic account/iid group reference may delete its retained exact ETag. Every other ref performs an exact-key GET and stays pending unless absent or the existing verified newer-incarnation check succeeds; the live replacement file is left intact. Group revision changes stay pending. No new key or authority read. B5: Increment completion counter only after the durable complete phase; C4 ordering stays after that commit.;rev3=census-ruling-region-ha-p3b;basis=Require registered admitted work before completing a departure or acknowledging it. Existing coverage, inventory, lease and successor reads remain; closed members defer rather than clear obligations.;rev3=census-ruling-region-ha-g2r-fixes;basis=W3: drops the per-departure nudge bookkeeping (moved to a fixed-size global limiter). Completion gates, exact-ETag deletion and reads unchanged.;rev3=census-ruling-region-ha-g3-fixes;basis=Require current inventory visit coverage and re-read group edges before conditional deletion. Verify identity and scope before rebinding a changed ETag; preserve fixed-ref retention and exact-ETag deletion. Reads scan EdgesETag and coverage state; no new object key or read source.;rev3=census-ruling-region-ha-dr2;basis=DR-2: after the edges phases, calls retireStatusSnapshot, which for a deterministic account/iid group reference only does one GET of status/boxes/<ref>.json in the deployment store and a conditional delete of that exact revision (ETag). Best-effort and time-bounded (at most 5 s, always leaving 2 s of the step for the completion save; Astra R1 P2): any failure or timeout is logged and never holds completion, paging or acknowledgement. Fixed refs untouched. No filesystem, executable or new authority read; no change to the edges deletion, completion gates or ordering.;rev3=census-ruling-region-ha-dr5;basis=DR-5: one finalization gate immediately before the conditional edges delete revalidates unserved discharges (unservedRevoked: local view, policy, journal only); on failure clears DeleteUncertain and resets to a fresh walk before any delete. The completion log counts imported hosts only. No new remote read.;rev3=census-ruling-ha-1192;basis=excludes "trashed" hosts from the recovered count, as it does "unserved" registry:DeleteUncertain@3813,registry:DeleteUncertain@4544,registry:DeleteUncertain@4997,registry:EdgesETag@1894,registry:EdgesETag@2906,registry:Hosts@5848,registry:InventoryGeneration@1846,registry:PermissionAlerted@2426,registry:PermissionAlerted@3559,registry:PermissionAlerted@5141,registry:PermissionAlerted@5545,registry:PermissionAlerted@841,registry:PermissionAlerted@883,registry:Phase@1002,registry:Phase@1042,registry:Phase@1538,registry:Phase@262,registry:Phase@3692,registry:Phase@5259,registry:Phase@680,registry:Phase@950,registry:Phase@967,registry:Rescan@4574,registry:Result@5863,registry:Result@5896,registry:Version@665,registry:Visited@4595,whole:HADeparture@2846,whole:HADeparture@315,whole:HADeparture@442,whole:HADeparture@4423,whole:HADeparture@5671,whole:HADeparture@6057,whole:HADepartureHostScan@5850,whole:HADepartureScan@1718,whole:HADepartureScan@4426,whole:HADepartureScan@643,whole:HADepartureVisit@4597 f33013ac30442297b3e54f41180c4216262080cbeb373f9d1617ab7c47b64a2a
+@coverage internal/grouproll d6717da3083172aa7cd109fa520c7e865fa748ae2311c2b1fd4b70d6030bbd2b
+@coverage internal/host 5fe58660833e47e79594f4747bb39c179f24cce1bf45a5ac2ba667ad91eed6b2
+@coverage internal/provision 1e4a77fec6e7c6484abaf60c76e6b4729615e161b43fae792c9047b201ae87f0
+@coverage internal/release 7d86684d77c3db85e2da19596bdd73110b21d4923c280786b6068141d3fa62d3