| index f87742cf6..9970f52d5 100644 |
| --- a/internal/provision/testdata/plan14-root-reads-ha-generations.tsv |
| +++ b/internal/provision/testdata/plan14-root-reads-ha-generations.tsv |
| @@ -1,6 +1,6 @@ |
| # 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. |
| +# 12 body, 4 sites, 17 envelope: each changed unit re-frozen at its existing disposition with its claim appended. |
| +# 14 new dispositions: 0 reads re-frozen at their disposition with the claim, 13 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 |
| @@ -8,17 +8,19 @@ |
| @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 1f219cdabfd80f5c771a9ff8fa3d17aa873f3133fc6e84f6cfc7185db6b6e26f 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 same single bounded GET of lock.json, with its ETag, now also decodes the body with hafresh.DecodeLock and returns v.Generations(), so Tombstone refuses a storage-generations lock; a lock hafresh.DecodeLock cannot read (a malformed generations field) is an error, and Tombstone refuses on it; no read added (it does not return the Date header) 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 0fef49391d39480440cf785632cc9a7b1ef11c1491123224f8e30d25a65cc3b9 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) and accepts it only when its revision (hostfiles.BaselineGen: decoded and hashed in memory, no read, no publisher) is the marker's files_gen; otherwise reads the files manifest once (hostfiles.ReadBaseline, the same bounded GET hostfiles.Open made, with Open's refusals) to build the files fence baseline. Branch fix: it opens no hostfiles publisher (the publication guard's raw-secret rule); the wake's own publisher opens on the fence's write in stageKeptFiles; reads the box's own registry row registry:Host@142,registry:Host@706,whole:Route@194 8cd6e7585b5a1aff1fad05749ca37c0eac4dd32db8a41146e545179a73a53fb0 |
| @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 30d341d03c3f18864e4a52866d44e1d90fde0f30d2089b102638b62b5c0909a0 internal/host/genfloor.go generationsFloorMarked legacy accepted-legacy accepted-legacy;rev3=census-ruling-ha-generations;basis=new (branch fix, storage generations activation floor): os.Lstat of <etc>/carlos/ha-generations-floor, presence only; the file is never opened or read, a symlink is not followed, and any error other than not-exist is returned so the guard arms on it. The path is root-owned /etc/carlos (host.env's directory); only root can create or remove the file, and its presence only adds a refusal (it can never lift a guard). file:Lstat@68 ee381a32f0628b1565baf1075f9ac7613606acde20f8763f913317a32e2e5446 |
| +@legacy 5f65a32a001237a4188e6f5b959b5cd3b7f47d3f6ab47eaac44a1efae7f0d4a2 internal/host/genfloor.go recordGenerationsFloor legacy accepted-legacy accepted-legacy;rev3=census-ruling-ha-generations;basis=new (branch fix, storage generations activation floor): when generationsFloorMarked finds nothing, creates <etc>/carlos/ha-generations-floor with os.OpenFile(O_WRONLY|O_CREATE|O_EXCL, 0600), so an existing file or symlink there is never opened or followed (EEXIST is success), writes the fixed body "replica-generations-1\n", syncs it and the directory. It never creates <etc>/carlos. Called only by root processes that have seen CARLOS_HA_GENERATIONS on (the activation guards and ensureSystemUnits). No read of the file. file:OpenFile@194 a98aa18c6655bf07f360e204eca27580732c7c6406b9f971130578d68e3247fc |
| @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 |
| @@ -29,20 +31,25 @@ internal/activator/backend_exec.go ExecBackend.restorePlain legacy accepted-lega |
| 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/guardexec.go RunSystemGuardExec authority F,J4 rev3=PROPOSED-p3;run=13;identity=root apply/recover uid 0; edge uid carlos; console service identity;basis=keeps main remote policy checks for no-census recovery; only census recovery is network-free; edge never opens root state;rev3=census-ruling-edge-ppv2;basis=Root. The apply/recover case moves into guardExecRouter (the journal os.Stat moves with it: sites -file:Stat), which receives the existing rootMovesFloorIdentity, rootFloorJournalPresent, withRootFloorGuardCandidate and d.Exec, plus the new prevAllowed = proxyPrevAllowed(productionProxyArmed, d.Run bounded by systemVersionWait). The policy load, recover lock check, network-free decision and remote policy check before it, and the console case, are unchanged; the platform string is computed once and used by both.;rev3=census-ruling-ha-generations;basis=Branch fix (storage generations activation floor): the apply/recover prevAllowed closure, after the unchanged PROXY protocol check (proxyPrevAllowed), also applies generationsPrevAllowed with productionGenerationsArmed: armed by CARLOS_HA_GENERATIONS (anything but empty, 0 or off) in the process environment or in /etc/carlos/host.env read by the existing protected reader sandboxHostEnvironmentAt (an error arms it), or by /etc/carlos/ha-generations-floor being present (os.Lstat only, never opened; an error but not-exist arms it). Seeing the switch on, it creates that file create-only (O_CREATE|O_EXCL, 0600, as root; failure ignored, the guard is armed either way). When armed it runs carlos.prev `version --json` through the same d.Run bounded by systemVersionWait the PROXY check already uses; a refusal makes guardExecRouter pass over carlos.prev for the current binary, as before. Other modes unchanged. file:Exec@1939,file:Exec@2305 fed004e841b52ebb01a836cedb09b0f10129cff95145a468f590557234f631cc |
| 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/host/systemunits.go ensureSystemUnits authority F,J4 rev3=PROPOSED-activation-tools;run=27;basis=automated offline transaction removed; retains preceding integrated classification: root-input;kept=F;scope=protected-decision-only;rev3=census-ruling-db-region-forward-1;identity=root (the adopt pass);basis=installs carlos-dbread.socket and carlos-dbread@.service with the other system units, asks one more is-active and arms the socket, never the service template; read sites unchanged, offsets moved; main's F authority retained; round 1: arms carlos-dbread.socket only when the installed host.env arms db reads (dbReadsSocketWanted reads its six db-reads keys through readClaimUnitFile, which the scanner does not name), and stops and disables it elsewhere;rev3=census-ruling-retire-join-units-on-adopt;basis=root (the hourly carlos adopt pass, carlos-adopt.timer, and the -config-only/-stage-only passes; never -restart-only): after the apply lock is taken and systemctl has answered, and before the already-armed early return, calls retireUnitsIn(<etc>/systemd/system, retiredUnits, its own systemctl seam) to disable --now, then remove, the units an earlier build installed and this one no longer ships (the compiled-in exact names carlos-system-join.path and carlos-system-join.service); an error is logged and never stops the arming; under a running apply (lock held) or a silent systemctl nothing is retired; no read added in this body (the reads are in retireUnitsIn) (#454);rev3=census-ruling-agent-start-demo-1;basis=Body unchanged; consumes the enlarged embedded file list through the existing root installer.;rev3=census-ruling-region-ha-p3b;basis=Direct unit/lock reads moved to ensureSystemUnitsWithGuard; wrapper builds systemApplier and delegates. Quiet means no direct scanner sites; root repair authorization and protected marker/permit reads live in the delegate.;rev3=census-ruling-ha-generations;basis=Branch fix (storage generations activation floor): first calls noteGenerationsSwitch(etcDir, os.Getenv, logf): when the pass's own environment (the adopt units load /etc/carlos/host.env) has CARLOS_HA_GENERATIONS anything but empty, 0 or off, it os.Lstats /etc/carlos/ha-generations-floor and, when absent, creates it create-only (O_CREATE|O_EXCL, 0600, as root; it never creates /etc/carlos), syncs it and the directory, and logs an ALERT on failure, never fatal. No file content is read. The rest unchanged. 15260d2d6a1c806149272425fb23ffd410ac99b299220b39c9d7760bf5014145 |
| +internal/host/units/carlos-system-recover.service external authority F,J4 rev3=PROPOSED-p3;identity=systemd update/recover oneshot shell uid 0;basis=guard branch is conditional on executable presence; unarmed units retain main selector; installed guard selects from root local floor;rev3=census-ruling-gvisor-demos;basis=Insert current-binary sandbox gate immediately before second-branch prev exec. Preserve guard branch and all other shell bytes.;rev3=census-ruling-w6-ingress-drain;basis=TimeoutStartSec 10min -> 13min (comment: a runtime recovery restarts the edge and the drain unit's 170 s stop runs first). ExecStart, EnvironmentFile and guard selector unchanged. No read added.;rev3=census-ruling-edge-ppv2;basis=Root oneshot. The second branch's && chain gains, last and only after the existing exec-sandbox-allows-prev gate has passed, `/opt/carlos/carlos system proxy-allows-prev /opt/carlos/carlos.prev`; any non-zero exit falls through to the existing `exec /opt/carlos/carlos system apply --recover`, whose own recovery refuses the same carlos.prev (requirePrevFeatures). The verb runs as the current binary, accepts exactly the one argument /opt/carlos/carlos.prev (anything else exit 2), exits 0 without running anything unless armed (its environment, which this unit loads from EnvironmentFile=-/etc/carlos/host.env, or /etc/carlos/host.env read by the existing protected reader sandboxHostEnvironmentAt; an error arms it). When armed it first applies the exec-sandbox rule itself (sandboxAllowsPrev(carlos.prev), the check exec-sandbox-allows-prev makes, so the verb run by hand outside this unit refuses the same predecessor: exit 1, nothing run), and only then runs /opt/carlos/carlos.prev `version --json` (productionSysOps run, exec.CommandContext bounded by systemVersionWait): the binary this branch has already run (floor-allows-prev, when a floor is set) and is about to exec. The shell's && order also still puts it after exec-sandbox-allows-prev. Guard branch, the other gates and the rest of the shell bytes unchanged; header comment added.;rev3=census-ruling-ha-generations;basis=Root oneshot. Branch fix (storage generations activation floor): the second branch's && chain gains, last and only after the existing proxy-allows-prev gate has passed, `/opt/carlos/carlos system generations-allows-prev /opt/carlos/carlos.prev`; any non-zero exit falls through to the existing `exec /opt/carlos/carlos system apply --recover`, whose own recovery refuses the same carlos.prev (requirePrevFeatures, now asking for every armed feature). The verb runs as the current binary, accepts exactly the one argument /opt/carlos/carlos.prev (anything else exit 2), exits 0 without running anything unless armed: CARLOS_HA_GENERATIONS anything but empty, 0 or off in its environment (this unit loads EnvironmentFile=-/etc/carlos/host.env) or in /etc/carlos/host.env read by the existing protected reader sandboxHostEnvironmentAt (an error arms it), or /etc/carlos/ha-generations-floor present (os.Lstat only, never opened; any error but not-exist arms it; root-owned 0600, created create-only by root when the switch is seen on, never removed). When armed it first applies the exec-sandbox rule (sandboxAllowsPrev), then runs /opt/carlos/carlos.prev `version --json` (productionSysOps run bounded by systemVersionWait), the binary this branch is about to exec. Guard branch, the other gates and the rest of the shell bytes unchanged; header comment added. file:external@0 2bdd38b6622d1abc1e708c8d3cd84ac6815d78400b01cceff3f74cc2b3ff34d2 |
| +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 same single bounded GET of lock.json, with its ETag, now also decodes the body with hafresh.DecodeLock and returns v.Generations(), so Tombstone refuses a storage-generations lock; a lock hafresh.DecodeLock cannot read (a malformed generations field) is an error, and Tombstone refuses on it; no read added (it does not return the Date header) 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.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) and accepts it only when its revision (hostfiles.BaselineGen: decoded and hashed in memory, no read, no publisher) is the marker's files_gen; otherwise reads the files manifest once (hostfiles.ReadBaseline, the same bounded GET hostfiles.Open made, with Open's refusals) to build the files fence baseline. Branch fix: it opens no hostfiles publisher (the publication guard's raw-secret rule); the wake's own publisher opens on the fence's write in stageKeptFiles; reads the box's own registry row registry:Host@142,registry:Host@706,whole:Route@194 8cd6e7585b5a1aff1fad05749ca37c0eac4dd32db8a41146e545179a73a53fb0 |
| 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/host/genfloor.go generationsFloorMarked legacy accepted-legacy accepted-legacy;rev3=census-ruling-ha-generations;basis=new (branch fix, storage generations activation floor): os.Lstat of <etc>/carlos/ha-generations-floor, presence only; the file is never opened or read, a symlink is not followed, and any error other than not-exist is returned so the guard arms on it. The path is root-owned /etc/carlos (host.env's directory); only root can create or remove the file, and its presence only adds a refusal (it can never lift a guard). file:Lstat@68 ee381a32f0628b1565baf1075f9ac7613606acde20f8763f913317a32e2e5446 |
| +internal/host/genfloor.go recordGenerationsFloor legacy accepted-legacy accepted-legacy;rev3=census-ruling-ha-generations;basis=new (branch fix, storage generations activation floor): when generationsFloorMarked finds nothing, creates <etc>/carlos/ha-generations-floor with os.OpenFile(O_WRONLY|O_CREATE|O_EXCL, 0600), so an existing file or symlink there is never opened or followed (EEXIST is success), writes the fixed body "replica-generations-1\n", syncs it and the directory. It never creates <etc>/carlos. Called only by root processes that have seen CARLOS_HA_GENERATIONS on (the activation guards and ensureSystemUnits). No read of the file. file:OpenFile@194 a98aa18c6655bf07f360e204eca27580732c7c6406b9f971130578d68e3247fc |
| 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 |
| @@ -50,17 +57,20 @@ internal/activator/hawake.go ExecBackend.restoreFilesClean legacy accepted-legac |
| 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 . bd84b8515b6876b883f527a9327b7b82a0934048d46f36bd7abd6a7100a0bb50 |
| +@coverage internal/activator 4e19e71c6dc89d7af2c0d56d4d7ff5c9b205516e4bc7243c3f363992e4665ea0 |
| @coverage internal/dbdoor 815998a9d98513117aacf850b4b585db0c06fd61357baa0143c55ce856a78a9d |
| @coverage internal/dbreads 6b803f18ee087eb59532a7bdeeac748f23c666f8a15bf03ca11072b9e59d9bf3 |
| @coverage internal/genselect 2cb4d36f5c6ac1d0f88d506175c6b633827775c29277a1de4a6399f5b3e42d9e |
| -@coverage internal/grouproll 1daf2947a4ed35ea04132029a115a3e48977d78594ffa97a7e46f79c75a0a108 |
| +@coverage internal/grouproll d027d26c86d2f881176b557f2f5ea0c0c03421d4473cb85797aecdc412fd9ad6 |
| @coverage internal/hafresh cbf3c6742bbab284dd2f0bac42d295d39e610c4c59e637ea1eacdb51c2afd670 |
| -@coverage internal/host b8410a4537cbba44b3cbb1a7cdd84797d8d27206945c252681d336c214ca4853 |
| +@coverage internal/host c9fdfbf6e2de5cc63702af2feec8b49ba823182137ae0054c732c4ff9706f7fc |
| +@coverage internal/host/units fee4c243945e57e90bc8d3f5600b816a453a4985e40f95574fdf94e42d421f82 |
| @coverage internal/hostbox a656c61012ba600271b99d0ed4f9a74feaaa30eb82f62a4054fa2f077610b0ac |
| -@coverage internal/hostfiles e7878034d6141289daff2a1b5fbfec68cbfc976a61d62a613dbcf5a33c4368a4 |
| +@coverage internal/hostfiles 62330256c3fa798542b0b85ad56639751e3a04ba7bae4f80ac280b8b0d169434 |
| @coverage internal/lease c19fe01f256560bbc5edbf74cc9fd669cf0eca02a221354ade0cd0f398f1911e |
| @coverage internal/moves e35b5fef3e5f4de37a496ccf8dee214898c53106c26e35bf0cb440625de80b3a |
| @coverage internal/ops a8db14fbd952f9af2d3029b9da0bb5662fe9405296dfd51c56a9c688e8e38ce7 |
| @coverage internal/release 62ebbbf9283c889e690adb69bc43292a013cdf9c9b2f5431268d291f7fd9f6f3 |
| @coverage internal/replicagen e45eb98acc9f30407a0f011a6d31ebf86de4fd67fae9d45ba44dada551fb725c |
| +@coverage internal/version a2bc2658c0acc7e9fb24b4f504fae43ba7ce7101b1d92fe5c11256f8d05c84bd |