carlos / platform Public

fix: preserve legacy snapshot hashes for stateful routes

Hash the stateless projection as a boolean, omitting zero just like the existing HA and moved flags. Check that setting mode changes the snapshot fingerprint and clearing it restores the original fingerprint across local and remote registry handles.

Task 3a remains incomplete: verified wake branching and stateless launch and lifecycle integration are not implemented by these plumbing commits.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev 2408073cda50b0215ae589c44a5919312e7716be parent 52e210f
5 files changed, +21 −6
  • docs/superpowers/notes/census-proposal-stateless-replicas-1.md +3 −1
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −1
  • internal/provision/testdata/plan14-root-reads-stateless-replicas-1.tsv +4 −2
  • internal/registry/registry.go +1 −2
  • internal/registry/stateless_test.go +12 −0

Intent

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

diff --git a/docs/superpowers/notes/census-proposal-stateless-replicas-1.md b/docs/superpowers/notes/census-proposal-stateless-replicas-1.md
index 86e9c16d4..f5b0899ac 100644
--- a/docs/superpowers/notes/census-proposal-stateless-replicas-1.md
+++ b/docs/superpowers/notes/census-proposal-stateless-replicas-1.md
@@ -12,6 +12,7 @@ Ruling `census-ruling-stateless-replicas-1`. The independent reviewer approves o
| `internal/host/agent.go` `haRecordFacts` | body | unchanged (3) | Return RecordFacts with lifetime identity, Coordinator and ReplicaDeploy from the same judged record object; same store and record reads, no extra GET. |
| `internal/host/agent.go` `runAgent` | body | unchanged (6) | Construct coordination with existing fleet API credentials on fleet boxes, trusted deployment store otherwise; invalid fleet identity leaves it unarmed. Assign production observation callback, close after service shutdown with a five-second context. Existing read sites unchanged. |
| `internal/registry/registry.go` `Registry.Fingerprint` | body | unchanged (33) | Read the additive stateless projection in the existing registry SELECT and hash only when set; no new read source. |
+| `internal/registry/registry.go` `Registry.SnapshotFingerprint` | body | unchanged (12) | Hash the additive stateless boolean only when nonzero in the existing snapshot query; legacy false adds no bytes; no new read source. |
| `internal/registry/registry.go` `upsertRoute` | body | unchanged (3) | Persist the stateless projection in the existing guarded upsert; no new read. |
| `internal/rollout/failures.go` `FailureBook.saveLocked` | body | unchanged (0) | Persist the additive replica_releases selection carrier in the existing failure-book atomic write; no new path, record writer or authority. IDs are returned only after a successful save. |
| `internal/rollout/failures.go` `OpenFailureBook` | body | unchanged (1) | Load the additive replica_releases carrier from the same existing failure-book ReadFile; unchanged schema acceptance, identity recovery, reconciliation and read site. No additional read. |
@@ -32,6 +33,7 @@ Recorded dispositions, which each change must still satisfy:
- `internal/host/agent.go` `haRecordFacts`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-region-ha-p1a;basis=new (region HA P1a), the agent as carlos: activator.Config.Record, the closure the HA classification calls on a lifetime index miss: opens the deployment store once (openDeployStore, kept under a mutex) and reads the host's record through judgedRecord(store, judge, release.RouteAccount(rt), rt.App, rt.Host) (CI fix: provision.ReadRecordJudged under the box's lifetime judge, which also GETs the host's incarnation slot control/host-incarnations/<host>.json from the same deployment store; a record the slot no longer vouches for, or a tombstone, reads as os.ErrNotExist; a nil judge, host claims on, is provision.GetRecord exactly), turned into a lifetime entry by provision.LifetimeEntryOf; the reads are the row it is handed (registry:App, registry:Host, whole:Route); the record is the console-written deployment record the reconcile passes already read; an open or read error is returned and the wake fails closed; root never calls it
- `internal/host/agent.go` `runAgent`: authority, task B,C,D,F. Basis: rev3=census-ruling-self-serve-moves-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): builds the box's lifetime judge once (newBoxJudge, nil with host claims on) and hands it to the seed placement, the moves and runs workers and every loop it starts; read sites unchanged, offsets moved; B,C,D,F authority retained; self-serve moves 1 Task 8: derives the box's lifetimes switch from the judge once (lifetimes := boxJudge != nil) and hands it to the edges file loop; read sites unchanged, offsets moved;rev3=census-ruling-plans-4d-lapse;basis=arms two more plans hooks from the same snapshot: e.SetPlanDisabledFor(planDisabledFor) beside SetPlanGovernedFor, and svc.SetDisabledFor(planDisabledRoute) beside SetMaxRunFor (plans 4d); the reads live in those units (plans-4d-units decision); read sites unchanged, offsets moved;rev3=census-ruling-rootfs-apps-2;basis=main's body as of the merge of origin/main 9b81d97b (with main's plan rate ceiling, edge request records, regional box names, self-serve moves plan 1, plans 4d-1 lapse and its other later changes under main's own census rulings) plus the rootfs placement wiring in the activator start: an agentRootfs built from eb.NestedOK, CARLOS_DEPLOYMENT_SINGLE_TENANT, CARLOS_POOLS, the claim flag, swapArming's answer, the control client's /ready/rootfs and, on a fleet box whose identity resolved, fleetOwnerCheck over the deploy store main already opens for the fleet label (fleetStore), then arm and armedRootfs.Store; this body reads nothing new itself; the closures it wires read later, at a rootfs wake and each status tick: GET /ready/rootfs over the control socket, NestedOK's checks, and release.FleetOwnerKey for the judged row's own account and this box's fleet from the deploy store;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328 plan 2 Tasks 7 and 11, #329 plan 3 Task 7 and plan 1 Task 7's policy cache: the control client is built once and handed to eb.Control, to the status tick (egressStatus) and to a new egressNudgeLoop goroutine; armSizeSource(svc, "/sys/fs/cgroup") after the activator Service; armPolicyCache() after armChangeIndex; statusLoop takes egressStatus. The reads are those units' own (decision rows); this body reads nothing new: the same five sites, offsets moved, in the agent; B,C,D,F authority retained.;rev3=census-ruling-remote-instance-metrics;basis=builds the metrics loop's owners closure (metricsOwners over the agent's registry, the activator and cgm.Leftover) when an activator exists and hands it to metricsLoop; reads nothing new itself;rev3=census-ruling-edge-asset-cache-3;basis=adds file:Statfs. runAgent keeps its authority (B,C,D,F). The new site is assetcache.Statfs, an exported assetcache.FS interface value (var Statfs FS = statfsFS{}), not a function value and not a call in runAgent: the ready hook passes it to armEdgeAssetCache as the store's filesystem, and armEdgeAssetCache calls its Space method on the configured data directory (dataDir(): $CARLOS_DATA_DIR, else /data), which calls unix.Statfs there (statfsFS.Space, accepted legacy at census-ruling-edge-asset-cache-2). No request-supplied pathname reaches it.;rev3=census-ruling-remote-metrics-nested;basis=main's body (merged origin/main acfa4f80, under main's own census rulings) plus: snapshots the nested layout (snapshotNestedUnits over /sys/fs/cgroup/carlos.slice/carlos-instances.slice) once at start, before the activator, and hands the metrics loop a unitSources struct (stamped units, routeHostNames, that root and the snapshot); reads nothing new itself;rev3=census-ruling-region-ha-p1a;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): wires region HA P1a into the activator: cfg.Record = haRecordFacts(openDeployStore, boxJudge) (the box's lifetime judge this body already builds with newBoxJudge, nil with host claims on; CI fix) and cfg.Self = lease.CurrentSelf; eb.Lifetimes (the process's lifetime index), eb.Registry, eb.StartupSwept (seedSweptAtStart.Load), eb.FilesStore from newProductionFilesStore (now lease.NewFilesStore, rootaws-loaded, a log line on failure) and lease.SetObligationDir(<data>/.ha-owed) (logged on failure; HA acquires then refuse); this body reads nothing new itself, the same five sites; the reads are those units' own (haRecordFacts and lease's SetObligationDir are new rows on this card); merge of origin/main d7ae1d76: main's own later changes to this body are kept as main has them, under main's rulings (census-ruling-remote-instance-metrics: the metricsOwners closure for metricsLoop; census-ruling-edge-asset-cache-3: the +file:Statfs site, assetcache.Statfs handed to the asset ready hook); this branch's change is the same as above;rev3=census-ruling-region-ha-p1b1;basis=region HA P1b-1: builds one termfence.Confirmer (Self from lease.CurrentSelf at each call, EC2 DescribeInstances method only, client from rootaws.LoadDefaultConfig with retries off, built lazily on first use) and sets eb.OwnerTerminated; this body reads nothing new itself, the same six sites;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 7: the startup Sweep literal hands its answer to startupSwept, which logs as before and, only on a clean sweep, marks rootfs admission swept (MarkRootfsSwept); same Sweep call, no read added;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (controller ruling after branch review R1, and Paul's R2 ruling): sets svc.Fleet = fleetWakeFor(os.Getenv, identity, identErr, fleetStore) from the identity it already resolves once and the deployment store the fleet loops already opened, and logs an ERROR naming the identity error when the box is on a fleet with an invalid identity. fleetWakeFor reads CARLOS_REGION and CARLOS_FLEET from the same environment. Read sites unchanged (6). Agent, not root; a platform box is unchanged.;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 12: one call more beside armRunsPass, armInteractivePass(svc, reg, rolloutSink, boxJudge), in the same activator Configure hook, handing it the same box judge; fix round 1 (Astra P2, shutdown): after svc.Shutdown(ctx), shutdownInteractive(ctx) ends and joins every interactive session under the same shutdown budget; the worker's own reads are its units' (interactive.go); this body reads nothing new, the same six sites; merge of origin/main 6f1f6ca6: main's svc.Fleet = fleetWakeFor(...) and its invalid-identity ERROR line are kept as main has them (census-ruling-managed-fleets-1b); this branch's change is the same as above; read sites unchanged (6);rev3=census-ruling-fix-set-aside-exdev;basis=set-aside EXDEV fix: one field more on the agent ExecBackend literal, RawInstanceDir: layout.RawInstanceDir (a pure path join: <dataDir>/.instances/<InstanceID(host)>), so the start rule set-aside moves a copy out through the raw directory instead of through the nosymfollow bind; this body reads nothing new, the same six sites;rev3=census-ruling-durability-3a-escrow;basis=durability 3a Task 3: one more assignment beside eb.FilesStore: eb.EscrowKey = haEscrowKey(os.Getenv("CARLOS_SECRETS_KEY")), the agent's own environment parsed by appconfig.ParsePrivateKey as the moves pass parses it (unset or unparseable: a log line and nil, and HA publication refuses on the box). No path is opened or read, no read site added; the same six sites, offsets moved; B,C,D,F authority retained. Durability 3a Task 4: one more goroutine beside configSyncLoop: go escrowLoop(agentCtx, reg, svc), the escrow sweep every 30 s over the same registry and Service. This body reads nothing new itself; the same six sites, offsets moved; B,C,D,F authority retained. Durability 3a Task 5: one more call beside eb.EscrowKey: wireRawSecretPages(eb, PageOperator, metricsBoxLabel(os.Getenv, readMachineID())), which sets eb.OnRawSecret to page an operator (alerting.Page through PageOperator, LevelIncident) on its own goroutine with a 20 s timeout; metricsBoxLabel and readMachineID are the reads this body already makes for the moves refusal log; no new read site; the same six sites, offsets moved; B,C,D,F authority retained. Merge of origin/main 90c4d3aa: main's own later changes to this body are kept as main has them, under main's rulings; this branch's change is the same as above. Merge of origin/main 00bf5b8c (fleet set-aside EXDEV fix): main's change to this body is kept as main has it, under its own census ruling; this branch's change is unchanged.;rev3=census-ruling-probe-burst-limit;basis=two more sink wirings beside setAnalyticsSink: setProtectionSink(e.SetProtectionRecordOnly) and setAssetOwnersSource(e.AssetOwners), function values the telemetry pass calls; this body reads nothing new, the same six sites; authority B,C,D,F retained; no new root read or write kind
- `internal/registry/registry.go` `Registry.Fingerprint`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-self-serve-moves-1;basis=the registry's SQLite side, as carlos: in the agent (/opt/carlos/carlos agent, carlos-edge.service) and in the registry child (carlos __registry-child, which a root pass forks as the service user); the remote arm, unchanged, in the process that holds a remote handle: census-ruling-seeded-instances's body with the row's lifetime pair (incarnation, serving_seq) folded into the edge's change poll, each only when non-zero, so a registry with no pair digests as before; self-serve moves 1 Task 7;rev3=census-ruling-regional-domains-447;basis=#447 Task 4: hashes regional_domains (host, target, account, app, region; created_at not) over the same fresh connection, with a section marker written only when a row exists, so a registry with no regional rows digests as before; the one added site is that SELECT (+file:Query) on the box's own registry database, as carlos; no file path read;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): review R1 finding 1: the routes SELECT also reads host, kind, account, app, platform and fingerprintForwardInert (one CASE over the ForwardForbidden columns), and every row folds host, kind, account and app (tagged, quoted), platform when set, and forward_inert=0 for a forward row that is not inert, so a rowid reused by another hostname, an in-place account or app rewrite, or a stray forbidden column moves the edge's change poll. Same one SELECT per table on the same fresh connection to the box's own registry database, as carlos; no table, file or bucket read added; a digest, never a decision.;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Task 5): the SELECT also reads fleet_label and, only when it is set, hashes "fleet_label=<q>" into the digest, so labelling a row moves the edge's reload fingerprint. Read sites unchanged (33). Registry side, not root; an unlabelled registry's digest is byte-identical.
+- `internal/registry/registry.go` `Registry.SnapshotFingerprint`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-self-serve-moves-1;basis=the registry's SQLite side, as carlos: in the agent (/opt/carlos/carlos agent, carlos-edge.service) and in the registry child (carlos __registry-child, which a root pass forks as the service user); the remote arm, unchanged, in the process that holds a remote handle: census-ruling-seeded-instances's body with incarnation and serving_seq hashed, tagged, only when non-zero (snapshotPairCols), so a registry with no pair digests as before; self-serve moves 1 Task 7;rev3=census-ruling-region-ha-p1a;basis=hashes the new ha column only when it is set (non-empty and not "0"), tagged, so a registry with no born-HA row digests as before; the same twelve sites, no read added;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Tasks 2 and 5): fleet_assigned and fleet_label join snapshotWhenSetCols (hashed only when set), and fleet_moved is hashed like ha, only when non-zero. Read sites unchanged (12). Registry side, not root; rows without them hash as before.
- `internal/registry/registry.go` `upsertRoute`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-alias-socket-follow-338;basis=#338: Upsert's unchanged statement moved into a helper so it can run on the database or inside a transaction;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 2 (runtimeFixed in the registry): takes a guard appended to the ON CONFLICT WHERE (UpsertUnlessRootfs passes routes.runtime = ''); a stored row with a runtime keeps its region and hibernate unless the tenant changed; replication is cleared only when the effective runtime is empty; no new read source, same SQLite table;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 3: on a refused conflict, the forward check reads the host (+registry:Host) to answer ErrForwardRow; the statement carries kind <> 'forward'. A refusal only.;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Task 2): the conflict arm gains fleet_assigned (the excluded value on a re-tenanted host, else kept when the writer carries '') and fleet_moved (excluded on a re-tenanted host, else MAX of stored and excluded). Read sites unchanged (3). The same statement guard (claim ownership, kind <> 'forward') applies.
- `internal/rollout/failures.go` `FailureBook.saveLocked`: authority, task E3. Basis: rev3=PROPOSED-p3;run=8;identity=root adoption uid 0 or legacy rollout uid carlos;basis=root instance uses checked store writer; legacy instances retain the original atomic file writer and epoch semantics
- `internal/rollout/failures.go` `OpenFailureBook`: authority, task E1,E3,J1,J4. Basis: fix1-merge-review;basis=Loads schema-three durable generations and refuses unsafe identity recovery on entropy failure.
@@ -49,6 +51,6 @@ New dispositions, which census-propose wrote and the reviewer checks against the
- reads `internal/registry/registry.go:routeArgs`: +registry:Stateless; keeps authority, task E3
- reads `internal/registry/registry.go:scanRoute`: +registry:Stateless; keeps legacy, task accepted-legacy
-Seal: `5f805400717bad7726bd9d62744b8103a40eb5f5823b0ab7c960a5c0965cb3bc` → `e7792d4d8ebec186a1f07e797cfa76993673adb465214b730dc6f21482b30927`.
+Seal: `5f805400717bad7726bd9d62744b8103a40eb5f5823b0ab7c960a5c0965cb3bc` → `f44796e96185a89da6adcbe2c16f6f16cc6df4ee4af18f359a991ead9ce8f63f`.
Overlay: `internal/provision/testdata/plan14-root-reads-stateless-replicas-1.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`.
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv
index 45e03c1aa..2466062be 100644
--- a/internal/provision/testdata/plan14-root-reads-chain.tsv
+++ b/internal/provision/testdata/plan14-root-reads-chain.tsv
@@ -56,4 +56,4 @@ plan14-root-reads-fix-set-aside-exdev.tsv f9d3016cc6803338f9db19311f3f598e20c37c
plan14-root-reads-durability-3a-escrow.tsv 03a92257beb9b8aac421559e247d191bd69f28a0b26243397a1344a90d59fc2a
plan14-root-reads-rootfs-default-home.tsv 7a0a3da3d6fe7e3c77abb22676db000af2a276c3d13ccae0f038190f51287ed5
plan14-root-reads-probe-burst-limit.tsv 5f805400717bad7726bd9d62744b8103a40eb5f5823b0ab7c960a5c0965cb3bc
-plan14-root-reads-stateless-replicas-1.tsv e7792d4d8ebec186a1f07e797cfa76993673adb465214b730dc6f21482b30927
+plan14-root-reads-stateless-replicas-1.tsv f44796e96185a89da6adcbe2c16f6f16cc6df4ee4af18f359a991ead9ce8f63f
diff --git a/internal/provision/testdata/plan14-root-reads-stateless-replicas-1.tsv b/internal/provision/testdata/plan14-root-reads-stateless-replicas-1.tsv
index 29cff468c..bae36b3a2 100644
--- a/internal/provision/testdata/plan14-root-reads-stateless-replicas-1.tsv
+++ b/internal/provision/testdata/plan14-root-reads-stateless-replicas-1.tsv
@@ -1,11 +1,12 @@
# Census overlay stateless-replicas-1, written by census-propose (#369). census-ruling-stateless-replicas-1, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-stateless-replicas-1.md.
-# 12 body, 1 sites, 8 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
+# 13 body, 1 sites, 8 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
# 8 new dispositions: 3 reads re-frozen at their disposition with the claim, 4 new units frozen accepted-legacy, 0 quiet units retired while they read nothing, 1 other.
@legacy 8532ad0b6523e01bb6548e7a0ff565615b99e39a8921c338db522812368899a3 cli.go runShip legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-rootfs-apps-1;basis=rootfs Plan 1 Task 9: takes --rootfs, --processes, --hibernate, --jit and --check and hands a rootfs ship to runShipRootfs (ship_rootfs.go) before the binary path; the --notes-file ReadFile moved into shipNoteText (its own row, the same read of the file the person named) and the direct-mode version mint into mintDirectVersion; one read site fewer, none added; Task 12: the --hibernate flag help is RFS-1-C32's new text, the same reads;rev3=census-ruling-edge-asset-cache-1;basis=takes --assets (repeatable), checks the folders with checkShipAssets (release.ValidAssetPaths; refused on a static site) before the mode split, carries them into the API meta (sess.shipAssets) and the direct-mode manifest (shipAssetsBlock), and passes them to runShipRootfs (rootfsShipOpts.assets), which runs the same check and carries them the same two ways; after a direct-mode ship has stored a release declaring folders, directShipAssetGens runs the console ship door's backfill (provision.MintMissingAssetGens: lists the app's record keys and gives each record without an asset generation one, a CAS write in the deployment bucket as the person running the CLI) and fails naming any record it could not mint; read sites unchanged (2), none added;rev3=census-ruling-rootfs-apps-4;basis=adds the repeatable --env flag and refuses it before anything else unless --check is given (shipEnvRefusal, parseShipCheckEnv); the parsed values go into rootfsShipOpts.checkEnv. --env values reach the check's local container runtime as -e argv only, never root, never a box. No read added; read sites unchanged (2).;rev3=census-ruling-stateless-replicas-1;basis=Carry --stateless into binary/API and rootfs ship options; same two read sites, no new read. file:ReadFile@7899,file:ReadFile@8123 d6f244d2c3bcae95eb8ec0fa7e57c52e9b50c7e9e2e00dda85f930b643731a51
@legacy 6cdd33926c20f85e6eeb7e15d78d04842cb9d59acbd6cb3fdde202c361a08d3e internal/activator/hawake.go ExecBackend.isHA legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1a;basis=new: the one HA classification: a legacy route is not HA and reads nothing; else the lifetime index, and on a miss the record (Config.Record, the deployment store's console-written record via haRecordFacts); a failed read is an error; the row's sticky HA (+registry:HA) and the index's marks only add HA; +registry:Host x2, +whole:Route x2;rev3=census-ruling-stateless-replicas-1;basis=Extract LifetimeEntry from the extended Config.Record result; existing HA classification and read/error gates unchanged. registry:HA@573,registry:Host@280,registry:Host@486,whole:Route@126,whole:Route@373 8337ad81c8e8671acb44eacc642a1c43246a90d23ea69d35d1d7d7b58f2fcc89
@legacy 33d60a8c0abaf72ce2a3f73d927dadd3c15f54beb0cb37e2f0753545b18d7f06 internal/host/agent.go fastTick legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=PROPOSED-s3-change-index;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=observes the change index before any pass (observeIndex), runs the backstop's requested full pass and a scoped pass for moved app scopes (indexTick), and arms the canary pointer gate on the sweep (canaryPointerGate) only on a tick whose own index observation succeeded; read site unchanged, offset moved;rev3=census-ruling-stateless-replicas-1;basis=Call coordinator Tick on the existing tick before convergence; client renews held terms only at the pinned interval. Existing registry read unchanged. registry:Host@4776 717574378829734fb3461a7ec0a4e4e9089466745685d39008ad51b571ddf993
@legacy f4edd209fd6fe7d50fd79c2f6ecf96bf255d5301f094ca86a5882acf5fe8ba20 internal/host/agent.go haRecordFacts legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1a;basis=new (region HA P1a), the agent as carlos: activator.Config.Record, the closure the HA classification calls on a lifetime index miss: opens the deployment store once (openDeployStore, kept under a mutex) and reads the host's record through judgedRecord(store, judge, release.RouteAccount(rt), rt.App, rt.Host) (CI fix: provision.ReadRecordJudged under the box's lifetime judge, which also GETs the host's incarnation slot control/host-incarnations/<host>.json from the same deployment store; a record the slot no longer vouches for, or a tombstone, reads as os.ErrNotExist; a nil judge, host claims on, is provision.GetRecord exactly), turned into a lifetime entry by provision.LifetimeEntryOf; the reads are the row it is handed (registry:App, registry:Host, whole:Route); the record is the console-written deployment record the reconcile passes already read; an open or read error is returned and the wake fails closed; root never calls it;rev3=census-ruling-stateless-replicas-1;basis=Return RecordFacts with lifetime identity, Coordinator and ReplicaDeploy from the same judged record object; same store and record reads, no extra GET. registry:App@596,registry:Host@604,whole:Route@591 db6d777c93afde9836873ce72b6cbb62a55567eb3fb01f85f7e1e12274e0c66d
@legacy e2d480482d14aee10d9a2451d91501d1960728889d9d6a9a4961fe97c56953b2 internal/registry/registry.go Registry.Fingerprint legacy accepted-legacy accepted-legacy;rev3=census-ruling-self-serve-moves-1;basis=the registry's SQLite side, as carlos: in the agent (/opt/carlos/carlos agent, carlos-edge.service) and in the registry child (carlos __registry-child, which a root pass forks as the service user); the remote arm, unchanged, in the process that holds a remote handle: census-ruling-seeded-instances's body with the row's lifetime pair (incarnation, serving_seq) folded into the edge's change poll, each only when non-zero, so a registry with no pair digests as before; self-serve moves 1 Task 7;rev3=census-ruling-regional-domains-447;basis=#447 Task 4: hashes regional_domains (host, target, account, app, region; created_at not) over the same fresh connection, with a section marker written only when a row exists, so a registry with no regional rows digests as before; the one added site is that SELECT (+file:Query) on the box's own registry database, as carlos; no file path read;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): review R1 finding 1: the routes SELECT also reads host, kind, account, app, platform and fingerprintForwardInert (one CASE over the ForwardForbidden columns), and every row folds host, kind, account and app (tagged, quoted), platform when set, and forward_inert=0 for a forward row that is not inert, so a rowid reused by another hostname, an in-place account or app rewrite, or a stray forbidden column moves the edge's change poll. Same one SELECT per table on the same fresh connection to the box's own registry database, as carlos; no table, file or bucket read added; a digest, never a decision.;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Task 5): the SELECT also reads fleet_label and, only when it is set, hashes "fleet_label=<q>" into the digest, so labelling a row moves the edge's reload fingerprint. Read sites unchanged (33). Registry side, not root; an unlabelled registry's digest is byte-identical.;rev3=census-ruling-stateless-replicas-1;basis=Read the additive stateless projection in the existing registry SELECT and hash only when set; no new read source. file:Exec@284,file:Open@188,file:Query@368,file:Query@5758,file:Query@6237,file:Query@7223,file:Query@7919,file:Query@8831,file:Query@9888,registry:ClaimIncarnation@1448,registry:ClaimIncarnation@4666,registry:ClaimIncarnation@4743,registry:ClaimOwner@1492,registry:ClaimOwner@4867,registry:ClaimOwner@4932,registry:ClaimRowID@1511,registry:ClaimRowID@4959,registry:ClaimRowID@5025,registry:ClaimStamp@1473,registry:ClaimStamp@4776,registry:ClaimStamp@4840,registry:Incarnation@1556,registry:Incarnation@5246,registry:Incarnation@5310,registry:ServingSeq@1575,registry:ServingSeq@5337,registry:ServingSeq@5400,registry:Text@158,registry:path@207,registry:remote@55,registry:remote@87,whole:remoteClient@57,whole:remoteClient@89 20459fd46b63a9ec4eee58920a98ed4a2d01fdaad6a374d66654ba74650d847a
+@legacy 3bbd906ea83bd2395f513d5dd4aba02ce12f14d63c95095c4a292d728f276881 internal/registry/registry.go Registry.SnapshotFingerprint legacy accepted-legacy accepted-legacy;rev3=census-ruling-self-serve-moves-1;basis=the registry's SQLite side, as carlos: in the agent (/opt/carlos/carlos agent, carlos-edge.service) and in the registry child (carlos __registry-child, which a root pass forks as the service user); the remote arm, unchanged, in the process that holds a remote handle: census-ruling-seeded-instances's body with incarnation and serving_seq hashed, tagged, only when non-zero (snapshotPairCols), so a registry with no pair digests as before; self-serve moves 1 Task 7;rev3=census-ruling-region-ha-p1a;basis=hashes the new ha column only when it is set (non-empty and not "0"), tagged, so a registry with no born-HA row digests as before; the same twelve sites, no read added;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Tasks 2 and 5): fleet_assigned and fleet_label join snapshotWhenSetCols (hashed only when set), and fleet_moved is hashed like ha, only when non-zero. Read sites unchanged (12). Registry side, not root; rows without them hash as before.;rev3=census-ruling-stateless-replicas-1;basis=Hash the additive stateless boolean only when nonzero in the existing snapshot query; legacy false adds no bytes; no new read source. file:Exec@300,file:Open@204,file:Query@3742,file:Query@385,file:Query@4161,file:Query@4640,registry:Text@174,registry:path@223,registry:remote@63,registry:remote@95,whole:remoteClient@65,whole:remoteClient@97 5cada4b451741a41627d6df9310720ac68a7a1d3a8753d45442d9eae0034a91f
@legacy 76170452f5e7f9f2ac77aad1b3f24f461c2d72da1db0d621ec26061ee3d533c0 internal/registry/registry.go upsertRoute legacy accepted-legacy accepted-legacy;rev3=census-ruling-alias-socket-follow-338;basis=#338: Upsert's unchanged statement moved into a helper so it can run on the database or inside a transaction;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 2 (runtimeFixed in the registry): takes a guard appended to the ON CONFLICT WHERE (UpsertUnlessRootfs passes routes.runtime = ''); a stored row with a runtime keeps its region and hibernate unless the tenant changed; replication is cleared only when the effective runtime is empty; no new read source, same SQLite table;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 3: on a refused conflict, the forward check reads the host (+registry:Host) to answer ErrForwardRow; the statement carries kind <> 'forward'. A refusal only.;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Task 2): the conflict arm gains fleet_assigned (the excluded value on a re-tenanted host, else kept when the writer carries '') and fleet_moved (excluded on a re-tenanted host, else MAX of stored and excluded). Read sites unchanged (3). The same statement guard (claim ownership, kind <> 'forward') applies.;rev3=census-ruling-stateless-replicas-1;basis=Persist the stateless projection in the existing guarded upsert; no new read. file:Exec@116,registry:Host@4720,whole:Route@4596 ebc718cda38d18914e19680c1e6b9ba68b4f8fd43318be417569951b78c578f5
@legacy 1e4efb560a06cb532c8d4caf719ff375c27a03a5651b26c59d81f271c70da628 ship_check.go rootfsCheck.runArgs legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-1;basis=root-input (J4, as main's db.go units); the carlos CLI on a person's machine, as the person (no box unit): new (rootfs Plan 1), builds the docker or podman run argv for one check container; the scanner matches the word Command, here a field of release.Process (a process's argv), not os/exec; reads no file; decides nothing for root;rev3=census-ruling-rootfs-check-volumes;basis=R2 P1: the data and run volume mounts (-v) now carry :nocopy through rootfsCheck.volumeMount, so Docker and Podman never fill an empty check volume from the image directory at the mount point (which would reset the prepared owner and mode); same volumes, same paths, same probe mount, nothing else in the argv changed. Runs on the person's machine as the person; no box unit; no read added.;rev3=census-ruling-stateless-replicas-1;basis=Stateless local checks mount only the run volume and omit the database mount; same probe read, no new read. file:Command@887,file:Command@971 e684fd3273527a209460ed81e5bcd472a4282f46830fe580e5f07f0b0d876684
@legacy 6d1e960297f78cd109abb5310aef1af00618baf7f938c405e603d6e027ca7afa internal/activator/replicaobservation.go ObservedReplicaRelease legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Read route Account, App and Host only to match the attempt-local observation carrier; refuse absent/stateful/incomplete/mismatched evidence, return copied deploy state and canonical target. No store or filesystem read, no authority granted. registry:Account@283,registry:App@307,registry:Host@328 17cf71ccf92a913a42bef47ea461888ab0045b2ed7acabc81648e55cca322bbb
@@ -23,6 +24,7 @@ internal/host/agent.go fastTick legacy accepted-legacy accepted-legacy;rev3=J1;b
internal/host/agent.go haRecordFacts legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1a;basis=new (region HA P1a), the agent as carlos: activator.Config.Record, the closure the HA classification calls on a lifetime index miss: opens the deployment store once (openDeployStore, kept under a mutex) and reads the host's record through judgedRecord(store, judge, release.RouteAccount(rt), rt.App, rt.Host) (CI fix: provision.ReadRecordJudged under the box's lifetime judge, which also GETs the host's incarnation slot control/host-incarnations/<host>.json from the same deployment store; a record the slot no longer vouches for, or a tombstone, reads as os.ErrNotExist; a nil judge, host claims on, is provision.GetRecord exactly), turned into a lifetime entry by provision.LifetimeEntryOf; the reads are the row it is handed (registry:App, registry:Host, whole:Route); the record is the console-written deployment record the reconcile passes already read; an open or read error is returned and the wake fails closed; root never calls it;rev3=census-ruling-stateless-replicas-1;basis=Return RecordFacts with lifetime identity, Coordinator and ReplicaDeploy from the same judged record object; same store and record reads, no extra GET. registry:App@596,registry:Host@604,whole:Route@591 db6d777c93afde9836873ce72b6cbb62a55567eb3fb01f85f7e1e12274e0c66d
internal/host/agent.go runAgent authority B,C,D,F rev3=census-ruling-self-serve-moves-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): builds the box's lifetime judge once (newBoxJudge, nil with host claims on) and hands it to the seed placement, the moves and runs workers and every loop it starts; read sites unchanged, offsets moved; B,C,D,F authority retained; self-serve moves 1 Task 8: derives the box's lifetimes switch from the judge once (lifetimes := boxJudge != nil) and hands it to the edges file loop; read sites unchanged, offsets moved;rev3=census-ruling-plans-4d-lapse;basis=arms two more plans hooks from the same snapshot: e.SetPlanDisabledFor(planDisabledFor) beside SetPlanGovernedFor, and svc.SetDisabledFor(planDisabledRoute) beside SetMaxRunFor (plans 4d); the reads live in those units (plans-4d-units decision); read sites unchanged, offsets moved;rev3=census-ruling-rootfs-apps-2;basis=main's body as of the merge of origin/main 9b81d97b (with main's plan rate ceiling, edge request records, regional box names, self-serve moves plan 1, plans 4d-1 lapse and its other later changes under main's own census rulings) plus the rootfs placement wiring in the activator start: an agentRootfs built from eb.NestedOK, CARLOS_DEPLOYMENT_SINGLE_TENANT, CARLOS_POOLS, the claim flag, swapArming's answer, the control client's /ready/rootfs and, on a fleet box whose identity resolved, fleetOwnerCheck over the deploy store main already opens for the fleet label (fleetStore), then arm and armedRootfs.Store; this body reads nothing new itself; the closures it wires read later, at a rootfs wake and each status tick: GET /ready/rootfs over the control socket, NestedOK's checks, and release.FleetOwnerKey for the judged row's own account and this box's fleet from the deploy store;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328 plan 2 Tasks 7 and 11, #329 plan 3 Task 7 and plan 1 Task 7's policy cache: the control client is built once and handed to eb.Control, to the status tick (egressStatus) and to a new egressNudgeLoop goroutine; armSizeSource(svc, "/sys/fs/cgroup") after the activator Service; armPolicyCache() after armChangeIndex; statusLoop takes egressStatus. The reads are those units' own (decision rows); this body reads nothing new: the same five sites, offsets moved, in the agent; B,C,D,F authority retained.;rev3=census-ruling-remote-instance-metrics;basis=builds the metrics loop's owners closure (metricsOwners over the agent's registry, the activator and cgm.Leftover) when an activator exists and hands it to metricsLoop; reads nothing new itself;rev3=census-ruling-edge-asset-cache-3;basis=adds file:Statfs. runAgent keeps its authority (B,C,D,F). The new site is assetcache.Statfs, an exported assetcache.FS interface value (var Statfs FS = statfsFS{}), not a function value and not a call in runAgent: the ready hook passes it to armEdgeAssetCache as the store's filesystem, and armEdgeAssetCache calls its Space method on the configured data directory (dataDir(): $CARLOS_DATA_DIR, else /data), which calls unix.Statfs there (statfsFS.Space, accepted legacy at census-ruling-edge-asset-cache-2). No request-supplied pathname reaches it.;rev3=census-ruling-remote-metrics-nested;basis=main's body (merged origin/main acfa4f80, under main's own census rulings) plus: snapshots the nested layout (snapshotNestedUnits over /sys/fs/cgroup/carlos.slice/carlos-instances.slice) once at start, before the activator, and hands the metrics loop a unitSources struct (stamped units, routeHostNames, that root and the snapshot); reads nothing new itself;rev3=census-ruling-region-ha-p1a;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): wires region HA P1a into the activator: cfg.Record = haRecordFacts(openDeployStore, boxJudge) (the box's lifetime judge this body already builds with newBoxJudge, nil with host claims on; CI fix) and cfg.Self = lease.CurrentSelf; eb.Lifetimes (the process's lifetime index), eb.Registry, eb.StartupSwept (seedSweptAtStart.Load), eb.FilesStore from newProductionFilesStore (now lease.NewFilesStore, rootaws-loaded, a log line on failure) and lease.SetObligationDir(<data>/.ha-owed) (logged on failure; HA acquires then refuse); this body reads nothing new itself, the same five sites; the reads are those units' own (haRecordFacts and lease's SetObligationDir are new rows on this card); merge of origin/main d7ae1d76: main's own later changes to this body are kept as main has them, under main's rulings (census-ruling-remote-instance-metrics: the metricsOwners closure for metricsLoop; census-ruling-edge-asset-cache-3: the +file:Statfs site, assetcache.Statfs handed to the asset ready hook); this branch's change is the same as above;rev3=census-ruling-region-ha-p1b1;basis=region HA P1b-1: builds one termfence.Confirmer (Self from lease.CurrentSelf at each call, EC2 DescribeInstances method only, client from rootaws.LoadDefaultConfig with retries off, built lazily on first use) and sets eb.OwnerTerminated; this body reads nothing new itself, the same six sites;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 7: the startup Sweep literal hands its answer to startupSwept, which logs as before and, only on a clean sweep, marks rootfs admission swept (MarkRootfsSwept); same Sweep call, no read added;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (controller ruling after branch review R1, and Paul's R2 ruling): sets svc.Fleet = fleetWakeFor(os.Getenv, identity, identErr, fleetStore) from the identity it already resolves once and the deployment store the fleet loops already opened, and logs an ERROR naming the identity error when the box is on a fleet with an invalid identity. fleetWakeFor reads CARLOS_REGION and CARLOS_FLEET from the same environment. Read sites unchanged (6). Agent, not root; a platform box is unchanged.;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 12: one call more beside armRunsPass, armInteractivePass(svc, reg, rolloutSink, boxJudge), in the same activator Configure hook, handing it the same box judge; fix round 1 (Astra P2, shutdown): after svc.Shutdown(ctx), shutdownInteractive(ctx) ends and joins every interactive session under the same shutdown budget; the worker's own reads are its units' (interactive.go); this body reads nothing new, the same six sites; merge of origin/main 6f1f6ca6: main's svc.Fleet = fleetWakeFor(...) and its invalid-identity ERROR line are kept as main has them (census-ruling-managed-fleets-1b); this branch's change is the same as above; read sites unchanged (6);rev3=census-ruling-fix-set-aside-exdev;basis=set-aside EXDEV fix: one field more on the agent ExecBackend literal, RawInstanceDir: layout.RawInstanceDir (a pure path join: <dataDir>/.instances/<InstanceID(host)>), so the start rule set-aside moves a copy out through the raw directory instead of through the nosymfollow bind; this body reads nothing new, the same six sites;rev3=census-ruling-durability-3a-escrow;basis=durability 3a Task 3: one more assignment beside eb.FilesStore: eb.EscrowKey = haEscrowKey(os.Getenv("CARLOS_SECRETS_KEY")), the agent's own environment parsed by appconfig.ParsePrivateKey as the moves pass parses it (unset or unparseable: a log line and nil, and HA publication refuses on the box). No path is opened or read, no read site added; the same six sites, offsets moved; B,C,D,F authority retained. Durability 3a Task 4: one more goroutine beside configSyncLoop: go escrowLoop(agentCtx, reg, svc), the escrow sweep every 30 s over the same registry and Service. This body reads nothing new itself; the same six sites, offsets moved; B,C,D,F authority retained. Durability 3a Task 5: one more call beside eb.EscrowKey: wireRawSecretPages(eb, PageOperator, metricsBoxLabel(os.Getenv, readMachineID())), which sets eb.OnRawSecret to page an operator (alerting.Page through PageOperator, LevelIncident) on its own goroutine with a 20 s timeout; metricsBoxLabel and readMachineID are the reads this body already makes for the moves refusal log; no new read site; the same six sites, offsets moved; B,C,D,F authority retained. Merge of origin/main 90c4d3aa: main's own later changes to this body are kept as main has them, under main's rulings; this branch's change is the same as above. Merge of origin/main 00bf5b8c (fleet set-aside EXDEV fix): main's change to this body is kept as main has it, under its own census ruling; this branch's change is unchanged.;rev3=census-ruling-probe-burst-limit;basis=two more sink wirings beside setAnalyticsSink: setProtectionSink(e.SetProtectionRecordOnly) and setAssetOwnersSource(e.AssetOwners), function values the telemetry pass calls; this body reads nothing new, the same six sites; authority B,C,D,F retained; no new root read or write kind;rev3=census-ruling-stateless-replicas-1;basis=Construct coordination with existing fleet API credentials on fleet boxes, trusted deployment store otherwise; invalid fleet identity leaves it unarmed. Assign production observation callback, close after service shutdown with a five-second context. Existing read sites unchanged. file:Exec@17664,file:Open@1150,file:Statfs@45008,registry:App@11419,whole:Route@11411,whole:Route@28976 982510112e4bce377dddd0343847282cbc274e4e047fc01e67cd60ec139461e9
internal/registry/registry.go Registry.Fingerprint legacy accepted-legacy accepted-legacy;rev3=census-ruling-self-serve-moves-1;basis=the registry's SQLite side, as carlos: in the agent (/opt/carlos/carlos agent, carlos-edge.service) and in the registry child (carlos __registry-child, which a root pass forks as the service user); the remote arm, unchanged, in the process that holds a remote handle: census-ruling-seeded-instances's body with the row's lifetime pair (incarnation, serving_seq) folded into the edge's change poll, each only when non-zero, so a registry with no pair digests as before; self-serve moves 1 Task 7;rev3=census-ruling-regional-domains-447;basis=#447 Task 4: hashes regional_domains (host, target, account, app, region; created_at not) over the same fresh connection, with a section marker written only when a row exists, so a registry with no regional rows digests as before; the one added site is that SELECT (+file:Query) on the box's own registry database, as carlos; no file path read;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): review R1 finding 1: the routes SELECT also reads host, kind, account, app, platform and fingerprintForwardInert (one CASE over the ForwardForbidden columns), and every row folds host, kind, account and app (tagged, quoted), platform when set, and forward_inert=0 for a forward row that is not inert, so a rowid reused by another hostname, an in-place account or app rewrite, or a stray forbidden column moves the edge's change poll. Same one SELECT per table on the same fresh connection to the box's own registry database, as carlos; no table, file or bucket read added; a digest, never a decision.;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Task 5): the SELECT also reads fleet_label and, only when it is set, hashes "fleet_label=<q>" into the digest, so labelling a row moves the edge's reload fingerprint. Read sites unchanged (33). Registry side, not root; an unlabelled registry's digest is byte-identical.;rev3=census-ruling-stateless-replicas-1;basis=Read the additive stateless projection in the existing registry SELECT and hash only when set; no new read source. file:Exec@284,file:Open@188,file:Query@368,file:Query@5758,file:Query@6237,file:Query@7223,file:Query@7919,file:Query@8831,file:Query@9888,registry:ClaimIncarnation@1448,registry:ClaimIncarnation@4666,registry:ClaimIncarnation@4743,registry:ClaimOwner@1492,registry:ClaimOwner@4867,registry:ClaimOwner@4932,registry:ClaimRowID@1511,registry:ClaimRowID@4959,registry:ClaimRowID@5025,registry:ClaimStamp@1473,registry:ClaimStamp@4776,registry:ClaimStamp@4840,registry:Incarnation@1556,registry:Incarnation@5246,registry:Incarnation@5310,registry:ServingSeq@1575,registry:ServingSeq@5337,registry:ServingSeq@5400,registry:Text@158,registry:path@207,registry:remote@55,registry:remote@87,whole:remoteClient@57,whole:remoteClient@89 20459fd46b63a9ec4eee58920a98ed4a2d01fdaad6a374d66654ba74650d847a
+internal/registry/registry.go Registry.SnapshotFingerprint legacy accepted-legacy accepted-legacy;rev3=census-ruling-self-serve-moves-1;basis=the registry's SQLite side, as carlos: in the agent (/opt/carlos/carlos agent, carlos-edge.service) and in the registry child (carlos __registry-child, which a root pass forks as the service user); the remote arm, unchanged, in the process that holds a remote handle: census-ruling-seeded-instances's body with incarnation and serving_seq hashed, tagged, only when non-zero (snapshotPairCols), so a registry with no pair digests as before; self-serve moves 1 Task 7;rev3=census-ruling-region-ha-p1a;basis=hashes the new ha column only when it is set (non-empty and not "0"), tagged, so a registry with no born-HA row digests as before; the same twelve sites, no read added;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Tasks 2 and 5): fleet_assigned and fleet_label join snapshotWhenSetCols (hashed only when set), and fleet_moved is hashed like ha, only when non-zero. Read sites unchanged (12). Registry side, not root; rows without them hash as before.;rev3=census-ruling-stateless-replicas-1;basis=Hash the additive stateless boolean only when nonzero in the existing snapshot query; legacy false adds no bytes; no new read source. file:Exec@300,file:Open@204,file:Query@3742,file:Query@385,file:Query@4161,file:Query@4640,registry:Text@174,registry:path@223,registry:remote@63,registry:remote@95,whole:remoteClient@65,whole:remoteClient@97 5cada4b451741a41627d6df9310720ac68a7a1d3a8753d45442d9eae0034a91f
internal/registry/registry.go upsertRoute legacy accepted-legacy accepted-legacy;rev3=census-ruling-alias-socket-follow-338;basis=#338: Upsert's unchanged statement moved into a helper so it can run on the database or inside a transaction;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 2 (runtimeFixed in the registry): takes a guard appended to the ON CONFLICT WHERE (UpsertUnlessRootfs passes routes.runtime = ''); a stored row with a runtime keeps its region and hibernate unless the tenant changed; replication is cleared only when the effective runtime is empty; no new read source, same SQLite table;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 3: on a refused conflict, the forward check reads the host (+registry:Host) to answer ErrForwardRow; the statement carries kind <> 'forward'. A refusal only.;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Task 2): the conflict arm gains fleet_assigned (the excluded value on a re-tenanted host, else kept when the writer carries '') and fleet_moved (excluded on a re-tenanted host, else MAX of stored and excluded). Read sites unchanged (3). The same statement guard (claim ownership, kind <> 'forward') applies.;rev3=census-ruling-stateless-replicas-1;basis=Persist the stateless projection in the existing guarded upsert; no new read. file:Exec@116,registry:Host@4720,whole:Route@4596 ebc718cda38d18914e19680c1e6b9ba68b4f8fd43318be417569951b78c578f5
internal/rollout/failures.go FailureBook.saveLocked authority E3 rev3=PROPOSED-p3;run=8;identity=root adoption uid 0 or legacy rollout uid carlos;basis=root instance uses checked store writer; legacy instances retain the original atomic file writer and epoch semantics;rev3=census-ruling-stateless-replicas-1;basis=Persist the additive replica_releases selection carrier in the existing failure-book atomic write; no new path, record writer or authority. IDs are returned only after a successful save. 443cdc68cd2c5cae070a81e4b0d98bbd8551adba8de795e18f5b505f4a03f1d7
internal/rollout/failures.go OpenFailureBook authority E1,E3,J1,J4 fix1-merge-review;basis=Loads schema-three durable generations and refuses unsafe identity recovery on entropy failure.;rev3=census-ruling-stateless-replicas-1;basis=Load the additive replica_releases carrier from the same existing failure-book ReadFile; unchanged schema acceptance, identity recovery, reconciliation and read site. No additional read. file:ReadFile@136 b92f6a033f129bffb158e8768b1b14ee88e855f67c2f0da360c65c93d27d8cf8
@@ -39,7 +41,7 @@ internal/activator/rootfsrelease.go Service.runRelease legacy accepted-legacy ac
@coverage internal/activator 84de4ed8028b1677612190c2c795018905bbb0c9a683e0173ad6e5f09784e669
@coverage internal/host 50d79612f83e07e6ef70e5c3e46146494b71d9e459104a66a5e884148ac5084b
@coverage internal/provision 065bba3c905bb30f6f7b44408b2ab013ed063c3ce49c6fc26ee0b153a454e9ca
-@coverage internal/registry 25e5d232939ee0c4de4aa6d2a08113386de1812363384041803cdfbc937bcad5
+@coverage internal/registry 181925b03831aec74b9629e863f090da5a478c01eb0bf2be4fa9a8e4f274e987
@coverage internal/release c1012571516227abff9612aba085e749489e8b8119c0b55444f53a15ed881fb1
@coverage internal/replicas 53b94eb040154539a0a977498b4b8bc1d53d82f67c1c6233667a0b823dd30d8a
@coverage internal/rollout d95e28f37f3456b4b1fb38c848ffe310b2816ab4089347332b2f6b8cb9e02831
diff --git a/internal/registry/registry.go b/internal/registry/registry.go
index 50a80c1ea..22f8848eb 100644
--- a/internal/registry/registry.go
+++ b/internal/registry/registry.go
@@ -4224,7 +4224,6 @@ var snapshotClaimCols = map[string]bool{
// digests exactly as it did before the columns existed, so upgrading does
// not force a snapshot on every box.
var snapshotWhenSetCols = map[string]bool{
- "stateless": true,
"good_version": true,
"good_digest": true,
"good_demand": true,
@@ -4320,7 +4319,7 @@ func (r *Registry) SnapshotFingerprint() (string, error) {
}
// ha too (region HA P1a): only a born-HA row hashes it. And
// fleet_moved (managed fleets 1b): only a moved row's.
- if cols[i] == "ha" || cols[i] == "fleet_moved" {
+ if cols[i] == "ha" || cols[i] == "fleet_moved" || cols[i] == "stateless" {
if v.Valid && v.String != "" && v.String != "0" {
fmt.Fprintf(h, "%s=%s\x1f", cols[i], v.String)
}
diff --git a/internal/registry/stateless_test.go b/internal/registry/stateless_test.go
index 168e6a038..1ff7d0a1d 100644
--- a/internal/registry/stateless_test.go
+++ b/internal/registry/stateless_test.go
@@ -24,6 +24,10 @@ func TestStatelessRouteProjection(t *testing.T) {
if err != nil {
t.Fatal(err)
}
+ snapshotBefore, err := r.SnapshotFingerprint()
+ if err != nil {
+ t.Fatal(err)
+ }
rt.Stateless = true
if err := r.Upsert(rt); err != nil {
t.Fatal(err)
@@ -36,6 +40,10 @@ func TestStatelessRouteProjection(t *testing.T) {
if err != nil || after == before {
t.Fatalf("mode did not change fingerprint: %v", err)
}
+ snapshotAfter, err := r.SnapshotFingerprint()
+ if err != nil || snapshotBefore == snapshotAfter {
+ t.Fatalf("mode did not change snapshot: %v", err)
+ }
rt.Stateless = false
if err := r.Upsert(rt); err != nil {
t.Fatal(err)
@@ -44,6 +52,10 @@ func TestStatelessRouteProjection(t *testing.T) {
if err != nil || got == nil || got.Stateless {
t.Fatalf("stateful route = %+v, %v", got, err)
}
+ snapshotCleared, err := r.SnapshotFingerprint()
+ if err != nil || snapshotCleared != snapshotBefore {
+ t.Fatalf("cleared mode changed snapshot: %v", err)
+ }
rt.Kind, rt.Region, rt.Stateless = KindForward, "fleet/shop", true
rt.Host = "forward.example.com"
if err := r.PutForward(rt); err != nil {