carlos / platform Public

census: ha-generations root-read proposal

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev b8ff4eb897c8323b4ea978e9c228be70d77f3eed parent 9a2b65c
3 files changed, +125 −0
  • docs/superpowers/notes/census-proposal-ha-generations.md +58 −0
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −0
  • internal/provision/testdata/plan14-root-reads-ha-generations.tsv +66 −0
diff --git a/docs/superpowers/notes/census-proposal-ha-generations.md b/docs/superpowers/notes/census-proposal-ha-generations.md
new file mode 100644
index 000000000..b2c777259
--- /dev/null
+++ b/docs/superpowers/notes/census-proposal-ha-generations.md
@@ -0,0 +1,58 @@
+# Census approval: ha-generations
+
+Ruling `census-ruling-ha-generations`. The independent reviewer approves or rejects every change below, 12 with a new disposition; nothing goes to the census owner (Paul, #280, 2026-10-26).
+
+| unit | change | read sites | what changed |
+|---|---|---|---|
+| `internal/activator/activator.go` `Service.doWake` | body | unchanged (1) | region HA storage generations Task 5: doWake re-runs doWakeOnce once when the failed wake's error is lease.ErrHeadMoved or a files-fence conflict, after the same proven give-back checks as the wakeModeChange retry; no read added |
+| `internal/activator/backend_exec.go` `ExecBackend.restorePlain` | body | unchanged (13) | storage generations: an HA host's restore is dispatched to restoreHAWake (generations-aware) instead of restoreHA directly; Task 7: promoteStagedReplica refuses a host with head.json before promotion; read sites unchanged |
+| `internal/activator/hasecrets.go` `ExecBackend.haManifestFound` | body | unchanged (2) | storage generations Task 5 fix: a found manifest is decoded with no defaults and a files-fence placeholder (v2, lock_generation > 0, seq 0, no entries, platform or origins) counts as no manifest so the first generations wake can mint; any other manifest still counts as found; no read added (Astra + Fable reviewed) |
+| `internal/activator/poolwithdrawal.go` `Service.poolWithdrawalProof` | body | unchanged (40) | storage generations Task 1: compares the released marker with Marker.SameRecord (ignores the decode-only Gen flag) so a generations marker confirms the release; same readers |
+| `internal/dbdoor/client.go` `doorError` | body | unchanged (1) | storage generations Task 8: decodes the additive generation field of a 409 (the console names the generation to bind) from the same bounded read; no read added |
+| `internal/host/movesoffline_seal.go` `movesWorker.offlineTakeSeal` | body | unchanged (16) | storage generations Task 7: refuses a host with head.json (lease.HasHead, one GET of instances/<host>/head.json on the data bucket) before the first replica listing and before the tombstone; only adds a refusal |
+| `internal/host/movespass.go` `armMovesPass` | body | unchanged (3) | storage generations Task 7: wires the HasHead check into the moves worker; read sites unchanged |
+| `internal/host/movespass.go` `legacyMoveRound` | body | unchanged (4) | storage generations Task 7: refuses a host with head.json before the first mirror (aborting rounds pass); only adds a refusal |
+| `internal/lease/tombstone.go` `readLockFields` | body | unchanged (1) | storage generations: the read now also returns the S3 Date header (store clock) beside the body and ETag; same single GET of lock.json |
+| `internal/activator/haadopt.go` `Service.AdoptHost` | sites | +registry:Host ×2 | storage generations Task 10 fix: marks the host adoption-held after a successful adoption acquire and clears it after a successful release (in-memory only), so the fast same-box row cannot take a lock this process holds; +registry:Host x2 are the host passed to that mark/clear; no storage read added |
+| `internal/activator/hawake.go` `ExecBackend.acquireClassified` | sites | +whole:Route ×3 | storage generations Tasks 1, 5, 10: passes GenerationsOn (box switch) to the HA acquire and the fast-row proofs (LiveOwnerTerminated, LiveSameBoxEmpty without alarms) and Proofs.GenerationsFast; +whole:Route x3 are rt passed to those proof closures; no direct read added |
+| `internal/activator/hawake.go` `ExecBackend.restoreFilesClean` | sites | -registry:Host, -whole:Route | storage generations Task 5: split into restoreFilesCleanRead (the same reads, moved) plus the files fence; this unit reads less (-registry:Host, -whole:Route) |
+| `internal/activator/hawake.go` `ExecBackend.restoreHA` | sites | -whole:Route | storage generations Task 5: legacy (non-generations) HA restore unchanged, called from restoreHAWake; -whole:Route moved into haRestorePrelude |
+
+Envelopes re-pinned: `internal/activator`, `internal/dbdoor`, `internal/dbreads`, `internal/genselect`, `internal/grouproll`, `internal/hafresh`, `internal/host`, `internal/hostbox`, `internal/hostfiles`, `internal/lease`, `internal/moves`, `internal/ops`, `internal/release`, `internal/replicagen`.
+
+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/activator/activator.go` `Service.doWake`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-292fix;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body (census ruling 292's legacy start mark and lease give-back; census ruling owed's pending record) with the seeded change ruled under census-ruling-seeded-instances (the refreshed row checked against the row the wake began from, twice; the seed's first upload recorded after the wake), and now one more line on a failed start: a start its pre-exec gate refused (launchNotStarted: the exec gate, the pending record or its recheck answered no before root was asked) is recorded as known not started (stopObservation.notStarted) instead of uncertain, only when the wake has started nothing else (wakeStartedNothing); otherwise it goes through cleanupFailedWake and its proofs. A refusal before its lease (step 1), which has started nothing, is recorded the same way. Read sites unchanged; no new read and no root decision;rev3=census-ruling-wake-latency-1;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=marks the end of each wake step on the woken instance's journal timer (wakeSteps: a.now() and a slice append, journal only); no read added, no step reordered;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos: (1) after the restore it asks the backend for the replication class an HA restore imported from the host's published wake state (restoredReplication(rt)) and, if it differs, logs it and sets rt.Replication and the entry's route to it; (2) an HA lease of the stream class replicates with a 1 s monitor interval (SetMonitorInterval); (3) after Replicate, an HA replica opens the entry's files publisher (openEntryFiles(ctx, e, rt)) and starts it, and a publisher that will not open fails the wake through cleanupFailedWake; (4) every cleanupFailedWake call passes e; (5) final fix F1: the two start-error arms that gave the lease straight back (a start its pre-exec gate refused with nothing started, and the default arm) now call giveBackAfterStart(ctx, rt, w, lease), which gives a legacy lease back exactly as before and an HA one only over an empty host slice. New sites: registry:Replication x5 (the class compare, the log line, the assignment and the HA sync-interval check) and whole:Route x6 (rt handed to restoredReplication, openEntryFiles, the cleanup calls and giveBackAfterStart); no file read in this body; only adds a condition before an HA release, no check removed;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Tasks 7 and 8: the rootfs admission runs before the claim path and before Acquire on the refreshed row (rootfsWakeRefusal), again in full if a re-read under the lock changed any gate field, and a resident wake re-checks residentRunnable; for a rootfs row a held lease or refused config is an ownership refusal; a rootfs first boot (no good version, fresh) places the empty database under the lease (placeRootfsDB) and uploads it once (syncRootfsPlaceholder), while fresh with a good version is refused as a lost database; declared processes are logged after the wake (rootfsProcessesHook); binary rows unchanged; fix wave 1 and 2 (6189a9db, then the r2 ruling "refuse interrupted init"): a fresh rootfs first boot goes through rootfsFirstBoot (rootfsmarker.go) instead of placeRootfsDB alone: under the lease it reads the lifetime's first-boot marker from the hibernate bucket (present or unreadable refuses, present as errRootfsReplicaMissing), writes it create-only, reads it back (only a read back that finds it confirms it; a write conflict proves nothing), and only then places the database; a warm wake does nothing with the marker (fix wave 1's settleRootfsFirstBoot call and its whole:Route site are gone, no local pending record); adds refusals only, binary rows unchanged;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R, R3: (1) refuses (errWakeUnproven) while another entry's release record of the host is open; (2) a rootfs row with a plan or a pin reads its declared processes before the lease (declaredProcesses(rt, g): the existing staged-manifest read of ExecBackend.Processes, the manifest root's staging wrote, checked against the identity's path and digest) and refuses before Acquire on an error; (3) the staged-identity start runs releaseInWake(ctx, e, rt, id, lease) before startGenExe, under this wake's lease, and a release that did not pass fails the wake; (4) a rootfs row with no plan, no pin and no staged identity is refused, the lease given back, nothing started; (5) a start error whose release is not proven stopped hands the lease to the release record (oweWakeLeaseToRelease) instead of giving it back. New sites +whole:Route x2 (rt to declaredProcesses and releaseInWake); no new file read beyond the existing staged-manifest read; binary rows unchanged;rev3=census-ruling-rootfs-apps-3-workers;basis=rootfs Plan 3 Group W, W1: step 7 no longer calls rootfsProcessesHook (log only); it calls declareRootfsWorkers(e, rt, w), which registers the workers the wake's generation declares as pending and starts nothing (the resident tick starts them once the entry is awake under its lease watch); a worker is never a failure of the wake; the read of the declaration is the existing staged-manifest read (see registerRootfsWorkers); the same read sites in this body, no new read;rev3=census-ruling-region-ha-p1b2;basis=region HA P1b-2: a successful acquire drops the host's holder-cache entry; same reads;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (branch review R1 P1-1 and the controller ruling after it): after the lease, doWake asks routeCurrentUnderLease(ctx, rt, e.worker) (the +whole:Route site), which re-reads the host's row from the box's own registry and, for a labelled row on a fleet box, reads the instance record once; a row that is not this box's and current gives the lease back and refuses the wake, nothing restored or started. Its checks up to the spawn ask wakeGoesOn(e), which adds the entry's in-memory retired mark (set by RetireExcept) to the fence test. Task 6a's awake record call is removed. Agent, not root; it only refuses more.;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Keep the original entrypoint at its existing census path. Run doWakeOnce, and retry a selected fallback only after the failed generation is proven stopped, no release or stray obligation remains, and a stateful lease was returned. Carry the fallback canonical selection and original outcome metadata.
+- `internal/activator/backend_exec.go` `ExecBackend.restorePlain`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-seeded-instances;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): body of the frozen ExecBackend.Restore, which is now its dispatcher, with the seed marker reconciled before the warm-cache check; same staging fallback and replica restore;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos: first asks haRestore(ctx, rt) (+whole:Route x2: rt to haRestore and to restoreHA); an HA host restores through restoreHA (hawake.go, a new unit) and never through the warm cache or the staging fallback; an error there fails the restore; a non-HA host takes the unchanged path;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Task 3, rule 6 start rule): the +whole:Route sites are calls taking rt: reconcileAssignment before the seed-marker check (a labelled row's copy not kept under rt.Assigned is moved into <DataDir>/.superseded/<host>/, never deleted), startAllowed on the warm-cache, restored and fresh paths (a labelled row may refuse with ErrNothingToRestore), and establishAssignment after a restore and before a fresh boot (writes the <db>.assigned marker). Task 6a's record clear after a restore is removed. An unlabelled row (Assigned "") takes none of these. Agent, not root; it refuses more, never less.
+- `internal/activator/hasecrets.go` `ExecBackend.haManifestFound`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-region-ha-p1a;basis=new: whether the host's files manifest exists: from the wake's or entry's publisher if there is one, else one hostfiles.Load of <hibernate prefix>/files/0/ from the files store; +registry:Host x2
+- `internal/activator/poolwithdrawal.go` `Service.poolWithdrawalProof`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-region-ha-g2-fixes;basis=New withdrawal proof uses existing fence/stop, cgroup, record/lifetime, holder-lock, obligation, local release-record/stat and registry timer/route readers. Requires proven stop and clean release or safe never-started state; retains outstanding duties and special rows. No new path namespace or record write; local files use existing backend layout.;rev3=census-ruling-region-ha-g2r-fixes;basis=W1: each pending return wraps the error that caused it (cgroup/nested readiness, record, lock) instead of discarding it. Same readers and proof conditions; no new read or write.
+- `internal/dbdoor/client.go` `doorError`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-db-region-forward-2;identity=the carlos CLI on a person's machine, as the person;basis=decodes the db region forward marker's three additive fields (forward, region, forward_ops) beside error, from the same bounded 64 KiB read of a refusal body; no read added;rev3=census-ruling-region-labels;basis=decodes the additive region_name beside region in the forward marker, from the same bounded 64 KiB read; no read added
+- `internal/host/movesoffline_seal.go` `movesWorker.offlineTakeSeal`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-moves-offline-precopy;basis=root-route (J1, census-ruling-moves-offline's disposition); the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): census-ruling-moves-offline's body (seal steps 1 to 9 from the row: database path, next due, replication rung and timer rows, read for the seal) with one refusal before the mirror: a staged move (staged_at set) is sealed only into the staging bucket and region the stage fixed on the record (move.stage_bucket, move.stage_region), a comparison of record and edges-file fields that reads and writes nothing new. Read sites unchanged; every offset after the check moved by 487 bytes
+- `internal/host/movespass.go` `armMovesPass`: authority, task B,C. Basis: rev3=census-ruling-self-serve-moves-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): arms the moves worker with the box's judge (moveCfg.Judge, copied into its offline view); read sites unchanged, offsets moved; B,C authority retained
+- `internal/host/movespass.go` `legacyMoveRound`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J1,J4;basis=route-and-input
+- `internal/lease/tombstone.go` `readLockFields`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-ha-generations-floor;basis=new: reads lock.json from the data bucket (ReadAll of the S3 GET body, 64 KiB cap as before) and keeps its ETag, so the tombstone write is conditional on the checked version and refuses unknown carlos_ fields; replaces readLock
+- `internal/activator/haadopt.go` `Service.AdoptHost`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-region-ha-p1b3b-t;basis=Serialize through the existing host operation state. Read local route/revision/receipt plus configured lock/manifest/wake objects; use only restricted ordinary acquire, exact guarded restore, ordinary unclean release and verified readback for adoption. No process launch, local-copy reuse or secret access. B3: pass the optional shared durable termination proof adapter into the existing restricted finalizer acquire. The adapter validates the exact classified peer and current host lifetime, uses the acquire data-bucket client, and cannot bypass expiry or CAS. No new read in this unit. B4: A first scanner import may reuse its staging lock observation; the ordinary acquire still rereads and compares the exact ETag/generation and expiry. Existing receipt replay keeps its fresh read. No new read path or takeover authority.;rev3=census-ruling-region-ha-followups;basis=Attach a per-acquire termination proof observer to finalizer acquisitions so refusals retain alarms; avoid duplicate fallback observations. The observer receives the existing route and departure ref for paging; no new storage read or takeover authority.;rev3=census-ruling-region-ha-g2-fixes;basis=Require local pool eligibility at entry and in HA acquisition proofs; supplied route only; termination, lifetime and emptiness checks remain.;rev3=census-ruling-ha-unclean-marker-waits;basis=Defers adoption, before any import, while the observed lock is an unclean release marker that is not settled and younger than a lease term (hafresh.MarkerOpensAt). No new read: it inspects the lock view the unit already read. Only adds a refusal.
+- `internal/activator/hawake.go` `ExecBackend.acquireClassified`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-region-ha-p1a;basis=new: the acquire's classification: a legacy route (sidecar, hand-added or not an instance) takes lease.Acquire and refuses on an HA-format lock; otherwise isHA (a record read error fails the wake, never falls back to legacy); not HA takes lease.Acquire, and an HA-format lock there marks the host HA for good and continues; HA requires haContained before any lock request, then lease.AcquireHA with the same-box proof; held and refused leases map to errLeaseHeld and errLeaseRefused (leaseError); +registry:Host, +whole:Route x7;rev3=census-ruling-region-ha-p1b1;basis=region HA P1b-1: the HA acquire's Proofs gain OwnerTerminated (b.ownerTerminated(ctx, rt)) beside SameBoxEmpty; one more whole:Route site passes the route to ownerTerminated; nothing new is read; the proof is consulted only by hafresh.DecideAcquire for another box's expired HA lock;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Task 7, two-box fleet test): the two legacy acquires call b.acquireLegacy(ctx, prefix), which is acquireLegacyLease exactly when ExecBackend.LeaseIdentity is nil and LeaseTTL is 0 (the agent never sets them), otherwise lease.AcquireAs with that identity and TTL. The classification, the HA path and every refusal are unchanged. Read sites unchanged (9). Agent, not root.;rev3=census-ruling-region-ha-p1b3b-t;basis=Select the restriction-only AcquireHAForDuty for background contexts, including sticky HA reclassification; observe successful ordinary acquires to clear stale suppression. Add a whole-route observer argument; no new authority. B2 binds the current authoritative lifetime and advances local revision before HA acquire, invalidating concurrent adoption I/O. Ordinary lease authority and restore ordering remain unchanged. B2 fix r1: advance the local duty revision with an unconditional registry UPDATE before acquire; remove pre-acquire lifetime CAS and basis clearing. Failed acquire preserves adopted state. Existing lease validation and successful-acquire observer remain. B3: pass the same optional durable termination proof adapter to visitor and duty acquires. Nil retains the existing path until controller arming; configured proof failures refuse, with no fallback to a live boolean. No new read in this unit. Final fix P2-1: copy the shared proof adapter per acquire to attach the existing takeover telemetry; retain a live confirmer fallback for unverified identities. Existing classified owner, lifetime, expiry and CAS guards remain.;rev3=census-ruling-agent-start-demo-1;basis=Reads demo shape/layout and takes the existing legacy renewing lease for demos; never falls through to HA acquisition. Merge integration against origin/main 9bd45488 retains main's HA duty/termination proof wiring after the demo legacy-lease branch; the added whole-route passes are main's existing checks.;rev3=census-ruling-region-ha-p1b3b-s;basis=Before any HA sidecar write require a known canonical lifetime, files store and valid shared sealer; unstamped sidecars cannot upgrade from an HA lock. Reuse existing containment, AcquireHAForDuty, restore and release paths.;rev3=census-ruling-region-ha-g2-fixes;basis=Pass local pool eligibility and classified-refusal observer into HA acquire; additional whole-route uses, no additional direct external read; existing lifetime and termination proofs remain.
+- `internal/activator/hawake.go` `ExecBackend.restoreFilesClean`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-region-ha-p1a;basis=new: restores the HA host's published files into a fresh <host>.restore directory beneath the instance data dir (instancefs, no link followed), renames it into place without replacing anything, writes the manifest's env item as <host>.env (instancefs.WriteAtomic, 0600) and imports the manifest's wake state into the registry (hostfiles.ImportWake, then the class for restoredReplication); the source is the host's files manifest in the hibernate bucket, written by the agents of the boxes that held the host; every failure fails the wake; +registry:Host, +whole:Route x2;rev3=census-ruling-durability-3a-escrow;basis=durability 3a Task 3 (fix round 1: sealed precedence before any fetch): the restore into <host>.restore is now RestoreRootBaselineShadowed with sealedShadow(host), a pure function of the manifest already read and validated: a live raw instance.key or report.token entry whose sealed item the manifest holds is neither fetched nor written (so a missing or corrupt raw object cannot fail the wake, and a sealed item that does not open fails it with no raw fallback); every other entry is restored as before, and the baseline the wake's publisher continues from is the manifest as read. Then each sealed trio item the manifest holds (instance.key.sealed, report.token.sealed) is fetched and opened with hostfiles.ReadSealed (key, sha256, v2 envelope, binding and MAC checked) and written with instancefs.WriteAtomic (openat2 directory, no symlink, O_EXCL temp, rename, 0600) into the restore directory this function created, then that directory is synced; then the same no-replace rename. The env file comes from the sealed env item through ReadSealed when present, else from the raw env item as before, written as before. The source is still the host's files manifest in the hibernate bucket; the destinations are the same restore directory and env file; no new path is opened, followed or named from input; the sealer (sealerFor) is built only when a sealed item is present. Durability 3a Task 5: after RestoreRootBaselineShadowed, noteRawSecrets(host, rm) on the manifest just restored from. Reads only manifests this process already holds (no request, no file opened); calls the detector, which logs and calls ExecBackend.OnRawSecret; nothing else changes. Read sites unchanged. Durability 3a Task 5 fix round 1: the restore is RestoreRootBaselineObserved (the same read and restore as RestoreRootBaselineShadowed) with a checked callback, noteRawSecrets(host, m), run once the manifest is read and validated and before any entry is removed, fetched or written, so a restore that then fails still shows the detector the manifest; the later noteRawSecrets call is gone. No request, open or write added; read sites unchanged.;rev3=census-ruling-region-ha-p1b3b-t;basis=Final fix P3-1: select the HA ordinary-wake importer after the same acquired-lease manifest restore. It alone permits generation of legacy non-claim timer registrations; claim-owned empty registrations remain refused. All file, key and manifest reads are unchanged.
+- `internal/activator/hawake.go` `ExecBackend.restoreHA`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-region-ha-p1a;basis=new: an HA host's restore: haContained again, the existing seed-obligation and seed-marker checks, then on a first wake (lock absent) sets the local copy aside and boots fresh; otherwise keeps the local copy only when hafresh.DecideKeep over the acquire's view, this box's identity, the lifetime and the local state (readLocalNow) says so, else sets it aside (instancefs renames and removes beneath their directories), restores the replica (lease.Restore, CheckDB, quarantine on corruption) and the files (restoreFilesClean); every error fails the wake; +registry:Host, +whole:Route x8
+
+New dispositions, which census-propose wrote and the reviewer checks against the unit's reads and the diff:
+
+- new `internal/activator/hasamebox.go:ExecBackend.sameBoxEmptyLive`: reads +registry:Host ×2, +whole:Route; written legacy, accepted-legacy, frozen
+- new `internal/activator/hatakeover.go:ExecBackend.ownerTerminatedLive`: reads +whole:Route; written legacy, accepted-legacy, frozen
+- new `internal/activator/hatakeover.go:ExecBackend.reportLiveTakeover`: reads +registry:Host ×2; written legacy, accepted-legacy, frozen
+- new `internal/activator/hawake.go:ExecBackend.haRestorePrelude`: reads +whole:Route ×4; written legacy, accepted-legacy, frozen
+- new `internal/activator/hawake.go:ExecBackend.keptBaseline`: reads +file:Open, +registry:Host ×2, +whole:Route; written legacy, accepted-legacy, frozen
+- new `internal/activator/hawake.go:ExecBackend.refuseHeadWithoutGenerations`: reads +registry:Host ×3; written legacy, accepted-legacy, frozen
+- new `internal/activator/hawake.go:ExecBackend.restoreFilesCleanRead`: reads +registry:Host, +whole:Route ×2; written legacy, accepted-legacy, frozen
+- new `internal/activator/hawake.go:ExecBackend.restoreHAGenerations`: reads +registry:Host, +whole:Route ×6; written legacy, accepted-legacy, frozen
+- new `internal/activator/hawake.go:ExecBackend.restoreHAWake`: reads +whole:Route ×2; written legacy, accepted-legacy, frozen
+- new `internal/dbdoor/generation.go:Client.refusal`: reads +file:ReadAll; written legacy, accepted-legacy, frozen
+- new `internal/lease/legacytake.go:readViewClock`: reads +file:ReadAll; written legacy, accepted-legacy, frozen
+- quiet `internal/lease/legacytake.go:readView`: reads nothing now; retired while it reads nothing (or its row keeps no sites)
+
+Seal: `5d4a5eea79394145fdd59aa5eb87115cc1ee396e02e0ab4b21decd2b3a10e3b4` → `8f2c0915d34cc0dff95a252103ab6fb473f1853ad3c3de8796cc677a85a78f35`.
+
+Overlay: `internal/provision/testdata/plan14-root-reads-ha-generations.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 33351eace..199614493 100644
--- a/internal/provision/testdata/plan14-root-reads-chain.tsv
+++ b/internal/provision/testdata/plan14-root-reads-chain.tsv
@@ -252,3 +252,4 @@ plan14-root-reads-staticcheck-sa1012.tsv 5fcd060180e923773dad3faee7cc60ee250779a
plan14-root-reads-staticcheck-sa1019.tsv f9be26c06eb1c844b91a75f65faa51997048cb2900f3ed078be2ae28c65c0e98
plan14-root-reads-small-fixes-1246-1248.tsv c6d366dcf2211b714977b7a69180289555b362dfe5f36a5780af90b5ece82998
plan14-root-reads-edge-ppv2-idle.tsv 5d4a5eea79394145fdd59aa5eb87115cc1ee396e02e0ab4b21decd2b3a10e3b4
+plan14-root-reads-ha-generations.tsv 8f2c0915d34cc0dff95a252103ab6fb473f1853ad3c3de8796cc677a85a78f35
diff --git a/internal/provision/testdata/plan14-root-reads-ha-generations.tsv b/internal/provision/testdata/plan14-root-reads-ha-generations.tsv
new file mode 100644
index 000000000..f87742cf6
--- /dev/null
+++ b/internal/provision/testdata/plan14-root-reads-ha-generations.tsv
@@ -0,0 +1,66 @@
+# Census overlay ha-generations, written by census-propose (#369). census-ruling-ha-generations, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-ha-generations.md.
+# 9 body, 4 sites, 14 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
+# 12 new dispositions: 0 reads re-frozen at their disposition with the claim, 11 new units frozen accepted-legacy, 1 quiet units retired while they read nothing, 0 other.
+@legacy 206775f68cc04f280bc2d3b5648b3ef56b7c788fd8201288c3e4f9093382451b internal/activator/activator.go Service.doWake legacy accepted-legacy accepted-legacy;rev3=census-ruling-292fix;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body (census ruling 292's legacy start mark and lease give-back; census ruling owed's pending record) with the seeded change ruled under census-ruling-seeded-instances (the refreshed row checked against the row the wake began from, twice; the seed's first upload recorded after the wake), and now one more line on a failed start: a start its pre-exec gate refused (launchNotStarted: the exec gate, the pending record or its recheck answered no before root was asked) is recorded as known not started (stopObservation.notStarted) instead of uncertain, only when the wake has started nothing else (wakeStartedNothing); otherwise it goes through cleanupFailedWake and its proofs. A refusal before its lease (step 1), which has started nothing, is recorded the same way. Read sites unchanged; no new read and no root decision;rev3=census-ruling-wake-latency-1;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=marks the end of each wake step on the woken instance's journal timer (wakeSteps: a.now() and a slice append, journal only); no read added, no step reordered;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos: (1) after the restore it asks the backend for the replication class an HA restore imported from the host's published wake state (restoredReplication(rt)) and, if it differs, logs it and sets rt.Replication and the entry's route to it; (2) an HA lease of the stream class replicates with a 1 s monitor interval (SetMonitorInterval); (3) after Replicate, an HA replica opens the entry's files publisher (openEntryFiles(ctx, e, rt)) and starts it, and a publisher that will not open fails the wake through cleanupFailedWake; (4) every cleanupFailedWake call passes e; (5) final fix F1: the two start-error arms that gave the lease straight back (a start its pre-exec gate refused with nothing started, and the default arm) now call giveBackAfterStart(ctx, rt, w, lease), which gives a legacy lease back exactly as before and an HA one only over an empty host slice. New sites: registry:Replication x5 (the class compare, the log line, the assignment and the HA sync-interval check) and whole:Route x6 (rt handed to restoredReplication, openEntryFiles, the cleanup calls and giveBackAfterStart); no file read in this body; only adds a condition before an HA release, no check removed;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Tasks 7 and 8: the rootfs admission runs before the claim path and before Acquire on the refreshed row (rootfsWakeRefusal), again in full if a re-read under the lock changed any gate field, and a resident wake re-checks residentRunnable; for a rootfs row a held lease or refused config is an ownership refusal; a rootfs first boot (no good version, fresh) places the empty database under the lease (placeRootfsDB) and uploads it once (syncRootfsPlaceholder), while fresh with a good version is refused as a lost database; declared processes are logged after the wake (rootfsProcessesHook); binary rows unchanged; fix wave 1 and 2 (6189a9db, then the r2 ruling "refuse interrupted init"): a fresh rootfs first boot goes through rootfsFirstBoot (rootfsmarker.go) instead of placeRootfsDB alone: under the lease it reads the lifetime's first-boot marker from the hibernate bucket (present or unreadable refuses, present as errRootfsReplicaMissing), writes it create-only, reads it back (only a read back that finds it confirms it; a write conflict proves nothing), and only then places the database; a warm wake does nothing with the marker (fix wave 1's settleRootfsFirstBoot call and its whole:Route site are gone, no local pending record); adds refusals only, binary rows unchanged;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R, R3: (1) refuses (errWakeUnproven) while another entry's release record of the host is open; (2) a rootfs row with a plan or a pin reads its declared processes before the lease (declaredProcesses(rt, g): the existing staged-manifest read of ExecBackend.Processes, the manifest root's staging wrote, checked against the identity's path and digest) and refuses before Acquire on an error; (3) the staged-identity start runs releaseInWake(ctx, e, rt, id, lease) before startGenExe, under this wake's lease, and a release that did not pass fails the wake; (4) a rootfs row with no plan, no pin and no staged identity is refused, the lease given back, nothing started; (5) a start error whose release is not proven stopped hands the lease to the release record (oweWakeLeaseToRelease) instead of giving it back. New sites +whole:Route x2 (rt to declaredProcesses and releaseInWake); no new file read beyond the existing staged-manifest read; binary rows unchanged;rev3=census-ruling-rootfs-apps-3-workers;basis=rootfs Plan 3 Group W, W1: step 7 no longer calls rootfsProcessesHook (log only); it calls declareRootfsWorkers(e, rt, w), which registers the workers the wake's generation declares as pending and starts nothing (the resident tick starts them once the entry is awake under its lease watch); a worker is never a failure of the wake; the read of the declaration is the existing staged-manifest read (see registerRootfsWorkers); the same read sites in this body, no new read;rev3=census-ruling-region-ha-p1b2;basis=region HA P1b-2: a successful acquire drops the host's holder-cache entry; same reads;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (branch review R1 P1-1 and the controller ruling after it): after the lease, doWake asks routeCurrentUnderLease(ctx, rt, e.worker) (the +whole:Route site), which re-reads the host's row from the box's own registry and, for a labelled row on a fleet box, reads the instance record once; a row that is not this box's and current gives the lease back and refuses the wake, nothing restored or started. Its checks up to the spawn ask wakeGoesOn(e), which adds the entry's in-memory retired mark (set by RetireExcept) to the fence test. Task 6a's awake record call is removed. Agent, not root; it only refuses more.;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Keep the original entrypoint at its existing census path. Run doWakeOnce, and retry a selected fallback only after the failed generation is proven stopped, no release or stray obligation remains, and a stateful lease was returned. Carry the fallback canonical selection and original outcome metadata.;rev3=census-ruling-ha-generations;basis=region HA storage generations Task 5: doWake re-runs doWakeOnce once when the failed wake's error is lease.ErrHeadMoved or a files-fence conflict, after the same proven give-back checks as the wakeModeChange retry; no read added whole:Route@486 5c4be08e18de95a89222214ebb8d7c887f182f9c76e735099e22d00ab1720e18
+@legacy 8a33cbba9be29b6a7cef97d29ea43e2801f368f9ff05eef95e6a153f85326153 internal/activator/backend_exec.go ExecBackend.restorePlain legacy accepted-legacy accepted-legacy;rev3=census-ruling-seeded-instances;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): body of the frozen ExecBackend.Restore, which is now its dispatcher, with the seed marker reconciled before the warm-cache check; same staging fallback and replica restore;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos: first asks haRestore(ctx, rt) (+whole:Route x2: rt to haRestore and to restoreHA); an HA host restores through restoreHA (hawake.go, a new unit) and never through the warm cache or the staging fallback; an error there fails the restore; a non-HA host takes the unchanged path;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Task 3, rule 6 start rule): the +whole:Route sites are calls taking rt: reconcileAssignment before the seed-marker check (a labelled row's copy not kept under rt.Assigned is moved into <DataDir>/.superseded/<host>/, never deleted), startAllowed on the warm-cache, restored and fresh paths (a labelled row may refuse with ErrNothingToRestore), and establishAssignment after a restore and before a fresh boot (writes the <db>.assigned marker). Task 6a's record clear after a restore is removed. An unlabelled row (Assigned "") takes none of these. Agent, not root; it refuses more, never less.;rev3=census-ruling-ha-generations;basis=storage generations: an HA host's restore is dispatched to restoreHAWake (generations-aware) instead of restoreHA directly; Task 7: promoteStagedReplica refuses a host with head.json before promotion; read sites unchanged file:Stat@1163,registry:Host@354,whole:Route@1020,whole:Route@1100,whole:Route@1376,whole:Route@243,whole:Route@327,whole:Route@374,whole:Route@5613,whole:Route@5703,whole:Route@6280,whole:Route@643,whole:Route@6511 27131b2433327d4619bf78499a30e525303a4bd38462e82455ef2ff6c6c3240e
+@legacy e09d8597abefbf56e38b037013692a12e335f5d21a34c48e9f88920c39d3c268 internal/activator/hasecrets.go ExecBackend.haManifestFound legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1a;basis=new: whether the host's files manifest exists: from the wake's or entry's publisher if there is one, else one hostfiles.Load of <hibernate prefix>/files/0/ from the files store; +registry:Host x2;rev3=census-ruling-ha-generations;basis=storage generations Task 5 fix: a found manifest is decoded with no defaults and a files-fence placeholder (v2, lock_generation > 0, seq 0, no entries, platform or origins) counts as no manifest so the first generations wake can mint; any other manifest still counts as found; no read added (Astra + Fable reviewed) registry:Host@149,registry:Host@373 ecc25f3bf7b916e4e32881ac91938c5d2005c1aa1b9f40f308f5420a28051bfc
+@legacy 7975d7f26e8896a6cc8c55cdcc65abf0115dd9d4c2ce03793651e9d304027999 internal/activator/poolwithdrawal.go Service.poolWithdrawalProof legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-g2-fixes;basis=New withdrawal proof uses existing fence/stop, cgroup, record/lifetime, holder-lock, obligation, local release-record/stat and registry timer/route readers. Requires proven stop and clean release or safe never-started state; retains outstanding duties and special rows. No new path namespace or record write; local files use existing backend layout.;rev3=census-ruling-region-ha-g2r-fixes;basis=W1: each pending return wraps the error that caused it (cgroup/nested readiness, record, lock) instead of discarding it. Same readers and proof conditions; no new read or write.;rev3=census-ruling-ha-generations;basis=storage generations Task 1: compares the released marker with Marker.SameRecord (ignores the decode-only Gen flag) so a generations marker confirms the release; same readers registry:Addr@1111,registry:Addrs@1128,registry:Args@1185,registry:DBPath@1146,registry:HA@1351,registry:Hibernate@1076,registry:Host@1597,registry:Host@2113,registry:Host@2373,registry:Host@2582,registry:Host@279,registry:Host@4086,registry:Host@4179,registry:Host@434,registry:Host@469,registry:Host@508,registry:Host@539,registry:Host@621,registry:Host@658,registry:Host@897,registry:Kind@1034,registry:Kind@1292,registry:Kind@1396,registry:NextDue@4342,registry:Runtime@1165,registry:Socket@1092,registry:WakeIncarnation@1263,registry:WakeIncarnation@1876,whole:Route@115,whole:Route@1452,whole:Route@1681,whole:Route@2208,whole:Route@2368,whole:Route@2631,whole:Route@4206,whole:Route@4250,whole:Route@4273,whole:Route@4296,whole:Route@977,whole:Timer@4370 5d4bec521ea0e1aeed4d00b9d7c76057254c6821012a3dab696e09d92cfa1e23
+@legacy 4e0c2f0d9dec9776f99c99c307df7b96b49db7655fab33b84a19dfa8c4e7b101 internal/dbdoor/client.go doorError legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-db-region-forward-2;identity=the carlos CLI on a person's machine, as the person;basis=decodes the db region forward marker's three additive fields (forward, region, forward_ops) beside error, from the same bounded 64 KiB read of a refusal body; no read added;rev3=census-ruling-region-labels;basis=decodes the additive region_name beside region in the forward marker, from the same bounded 64 KiB read; no read added;rev3=census-ruling-ha-generations;basis=storage generations Task 8: decodes the additive generation field of a 409 (the console names the generation to bind) from the same bounded read; no read added file:ReadAll@54 f0a152ddf5e4eadaf034883b83ed1692d063ddf9232d9737fa6e6dea53090f53
+@legacy 4812b941b41e69aeb8ffe04296a282be2f638f4633abec074b895dd4dbe4698f internal/host/movesoffline_seal.go movesWorker.offlineTakeSeal legacy accepted-legacy accepted-legacy;rev3=census-ruling-moves-offline-precopy;basis=root-route (J1, census-ruling-moves-offline's disposition); the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): census-ruling-moves-offline's body (seal steps 1 to 9 from the row: database path, next due, replication rung and timer rows, read for the seal) with one refusal before the mirror: a staged move (staged_at set) is sealed only into the staging bucket and region the stage fixed on the record (move.stage_bucket, move.stage_region), a comparison of record and edges-file fields that reads and writes nothing new. Read sites unchanged; every offset after the check moved by 487 bytes;rev3=census-ruling-ha-generations;basis=storage generations Task 7: refuses a host with head.json (lease.HasHead, one GET of instances/<host>/head.json on the data bucket) before the first replica listing and before the tombstone; only adds a refusal registry:DBPath@2885,registry:NextDue@12314,registry:NextDue@13226,registry:Replication@12219,registry:Replication@13201,whole:Route@10954,whole:Route@1713,whole:Route@2946,whole:Route@3727,whole:Route@5716,whole:Route@8490,whole:Timer@10070,whole:Timer@9641,whole:Timer@9706,whole:Timer@9712,whole:Timer@9971 f6eb0f4f2e8cdb74e8fd2ce1d00481055937743637cf0b1a69ef276308c91a7f
+@legacy dfd0993c4b655199ff515e2f07352c81154ba512e5fad4e20c631a3550f73855 internal/host/movespass.go legacyMoveRound legacy accepted-legacy accepted-legacy;rev3=J1,J4;basis=route-and-input;rev3=census-ruling-ha-generations;basis=storage generations Task 7: refuses a host with head.json before the first mirror (aborting rounds pass); only adds a refusal file:Stat@6087,registry:DBPath@5988,registry:DBPath@6019,whole:Route@5975 f40ac781b0392fcf98a920a78ae0b3884d422ba55e030496b6a90c370a5b9e28
+@legacy b135b9739e852966cca4d4805e18f92416c367ff88e0738e2d6f1175340551d5 internal/lease/tombstone.go readLockFields legacy accepted-legacy accepted-legacy;rev3=census-ruling-ha-generations-floor;basis=new: reads lock.json from the data bucket (ReadAll of the S3 GET body, 64 KiB cap as before) and keeps its ETag, so the tombstone write is conditional on the checked version and refuses unknown carlos_ fields; replaces readLock;rev3=census-ruling-ha-generations;basis=storage generations: the read now also returns the S3 Date header (store clock) beside the body and ETag; same single GET of lock.json file:ReadAll@471 6bdc0c53c141304623479235ba36e4cd162ca4b56bbfc081c60a1ee9889a4720
+@legacy ee2900245529fed17369f1471ce1091fd45a5a1c74cf5de0ebf78b053ae978ee internal/activator/hasamebox.go ExecBackend.sameBoxEmptyLive legacy accepted-legacy accepted-legacy;rev3=census-ruling-ha-generations;basis=new (Task 10): the fast same-box proof for an unexpired generations lock: the existing same-box emptiness checks without alarms, refusing while the host is acquired here or adoption-held; reads the box's own registry and route only registry:Host@142,registry:Host@497,whole:Route@274 134e778f665dcfbeeb113315f9301b62823c34e4a6b0850d16841eb3e1df00f7
+@legacy 4c46ae379f3da31a0a9d32a7117505f219abb34e216c8d30985ef1ef7bb869db internal/activator/hatakeover.go ExecBackend.ownerTerminatedLive legacy accepted-legacy accepted-legacy;rev3=census-ruling-ha-generations;basis=new (Task 10): the fast other-box termination proof for an unexpired generations lock, the existing termination proof without the expired-lock ALERT; route only whole:Route@269 5743a10fc6ffa0dc942b2f3cff2420590fff55cf67242991ffb6163673a9f36a
+@legacy d2578119c51ac1013a849b5b9f1d56a3c51d6e2e9c7bf21424d5cd60a6332390 internal/activator/hatakeover.go ExecBackend.reportLiveTakeover legacy accepted-legacy accepted-legacy;rev3=census-ruling-ha-generations;basis=new (Task 10): logs a confirmed live takeover; reads the registry host row for the log line only registry:Host@158,registry:Host@306 e83d2ca67a764560b580f6d68c45ba53982dbdcbbb99a278cdfdb11616423a1c
+@legacy 48080a87c39dcce661558f48688ae2e1134efa459a0175b76fe7e39a8fb09229 internal/activator/hawake.go ExecBackend.haRestorePrelude legacy accepted-legacy accepted-legacy;rev3=census-ruling-ha-generations;basis=new (Task 5): the containment, seed-obligation and seed-marker checks restoreHA already ran, factored out for both restore paths; same reads whole:Route@112,whole:Route@183,whole:Route@226,whole:Route@298 8ea472a5c25337032adf82144f53ee6e688bafcfa79a30ce5f6af1e783c04db4
+@legacy 44cf9b445919f16f49118b49c21d9b3020f0f7cf5af81fc538a147d1c6d8722b internal/activator/hawake.go ExecBackend.keptBaseline legacy accepted-legacy accepted-legacy;rev3=census-ruling-ha-generations;basis=new (Task 5): on a kept wake, opens the local <db>.release.files.json the release wrote (existing stageKeptFiles source, accepted only when its body hashes to the marker's files_gen) to build the files fence baseline; reads the box's own registry row file:Open@583,registry:Host@142,registry:Host@556,whole:Route@194 9a3fbf21afdf4ce3bf2f51f20d6a6e983993d44c34ae9ea3fef64f9d535c28c1
+@legacy 084c5ca643e05b61a190d63f9a2b071827f81fb6a70c88071b5d2b8f1cb139c2 internal/activator/hawake.go ExecBackend.refuseHeadWithoutGenerations legacy accepted-legacy accepted-legacy;rev3=census-ruling-ha-generations;basis=new (Task 5): refuses (and pages) a non-generations wake over a host whose head.json exists; registry host for the log and page only registry:Host@280,registry:Host@337,registry:Host@394 214eb9e7e5e83e4b45bd462484e8f4bd6bfcc4a84a04d962b5f95e32c7bf7bc0
+@legacy d0109d17a1e4ed542a1cc2091e2f602b80ff117ab5134de7ff9f32c05336d565 internal/activator/hawake.go ExecBackend.restoreFilesCleanRead legacy accepted-legacy accepted-legacy;rev3=census-ruling-ha-generations;basis=new (Task 5): the read half of restoreFilesClean moved verbatim (manifest read and restore into <host>.restore beneath the instance data dir); same reads as before registry:Host@132,whole:Route@1534,whole:Route@235 7f0dffb065fe65083a6cce431fbe384597b3c59f01d971f486c6d106701d7892
+@legacy e9b167b9f07715d8606bb794e350861dda6a741e3726379e4faecc94ee1d4572 internal/activator/hawake.go ExecBackend.restoreHAGenerations legacy accepted-legacy accepted-legacy;rev3=census-ruling-ha-generations;basis=new (Task 5): the generations take on the wake: StartGeneration over the data bucket (head.json, the predecessor generation's listing and server-side copies into g-<N>), the keep rule (only when head names the marker holder's generation), RestoreTake from g-<N>, files restore and fence, Switch, all before spawn; data-bucket objects written only by holders of this host's lease registry:Host@128,whole:Route@171,whole:Route@2565,whole:Route@3104,whole:Route@314,whole:Route@3700,whole:Route@386 980c26827c05b0f64edb87b14e2cfb80469989258c3cf2d04325db6a26c1e999
+@legacy 6111bdac182d64169681f4052426dd6ce233f12d85b5216649c3b4639b8a4fae internal/activator/hawake.go ExecBackend.restoreHAWake legacy accepted-legacy accepted-legacy;rev3=census-ruling-ha-generations;basis=new (Task 5): chooses restoreHAGenerations (lock in generations mode or switch on) or the legacy restoreHA; route only whole:Route@185,whole:Route@220 13c812473760fcc35e6ca522883f58476fd5192e8aa648ac67326a30ccbe8c39
+@legacy 5c76d95c8ec966cd1e7672384f129db83856a6706b1fa44a9ba033aec210aa83 internal/dbdoor/generation.go Client.refusal legacy accepted-legacy accepted-legacy;rev3=census-ruling-ha-generations;basis=new (Task 8): decodes a bounded console refusal body (409 with generation, 410 gone) for the CLI's bound reads; the CLI on a person's machine file:ReadAll@131 ab2262a63238203cf8d3fc50125cad3f6b7c25c9cdef0e22706baf9ab68c727e
+@legacy 8081b965c3c847d3192f400995c3f3a76b369969ecb4d1c6b968cb010b156b73 internal/lease/legacytake.go readViewClock legacy accepted-legacy accepted-legacy;rev3=census-ruling-ha-generations;basis=new (Task 11c): the lock.json GET readView did, also returning the response's Date header (store clock) for retirement ages; same object, same 64 KiB cap file:ReadAll@425 97fce1b57c9ec6f56c416930651507782f3ba3f56289f34d45ac818eb3c0ca69
+@legacy d5e08237a9c82ec4b2a09b2e3bad6fcae946099c7badbc7e135644ad9f56b987 internal/activator/haadopt.go Service.AdoptHost legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1b3b-t;basis=Serialize through the existing host operation state. Read local route/revision/receipt plus configured lock/manifest/wake objects; use only restricted ordinary acquire, exact guarded restore, ordinary unclean release and verified readback for adoption. No process launch, local-copy reuse or secret access. B3: pass the optional shared durable termination proof adapter into the existing restricted finalizer acquire. The adapter validates the exact classified peer and current host lifetime, uses the acquire data-bucket client, and cannot bypass expiry or CAS. No new read in this unit. B4: A first scanner import may reuse its staging lock observation; the ordinary acquire still rereads and compares the exact ETag/generation and expiry. Existing receipt replay keeps its fresh read. No new read path or takeover authority.;rev3=census-ruling-region-ha-followups;basis=Attach a per-acquire termination proof observer to finalizer acquisitions so refusals retain alarms; avoid duplicate fallback observations. The observer receives the existing route and departure ref for paging; no new storage read or takeover authority.;rev3=census-ruling-region-ha-g2-fixes;basis=Require local pool eligibility at entry and in HA acquisition proofs; supplied route only; termination, lifetime and emptiness checks remain.;rev3=census-ruling-ha-unclean-marker-waits;basis=Defers adoption, before any import, while the observed lock is an unclean release marker that is not settled and younger than a lease term (hafresh.MarkerOpensAt). No new read: it inspects the lock view the unit already read. Only adds a refusal.;rev3=census-ruling-ha-generations;basis=storage generations Task 10 fix: marks the host adoption-held after a successful adoption acquire and clears it after a successful release (in-memory only), so the fast same-box row cannot take a lock this process holds; +registry:Host x2 are the host passed to that mark/clear; no storage read added registry:AcquiredGeneration@2664,registry:AcquiredGeneration@3037,registry:AcquiredGeneration@3815,registry:AcquiredGeneration@4427,registry:AcquiredGeneration@4518,registry:AcquiredGeneration@5157,registry:AcquiredGeneration@5248,registry:DepartureIID@1912,registry:DepartureIID@6033,registry:DepartureRef@1876,registry:DepartureRef@6017,registry:ExpectedPair@9088,registry:Host@1074,registry:Host@1277,registry:Host@1373,registry:Host@1445,registry:Host@1514,registry:Host@1780,registry:Host@2155,registry:Host@2881,registry:Host@3218,registry:Host@3605,registry:Host@5846,registry:Host@6267,registry:Host@6452,registry:Host@7797,registry:Host@8307,registry:Host@8438,registry:Host@8850,registry:Host@9152,registry:Host@9710,registry:Host@976,registry:Lifetime@6069,registry:Lifetime@9057,registry:LockETag@6104,registry:LockGeneration@1948,registry:LockGeneration@6116,registry:Phase@2996,registry:Phase@3013,registry:Phase@3355,registry:Phase@3393,registry:Phase@3449,registry:Phase@4459,registry:Phase@4551,registry:Phase@5101,registry:Phase@5189,registry:Receipt@6093,registry:Revision@3237,registry:Revision@6081,registry:Sequence@3141,registry:Sequence@3161,registry:WakeDigest@3100,registry:WakeDigest@3122,whole:HAAdoption@3254,whole:HAAdoption@6408,whole:HAWakeImport@3083,whole:HAWakeImport@5988,whole:HAWakeImport@6004,whole:HAWakeImport@6012,whole:HAWakeImport@6286,whole:HAWakeImport@8859,whole:HAWakeImport@9161,whole:HAWakeImport@9253,whole:Pair@3231,whole:Pair@6280,whole:Pair@9094,whole:Pair@9114,whole:Route@1004,whole:Route@1243,whole:Route@1286,whole:Route@1293,whole:Route@138,whole:Route@174,whole:Route@2813,whole:Route@308,whole:Route@3515,whole:Route@4828,whole:Route@568,whole:Route@5935,whole:Route@646,whole:Route@7269,whole:Route@7310,whole:Route@7355,whole:Route@7510,whole:Route@8065,whole:Route@838,whole:Route@8946 1581f9832419cb87d63fe628f57d10408039f4695f41f2e1e2e23a63848f0245
+@legacy 44d6bb39599c5f5a1c34f61978b2e77fa613d99c8943e8e42f307e37e5853162 internal/activator/hawake.go ExecBackend.acquireClassified legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1a;basis=new: the acquire's classification: a legacy route (sidecar, hand-added or not an instance) takes lease.Acquire and refuses on an HA-format lock; otherwise isHA (a record read error fails the wake, never falls back to legacy); not HA takes lease.Acquire, and an HA-format lock there marks the host HA for good and continues; HA requires haContained before any lock request, then lease.AcquireHA with the same-box proof; held and refused leases map to errLeaseHeld and errLeaseRefused (leaseError); +registry:Host, +whole:Route x7;rev3=census-ruling-region-ha-p1b1;basis=region HA P1b-1: the HA acquire's Proofs gain OwnerTerminated (b.ownerTerminated(ctx, rt)) beside SameBoxEmpty; one more whole:Route site passes the route to ownerTerminated; nothing new is read; the proof is consulted only by hafresh.DecideAcquire for another box's expired HA lock;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Task 7, two-box fleet test): the two legacy acquires call b.acquireLegacy(ctx, prefix), which is acquireLegacyLease exactly when ExecBackend.LeaseIdentity is nil and LeaseTTL is 0 (the agent never sets them), otherwise lease.AcquireAs with that identity and TTL. The classification, the HA path and every refusal are unchanged. Read sites unchanged (9). Agent, not root.;rev3=census-ruling-region-ha-p1b3b-t;basis=Select the restriction-only AcquireHAForDuty for background contexts, including sticky HA reclassification; observe successful ordinary acquires to clear stale suppression. Add a whole-route observer argument; no new authority. B2 binds the current authoritative lifetime and advances local revision before HA acquire, invalidating concurrent adoption I/O. Ordinary lease authority and restore ordering remain unchanged. B2 fix r1: advance the local duty revision with an unconditional registry UPDATE before acquire; remove pre-acquire lifetime CAS and basis clearing. Failed acquire preserves adopted state. Existing lease validation and successful-acquire observer remain. B3: pass the same optional durable termination proof adapter to visitor and duty acquires. Nil retains the existing path until controller arming; configured proof failures refuse, with no fallback to a live boolean. No new read in this unit. Final fix P2-1: copy the shared proof adapter per acquire to attach the existing takeover telemetry; retain a live confirmer fallback for unverified identities. Existing classified owner, lifetime, expiry and CAS guards remain.;rev3=census-ruling-agent-start-demo-1;basis=Reads demo shape/layout and takes the existing legacy renewing lease for demos; never falls through to HA acquisition. Merge integration against origin/main 9bd45488 retains main's HA duty/termination proof wiring after the demo legacy-lease branch; the added whole-route passes are main's existing checks.;rev3=census-ruling-region-ha-p1b3b-s;basis=Before any HA sidecar write require a known canonical lifetime, files store and valid shared sealer; unstamped sidecars cannot upgrade from an HA lock. Reuse existing containment, AcquireHAForDuty, restore and release paths.;rev3=census-ruling-region-ha-g2-fixes;basis=Pass local pool eligibility and classified-refusal observer into HA acquire; additional whole-route uses, no additional direct external read; existing lifetime and termination proofs remain.;rev3=census-ruling-ha-generations;basis=storage generations Tasks 1, 5, 10: passes GenerationsOn (box switch) to the HA acquire and the fast-row proofs (LiveOwnerTerminated, LiveSameBoxEmpty without alarms) and Proofs.GenerationsFast; +whole:Route x3 are rt passed to those proof closures; no direct read added registry:Host@106,whole:Route@1064,whole:Route@1115,whole:Route@1365,whole:Route@1668,whole:Route@1964,whole:Route@221,whole:Route@2421,whole:Route@2471,whole:Route@2522,whole:Route@2569,whole:Route@2624,whole:Route@2676,whole:Route@278,whole:Route@2834,whole:Route@2942,whole:Route@4375,whole:Route@4471,whole:Route@589,whole:Route@627 c4e7023bb238df74b2a6a53fb2421d6f021dc6ed57683da36c9665692092fa6a
+@legacy d54e9b4cf4667eb21e2ccffbe31f68eeb162fa98dfa6d1427cf87550ffab5a3e internal/activator/hawake.go ExecBackend.restoreFilesClean legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1a;basis=new: restores the HA host's published files into a fresh <host>.restore directory beneath the instance data dir (instancefs, no link followed), renames it into place without replacing anything, writes the manifest's env item as <host>.env (instancefs.WriteAtomic, 0600) and imports the manifest's wake state into the registry (hostfiles.ImportWake, then the class for restoredReplication); the source is the host's files manifest in the hibernate bucket, written by the agents of the boxes that held the host; every failure fails the wake; +registry:Host, +whole:Route x2;rev3=census-ruling-durability-3a-escrow;basis=durability 3a Task 3 (fix round 1: sealed precedence before any fetch): the restore into <host>.restore is now RestoreRootBaselineShadowed with sealedShadow(host), a pure function of the manifest already read and validated: a live raw instance.key or report.token entry whose sealed item the manifest holds is neither fetched nor written (so a missing or corrupt raw object cannot fail the wake, and a sealed item that does not open fails it with no raw fallback); every other entry is restored as before, and the baseline the wake's publisher continues from is the manifest as read. Then each sealed trio item the manifest holds (instance.key.sealed, report.token.sealed) is fetched and opened with hostfiles.ReadSealed (key, sha256, v2 envelope, binding and MAC checked) and written with instancefs.WriteAtomic (openat2 directory, no symlink, O_EXCL temp, rename, 0600) into the restore directory this function created, then that directory is synced; then the same no-replace rename. The env file comes from the sealed env item through ReadSealed when present, else from the raw env item as before, written as before. The source is still the host's files manifest in the hibernate bucket; the destinations are the same restore directory and env file; no new path is opened, followed or named from input; the sealer (sealerFor) is built only when a sealed item is present. Durability 3a Task 5: after RestoreRootBaselineShadowed, noteRawSecrets(host, rm) on the manifest just restored from. Reads only manifests this process already holds (no request, no file opened); calls the detector, which logs and calls ExecBackend.OnRawSecret; nothing else changes. Read sites unchanged. Durability 3a Task 5 fix round 1: the restore is RestoreRootBaselineObserved (the same read and restore as RestoreRootBaselineShadowed) with a checked callback, noteRawSecrets(host, m), run once the manifest is read and validated and before any entry is removed, fetched or written, so a restore that then fails still shows the detector the manifest; the later noteRawSecrets call is gone. No request, open or write added; read sites unchanged.;rev3=census-ruling-region-ha-p1b3b-t;basis=Final fix P3-1: select the HA ordinary-wake importer after the same acquired-lease manifest restore. It alone permits generation of legacy non-claim timer registrations; claim-owned empty registrations remain refused. All file, key and manifest reads are unchanged.;rev3=census-ruling-ha-generations;basis=storage generations Task 5: split into restoreFilesCleanRead (the same reads, moved) plus the files fence; this unit reads less (-registry:Host, -whole:Route) whole:Route@196,whole:Route@249 3963dc6503598dd6bbf6eb6cb1c35214864a8a02ab74f9b05a2485464449c106
+@legacy b5dd4f7a3cb91dbcd5c3fb77eee8e007fdca9965f93cd0f193e75b2d18b9aa42 internal/activator/hawake.go ExecBackend.restoreHA legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1a;basis=new: an HA host's restore: haContained again, the existing seed-obligation and seed-marker checks, then on a first wake (lock absent) sets the local copy aside and boots fresh; otherwise keeps the local copy only when hafresh.DecideKeep over the acquire's view, this box's identity, the lifetime and the local state (readLocalNow) says so, else sets it aside (instancefs renames and removes beneath their directories), restores the replica (lease.Restore, CheckDB, quarantine on corruption) and the files (restoreFilesClean); every error fails the wake; +registry:Host, +whole:Route x8;rev3=census-ruling-ha-generations;basis=storage generations Task 5: legacy (non-generations) HA restore unchanged, called from restoreHAWake; -whole:Route moved into haRestorePrelude registry:Host@135,whole:Route@1121,whole:Route@1570,whole:Route@178,whole:Route@236,whole:Route@301,whole:Route@695,whole:Route@779 109db7ccabdc810c9de1f99ef7bab610e31f2697571555b0fac0ba91a51897c5
+internal/activator/activator.go Service.doWake legacy accepted-legacy accepted-legacy;rev3=census-ruling-292fix;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body (census ruling 292's legacy start mark and lease give-back; census ruling owed's pending record) with the seeded change ruled under census-ruling-seeded-instances (the refreshed row checked against the row the wake began from, twice; the seed's first upload recorded after the wake), and now one more line on a failed start: a start its pre-exec gate refused (launchNotStarted: the exec gate, the pending record or its recheck answered no before root was asked) is recorded as known not started (stopObservation.notStarted) instead of uncertain, only when the wake has started nothing else (wakeStartedNothing); otherwise it goes through cleanupFailedWake and its proofs. A refusal before its lease (step 1), which has started nothing, is recorded the same way. Read sites unchanged; no new read and no root decision;rev3=census-ruling-wake-latency-1;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=marks the end of each wake step on the woken instance's journal timer (wakeSteps: a.now() and a slice append, journal only); no read added, no step reordered;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos: (1) after the restore it asks the backend for the replication class an HA restore imported from the host's published wake state (restoredReplication(rt)) and, if it differs, logs it and sets rt.Replication and the entry's route to it; (2) an HA lease of the stream class replicates with a 1 s monitor interval (SetMonitorInterval); (3) after Replicate, an HA replica opens the entry's files publisher (openEntryFiles(ctx, e, rt)) and starts it, and a publisher that will not open fails the wake through cleanupFailedWake; (4) every cleanupFailedWake call passes e; (5) final fix F1: the two start-error arms that gave the lease straight back (a start its pre-exec gate refused with nothing started, and the default arm) now call giveBackAfterStart(ctx, rt, w, lease), which gives a legacy lease back exactly as before and an HA one only over an empty host slice. New sites: registry:Replication x5 (the class compare, the log line, the assignment and the HA sync-interval check) and whole:Route x6 (rt handed to restoredReplication, openEntryFiles, the cleanup calls and giveBackAfterStart); no file read in this body; only adds a condition before an HA release, no check removed;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Tasks 7 and 8: the rootfs admission runs before the claim path and before Acquire on the refreshed row (rootfsWakeRefusal), again in full if a re-read under the lock changed any gate field, and a resident wake re-checks residentRunnable; for a rootfs row a held lease or refused config is an ownership refusal; a rootfs first boot (no good version, fresh) places the empty database under the lease (placeRootfsDB) and uploads it once (syncRootfsPlaceholder), while fresh with a good version is refused as a lost database; declared processes are logged after the wake (rootfsProcessesHook); binary rows unchanged; fix wave 1 and 2 (6189a9db, then the r2 ruling "refuse interrupted init"): a fresh rootfs first boot goes through rootfsFirstBoot (rootfsmarker.go) instead of placeRootfsDB alone: under the lease it reads the lifetime's first-boot marker from the hibernate bucket (present or unreadable refuses, present as errRootfsReplicaMissing), writes it create-only, reads it back (only a read back that finds it confirms it; a write conflict proves nothing), and only then places the database; a warm wake does nothing with the marker (fix wave 1's settleRootfsFirstBoot call and its whole:Route site are gone, no local pending record); adds refusals only, binary rows unchanged;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R, R3: (1) refuses (errWakeUnproven) while another entry's release record of the host is open; (2) a rootfs row with a plan or a pin reads its declared processes before the lease (declaredProcesses(rt, g): the existing staged-manifest read of ExecBackend.Processes, the manifest root's staging wrote, checked against the identity's path and digest) and refuses before Acquire on an error; (3) the staged-identity start runs releaseInWake(ctx, e, rt, id, lease) before startGenExe, under this wake's lease, and a release that did not pass fails the wake; (4) a rootfs row with no plan, no pin and no staged identity is refused, the lease given back, nothing started; (5) a start error whose release is not proven stopped hands the lease to the release record (oweWakeLeaseToRelease) instead of giving it back. New sites +whole:Route x2 (rt to declaredProcesses and releaseInWake); no new file read beyond the existing staged-manifest read; binary rows unchanged;rev3=census-ruling-rootfs-apps-3-workers;basis=rootfs Plan 3 Group W, W1: step 7 no longer calls rootfsProcessesHook (log only); it calls declareRootfsWorkers(e, rt, w), which registers the workers the wake's generation declares as pending and starts nothing (the resident tick starts them once the entry is awake under its lease watch); a worker is never a failure of the wake; the read of the declaration is the existing staged-manifest read (see registerRootfsWorkers); the same read sites in this body, no new read;rev3=census-ruling-region-ha-p1b2;basis=region HA P1b-2: a successful acquire drops the host's holder-cache entry; same reads;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (branch review R1 P1-1 and the controller ruling after it): after the lease, doWake asks routeCurrentUnderLease(ctx, rt, e.worker) (the +whole:Route site), which re-reads the host's row from the box's own registry and, for a labelled row on a fleet box, reads the instance record once; a row that is not this box's and current gives the lease back and refuses the wake, nothing restored or started. Its checks up to the spawn ask wakeGoesOn(e), which adds the entry's in-memory retired mark (set by RetireExcept) to the fence test. Task 6a's awake record call is removed. Agent, not root; it only refuses more.;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Keep the original entrypoint at its existing census path. Run doWakeOnce, and retry a selected fallback only after the failed generation is proven stopped, no release or stray obligation remains, and a stateful lease was returned. Carry the fallback canonical selection and original outcome metadata.;rev3=census-ruling-ha-generations;basis=region HA storage generations Task 5: doWake re-runs doWakeOnce once when the failed wake's error is lease.ErrHeadMoved or a files-fence conflict, after the same proven give-back checks as the wakeModeChange retry; no read added whole:Route@486 5c4be08e18de95a89222214ebb8d7c887f182f9c76e735099e22d00ab1720e18
+internal/activator/backend_exec.go ExecBackend.restorePlain legacy accepted-legacy accepted-legacy;rev3=census-ruling-seeded-instances;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): body of the frozen ExecBackend.Restore, which is now its dispatcher, with the seed marker reconciled before the warm-cache check; same staging fallback and replica restore;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos: first asks haRestore(ctx, rt) (+whole:Route x2: rt to haRestore and to restoreHA); an HA host restores through restoreHA (hawake.go, a new unit) and never through the warm cache or the staging fallback; an error there fails the restore; a non-HA host takes the unchanged path;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Task 3, rule 6 start rule): the +whole:Route sites are calls taking rt: reconcileAssignment before the seed-marker check (a labelled row's copy not kept under rt.Assigned is moved into <DataDir>/.superseded/<host>/, never deleted), startAllowed on the warm-cache, restored and fresh paths (a labelled row may refuse with ErrNothingToRestore), and establishAssignment after a restore and before a fresh boot (writes the <db>.assigned marker). Task 6a's record clear after a restore is removed. An unlabelled row (Assigned "") takes none of these. Agent, not root; it refuses more, never less.;rev3=census-ruling-ha-generations;basis=storage generations: an HA host's restore is dispatched to restoreHAWake (generations-aware) instead of restoreHA directly; Task 7: promoteStagedReplica refuses a host with head.json before promotion; read sites unchanged file:Stat@1163,registry:Host@354,whole:Route@1020,whole:Route@1100,whole:Route@1376,whole:Route@243,whole:Route@327,whole:Route@374,whole:Route@5613,whole:Route@5703,whole:Route@6280,whole:Route@643,whole:Route@6511 27131b2433327d4619bf78499a30e525303a4bd38462e82455ef2ff6c6c3240e
+internal/activator/hasecrets.go ExecBackend.haManifestFound legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1a;basis=new: whether the host's files manifest exists: from the wake's or entry's publisher if there is one, else one hostfiles.Load of <hibernate prefix>/files/0/ from the files store; +registry:Host x2;rev3=census-ruling-ha-generations;basis=storage generations Task 5 fix: a found manifest is decoded with no defaults and a files-fence placeholder (v2, lock_generation > 0, seq 0, no entries, platform or origins) counts as no manifest so the first generations wake can mint; any other manifest still counts as found; no read added (Astra + Fable reviewed) registry:Host@149,registry:Host@373 ecc25f3bf7b916e4e32881ac91938c5d2005c1aa1b9f40f308f5420a28051bfc
+internal/activator/poolwithdrawal.go Service.poolWithdrawalProof legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-g2-fixes;basis=New withdrawal proof uses existing fence/stop, cgroup, record/lifetime, holder-lock, obligation, local release-record/stat and registry timer/route readers. Requires proven stop and clean release or safe never-started state; retains outstanding duties and special rows. No new path namespace or record write; local files use existing backend layout.;rev3=census-ruling-region-ha-g2r-fixes;basis=W1: each pending return wraps the error that caused it (cgroup/nested readiness, record, lock) instead of discarding it. Same readers and proof conditions; no new read or write.;rev3=census-ruling-ha-generations;basis=storage generations Task 1: compares the released marker with Marker.SameRecord (ignores the decode-only Gen flag) so a generations marker confirms the release; same readers registry:Addr@1111,registry:Addrs@1128,registry:Args@1185,registry:DBPath@1146,registry:HA@1351,registry:Hibernate@1076,registry:Host@1597,registry:Host@2113,registry:Host@2373,registry:Host@2582,registry:Host@279,registry:Host@4086,registry:Host@4179,registry:Host@434,registry:Host@469,registry:Host@508,registry:Host@539,registry:Host@621,registry:Host@658,registry:Host@897,registry:Kind@1034,registry:Kind@1292,registry:Kind@1396,registry:NextDue@4342,registry:Runtime@1165,registry:Socket@1092,registry:WakeIncarnation@1263,registry:WakeIncarnation@1876,whole:Route@115,whole:Route@1452,whole:Route@1681,whole:Route@2208,whole:Route@2368,whole:Route@2631,whole:Route@4206,whole:Route@4250,whole:Route@4273,whole:Route@4296,whole:Route@977,whole:Timer@4370 5d4bec521ea0e1aeed4d00b9d7c76057254c6821012a3dab696e09d92cfa1e23
+internal/dbdoor/client.go doorError legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-db-region-forward-2;identity=the carlos CLI on a person's machine, as the person;basis=decodes the db region forward marker's three additive fields (forward, region, forward_ops) beside error, from the same bounded 64 KiB read of a refusal body; no read added;rev3=census-ruling-region-labels;basis=decodes the additive region_name beside region in the forward marker, from the same bounded 64 KiB read; no read added;rev3=census-ruling-ha-generations;basis=storage generations Task 8: decodes the additive generation field of a 409 (the console names the generation to bind) from the same bounded read; no read added file:ReadAll@54 f0a152ddf5e4eadaf034883b83ed1692d063ddf9232d9737fa6e6dea53090f53
+internal/host/movesoffline_seal.go movesWorker.offlineTakeSeal legacy accepted-legacy accepted-legacy;rev3=census-ruling-moves-offline-precopy;basis=root-route (J1, census-ruling-moves-offline's disposition); the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): census-ruling-moves-offline's body (seal steps 1 to 9 from the row: database path, next due, replication rung and timer rows, read for the seal) with one refusal before the mirror: a staged move (staged_at set) is sealed only into the staging bucket and region the stage fixed on the record (move.stage_bucket, move.stage_region), a comparison of record and edges-file fields that reads and writes nothing new. Read sites unchanged; every offset after the check moved by 487 bytes;rev3=census-ruling-ha-generations;basis=storage generations Task 7: refuses a host with head.json (lease.HasHead, one GET of instances/<host>/head.json on the data bucket) before the first replica listing and before the tombstone; only adds a refusal registry:DBPath@2885,registry:NextDue@12314,registry:NextDue@13226,registry:Replication@12219,registry:Replication@13201,whole:Route@10954,whole:Route@1713,whole:Route@2946,whole:Route@3727,whole:Route@5716,whole:Route@8490,whole:Timer@10070,whole:Timer@9641,whole:Timer@9706,whole:Timer@9712,whole:Timer@9971 f6eb0f4f2e8cdb74e8fd2ce1d00481055937743637cf0b1a69ef276308c91a7f
+internal/host/movespass.go armMovesPass authority B,C rev3=census-ruling-self-serve-moves-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): arms the moves worker with the box's judge (moveCfg.Judge, copied into its offline view); read sites unchanged, offsets moved; B,C authority retained;rev3=census-ruling-ha-generations;basis=storage generations Task 7: wires the HasHead check into the moves worker; read sites unchanged file:Read@3062,registry:Provisioned@1838,whole:Route@1825 bab8f6bea7b20c4ddfbdbea7e135bb217f404b2b19421fcd5d0afd0f34055185
+internal/host/movespass.go legacyMoveRound legacy accepted-legacy accepted-legacy;rev3=J1,J4;basis=route-and-input;rev3=census-ruling-ha-generations;basis=storage generations Task 7: refuses a host with head.json before the first mirror (aborting rounds pass); only adds a refusal file:Stat@6087,registry:DBPath@5988,registry:DBPath@6019,whole:Route@5975 f40ac781b0392fcf98a920a78ae0b3884d422ba55e030496b6a90c370a5b9e28
+internal/lease/tombstone.go readLockFields legacy accepted-legacy accepted-legacy;rev3=census-ruling-ha-generations-floor;basis=new: reads lock.json from the data bucket (ReadAll of the S3 GET body, 64 KiB cap as before) and keeps its ETag, so the tombstone write is conditional on the checked version and refuses unknown carlos_ fields; replaces readLock;rev3=census-ruling-ha-generations;basis=storage generations: the read now also returns the S3 Date header (store clock) beside the body and ETag; same single GET of lock.json file:ReadAll@471 6bdc0c53c141304623479235ba36e4cd162ca4b56bbfc081c60a1ee9889a4720
+internal/activator/hasamebox.go ExecBackend.sameBoxEmptyLive legacy accepted-legacy accepted-legacy;rev3=census-ruling-ha-generations;basis=new (Task 10): the fast same-box proof for an unexpired generations lock: the existing same-box emptiness checks without alarms, refusing while the host is acquired here or adoption-held; reads the box's own registry and route only registry:Host@142,registry:Host@497,whole:Route@274 134e778f665dcfbeeb113315f9301b62823c34e4a6b0850d16841eb3e1df00f7
+internal/activator/hatakeover.go ExecBackend.ownerTerminatedLive legacy accepted-legacy accepted-legacy;rev3=census-ruling-ha-generations;basis=new (Task 10): the fast other-box termination proof for an unexpired generations lock, the existing termination proof without the expired-lock ALERT; route only whole:Route@269 5743a10fc6ffa0dc942b2f3cff2420590fff55cf67242991ffb6163673a9f36a
+internal/activator/hatakeover.go ExecBackend.reportLiveTakeover legacy accepted-legacy accepted-legacy;rev3=census-ruling-ha-generations;basis=new (Task 10): logs a confirmed live takeover; reads the registry host row for the log line only registry:Host@158,registry:Host@306 e83d2ca67a764560b580f6d68c45ba53982dbdcbbb99a278cdfdb11616423a1c
+internal/activator/hawake.go ExecBackend.haRestorePrelude legacy accepted-legacy accepted-legacy;rev3=census-ruling-ha-generations;basis=new (Task 5): the containment, seed-obligation and seed-marker checks restoreHA already ran, factored out for both restore paths; same reads whole:Route@112,whole:Route@183,whole:Route@226,whole:Route@298 8ea472a5c25337032adf82144f53ee6e688bafcfa79a30ce5f6af1e783c04db4
+internal/activator/hawake.go ExecBackend.keptBaseline legacy accepted-legacy accepted-legacy;rev3=census-ruling-ha-generations;basis=new (Task 5): on a kept wake, opens the local <db>.release.files.json the release wrote (existing stageKeptFiles source, accepted only when its body hashes to the marker's files_gen) to build the files fence baseline; reads the box's own registry row file:Open@583,registry:Host@142,registry:Host@556,whole:Route@194 9a3fbf21afdf4ce3bf2f51f20d6a6e983993d44c34ae9ea3fef64f9d535c28c1
+internal/activator/hawake.go ExecBackend.refuseHeadWithoutGenerations legacy accepted-legacy accepted-legacy;rev3=census-ruling-ha-generations;basis=new (Task 5): refuses (and pages) a non-generations wake over a host whose head.json exists; registry host for the log and page only registry:Host@280,registry:Host@337,registry:Host@394 214eb9e7e5e83e4b45bd462484e8f4bd6bfcc4a84a04d962b5f95e32c7bf7bc0
+internal/activator/hawake.go ExecBackend.restoreFilesCleanRead legacy accepted-legacy accepted-legacy;rev3=census-ruling-ha-generations;basis=new (Task 5): the read half of restoreFilesClean moved verbatim (manifest read and restore into <host>.restore beneath the instance data dir); same reads as before registry:Host@132,whole:Route@1534,whole:Route@235 7f0dffb065fe65083a6cce431fbe384597b3c59f01d971f486c6d106701d7892
+internal/activator/hawake.go ExecBackend.restoreHAGenerations legacy accepted-legacy accepted-legacy;rev3=census-ruling-ha-generations;basis=new (Task 5): the generations take on the wake: StartGeneration over the data bucket (head.json, the predecessor generation's listing and server-side copies into g-<N>), the keep rule (only when head names the marker holder's generation), RestoreTake from g-<N>, files restore and fence, Switch, all before spawn; data-bucket objects written only by holders of this host's lease registry:Host@128,whole:Route@171,whole:Route@2565,whole:Route@3104,whole:Route@314,whole:Route@3700,whole:Route@386 980c26827c05b0f64edb87b14e2cfb80469989258c3cf2d04325db6a26c1e999
+internal/activator/hawake.go ExecBackend.restoreHAWake legacy accepted-legacy accepted-legacy;rev3=census-ruling-ha-generations;basis=new (Task 5): chooses restoreHAGenerations (lock in generations mode or switch on) or the legacy restoreHA; route only whole:Route@185,whole:Route@220 13c812473760fcc35e6ca522883f58476fd5192e8aa648ac67326a30ccbe8c39
+internal/dbdoor/generation.go Client.refusal legacy accepted-legacy accepted-legacy;rev3=census-ruling-ha-generations;basis=new (Task 8): decodes a bounded console refusal body (409 with generation, 410 gone) for the CLI's bound reads; the CLI on a person's machine file:ReadAll@131 ab2262a63238203cf8d3fc50125cad3f6b7c25c9cdef0e22706baf9ab68c727e
+internal/lease/legacytake.go readViewClock legacy accepted-legacy accepted-legacy;rev3=census-ruling-ha-generations;basis=new (Task 11c): the lock.json GET readView did, also returning the response's Date header (store clock) for retirement ages; same object, same 64 KiB cap file:ReadAll@425 97fce1b57c9ec6f56c416930651507782f3ba3f56289f34d45ac818eb3c0ca69
+internal/activator/haadopt.go Service.AdoptHost legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1b3b-t;basis=Serialize through the existing host operation state. Read local route/revision/receipt plus configured lock/manifest/wake objects; use only restricted ordinary acquire, exact guarded restore, ordinary unclean release and verified readback for adoption. No process launch, local-copy reuse or secret access. B3: pass the optional shared durable termination proof adapter into the existing restricted finalizer acquire. The adapter validates the exact classified peer and current host lifetime, uses the acquire data-bucket client, and cannot bypass expiry or CAS. No new read in this unit. B4: A first scanner import may reuse its staging lock observation; the ordinary acquire still rereads and compares the exact ETag/generation and expiry. Existing receipt replay keeps its fresh read. No new read path or takeover authority.;rev3=census-ruling-region-ha-followups;basis=Attach a per-acquire termination proof observer to finalizer acquisitions so refusals retain alarms; avoid duplicate fallback observations. The observer receives the existing route and departure ref for paging; no new storage read or takeover authority.;rev3=census-ruling-region-ha-g2-fixes;basis=Require local pool eligibility at entry and in HA acquisition proofs; supplied route only; termination, lifetime and emptiness checks remain.;rev3=census-ruling-ha-unclean-marker-waits;basis=Defers adoption, before any import, while the observed lock is an unclean release marker that is not settled and younger than a lease term (hafresh.MarkerOpensAt). No new read: it inspects the lock view the unit already read. Only adds a refusal.;rev3=census-ruling-ha-generations;basis=storage generations Task 10 fix: marks the host adoption-held after a successful adoption acquire and clears it after a successful release (in-memory only), so the fast same-box row cannot take a lock this process holds; +registry:Host x2 are the host passed to that mark/clear; no storage read added registry:AcquiredGeneration@2664,registry:AcquiredGeneration@3037,registry:AcquiredGeneration@3815,registry:AcquiredGeneration@4427,registry:AcquiredGeneration@4518,registry:AcquiredGeneration@5157,registry:AcquiredGeneration@5248,registry:DepartureIID@1912,registry:DepartureIID@6033,registry:DepartureRef@1876,registry:DepartureRef@6017,registry:ExpectedPair@9088,registry:Host@1074,registry:Host@1277,registry:Host@1373,registry:Host@1445,registry:Host@1514,registry:Host@1780,registry:Host@2155,registry:Host@2881,registry:Host@3218,registry:Host@3605,registry:Host@5846,registry:Host@6267,registry:Host@6452,registry:Host@7797,registry:Host@8307,registry:Host@8438,registry:Host@8850,registry:Host@9152,registry:Host@9710,registry:Host@976,registry:Lifetime@6069,registry:Lifetime@9057,registry:LockETag@6104,registry:LockGeneration@1948,registry:LockGeneration@6116,registry:Phase@2996,registry:Phase@3013,registry:Phase@3355,registry:Phase@3393,registry:Phase@3449,registry:Phase@4459,registry:Phase@4551,registry:Phase@5101,registry:Phase@5189,registry:Receipt@6093,registry:Revision@3237,registry:Revision@6081,registry:Sequence@3141,registry:Sequence@3161,registry:WakeDigest@3100,registry:WakeDigest@3122,whole:HAAdoption@3254,whole:HAAdoption@6408,whole:HAWakeImport@3083,whole:HAWakeImport@5988,whole:HAWakeImport@6004,whole:HAWakeImport@6012,whole:HAWakeImport@6286,whole:HAWakeImport@8859,whole:HAWakeImport@9161,whole:HAWakeImport@9253,whole:Pair@3231,whole:Pair@6280,whole:Pair@9094,whole:Pair@9114,whole:Route@1004,whole:Route@1243,whole:Route@1286,whole:Route@1293,whole:Route@138,whole:Route@174,whole:Route@2813,whole:Route@308,whole:Route@3515,whole:Route@4828,whole:Route@568,whole:Route@5935,whole:Route@646,whole:Route@7269,whole:Route@7310,whole:Route@7355,whole:Route@7510,whole:Route@8065,whole:Route@838,whole:Route@8946 1581f9832419cb87d63fe628f57d10408039f4695f41f2e1e2e23a63848f0245
+internal/activator/hawake.go ExecBackend.acquireClassified legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1a;basis=new: the acquire's classification: a legacy route (sidecar, hand-added or not an instance) takes lease.Acquire and refuses on an HA-format lock; otherwise isHA (a record read error fails the wake, never falls back to legacy); not HA takes lease.Acquire, and an HA-format lock there marks the host HA for good and continues; HA requires haContained before any lock request, then lease.AcquireHA with the same-box proof; held and refused leases map to errLeaseHeld and errLeaseRefused (leaseError); +registry:Host, +whole:Route x7;rev3=census-ruling-region-ha-p1b1;basis=region HA P1b-1: the HA acquire's Proofs gain OwnerTerminated (b.ownerTerminated(ctx, rt)) beside SameBoxEmpty; one more whole:Route site passes the route to ownerTerminated; nothing new is read; the proof is consulted only by hafresh.DecideAcquire for another box's expired HA lock;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Task 7, two-box fleet test): the two legacy acquires call b.acquireLegacy(ctx, prefix), which is acquireLegacyLease exactly when ExecBackend.LeaseIdentity is nil and LeaseTTL is 0 (the agent never sets them), otherwise lease.AcquireAs with that identity and TTL. The classification, the HA path and every refusal are unchanged. Read sites unchanged (9). Agent, not root.;rev3=census-ruling-region-ha-p1b3b-t;basis=Select the restriction-only AcquireHAForDuty for background contexts, including sticky HA reclassification; observe successful ordinary acquires to clear stale suppression. Add a whole-route observer argument; no new authority. B2 binds the current authoritative lifetime and advances local revision before HA acquire, invalidating concurrent adoption I/O. Ordinary lease authority and restore ordering remain unchanged. B2 fix r1: advance the local duty revision with an unconditional registry UPDATE before acquire; remove pre-acquire lifetime CAS and basis clearing. Failed acquire preserves adopted state. Existing lease validation and successful-acquire observer remain. B3: pass the same optional durable termination proof adapter to visitor and duty acquires. Nil retains the existing path until controller arming; configured proof failures refuse, with no fallback to a live boolean. No new read in this unit. Final fix P2-1: copy the shared proof adapter per acquire to attach the existing takeover telemetry; retain a live confirmer fallback for unverified identities. Existing classified owner, lifetime, expiry and CAS guards remain.;rev3=census-ruling-agent-start-demo-1;basis=Reads demo shape/layout and takes the existing legacy renewing lease for demos; never falls through to HA acquisition. Merge integration against origin/main 9bd45488 retains main's HA duty/termination proof wiring after the demo legacy-lease branch; the added whole-route passes are main's existing checks.;rev3=census-ruling-region-ha-p1b3b-s;basis=Before any HA sidecar write require a known canonical lifetime, files store and valid shared sealer; unstamped sidecars cannot upgrade from an HA lock. Reuse existing containment, AcquireHAForDuty, restore and release paths.;rev3=census-ruling-region-ha-g2-fixes;basis=Pass local pool eligibility and classified-refusal observer into HA acquire; additional whole-route uses, no additional direct external read; existing lifetime and termination proofs remain.;rev3=census-ruling-ha-generations;basis=storage generations Tasks 1, 5, 10: passes GenerationsOn (box switch) to the HA acquire and the fast-row proofs (LiveOwnerTerminated, LiveSameBoxEmpty without alarms) and Proofs.GenerationsFast; +whole:Route x3 are rt passed to those proof closures; no direct read added registry:Host@106,whole:Route@1064,whole:Route@1115,whole:Route@1365,whole:Route@1668,whole:Route@1964,whole:Route@221,whole:Route@2421,whole:Route@2471,whole:Route@2522,whole:Route@2569,whole:Route@2624,whole:Route@2676,whole:Route@278,whole:Route@2834,whole:Route@2942,whole:Route@4375,whole:Route@4471,whole:Route@589,whole:Route@627 c4e7023bb238df74b2a6a53fb2421d6f021dc6ed57683da36c9665692092fa6a
+internal/activator/hawake.go ExecBackend.restoreFilesClean legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1a;basis=new: restores the HA host's published files into a fresh <host>.restore directory beneath the instance data dir (instancefs, no link followed), renames it into place without replacing anything, writes the manifest's env item as <host>.env (instancefs.WriteAtomic, 0600) and imports the manifest's wake state into the registry (hostfiles.ImportWake, then the class for restoredReplication); the source is the host's files manifest in the hibernate bucket, written by the agents of the boxes that held the host; every failure fails the wake; +registry:Host, +whole:Route x2;rev3=census-ruling-durability-3a-escrow;basis=durability 3a Task 3 (fix round 1: sealed precedence before any fetch): the restore into <host>.restore is now RestoreRootBaselineShadowed with sealedShadow(host), a pure function of the manifest already read and validated: a live raw instance.key or report.token entry whose sealed item the manifest holds is neither fetched nor written (so a missing or corrupt raw object cannot fail the wake, and a sealed item that does not open fails it with no raw fallback); every other entry is restored as before, and the baseline the wake's publisher continues from is the manifest as read. Then each sealed trio item the manifest holds (instance.key.sealed, report.token.sealed) is fetched and opened with hostfiles.ReadSealed (key, sha256, v2 envelope, binding and MAC checked) and written with instancefs.WriteAtomic (openat2 directory, no symlink, O_EXCL temp, rename, 0600) into the restore directory this function created, then that directory is synced; then the same no-replace rename. The env file comes from the sealed env item through ReadSealed when present, else from the raw env item as before, written as before. The source is still the host's files manifest in the hibernate bucket; the destinations are the same restore directory and env file; no new path is opened, followed or named from input; the sealer (sealerFor) is built only when a sealed item is present. Durability 3a Task 5: after RestoreRootBaselineShadowed, noteRawSecrets(host, rm) on the manifest just restored from. Reads only manifests this process already holds (no request, no file opened); calls the detector, which logs and calls ExecBackend.OnRawSecret; nothing else changes. Read sites unchanged. Durability 3a Task 5 fix round 1: the restore is RestoreRootBaselineObserved (the same read and restore as RestoreRootBaselineShadowed) with a checked callback, noteRawSecrets(host, m), run once the manifest is read and validated and before any entry is removed, fetched or written, so a restore that then fails still shows the detector the manifest; the later noteRawSecrets call is gone. No request, open or write added; read sites unchanged.;rev3=census-ruling-region-ha-p1b3b-t;basis=Final fix P3-1: select the HA ordinary-wake importer after the same acquired-lease manifest restore. It alone permits generation of legacy non-claim timer registrations; claim-owned empty registrations remain refused. All file, key and manifest reads are unchanged.;rev3=census-ruling-ha-generations;basis=storage generations Task 5: split into restoreFilesCleanRead (the same reads, moved) plus the files fence; this unit reads less (-registry:Host, -whole:Route) whole:Route@196,whole:Route@249 3963dc6503598dd6bbf6eb6cb1c35214864a8a02ab74f9b05a2485464449c106
+internal/activator/hawake.go ExecBackend.restoreHA legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1a;basis=new: an HA host's restore: haContained again, the existing seed-obligation and seed-marker checks, then on a first wake (lock absent) sets the local copy aside and boots fresh; otherwise keeps the local copy only when hafresh.DecideKeep over the acquire's view, this box's identity, the lifetime and the local state (readLocalNow) says so, else sets it aside (instancefs renames and removes beneath their directories), restores the replica (lease.Restore, CheckDB, quarantine on corruption) and the files (restoreFilesClean); every error fails the wake; +registry:Host, +whole:Route x8;rev3=census-ruling-ha-generations;basis=storage generations Task 5: legacy (non-generations) HA restore unchanged, called from restoreHAWake; -whole:Route moved into haRestorePrelude registry:Host@135,whole:Route@1121,whole:Route@1570,whole:Route@178,whole:Route@236,whole:Route@301,whole:Route@695,whole:Route@779 109db7ccabdc810c9de1f99ef7bab610e31f2697571555b0fac0ba91a51897c5
+@remove internal/lease/legacytake.go readView
+@removed internal/lease/legacytake.go readView H3 census-ruling-ha-generations;basis=quiet: now delegates to readViewClock
+@coverage internal/activator 3f5d89be39236a4d143da477ef4356aeb11ea7536cf607db14a7229bd6b2b49f
+@coverage internal/dbdoor 815998a9d98513117aacf850b4b585db0c06fd61357baa0143c55ce856a78a9d
+@coverage internal/dbreads 6b803f18ee087eb59532a7bdeeac748f23c666f8a15bf03ca11072b9e59d9bf3
+@coverage internal/genselect 2cb4d36f5c6ac1d0f88d506175c6b633827775c29277a1de4a6399f5b3e42d9e
+@coverage internal/grouproll 1daf2947a4ed35ea04132029a115a3e48977d78594ffa97a7e46f79c75a0a108
+@coverage internal/hafresh cbf3c6742bbab284dd2f0bac42d295d39e610c4c59e637ea1eacdb51c2afd670
+@coverage internal/host b8410a4537cbba44b3cbb1a7cdd84797d8d27206945c252681d336c214ca4853
+@coverage internal/hostbox a656c61012ba600271b99d0ed4f9a74feaaa30eb82f62a4054fa2f077610b0ac
+@coverage internal/hostfiles e7878034d6141289daff2a1b5fbfec68cbfc976a61d62a613dbcf5a33c4368a4
+@coverage internal/lease c19fe01f256560bbc5edbf74cc9fd669cf0eca02a221354ade0cd0f398f1911e
+@coverage internal/moves e35b5fef3e5f4de37a496ccf8dee214898c53106c26e35bf0cb440625de80b3a
+@coverage internal/ops a8db14fbd952f9af2d3029b9da0bb5662fe9405296dfd51c56a9c688e8e38ce7
+@coverage internal/release 62ebbbf9283c889e690adb69bc43292a013cdf9c9b2f5431268d291f7fd9f6f3
+@coverage internal/replicagen e45eb98acc9f30407a0f011a6d31ebf86de4fd67fae9d45ba44dada551fb725c