| index 376c6de96..267040455 100644 |
| --- a/internal/provision/testdata/plan14-root-reads-sr-followups.tsv |
| +++ b/internal/provision/testdata/plan14-root-reads-sr-followups.tsv |
| @@ -1,5 +1,5 @@ |
| # Census overlay sr-followups, written by census-propose (#369). census-ruling-sr-followups, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-sr-followups.md. |
| -# 9 body, 3 sites, 7 envelope: each changed unit re-frozen at its existing disposition with its claim appended. |
| +# 10 body, 3 sites, 7 envelope: each changed unit re-frozen at its existing disposition with its claim appended. |
| # 4 new dispositions: 0 reads re-frozen at their disposition with the claim, 4 new units frozen accepted-legacy, 0 quiet units retired while they read nothing, 0 other. |
| @legacy c63e6675f23bdc2f1e3b6cf21ae4c44ae69974e9a56ed8071da2f91f3c99999e internal/activator/activator.go Service.doWakeOnce legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: The former doWake body, not deleted logic: refresh/admit/fence/layout checks remain. Select and verify the actual staged identity before serving Acquire; use canonical mode to call doStatelessWake. Keep SQLite acquire/restore/seed/marker/replicate only in the stateful arm, with the post-acquisition selection recheck and existing cleanup proofs. Fix 3a round 1 I1/I3a: admit config directly only for stateless and mark runtime ownership refusals. Stateful Acquire/Restore precede selection and pending publication; canonical mode inspection is separate, replan precedes settlement. Fix round 2 N2/N3: retain the original route/pin projection for post-lease declaration checks; reuse the unplanned capture so a live-link repoint cannot change the selected build. Stateful capture and changed-copy errors remain start failures after Acquire/Restore. A failed preliminary verification supplies no cached mode observation. No new file path or database authority. Final review C1/R26: unprojected stateful wakes capture and materialize the live link only after Acquire and Restore. Retain original route/generation/pin stateless evidence on the context across fallback, so missing stateless evidence cannot take stateful recovery inference. Known good stateful identity skips canonical declaration lookup. Existing pre-exec verification remains. R28 final fix 2: carry whether this wake has a plan in attempt-local context; no new read here; route, generation and pin stateless projection remains intact.;rev3=census-ruling-agent-start-demo-1;basis=Reads IsDemo and demo admission/capability state; chooses local lease retention, skips seed upload and sidecar selection. Existing stop and under-lease ordering retained.;rev3=census-ruling-region-ha-p3a;basis=P3a Task 3: refuse tenant starts under the existing service lock before main's demoWakeRefusal, and recheck before backend Acquire. Retain main's demo refusal and all lease, restore and serialization checks. Two added whole Route uses feed the in-memory admission predicate; no new filesystem or store read.;rev3=census-ruling-stateless-replicas-2;basis=P14: after verified storage-mode selection, before clearing the projected hint or acquiring a database lease, a set row still on the stateful branch returns ErrFenced. Reads the existing route FleetBoxes field only. Verified stateless wakes take their existing branch; legacy rows remain unchanged. No new file, registry query or bucket read. merge of origin/main 9b8b2c50: retain wake-slot and HA duty logic alongside the replica stateful-start refusal; no gate removed. merge of origin/main 6be08467: Keep main demo lease, local database and KeepLocal path; never equate replication-disabled demos with stateless generations. Merge-only body/read-site change. merge of origin/main 7920cccf: Retain main tenant admission and startOwnedLocked gates alongside the replica stateful-start refusal; whole Route passed to main admission checks, no new path or store read.;rev3=census-ruling-agent-start-demo-3;basis=Route claim seeds through seed restore/admission; do not fall back to empty boot or ordinary import behavior. Census read-site delta: +registry:SeedSource, +whole:Route.;rev3=census-ruling-region-ha-g2-fixes;basis=Bound recovery Acquire by its attempt deadline; existing acquire/restore/start ordering remains; no new read.;rev3=census-ruling-g6-fence;basis=G6 F-C Task 3, the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): right after retainDatabase returns, attaches the write-fence watcher under a.mu (watchWriteFenceLocked, in memory). retainDatabase is called through a retainDB test seam that is nil in production. No read added; no root call; existing acquire, restore, publisher and cleanup order unchanged.;rev3=census-ruling-sr-followups;basis=#1061 Task 1, the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): a refused plan now returns planRefusal(host, plan) instead of the inline fmt.Errorf, the text is unchanged, and when the planner marked the plan Installing the error also matches errBuildNotInstalled (installRefusal, in memory). Same refusal at the same point before the lease, read sites unchanged, no read, file, store, bucket or root call added registry:DBPath@2071,registry:DBPath@2087,registry:DBPath@2214,registry:DBPath@2225,registry:FleetBoxes@12030,registry:GoodVersion@18320,registry:Host@1900,registry:Host@1975,registry:Host@2053,registry:Host@2205,registry:Host@2539,registry:Host@4556,registry:Host@6813,registry:Host@949,registry:Replication@16947,registry:Replication@17076,registry:Replication@17095,registry:Replication@17176,registry:Replication@33249,registry:Seed@22015,registry:SeedSource@34709,registry:Socket@2100,registry:Socket@2116,registry:Socket@2239,registry:Socket@2250,registry:Stateless@10090,registry:Stateless@10376,registry:Stateless@11748,registry:Stateless@12078,registry:Stateless@20729,registry:Stateless@9633,registry:Stateless@9724,whole:Route@10162,whole:Route@10321,whole:Route@10700,whole:Route@10798,whole:Route@10889,whole:Route@11021,whole:Route@11144,whole:Route@11198,whole:Route@11470,whole:Route@11646,whole:Route@11650,whole:Route@12437,whole:Route@12712,whole:Route@13030,whole:Route@142,whole:Route@14491,whole:Route@15168,whole:Route@16049,whole:Route@16927,whole:Route@17178,whole:Route@18523,whole:Route@19114,whole:Route@19279,whole:Route@1998,whole:Route@20215,whole:Route@21011,whole:Route@21286,whole:Route@22116,whole:Route@22187,whole:Route@2434,whole:Route@2439,whole:Route@24599,whole:Route@2493,whole:Route@2499,whole:Route@2565,whole:Route@2573,whole:Route@2629,whole:Route@26457,whole:Route@27103,whole:Route@28410,whole:Route@28564,whole:Route@29063,whole:Route@29133,whole:Route@29720,whole:Route@30805,whole:Route@31236,whole:Route@31444,whole:Route@31498,whole:Route@32427,whole:Route@32612,whole:Route@333,whole:Route@33412,whole:Route@33483,whole:Route@34201,whole:Route@34250,whole:Route@34644,whole:Route@34826,whole:Route@3591,whole:Route@36078,whole:Route@36173,whole:Route@3685,whole:Route@37014,whole:Route@3752,whole:Route@4446,whole:Route@6182,whole:Route@6441,whole:Route@6703,whole:Route@6708,whole:Route@6765,whole:Route@6771,whole:Route@6840,whole:Route@6848,whole:Route@7164,whole:Route@7225,whole:Route@729,whole:Route@7323,whole:Route@8288,whole:Route@9237,whole:Route@934,whole:Route@9461,whole:Route@9525,whole:Route@9569 7a43d0ad420a47442b1904eb5c8a0616478ebccb31bb31d37515a7b62d154456 |
| @legacy f58d657bb8de876de8527e5a16c2e854a4ac83b55756b2f3c396f7d05024a8e8 internal/activator/claimwake.go Service.doClaimWake legacy accepted-legacy accepted-legacy;rev3=J1,J4;basis=route-and-input;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R: a claim wake is refused (errWakeUnproven) while another entry's release record of the host is open, as an unproven failed wake already refuses it; the in-memory map only, no read added; adds a refusal only;rev3=census-ruling-region-ha-p3a;basis=P3a Task 3: add/recheck the local start prohibition on generation, worker, sidecar, command or root-control launch, including retained leases; preserve existing lease/ownership checks and fixed-unit exemptions. Whole Route passes to the in-memory predicate; no new filesystem/store read.;rev3=census-ruling-sr-followups;basis=#1061 Task 1, the agent as user carlos: a refused plan returns planRefusal(rt.Host, plan) instead of the inline fmt.Errorf, same text and same refusal point, typed errBuildNotInstalled only when the planner marked it Installing. Read sites unchanged, no read, file, store, bucket or root call added file:Exec@1133,file:Prepare@2265,file:Read@140,file:Read@932,registry:Host@3329,registry:Host@3399,registry:Host@4520,registry:Host@4597,registry:Host@4696,registry:Host@5302,registry:WakeIncarnation@1464,registry:WakeIncarnation@1592,whole:Route@1466,whole:Route@1594,whole:Route@2363,whole:Route@2474,whole:Route@2529,whole:Route@2535,whole:Route@3542,whole:Route@3600,whole:Route@3606,whole:Route@4640,whole:Route@5566,whole:Route@6186,whole:Route@7550,whole:Route@7638,whole:Route@8310,whole:Route@8318 33edeeb15fdbb3e2527a53d49f07d35355028afc012e43f16319add9db313b11 |
| @@ -12,7 +12,7 @@ |
| @legacy fa455f37393220bcf90ba48a57893b926f6a6997edd0799b839ede1bda6952c3 internal/activator/rootfs_service.go Service.installKeyLocked legacy accepted-legacy accepted-legacy;rev3=census-ruling-sr-followups;basis=#1061 Task 1, new, the agent as user carlos: under a.mu, builds the install-wait key from the route it is handed (Host to index the in-memory a.replicaPolicies, ReplicaIncarnation for the key and to compare with the observed deploy) plus the observed deploy Target.Version, all already in memory. No registry query, file, store, bucket or root call registry:Host@151,registry:ReplicaIncarnation@191,registry:ReplicaIncarnation@97 8a223f255ef4c11f809b32f0488a32881a00a6183f6da84e74c04e452c41d8d7 |
| @legacy 1062347032387d1dcd40bc0283cc19d82b7fc00a447adb87f1a5e489c8f3b918 internal/activator/rootfs_service.go Service.installWaitLocked legacy accepted-legacy accepted-legacy;rev3=census-ruling-sr-followups;basis=#1061 Task 1, new, the agent as user carlos: under a.mu, returns since when the route wakes have waited for the build install: indexes the in-memory a.residents by the route Host and compares the stored key with installKeyLocked(rt) (the whole:Route site), zero when no covering wait. Reads only memory, no registry query, file, store, bucket or root call registry:Host@86,whole:Route@183 df0615174c3c4771589aeaab29aac028f096ac5cbe79dcc5eca34b9b55b6f839 |
| @legacy 46909d4fb7db60d79cb538c25fa18330096b55b67b8faa5af628ba9f56ada7e3 internal/activator/rootfs_service.go Service.noteInstallWaitLocked legacy accepted-legacy accepted-legacy;rev3=census-ruling-sr-followups;basis=#1061 Task 1, new, the agent as user carlos: the one place the install wait is set and cleared: a refusal for no installed build sets it (keyed by installKeyLocked(rt), the whole:Route site) when no wait covers that key, a started generation or its crash clears it. In-memory resident state only, no registry query, file, store, bucket or root call whole:Route@161 2836c2bbd6d383ffd82333e093bc5925740ca2f7d72d39fb2aa6fe45ffbc4f8e |
| -@legacy dd1450d6cfdfdf00190edc1963929dd883619ddf95902f31f3ed5739ae2436fb internal/appconfig/configack.go configAckETag legacy accepted-legacy accepted-legacy;rev3=census-ruling-sr-followups;basis=#966 fix round 1, new: WriteConfigAck read-before-write now takes only the existing ack status and ETag through configAckETag instead of s.Get. With a streaming store (release.Opener: S3, the store door, a prefix store over either) it opens the key and closes the body unread when an ETag comes with the stream, a local-dir store (DirStore, no stream ETag) is read through a 64 KiB cap, discarded, and then asked for its ETag with Get, an object over the cap refused and never overwritten, a store without Open (test fakes) is read with Get as before. Runs in the agent (user carlos) and in the root adopt pass (carlos adopt, carlos-adopt.service, root: SyncUnits with configAckFunc "adopt"). On a door box (#966 configAckStore, a NewPrefixStore of fleets/<fleet>/) the root adopt pass ack write now GETs fleets/<F>/control/config-ack/<label>/<host>.json, a key any box of that fleet can write, using only the status (ErrNotExist means create) and the ETag header for the CAS Put, never the body, the body is not parsed, buffered, followed or acted on. Elsewhere the key is the platform-root control/config-ack/<box>/<host>.json as before. No new bucket, file path or root call beyond that Get, which replaces the existing whole-body Get file:Open@200 4da62cd1fc2d9529d67cfb3165c8eadce8c083d89da05eb6a9a703896e89a804 |
| +@legacy 344c049fdea09c6d756f45a9876cfd16e675bb0e46f374bac68c3520cea55e6c internal/appconfig/configack.go configAckETag legacy accepted-legacy accepted-legacy;rev3=census-ruling-sr-followups;basis=#966 fix round 1 and census fix, new: WriteConfigAck's read-before-write takes only the existing ack status and ETag through configAckETag instead of s.Get. With a streaming store (release.Opener: S3, the store door, a prefix store over either) it opens the key and closes the body unread when an ETag comes with the stream; a local-dir store (DirStore, no stream ETag) is read through a 64 KiB cap, discarded, then asked for its ETag with Get, an object over the cap refused and never overwritten; a store without Open (test fakes) is read with Get as before. THE ROOT PASS NO LONGER READS THE FLEET CORNER: on a door box the root adopt pass writes its ack with ReplaceConfigAckBlind (configAckRootFunc), never WriteConfigAck, so configAckETag never runs in root against fleets/<F>/. In root it runs only on a box with a bucket or a dir (doorFleet empty), against the platform-root control/config-ack/<box>/<host>.json the root pass already read with s.Get before #966 (same key, status and ETag only now). Under the agent (user carlos) on a door box it reads fleets/<F>/control/config-ack/<label>/<host>.json file:Open@200 4da62cd1fc2d9529d67cfb3165c8eadce8c083d89da05eb6a9a703896e89a804 |
| @legacy c376fcdae715cd2824f475dfd430bf8920d1c14aeb1be66ee023990544a6149e internal/activator/replicadeploy.go Service.replicaRestartedFailure legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-4-final;basis=#511 micro-fix P1b (new): for an always-on set row holding this box's permit with no entry and no switch evidence, reads the host's registry row (Routes.Get: Resident, FleetBoxes, ReplicaIncarnation) and stats at.StagedPath (the root-staged release.VersionPath the rollout named; metadata only, never opened, read or run); past replicaRestartBound it fences (FenceAndStopAs), checks releaseOps and StopUncertain, lifts its own fence (LiftFenceAs) and answers switched-failed; starts nothing;rev3=census-ruling-stateless-replicas-4-drill1;basis=#511 drill 1 R21 and rounds 1-2: reads, under a.mu, the host's in-memory resident state (secretsSince, configSince). A copy whose wakes wait for its configuration keeps its step open (no answer) up to releaseConfigBound from the first such wait (round 2). Past the bounds, a copy refused for the shared secrets, or still waiting for its configuration, fences with a permit-owned owner (replicaKeptOwner, by reason), keeps the fence after a proven stop and answers kept (Proven, not WebFailed; SR-4-C83 or SR-4-C92); SetReplicaDeploy lifts that fence once the record no longer holds the permit open (round 1, Astra A1); a step finding its kept fence held answers kept again; otherwise the same bound, fence, stop proof and lift; no store, file or root call added;rev3=census-ruling-sr-followups;basis=#1061 Task 1, the agent as user carlos: reads, under a.mu, the in-memory install wait for the row it already holds (installWaitLocked(*rt), the two new whole:Route sites: rt is the registry row this unit already read with Routes.Get, passed to an in-memory lookup keyed by Host, ReplicaIncarnation and the observed deploy target). While the wait is set and younger than releaseInstallBound (10 min) the permitted step stays open (abandon errSwapNotAwake, no answer), past it, with the wait still set, it answers kept with reason install (keptInstall, replicaKeptOwner fence, replicaInstallRefusal, copy SR-6-C01) through the existing fence, stop proof and lift, never switched-failed while the wait is set. The already-kept check and replicaKeptFor accept the install owner. No store, file, bucket or root call added, only keeps a step open longer or halts it file:Stat@483,registry:FleetBoxes@367,registry:ReplicaIncarnation@390,whole:Route@1810,whole:Route@336,whole:Route@3721 3ca33c6a681b60d62fc626c626aa3f483e1047bb19cdc93e24eb690592381abe |
| @legacy 2de75b0dc150bd18d1de85ccffd808488b35f70b0570f13ad065fac2c10d1551 internal/activator/rootfs_service.go Service.noteResidentStopLocked legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 8: a resident's stop sets its next start: a crash or a lost lease backs off (residentBackoff, failures reset after a healthy run) and emits the resident restart event (RFS-3-C11); any other stop restarts on the next tick; state and event only;rev3=census-ruling-sr-followups;basis=#1061 Task 1, the agent as user carlos: a crash or lost-lease stop of a started generation (the existing failure branch) also clears the resident install wait through noteInstallWaitLocked(st, e.route, installCrashed), the new whole:Route site is the entry route already held, passed to that in-memory unit. State only, no read, file, store, bucket or root call added whole:Route@264,whole:Route@565,whole:Route@63 845f378a2d541e640a7e004aa85bd62ff5af192578c0f33ea03d46c11fc892e7 |
| @legacy 038666f261ba3d26ff22cefbccbcb9abf3c1ad36f842b42b00bc67cc68f8ce12 internal/activator/rootfs_service.go Service.noteResidentWakeLocked legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 8: a proactive wake gives back its reservation; a resident's failed wake backs off only when it is the build's failure (residentFailure), otherwise retries on the next tick, waiting out another owner's lease when the error says so; state only;rev3=census-ruling-stateless-replicas-4-drill1;basis=#511 drill 1 R21/R21b and round 2: records on the host's resident state since when its wakes have been refused for the instance's shared secrets (errStatelessSecretsWaiting) and since when they have waited for its configuration (releaseConfigWait), each cleared by any other outcome; the new whole:Route site is the entry's route already held (Resident); in-memory state only;rev3=census-ruling-sr-followups;basis=#1061 Task 1, the agent as user carlos: beside the existing secrets/config waits, a served wake clears the install wait and a wake refused with errBuildNotInstalled sets it, both through noteInstallWaitLocked(st, e.route, ...), the two new whole:Route sites are the entry route already held. residentFailure now also treats errBuildNotInstalled as not the build failure, so such a refusal is not counted as a resident crash and takes no backoff. In-memory state only, no read, file, store, bucket or root call added whole:Route@187,whole:Route@682,whole:Route@783,whole:Route@834 bff8ff78180a184cbe204beee25d37a70d787dbe3ebf3f3fdf79a43fc7f44196 |
| @@ -21,6 +21,7 @@ internal/activator/claimwake.go Service.doClaimWake legacy accepted-legacy accep |
| internal/edge/replicaprober.go replicaProber.Sync legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-3;basis=Task 1 fix round 1 Q13: preserve surviving host/incarnation/box jobs and their samples/counters across revision, Copies and deployment-stamp changes; refresh the in-memory route view under the prober mutex. Cancel removed members and changed owner/lifetime/fleet jobs; new members start unknown. Supplied Route values only, no query, bucket polling or wake.;rev3=census-ruling-sr-followups;basis=#1061 Task 2, the edge in the agent (carlos-edge.service, user carlos): a new probe job records started = p.clock.Now() (the prober clock, in memory). Same supplied Route values and job keys, no query, bucket poll, file, wake or root call added registry:Account@331,registry:App@351,registry:FleetBoxes@308,registry:FleetBoxes@688,registry:HA@367,registry:Hibernate@376,registry:Host@1318,registry:Host@473,registry:Host@501,registry:Host@529,registry:Kind@393,registry:Region@1211,registry:ReplicaIncarnation@1327,whole:Route@1064,whole:Route@1072,whole:Route@1085,whole:Route@1094,whole:Route@1123,whole:Route@1361,whole:Route@1368,whole:Route@262,whole:Route@467,whole:Route@523,whole:Route@540,whole:Route@569,whole:Route@610,whole:Route@745,whole:Route@776,whole:Route@829,whole:Route@871 a2b48a1e23053dae3e9f37cfed7056ad41204a250a4123ac9001ccee72a1135e |
| internal/edge/replicaprober.go replicaProber.record legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-3;basis=Final I1 fix, Q22: accept a revision-skewed result as normal health evidence after the unchanged current-job, cancellation, connection, owner, lifetime, box, boot and serving-evidence checks. Count fail/rise and refresh ObservedAt; stamp the accepted sample with the hub current route ReplicaRevision. The existing in-memory Route revision read moves from the skew refusal to that stamp. No new external read, path, bucket poll, membership authority or wake.;rev3=census-ruling-stateless-replicas-4-drill3;basis=drill 3 R23: after recordProbe, the accepted job also latches risen (job.risen = risen || count.up), the in-memory fact Risen and Select read; no read added, same two sites;rev3=census-ruling-sr-followups;basis=#1061 Task 2, the edge in the agent as user carlos: past replicaProbeFail, a copy that has never risen (job.risen false) and whose job is younger than replicaStartingCap (15 min, from job.started on the prober clock) reads State "starting" instead of "failed"/replicaFailed, once risen or past the cap it reads failed as before. Display only: Healthy, Select and Live are unchanged, so routing is unchanged. Same two read sites, no read, file, store, bucket or root call added registry:ReplicaRevision@1184,whole:Route@1186 86e93730d716cf7e11bf3926b253452628c68caccb54bd8cff2c9a75096d6f5f |
| internal/host/agent.go aliasPassReportingComplete legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-g2-fixes;basis=Extract the existing serialized alias pass, add cancellable locking and routing-only alias/regional publication from its completeness report; existing deployment/claim/registry reads retained, new in-memory Route/RegionalDomain passes.;rev3=census-ruling-fix-incomplete-domains-pass;basis=gains a startup bool parameter that it copies into domains.AliasReport.StartupNoRemoval; runHAIngressStartup passes true, aliasPassReporting (the ordinary agent pass) passes false; same reads and calls, body change only; no root pass calls it; no root decision;rev3=census-ruling-account-subdomains;basis=sets AliasReport.AppsDomain from PLATFORM_APPS_DOMAIN (trimmed), the variable domainsTickConfig reads; same reads and calls otherwise; body change only;rev3=census-ruling-sr-followups;basis=#966, the agent pass (user carlos, no root pass calls it): on a door box (doorFleet: no CARLOS_DEPLOYMENT_BUCKET or CARLOS_DEPLOYMENT_DIR and a fleet identity from the process environment, CARLOS_FLEET and its box label, as openDeployStoreEnv decides) it skips edgesfile.DeploymentRoutesComplete, the status/boxes/ list the store door refuses, and reports the route set incomplete (DeploymentRoutesPartial false, routesWhole false) as the refused list did. One store list fewer on door boxes, none added, every other box unchanged, no file, bucket or root call added whole:RegionalDomain@2200,whole:Route@1379,whole:Route@1401,whole:Route@1420,whole:Route@2278 026453ab1235806335a0f7702942512d914830dc09f4326aca52373fa2222a0d |
| +internal/host/agent.go runAdoptUnderRootRelease authority B3,E1,E2,E3 rev3=census-ruling-self-serve-moves-1;basis=root claim/adopt/update controller uid 0: builds root's lifetime judge once from the host-claim switch and hands it to both productionRestartRequestPass calls; read sites unchanged, offsets moved; the preceding B3,E1,E2,E3 classification retained;rev3=census-ruling-claims-cleanup-r1;basis=claims cleanup R1: the claims shutdown timeout is the host constant claimsShutdownLimit (120s) instead of hostbox.RequestLimit (120s); no read added or changed;rev3=census-ruling-named-unit-delivery-114;basis=config sync is appconfig.SyncUnits with productionUnitOps (drop-in root /etc/systemd/system, base dir /etc/carlos/units, the declaration file /etc/carlos/named-units.json, systemctl probe/reload/restart, the config flock); no proof binding and no bucket read for delivery (Paul's ruling on #114: a root-owned declaration decides); the comment at the restart callback rewritten; read sites unchanged;rev3=census-ruling-sr-followups;basis=#966 census fix: the SyncUnits ack callback is configAckRootFunc(ctx, store) instead of configAckFunc(ctx, store, "adopt"). configAckRootFunc (new, agent.go): on a box with a bucket or dir (doorFleet empty: no fleet identity, or CARLOS_DEPLOYMENT_BUCKET or CARLOS_DEPLOYMENT_DIR set in the process environment) it returns configAckFunc(ctx, store, "adopt"), the same callback as before #966 (platform-root key, read-then-CAS). On a door box it writes each ack through appconfig.ReplaceConfigAckBlind (new, configack.go) under NewPrefixStore(store, "fleets/<fleet>/"): s.Delete(key) then a create-only s.Put(key, body, ""), returning only errors, which are logged. THE ROOT PASS NO LONGER READS THE FLEET CORNER: it sends exactly DELETE and PUT for fleets/<F>/control/config-ack/<label>/<host>.json and no GET, Open or HEAD of any fleet key; it inspects no body, ETag or listing. Reads only the process environment (doorFleet, BoxLabel), as configAckFunc did. Read sites unchanged whole:Route@11178,whole:Route@18474,whole:Route@18510,whole:Route@8425 f5a3504d54adeb8e151ce8c8c5b5831935ccd05d2c52fac81cf3971a1f2405bd |
| internal/host/movesoffline_land.go landRun.config legacy accepted-legacy accepted-legacy;rev3=census-ruling-moves-offline;basis=root-route (J1, as main's moves units); the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): new, reads the held row to render its configuration through RenderHeld, which admits only a row held by this move;rev3=census-ruling-sr-followups;basis=#966: comment only (the root ack key is read here, a door box writes acks under fleets/<fleet>/ and moves refuse fleet routes), code and read sites unchanged whole:Route@198 1ac73a69b876bf2d0b57855a81698154b5a15fbb8764fd7f321aa82db29260d2 |
| internal/release/adopt.go adoptHost authority B3,E1,E2,E3,E4,J1 E16: root first-registration creation evidence under release exclusion; exact installation identity is required for first-program adoption and is consumed before an attempt. Installed-program history comes from the verified claim launch. Fixtures: TestPlan14FreshInstallRegistration, TestPlan14FreshInstallProgramGate, TestPlan14FreshInstallCanonicalIdentity, TestPlan14FreshInstallLaunchObservation, TestPlan14InstalledLaunchProgramEvidence, TestPlan14FreshInstallProcessCrash, TestPlan14FreshInstallVisibleSync, TestClaimControlUnitInstallers. E22: root generation pins guard existing-tree artifact and manifest writes in adoption and moves-held staging/publication. Held snapshot is read under release exclusion before the leaf held-stage lock; failures remain restrictive for writes. Claims-off source returns no root pins. Fresh wholly absent version trees retain signed staging. Fixtures: TestPlan14GenerationSiblingWrites, TestPlan14GenerationVerifiedSiblingWrites, TestPlan14GenerationHeldStage (production source assembly, both flag values without census, lock order, pin/error/fresh cases). Production completeness remains unavailable; no new completeness grant.;rev3=PROPOSED-p3;run=8;identity=carlos adopt uid 0; legacy agent pass uid carlos;basis=applies root settings to canonically resolved routes including named units while legacy settings eligibility remains unchanged;rev3=PROPOSED-p3;run=16;basis=P3-R11 approved punctuation edit only; authority and reads unchanged;rev3=census-ruling-315;identity=legacy agent pass uid carlos (RootRestartsUnits; never set on carlos adopt);basis=a non-root agent pass hands a route its named unit serves (unitServed) to root through the stage relay before staging or repointing; root adopt reads unchanged;rev3=census-ruling-rootfs-apps-2;identity=the root adopt pass (carlos adopt, carlos-adopt.service, root);basis=the row's runtime (Runtime) rides on a copy of the stage check, so stageFrom stages only the kind the row runs (runtimeMatches) before any download, and the manifest the pass ends up holding is checked again; the artifact sha comes from Manifest.BoxArtifact (the rootfs key for an image); the new kind is registry:Runtime, two sites, and one more Host site in the refusal's line. A runtime the agent forges can make the pass refuse a release, and can also admit a rootfs release to staging for a row it marks rootfs. The evidence paths that can then hand back a staged identity, exhaustively: (1) the signed channel pointer with a manifest digest (ensureStagedDigest, then stageFrom: a fresh download or the staged copy reused); (2) a signed pointer with no digest (the digest marker off), through ensureStagedChecked: with the manifest fetched, stageFrom as in (1); with the fetch failing, a binary's sibling on disk is handed back as before, and a rootfs sibling is refused (controller ruling R-a, task 11 fix E5); (3) a signed promotion record's manifest digest (stageAuthorized, then ensureStagedDigest and stageFrom); (4) retained-copy recovery when (3) fails (stageAuthorized, RetainedStaged: the copy's bytes must hash to its sibling's digest). For a rootfs version every path that hands back an identity yields a sibling byte-equal to the manifest just authorised: stageFrom reads the sibling back after a fresh stage or a reuse and refuses otherwise; (2)'s fallback never yields one; recovery refuses a sibling whose bytes do not hash to the digest a readable record names (retainedRootfsAuthorised, task 11 fix E1), and with no record readable takes the copy root itself verified, as for a binary. Every path is for the row's own account and app. The held stage (materializeheld.go) and signedhead.go stage through ensureStagedDigest with a zero stage check (a binary row's), so they never stage a rootfs release, and their no-digest fallback refuses a rootfs sibling too;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3: comment only, the Hibernate check is left as is for a resident;rev3=census-ruling-stateless-replicas-1;basis=Task 4 R19: reuse the manifest verified by existing staging and signed selection; within withReleaseWork after history, proof and staging gates, seed or unseed the exec mode before PointLive (R24), under the same full-row compare and no ServingVersion/GoodVersion/running build guard. Version stamps staging and is not serving evidence. All existing root admission, credentials, quotas, proof, restart and rollback checks retained; no additional manifest or bucket read.;rev3=census-ruling-dr1-left-link;basis=the up-to-date return is skipped for an unstamped planned row (unstampedPlannedRow), which takes the existing install path with all its gates; on that repair (cur == ver) the D2 history is not seeded from the candidate path, the stamp keeps PrevVersion, and the refusal clear keeps the up-to-date rule. No new read kind;rev3=census-ruling-sr-followups;basis=#1061 Task 4, print only: on a repoint failure the "repoint failed" line is skipped when the stage relay below is about to run (cfg.stageBlocked set and stageBlocked(err)) and the caps were not converged, the relay condition is computed once into relay and reused, otherwise identical. cfg.stageBlocked is set only by the non-root agent passes (OnStageBlocked, user carlos), the root adopt pass (carlos adopt, carlos-adopt.service, root) has no relay and is unchanged, every line still printing. Same reads, guard (withReleaseWork), relay and rollback, no read, file, store, bucket or root call added registry:App@11580,registry:App@11734,registry:App@13088,registry:App@14336,registry:App@15934,registry:App@21429,registry:App@27496,registry:App@3144,registry:App@35276,registry:App@6791,registry:App@8092,registry:App@8286,registry:Backing@21145,registry:GoodVersion@21184,registry:Hibernate@36749,registry:Host@10517,registry:Host@11460,registry:Host@11493,registry:Host@11593,registry:Host@11747,registry:Host@11843,registry:Host@11875,registry:Host@11940,registry:Host@12390,registry:Host@12730,registry:Host@12854,registry:Host@13301,registry:Host@13410,registry:Host@13612,registry:Host@14426,registry:Host@15212,registry:Host@15687,registry:Host@15920,registry:Host@16262,registry:Host@16897,registry:Host@20605,registry:Host@20713,registry:Host@2105,registry:Host@21397,registry:Host@22217,registry:Host@2294,registry:Host@23001,registry:Host@23428,registry:Host@23480,registry:Host@23627,registry:Host@23714,registry:Host@2375,registry:Host@24820,registry:Host@25064,registry:Host@25724,registry:Host@26109,registry:Host@26250,registry:Host@27464,registry:Host@27591,registry:Host@28933,registry:Host@29583,registry:Host@3157,registry:Host@32816,registry:Host@33434,registry:Host@33759,registry:Host@33833,registry:Host@34080,registry:Host@34231,registry:Host@35448,registry:Host@35733,registry:Host@35846,registry:Host@36284,registry:Host@36340,registry:Host@36444,registry:Host@36591,registry:Host@37450,registry:Host@37576,registry:Host@37664,registry:Host@4469,registry:Host@4616,registry:Host@5579,registry:Host@5684,registry:Host@6903,registry:Host@6951,registry:Host@7068,registry:Host@7100,registry:Host@7978,registry:Host@8146,registry:Host@8272,registry:Host@8391,registry:Host@8869,registry:Host@9256,registry:Host@9482,registry:Host@9578,registry:Host@9669,registry:Kind@21101,registry:Kind@554,registry:PrevVersion@35635,registry:Runtime@11244,registry:Runtime@12648,registry:ServingVersion@21208,registry:Socket@21126,registry:Stateless@21085,registry:Stateless@21336,registry:Tunnel@21165,registry:Unit@33979,registry:Unit@579,whole:Route@10106,whole:Route@10460,whole:Route@11575,whole:Route@11729,whole:Route@13078,whole:Route@14326,whole:Route@15902,whole:Route@16467,whole:Route@16873,whole:Route@18073,whole:Route@18376,whole:Route@18532,whole:Route@20862,whole:Route@21006,whole:Route@21282,whole:Route@21419,whole:Route@2206,whole:Route@24549,whole:Route@24948,whole:Route@27486,whole:Route@3139,whole:Route@32387,whole:Route@35424,whole:Route@3595,whole:Route@4347,whole:Route@4587,whole:Route@6786 5241c7eaf97caa90dfd30a005450d9bdccdc683d9c9790a8523abcd15b6a98de |
| internal/rollout/wakeplan.go Manager.Plan legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-sr-followups;basis=#1061 Task 1, the activator planner in the agent (user carlos): the confirmed-empty-version refusal sites (no Materialize, or the row re-read after Materialize has Version "") return notInstalledPlan(), the same text marked Installing, a failed or nil row read after install or plan, and a build that moved twice, return unconfirmedPlan(), the same text unmarked. The existing Routes.Get re-reads are unchanged and only split by err/nil versus empty Version, no read, file, store, bucket or root call added, refuses exactly when it did before registry:Host@1569,registry:Host@1644,registry:Host@2441,registry:Host@2520,registry:Host@2642,registry:Host@2948,registry:Host@3178,registry:Host@3459,registry:Host@3696,registry:Host@3874,registry:Host@496,registry:Version@1983,registry:Version@3004,registry:Version@3515,registry:Version@3532,registry:Version@3705,registry:Version@3717,registry:Version@3883,registry:Version@3895,whole:Route@104,whole:Route@2670,whole:Route@3061,whole:Route@3067,whole:Route@3138,whole:Route@3206,whole:Route@3912,whole:Route@3918,whole:Route@944,whole:Route@983 d4a4d8f37f4a1dbea5febea394da33f0df0c6c075e51acf35b9ab9a845ba184b |
| @@ -28,14 +29,14 @@ internal/rollout/wakeplan.go decideWake legacy accepted-legacy accepted-legacy;r |
| internal/activator/rootfs_service.go Service.installKeyLocked legacy accepted-legacy accepted-legacy;rev3=census-ruling-sr-followups;basis=#1061 Task 1, new, the agent as user carlos: under a.mu, builds the install-wait key from the route it is handed (Host to index the in-memory a.replicaPolicies, ReplicaIncarnation for the key and to compare with the observed deploy) plus the observed deploy Target.Version, all already in memory. No registry query, file, store, bucket or root call registry:Host@151,registry:ReplicaIncarnation@191,registry:ReplicaIncarnation@97 8a223f255ef4c11f809b32f0488a32881a00a6183f6da84e74c04e452c41d8d7 |
| internal/activator/rootfs_service.go Service.installWaitLocked legacy accepted-legacy accepted-legacy;rev3=census-ruling-sr-followups;basis=#1061 Task 1, new, the agent as user carlos: under a.mu, returns since when the route wakes have waited for the build install: indexes the in-memory a.residents by the route Host and compares the stored key with installKeyLocked(rt) (the whole:Route site), zero when no covering wait. Reads only memory, no registry query, file, store, bucket or root call registry:Host@86,whole:Route@183 df0615174c3c4771589aeaab29aac028f096ac5cbe79dcc5eca34b9b55b6f839 |
| internal/activator/rootfs_service.go Service.noteInstallWaitLocked legacy accepted-legacy accepted-legacy;rev3=census-ruling-sr-followups;basis=#1061 Task 1, new, the agent as user carlos: the one place the install wait is set and cleared: a refusal for no installed build sets it (keyed by installKeyLocked(rt), the whole:Route site) when no wait covers that key, a started generation or its crash clears it. In-memory resident state only, no registry query, file, store, bucket or root call whole:Route@161 2836c2bbd6d383ffd82333e093bc5925740ca2f7d72d39fb2aa6fe45ffbc4f8e |
| -internal/appconfig/configack.go configAckETag legacy accepted-legacy accepted-legacy;rev3=census-ruling-sr-followups;basis=#966 fix round 1, new: WriteConfigAck read-before-write now takes only the existing ack status and ETag through configAckETag instead of s.Get. With a streaming store (release.Opener: S3, the store door, a prefix store over either) it opens the key and closes the body unread when an ETag comes with the stream, a local-dir store (DirStore, no stream ETag) is read through a 64 KiB cap, discarded, and then asked for its ETag with Get, an object over the cap refused and never overwritten, a store without Open (test fakes) is read with Get as before. Runs in the agent (user carlos) and in the root adopt pass (carlos adopt, carlos-adopt.service, root: SyncUnits with configAckFunc "adopt"). On a door box (#966 configAckStore, a NewPrefixStore of fleets/<fleet>/) the root adopt pass ack write now GETs fleets/<F>/control/config-ack/<label>/<host>.json, a key any box of that fleet can write, using only the status (ErrNotExist means create) and the ETag header for the CAS Put, never the body, the body is not parsed, buffered, followed or acted on. Elsewhere the key is the platform-root control/config-ack/<box>/<host>.json as before. No new bucket, file path or root call beyond that Get, which replaces the existing whole-body Get file:Open@200 4da62cd1fc2d9529d67cfb3165c8eadce8c083d89da05eb6a9a703896e89a804 |
| +internal/appconfig/configack.go configAckETag legacy accepted-legacy accepted-legacy;rev3=census-ruling-sr-followups;basis=#966 fix round 1 and census fix, new: WriteConfigAck's read-before-write takes only the existing ack status and ETag through configAckETag instead of s.Get. With a streaming store (release.Opener: S3, the store door, a prefix store over either) it opens the key and closes the body unread when an ETag comes with the stream; a local-dir store (DirStore, no stream ETag) is read through a 64 KiB cap, discarded, then asked for its ETag with Get, an object over the cap refused and never overwritten; a store without Open (test fakes) is read with Get as before. THE ROOT PASS NO LONGER READS THE FLEET CORNER: on a door box the root adopt pass writes its ack with ReplaceConfigAckBlind (configAckRootFunc), never WriteConfigAck, so configAckETag never runs in root against fleets/<F>/. In root it runs only on a box with a bucket or a dir (doorFleet empty), against the platform-root control/config-ack/<box>/<host>.json the root pass already read with s.Get before #966 (same key, status and ETag only now). Under the agent (user carlos) on a door box it reads fleets/<F>/control/config-ack/<label>/<host>.json file:Open@200 4da62cd1fc2d9529d67cfb3165c8eadce8c083d89da05eb6a9a703896e89a804 |
| internal/activator/replicadeploy.go Service.replicaRestartedFailure legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-4-final;basis=#511 micro-fix P1b (new): for an always-on set row holding this box's permit with no entry and no switch evidence, reads the host's registry row (Routes.Get: Resident, FleetBoxes, ReplicaIncarnation) and stats at.StagedPath (the root-staged release.VersionPath the rollout named; metadata only, never opened, read or run); past replicaRestartBound it fences (FenceAndStopAs), checks releaseOps and StopUncertain, lifts its own fence (LiftFenceAs) and answers switched-failed; starts nothing;rev3=census-ruling-stateless-replicas-4-drill1;basis=#511 drill 1 R21 and rounds 1-2: reads, under a.mu, the host's in-memory resident state (secretsSince, configSince). A copy whose wakes wait for its configuration keeps its step open (no answer) up to releaseConfigBound from the first such wait (round 2). Past the bounds, a copy refused for the shared secrets, or still waiting for its configuration, fences with a permit-owned owner (replicaKeptOwner, by reason), keeps the fence after a proven stop and answers kept (Proven, not WebFailed; SR-4-C83 or SR-4-C92); SetReplicaDeploy lifts that fence once the record no longer holds the permit open (round 1, Astra A1); a step finding its kept fence held answers kept again; otherwise the same bound, fence, stop proof and lift; no store, file or root call added;rev3=census-ruling-sr-followups;basis=#1061 Task 1, the agent as user carlos: reads, under a.mu, the in-memory install wait for the row it already holds (installWaitLocked(*rt), the two new whole:Route sites: rt is the registry row this unit already read with Routes.Get, passed to an in-memory lookup keyed by Host, ReplicaIncarnation and the observed deploy target). While the wait is set and younger than releaseInstallBound (10 min) the permitted step stays open (abandon errSwapNotAwake, no answer), past it, with the wait still set, it answers kept with reason install (keptInstall, replicaKeptOwner fence, replicaInstallRefusal, copy SR-6-C01) through the existing fence, stop proof and lift, never switched-failed while the wait is set. The already-kept check and replicaKeptFor accept the install owner. No store, file, bucket or root call added, only keeps a step open longer or halts it file:Stat@483,registry:FleetBoxes@367,registry:ReplicaIncarnation@390,whole:Route@1810,whole:Route@336,whole:Route@3721 3ca33c6a681b60d62fc626c626aa3f483e1047bb19cdc93e24eb690592381abe |
| internal/activator/rootfs_service.go Service.noteResidentStopLocked legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 8: a resident's stop sets its next start: a crash or a lost lease backs off (residentBackoff, failures reset after a healthy run) and emits the resident restart event (RFS-3-C11); any other stop restarts on the next tick; state and event only;rev3=census-ruling-sr-followups;basis=#1061 Task 1, the agent as user carlos: a crash or lost-lease stop of a started generation (the existing failure branch) also clears the resident install wait through noteInstallWaitLocked(st, e.route, installCrashed), the new whole:Route site is the entry route already held, passed to that in-memory unit. State only, no read, file, store, bucket or root call added whole:Route@264,whole:Route@565,whole:Route@63 845f378a2d541e640a7e004aa85bd62ff5af192578c0f33ea03d46c11fc892e7 |
| internal/activator/rootfs_service.go Service.noteResidentWakeLocked legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 8: a proactive wake gives back its reservation; a resident's failed wake backs off only when it is the build's failure (residentFailure), otherwise retries on the next tick, waiting out another owner's lease when the error says so; state only;rev3=census-ruling-stateless-replicas-4-drill1;basis=#511 drill 1 R21/R21b and round 2: records on the host's resident state since when its wakes have been refused for the instance's shared secrets (errStatelessSecretsWaiting) and since when they have waited for its configuration (releaseConfigWait), each cleared by any other outcome; the new whole:Route site is the entry's route already held (Resident); in-memory state only;rev3=census-ruling-sr-followups;basis=#1061 Task 1, the agent as user carlos: beside the existing secrets/config waits, a served wake clears the install wait and a wake refused with errBuildNotInstalled sets it, both through noteInstallWaitLocked(st, e.route, ...), the two new whole:Route sites are the entry route already held. residentFailure now also treats errBuildNotInstalled as not the build failure, so such a refusal is not counted as a resident crash and takes no backoff. In-memory state only, no read, file, store, bucket or root call added whole:Route@187,whole:Route@682,whole:Route@783,whole:Route@834 bff8ff78180a184cbe204beee25d37a70d787dbe3ebf3f3fdf79a43fc7f44196 |
| @coverage . 7a880be74d9fd0d693210d538d19d90f6a7029dd96a44f9db36637777f2268b5 |
| @coverage internal/activator a39b85f0b3acee07c9fb3449726e557b63f5e57ae1ae7accbfac3ed0276ff30f |
| -@coverage internal/appconfig 173fe2fd8bf6f8eae3261b01dc3197591ee50f0b26a80d370c0ec0f67b00497a |
| +@coverage internal/appconfig 68ccfe9129f9fe1ac0216765c9ad755b7f9fdc03a67d99712b59d294483f921d |
| @coverage internal/edge 021bc52570baa38fec43c1144342fc3367189ec1440f1f07249a47c0e750c98b |
| -@coverage internal/host af9909b121a2ba21bac132ac3fb96483363db1694116f1a7c337cbdd940f7a20 |
| +@coverage internal/host a515141ea48cc3c201c3d505e1eb2ab0741c0b26612f43ed97e6976bc82fb6ab |
| @coverage internal/release 40fb5523f5cbed6e06bfd24ef1fd308ee903ad629044efcb452fda21782ba12c |
| @coverage internal/rollout 62df682f1e647046f6be1a1661f7ab25b219901c7932751b2e8ef16595791deb |