carlos / platform Public

fix: recover legacy rows after replica sets

Recover owned legacy successors and retire former member rows without
weakening the existing set lifetime checks. Distinguish one-box capacity
from unread fleet evidence, and stop placement retries after confirmed
coordinator binding publication until the assignment revision changes.

Correct the three database refusal comments, remove the duplicate move
refusal, and move the approved copies paragraphs into carlos apps set.
Refresh the root-read proposal and the two record-write digests.
Co-Authored-By: Codex (gpt-6-astra) <noreply@openai.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev 558bd8b012a55a3569edcd581b521ba550e01ad9 parent e14030d
15 files changed, +228 −55
  • docs/site/cli.md +4 −4
  • docs/superpowers/notes/census-proposal-stateless-replicas-2.md +6 −5
  • internal/activator/startrule.go +3 −3
  • internal/console/appcopies.go +3 −3
  • internal/console/appcopies_test.go +30 −0
  • internal/console/fleetbox.go +6 −1
  • internal/host/fleetbind.go +13 −8
  • internal/host/replica_request_budget_test.go +68 −0
  • internal/host/replicaplacement.go +6 −3
  • internal/provision/provision.go +0 −3
  • internal/provision/reconcile.go +7 −4
  • internal/provision/replicas_test.go +57 −0
  • internal/provision/stateless_placement_census_test.go +4 −2
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −1
  • internal/provision/testdata/plan14-root-reads-stateless-replicas-2.tsv +20 −18

Intent

Human

<task-notification> <task-id>bgth1h5pr</task-id> <tool-use-id>toolu_01BBva1iGH22X5Qo7cGATfa7</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/7c5a7d70-0e28-42b9-896c-5d73b2d2a05d/tasks/bgth1h5pr.output</output-file> <status>completed</status> <summary>Background command "Wait for the main merge" completed (exit code 0)</summary> </task-notification>

Human

<task-notification> <task-id>bulzsq8ge</task-id> <tool-use-id>toolu_01FeUqrFoDZy5H9maqSq7DDM</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/7c5a7d70-0e28-42b9-896c-5d73b2d2a05d/tasks/bulzsq8ge.output</output-file> <status>completed</status> <summary>Background command "Wait for CI on the merge commit" completed (exit code 0)</summary> </task-notification>

Human

<task-notification> <task-id>a1a4ea0e916251e77</task-id> <tool-use-id>toolu_01VSruo1rcqYCoWWtU1j3Wck</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/7c5a7d70-0e28-42b9-896c-5d73b2d2a05d/tasks/a1a4ea0e916251e77.output</output-file> <status>completed</status> <summary>Agent "Census review Plan 2 delta (#280)" finished</summary> <note>A task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.</note> <result>unit | class | verdict | reason (file:line) ---|---|---|--- `internal/host/agent.go` `fastTick` | body | APPROVE | Only signals the armed worker on the existing tick. No new path or store read (internal/host/agent.go:2937). `internal/host/agent.go` `runAgent` | body | APPROVE | The worker gets the same tunnel URL and token the coordinator client already uses (agent.go:605 vs agent.go:681). It is stopped and joined at shutdown. Compared with main, the merge adds only that block; main's HA wiring is intact. `internal/host/runs.go` `runsWorker.pickupOwned` | sites | APPROVE | Compared with 9b8b2c50, the merge adds only the 5-line replica recheck (runs.go:279). Main's `dutyStillOwned` check still runs after it (runs.go:284), before the pickup write. `internal/provision/reconcile.go` `RouteFor` | sites | APPROVE | Unchanged in this range; carried from the 6fb05fdd approval. Pure projection from the record. `internal/registry/forward.go` `SetFleetBoxIf`, `Route.InertForward` | body | APPROVE | Not changed in 523ff484..e14030d7; carried. `internal/registry/registry.go` `Registry.Fingerprint`, `upsertRoute` | body | APPROVE | Not changed in this range. The only `registry.go` change is the snapshot column maps, which add hashing only when a value is set (registry.go:4293, 4311). new `ExecBackend.ReplicaRetirementEmpty` | new | APPROVE | Path inputs (cgroup emptiness proof, below) are `rt.Host` from the console-signed record. The slice name is `Escape(InstanceID(host))`, which turns `/` into `-` and escapes a leading `.`, under a fixed parent path (activator/control.go:197). The second check, `openHostCgroup`, refuses a malformed host name and opens with `O_NOFOLLOW` (cgroup/cleanup_linux.go:65-68). Only kernel-written `cgroup.events` and the host cgroup are read; no label, box name or binding value reaches a path. Same pattern as main's `hostSliceEmpty` (activator/harelease.go:65). Read-only; it kills nothing. new `replicaPlacementWorker.run` | new | APPROVE | Runs the proof only when the box is in Retiring, has no local route and `Quiesced` holds, all under `reconcileMu` (replicaplacement.go:110-114). The ACK goes to the authenticated console as `op=retired` with the exact revision. No new local read. new `validReplicaFleetBinding` and reads `ReconcileFleetBindings` | new/reads | APPROVE | The hub binding reader never writes from a set binding: every set or replica-stamped binding ends in `continue` (fleetbind.go:307-318). The fleet comes from `rt.Region`, not the binding (fleetbind.go:538). Binding labels are only compared against active `fleet_boxes` rows and the fleet owner (fleetbind.go:534-566). reads `statelessBindingPublisher.publish` | reads | APPROVE | Box-side writer of its own binding. A set binding needs a valid projection plus matching incarnation and revision (fleetbind.go:518-523). No root read. new `Registry.ClearReplicaAssignment` | new | APPROVE | Keyed by host and runs in an immediate transaction. It compares the whole row against `observed` and refuses a forward row. The box must be in the set (`ReplicaContains`). The statement clears only the 4 set columns and sets `fleet_box`/`fleet_label` to that box (replicas.go:166-187). `fleet_label = FleetBox` matches `forwardRowFor` (provision/forward.go:40). `setReplicaAssignment`, `DeleteReplicaAssignment`, `ReplaceReplicaAssignment` | new | APPROVE | Only adds `AND kind &lt;&gt; 'forward'` (replicas.go:93, 117, 145). Stricter than before. reads `Registry.dispatchRemote` | reads | APPROVE | Adds the `ClearReplicaAssignment` case; the callee re-validates `q.Host` as a set member (remote_dispatch.go:359). `ErrReplicaAssignment` is appended after main's error indices, so they keep their order (registry/remote.go:17). reads `Service.doWakeOnce` | reads | APPROVE | Refuses any set row that reaches the stateful branch, before the lease (activator.go:2736). Stricter; this is the fence the P14 ruling relies on. reads `Reconcile`, `convergeOwned` | reads | APPROVE | P14: admitting a set row on the record alone (replicaassignment.go:192) adds nothing root runs. The only path that runs a set row stays the stateless branch, which checks the staged storage declaration. `convergeOwned` clears through the CAS above (reconcile.go:887). Compared with main, the merge keeps the departure scan and `family` call (reconcile.go:1398). A protected replica record only makes that completeness more conservative. envelopes `.`, activator, appconfig, host, provision, registry, release, replicas | envelope | APPROVE | Every changed function in this range is read above. No new exec, path open or link follow from tenant, app or box-agent input. Record-write entries: entry | verdict | reason ---|---|--- `ClearRecordReplicaAssignment` (new) | APPROVE | Holds the app mutation lock and does a conditional (ETag) `updateRecord` with `Expect` checks on lifetime, region, `RecordSeq` and revision. Needs manifest evidence, one member, none Retiring, no swap and no foreign live coordinator. Writes only FleetBox, Moved, At and the assignment (replicaassignment.go:239-265). `HaltRecordReplicaDeploy` (new) | APPROVE | Same lock and CAS. Changes only `ReplicaDeploy.Phase` and `Revision`; `ActiveBox` is kept (replicaassignment.go:273-296). `SetRecordReplicaAssignment` (re-digest) | APPROVE | Adds a swap refusal and the `RecordSeq` floor for the revision (replicaassignment.go:89, 127); existing gates kept. `RecordReplicaRetired` (re-digest) | APPROVE | Manifest evidence dropped only for removing an obligation. Adds a validity check and a swap refusal; removes only the named box (replicaassignment.go:140-160). `SetRecordCoordinator`, `SetRecordReplicaRelease` | APPROVE | Set records use one deterministic `ReplicaCoordinatorBox`; the legacy gate is unchanged (replicacoordinator.go:35, replicadeploy.go:33). `Server.handleReplicaCoordinator` | APPROVE | The `retired` op is re-authorized under the record lock, then needs box ∈ Retiring and the exact revision (console/replicacoordinator.go:85-93). console `replicaplacement.go` entries (`applyReplicaAction`, `reconcileReplicaApp`, `reconcileReplicaFleet`, `replicaAction`, `replicaNext`, `replicaStamp`, `replicaRecordKey`) | APPROVE | All writes go only through typed CAS writers, with manifest evidence attached first (replicaplacement.go:224-250). Halt passes the current revision. No direct record write. `createRecordWithLifetimeLocked` | APPROVE | `copiesCreateCheck` moved after the lifetime check, still before any allocation (lifetimes_create.go:84). `Reconcile` (merge re-digest 7d48c47e) | APPROVE | Compared with main, the merge keeps the departure collection alongside the replica observation; no new writer. `Server.registerCLIRoutes` (merge re-digest 792f2e40) | APPROVE | Compared with main, the only addition is the copies route with an empty role set, so people only (authcli.go:1025). Root-read chain: compared with 9b8b2c50, the chain keeps every line of main in order and adds only `plan14-root-reads-stateless-replicas-2.tsv 57f095e1…` as the last line. Its parent seal `c68e2453…` is main's last overlay (p1b3b-t). Every other overlay in testdata that changed is byte-identical to main's. `TestPlan14RootReadCensus`, `TestCensusScopeIsTheRootBinary` and `TestPlan9B8RecordWriteCensus` pass at e14030d7. Two notes, neither blocking: - **Layout check:** `ReplicaRetirementEmpty` does not check the row's layout, unlike main's `hostSliceEmpty`. Its input is safe; this is only about how strong the retirement proof is. - **P14 trust boundary:** the ruling (progress.md:101) records that a box with raw write access to the bucket could plant an assignment. That is the same trust boundary as forging FleetBox today. Exec still fences a stateful build on such a row (activator.go:2736). Census: APPROVED at e14030d7, seal `c68e2453bfc8afaf3794eb4c08850428982fa6954269b6b99bddfda4e6242929` → `57f095e19d4d433b74eb92a565f87f069bc0e3804f1f889333ab1e38b11bed1e`</result> <usage><subagent_tokens>144081</subagent_tokens><tool_uses>52</tool_uses><duration_ms>501756</duration_ms></usage> </task-notification>

Human

<task-notification> <task-id>af7ccfdea892596dc</task-id> <tool-use-id>toolu_016fXphTYWd8C63TwJtRe7ES</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/7c5a7d70-0e28-42b9-896c-5d73b2d2a05d/tasks/af7ccfdea892596dc.output</output-file> <status>completed</status> <summary>Agent "Final whole-branch review Plan 2" finished</summary> <note>A task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.</note> <result>I have read the full diff by area (CLI/appconfig; console doors and gates; console placement pass and fleet view; provision writers and reconcile; registry projection/RPC/SQL; activator/host box side; tests and pinned testdata; merge-conflict files against main) plus the plan, index, spec §5-6, progress ledger and merge report. Here is the review. ### Strengths - The inert gate holds on every path I traced. Legacy wakes, pickups, probes and box reconcile branch only on `rt.FleetBoxes != ""` / `rec.ReplicaAssignment != nil`; `loadFleetViewAt` adds one SQL query and returns early for one-box fleets exactly as before; `reconcileReplicaFleet` returns before any read when a fleet has no marked apps; `SnapshotFingerprint` and the forward fingerprint hash the new columns only when set; `SetFleetBoxIf` cannot touch a set row; `movable` is unchanged for legacy records. The only new bucket work on existing apps is P7's one memoized config GET per publication/create mutation, and the perf pins moved by exactly one each (`internal/console/perfwrites_test.go`, `testdata/perf-session-s3.txt` 415→416). - Lock discipline is coherent: app → name everywhere (`beginCopiesMutation`), fleet → app(tryLock) → name(TryLock) in the pass, fleet → app in the create and sidecar doors, and no app → fleet blocking acquisition anywhere. `withRecordLock` is `lockApp`, so the replaced wrappers lose nothing. No caller of `applyUpdates`, `requestInstall` or the `executePending*` handlers holds the app lock already. - The typed assignment writer (`internal/provision/replicaassignment.go`) is a proper CAS: lifetime, region, RecordSeq and revision inside the retry, monotone revision, old members must land in Boxes or Retiring, swap-active fences, unknown members refused by the writer and preserved by ordinary writers (`replicaFieldsFixed` fences any non-typed change). - The retirement ACK is sound: box identity comes from `fleetIdentityOK`, the record must list the box in Retiring at the stated revision, and the box only ACKs after its local row is gone, the service is quiesced and both cgroup layouts are empty (`internal/host/replicaplacement.go:107-113`). A dead box is never proof. - `replicas.Place` is deterministic and stable (retain eligible members, lowest-load tie-break by label, Retiring excluded from refill), and `Assignment.UnmarshalJSON` never fails a whole record decode. - Merge resolutions are correct: every `-` line in the seven conflict files is a replaced line, not dropped main behaviour; the replica pickup recheck sits before main's final `dutyStillOwned`; HA error sentinels keep their indices. ### Issues #### Critical (Must Fix) None. #### Important (Should Fix) 1. `internal/provision/reconcile.go:2378-2387` and `:887-897`: a set-shaped row whose current record is legacy and of a different lifetime is unrecoverable. Removal loop: `if rec.ReplicaAssignment == nil || ... { continue }` keeps every set row on a non-owner box once the record is legacy. Owner side: `convergeOwned` returns `ErrReplicaAssignment` when `inc != existing.ReplicaIncarnation`, every pass, forever. Scenario: an instance of a once-replicated app is deleted and recreated under the same host before the delete pass ran (or a restore/recreate gives it a new CreatedAt); `installRowLifetime` installs the new pair but the old replica hash stays, so the owner can never bring the legacy instance up (row keeps `fleet_boxes`, `Stateless`; the wake path refuses) and the other former member keeps a zombie row. Fix: in the removal loop, let a legacy record fall through to the legacy ownership judgement instead of `continue`; in `convergeOwned`, clear the set columns when the record is legacy, the row is owned and `existing.Incarnation &lt;= rec.Incarnation` (the pair already proved the lifetime), not only on hash equality. 2. `internal/console/appcopies.go:241-244`: on a fleet with one active box, `loadFleetView` leaves `Active` false, so `--copies 2` answers 503 SR-2-C06 ("could not check every instance... try again") instead of the 409 capacity refusal SR-2-C03. The operator is told to retry something that will never succeed. Check `v.Complete` for readability and count eligible boxes for the capacity answer; reserve C06 for an actual unread. 3. `internal/host/replicaplacement.go:114-121` with `observe`: for a member box that is the coordinator, `done` is never set, so the entry stays pending and `run` retries at the 1-minute cap for the life of the record. `Acquire` is a local no-op when held and `publish` dedupes, so the steady-state cost is CPU only, but the loop is doing periodic work with nothing to do and masks a real retry. Mark the entry done once the authority is held and the binding published, and re-arm only on `observe` of a changed revision. #### Minor (Nice to Have) - `internal/activator/startrule.go:176-180, 337-340, 391-394`: comments say "bypass this database path" while the code returns `ErrFenced`. The behaviour is right (stateless.go never reaches these); the comment is wrong. - `internal/provision/provision.go:1047-1052`: `replicaAssignmentMoveRefusal` after `if rec.ReplicaAssignment != nil { return ErrFleetBoxMoved }` is dead code; drop it or make the first check the only one. - `internal/console/copiespublication.go:569-571`: a create on a copies&gt;1 app silently flips a default-hibernate binary record to always-on (`rec.Hibernate = new(bool)`). Refusing with C04 is more honest than converting. - `docs/site/cli.md:258-260`: SR-2-C14/C15 sit under `### carlos ship`; they belong under `carlos apps set`. - `internal/console/fleetbox.go:101` vs `fleetrelabel.go:65`: a replica member is removed once unfresh (15 min) while a legacy label moves after `fleetBoxLostAfter` (20 min). A partition of 15-20 minutes stops a copy that a legacy record would have kept. Consider judging membership by `boxGone` for parity, or document the difference. - `internal/console/replicaplacement.go:40`: raw `s.store.db.QueryContext` in a `*Server` method; the other store reads go through `Store` methods. - `internal/console/copiespublication.go:401`: an incarnation mismatch answers 409 with C06 ("copy count was left unchanged"), which is the wrong sentence for a promote or create (deferred minor 1; a door-neutral row is needed). - Backward compatibility note: an older console that rewrites a record drops `replica_assignment` (unknown field), and an older box reads a set record as legacy on `rec.FleetBox`. Both are the same class Plan 1 accepted for `coordinator`/`replica_deploy`, and the floor gates it, but the record carries no schema bump to make the hazard visible. ### Deferred minors triage None must be fixed before merge. Three must be fixed before the v0.35.0 floor is released (not before this merge): - Task 3 "a box that dies for good never ACKs; Retiring persists forever; no operator path". This blocks P16 and every stateful publication for that app. The index keeps the obligation after a plain detach, but `fleets detach-box --terminated` is an operator attestation that the machine is gone, which is strictly stronger than "down". Let `--terminated` clear that label from Retiring. This is a Plan 4 precondition. - Task 2 "no positive end-to-end wake test of a set member via the real wake path". The only proof today is the dev drill. Add it before the floor ships. - Task 1 "C14/C15 under carlos ship": trivial, do it now. The rest I agree are minor: the partial `--copies 2 --swap hold` apply (refuse the combination up front), the Task 2 test hygiene items (unsynchronised log buffer, TempDir leaks, possibly vacuous worker-read count), `cache.apps` never pruned, the drain-time `ErrFenced` noise, the size-policy trigger gap, the private-storage ordering, and the older-CLI `copies` drop (operator credential only; a schema bump would break older readers, so leave it). The "no writer can clear an assignment" line is resolved by Task 3's `ClearRecordReplicaAssignment`. ### Rulings I disagree with - P7 (partly). "Config unreadable refuses unsafe targets" makes promote/rollback/create of a stateful build on an app that never set copies depend on a GET it never needed. The marginal risk is small because the same bucket already serves the manifest and pipeline reads, so I would not reopen it now, but the `apps.copies_configured` marker Task 3 added can soften it: admit on an unreadable config when the marker is 0. Worth doing when the door-neutral C06 row is added. - P16 as applied to the detach proof is right; the ruling is silent on the dead-box case and should be extended as above (`--terminated` as proof) rather than parked. Every other ruling (P0-P6, P8-P15, P17-P21) I checked against the code and the index and agree with. ### Declined to judge - Hub forwarding, probing and copy selection for set rows: Plan 3. - Deploy ordering, `ActiveBox` permits, release-once semantics: Plan 4; only the "halt on member loss" edge is here and it is correct. - Whether to cut v0.34.0/v0.35.0 or run the dev smoke: P19/P4, Paul's call. - Copy wording of the 17 SR-2 rows and the two provisional rows: P20, Paul's copy review. - Region HA combined with copies: ruled out by the index and P0. - The durable app mutation spanning ship uploads: pre-existing. - `HostClaim` consoles never run the relabel pass, so placement never runs there: pre-existing 1b behaviour, and production is claims-off. - The 21 host claim-startup failures and the release pins failure: reproduce on main. ### Recommendations 1. Fix Important 1 and 2 on this branch before merge; both are small and the second is one condition. 2. Fix the three Minor one-liners (startrule comments, dead code, doc placement) in the same round. 3. Record the three floor-release preconditions in the Plan 4 brief (terminated-detach proof, set-member wake test, door-neutral unread row). ### Assessment **Ready to merge?** With fixes **Reasoning:** The inert gate holds, the merge preserves main, and the CAS, retirement and lock structure are sound; the two Important items are a narrow but permanent convergence hole and a misleading refusal, both cheap to fix now and harder to find later.</result> <usage><subagent_tokens>273638</subagent_tokens><tool_uses>36</tool_uses><duration_ms>862022</duration_ms></usage> </task-notification>

Human

<paseo-system version="1" kind="agent-message" source-agent-id="f6728a80-f5ce-4bf4-8bc2-6250fbf5e591" message-id="3bb4d9c3-9b53-4c99-9c9e-4bb176af010b" source-agent-title="Region HA G1 dev switch-on (executing approved card)"> G1 dev switch-on (region HA) is starting now on sophie-knitting then leo-climbing; reply only if you are using these boxes in the next 45 minutes. Done so far: region-host-store-deny merged as 9bd4548; the targeted dev apply added the two IE termination queues and grants (10 added, 0 changed, 0 destroyed). Next: a console UnsetEnvironment drop-in on sophie (daemon-reload only); host.env gets 3 lines per box (backed up first); attended carlos-edge restarts, sophie then leo, 1-2 s each (worst case ~11 s; the dev console and most dev tenants are on sophie). Then a one-shot hapair schedule check. Dev only, no flagship, no Tito. Log: ~/.cache/region-ha-next/g1-log.md. From executor f6728a8. </paseo-system>

Attributed to this commit: 19.4 g CO₂e (2,537,023 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on stateless-replicas-2-placement, 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/site/cli.md b/docs/site/cli.md
index d98d6379c..c25879872 100644
--- a/docs/site/cli.md
+++ b/docs/site/cli.md
@@ -232,6 +232,10 @@ carlos apps set shop --instance-control updates,pin --default-updates manual
--instance-control names the settings an instance may change itself once instances can act for themselves. --default-updates and --default-major apply wherever an instance has not chosen; --default-channel is the channel new instances are created on.
+Set the count with carlos apps set shop --copies 2. Each instance of shop gets two copies on different eligible fleet boxes. The command refuses a count larger than the eligible fleet.
+
+If a box is lost or detached, the requested count stays the same. The platform uses a distinct spare when one is available, otherwise the app runs short until a suitable box returns.
+
System operators can also set an app's instance policy: which private addresses its instances may reach and the size each instance runs at. `carlos apps show` reads it back.
```sh
@@ -255,10 +259,6 @@ The console records a change, and the app's boxes apply it. A box that follows t
Ship with --stateless when your app keeps its data outside its box. The release gets no local database, CARLOS_DB or Litestream. You provide and operate its database and other data services.
-Set the count with carlos apps set shop --copies 2. Each instance of shop gets two copies on different eligible fleet boxes. The command refuses a count larger than the eligible fleet.
-
-If a box is lost or detached, the requested count stays the same. The platform uses a distinct spare when one is available, otherwise the app runs short until a suitable box returns.
-
If the box running the release command disappears, its result may be unknown. The deploy stops and the previous build keeps serving. Deploying again runs the command again, so release commands must be safe to repeat. Rails migrations record completed migrations in schema_migrations.
Publishes a release. The artifact is hashed, stored under its content
diff --git a/docs/superpowers/notes/census-proposal-stateless-replicas-2.md b/docs/superpowers/notes/census-proposal-stateless-replicas-2.md
index 8a84287ce..93d11e0e2 100644
--- a/docs/superpowers/notes/census-proposal-stateless-replicas-2.md
+++ b/docs/superpowers/notes/census-proposal-stateless-replicas-2.md
@@ -1,6 +1,6 @@
# Census approval: stateless-replicas-2
-Ruling `census-ruling-stateless-replicas-2`. The independent reviewer approves or rejects every change below, 35 with a new disposition; nothing goes to the census owner (Paul, #280, 2026-10-26).
+Ruling `census-ruling-stateless-replicas-2`. The independent reviewer approves or rejects every change below, 36 with a new disposition; nothing goes to the census owner (Paul, #280, 2026-10-26).
| unit | change | read sites | what changed |
|---|---|---|---|
@@ -32,6 +32,7 @@ New dispositions, which census-propose wrote and the reviewer checks against the
- new `internal/activator/replicaretirement.go:ExecBackend.ReplicaRetirementEmpty`: reads +registry:Backing, +registry:Host ×3, +registry:Unit; written legacy, accepted-legacy, frozen
- new `internal/activator/wakeidentity.go:Service.CheckReplicaAssignment`: reads +registry:FleetBoxes, +whole:Route; written legacy, accepted-legacy, frozen
+- new `internal/host/fleetbind.go:statelessBindingPublisher.publishCurrent`: reads +registry:Account, +registry:App, +registry:Assigned, +registry:Host, +registry:Provisioned, +registry:ReplicaIncarnation, +registry:ReplicaRevision, +registry:ServingVersion, +registry:Stateless, +registry:Status; written legacy, accepted-legacy, frozen
- new `internal/host/fleetbind.go:validReplicaFleetBinding`: reads +registry:Account ×2, +registry:Copies, +registry:FleetBoxes ×2, +registry:Host, +registry:Label, +registry:Region, +registry:ReplicaIncarnation, +registry:ReplicaRevision, +registry:Status, +whole:FleetBox; written legacy, accepted-legacy, frozen
- new `internal/host/fleetidentity.go:recheckReplicaPickup`: reads +registry:FleetBoxes, +whole:Route; written legacy, accepted-legacy, frozen
- new `internal/host/replicaplacement.go:replicaPlacementWorker.run`: reads +registry:ReplicaIncarnation, +registry:ReplicaRevision, +whole:Route ×4; written legacy, accepted-legacy, frozen
@@ -57,15 +58,15 @@ New dispositions, which census-propose wrote and the reviewer checks against the
- reads `internal/activator/wakeidentity.go:Service.currentWakeRoute`: +registry:Account, +registry:App, +registry:Channel, +registry:Copies, +registry:Environment, +registry:FleetBoxes ×4, +registry:Host, +registry:Kind, +registry:Region ×2, +registry:ReplicaIncarnation, +registry:ReplicaRevision, +registry:Runtime, +whole:Route; keeps legacy, task accepted-legacy
- reads `internal/activator/wakeidentity.go:leaseRouteChanged`: +registry:Copies ×2, +registry:FleetBoxes ×2, +registry:ReplicaIncarnation ×2, +registry:ReplicaRevision ×2; keeps legacy, task accepted-legacy
- reads `internal/host/fleetbind.go:ReconcileFleetBindings`: +registry:FleetBoxes, +whole:Route; keeps legacy, task accepted-legacy
-- reads `internal/host/fleetbind.go:statelessBindingPublisher.publish`: +registry:ReplicaIncarnation, +registry:ReplicaRevision; keeps legacy, task accepted-legacy
+- reads `internal/host/fleetbind.go:statelessBindingPublisher.publish`: -registry:Account, -registry:App, -registry:Assigned, -registry:Host, -registry:Provisioned, -registry:ServingVersion, -registry:Stateless, -registry:Status, +whole:Route; keeps legacy, task accepted-legacy
- reads `internal/provision/forward.go:forwardCurrent`: +registry:Copies ×2, +registry:FleetBox, +registry:FleetBoxes ×4, +registry:ReplicaIncarnation ×2, +registry:ReplicaRevision ×2, +registry:Stateless ×2; keeps legacy, task accepted-legacy
-- reads `internal/provision/reconcile.go:Reconcile`: +registry:Account ×2, +registry:App ×2, +registry:Canary, +registry:FleetBoxes ×3, +registry:HoldOp, +registry:Host ×7, +registry:Incarnation, +registry:Kind ×6, +registry:Platform, +registry:ReplicaIncarnation ×2, +whole:Route ×13; keeps legacy, task accepted-legacy
-- reads `internal/provision/reconcile.go:convergeOwned`: +registry:Copies ×2, +registry:FleetBoxes ×3, +registry:ReplicaIncarnation ×6, +registry:ReplicaRevision ×2, +registry:Stateless, +whole:Route ×2; keeps legacy, task accepted-legacy
+- reads `internal/provision/reconcile.go:Reconcile`: +registry:Account ×2, +registry:App ×2, +registry:Canary, +registry:FleetBoxes ×3, +registry:HoldOp, +registry:Host ×7, +registry:Incarnation ×2, +registry:Kind ×6, +registry:Platform, +registry:ReplicaIncarnation ×2, +whole:Route ×13; keeps legacy, task accepted-legacy
+- reads `internal/provision/reconcile.go:convergeOwned`: +registry:Account, +registry:App, +registry:Copies ×2, +registry:FleetBoxes ×3, +registry:Host, +registry:Incarnation, +registry:Provisioned, +registry:ReplicaIncarnation ×5, +registry:ReplicaRevision ×2, +registry:Stateless, +whole:Route ×2; keeps legacy, task accepted-legacy
- reads `internal/registry/forward.go:Registry.PutForward`: +registry:Copies, +registry:FleetBox, +registry:FleetBoxes ×2, +registry:FleetLabel, +registry:ReplicaIncarnation, +registry:ReplicaRevision; keeps legacy, task accepted-legacy
- reads `internal/registry/registry.go:routeArgs`: +registry:Copies, +registry:FleetBoxes, +registry:ReplicaIncarnation, +registry:ReplicaRevision; keeps authority, task E3
- reads `internal/registry/registry.go:scanRoute`: +registry:Copies, +registry:FleetBoxes, +registry:ReplicaIncarnation, +registry:ReplicaRevision; keeps legacy, task accepted-legacy
- reads `internal/registry/remote_dispatch.go:Registry.dispatchRemote`: +registry:Assignment ×2, +registry:Changed ×2, +registry:Host ×2, +registry:Observed ×4, +registry:On, +registry:ReplicaLife ×2, +registry:TValue, +whole:Route ×5; keeps hint, task E2
-Seal: `c68e2453bfc8afaf3794eb4c08850428982fa6954269b6b99bddfda4e6242929` → `57f095e19d4d433b74eb92a565f87f069bc0e3804f1f889333ab1e38b11bed1e`.
+Seal: `c68e2453bfc8afaf3794eb4c08850428982fa6954269b6b99bddfda4e6242929` → `50a986ac29a27830da86785a82c251a39ed8cf8569fd35b65331320110fb3525`.
Overlay: `internal/provision/testdata/plan14-root-reads-stateless-replicas-2.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`.
diff --git a/internal/activator/startrule.go b/internal/activator/startrule.go
index 2f202458b..c6c807ca8 100644
--- a/internal/activator/startrule.go
+++ b/internal/activator/startrule.go
@@ -173,7 +173,7 @@ func localCopyNames(dir, base string) (present []string, data bool, err error) {
// .partial directory (which counts as set aside) and fails the wake.
// Nothing is ever removed. An unlabelled row is not touched.
func (b *ExecBackend) reconcileAssignment(rt registry.Route, dbPath string) error {
- // Verified stateless generations bypass this database path entirely.
+ // Refuse set projections here; only the verified stateless launch path may bypass the database rules.
if rt.FleetBoxes != "" {
return ErrFenced
}
@@ -334,7 +334,7 @@ func (b *ExecBackend) supersede(host, dir string, names []string) (string, error
// Every start path on a fleet box that would boot without a restored or
// kept copy calls it (TestEveryFreshBootPathConsultsTheRule).
func (b *ExecBackend) startAllowed(rt registry.Route, haveLocal, restored bool) error {
- // Verified stateless generations bypass this database path entirely.
+ // Refuse set projections here; only the verified stateless launch path may bypass the database rules.
if rt.FleetBoxes != "" {
return ErrFenced
}
@@ -388,7 +388,7 @@ func (b *ExecBackend) startAllowed(rt registry.Route, haveLocal, restored bool)
// write that fails fails the wake, before anything runs. An unlabelled row
// writes nothing; HA hosts never reach it (restoreHA).
func (b *ExecBackend) establishAssignment(rt registry.Route, dbPath string) error {
- // Verified stateless generations bypass this database path entirely.
+ // Refuse set projections here; only the verified stateless launch path may bypass the database rules.
if rt.FleetBoxes != "" {
return ErrFenced
}
diff --git a/internal/console/appcopies.go b/internal/console/appcopies.go
index 6580351af..60f6180d7 100644
--- a/internal/console/appcopies.go
+++ b/internal/console/appcopies.go
@@ -35,7 +35,7 @@ func atReplicaFloor(build string) bool {
}
func (v *fleetView) replicasActive(consoleRelease string) bool {
- if v == nil || !v.Active || len(v.Boxes) == 0 || !atReplicaFloor(consoleRelease) {
+ if v == nil || !v.Complete || !atReplicaFloor(consoleRelease) {
return false
}
for _, b := range v.Boxes {
@@ -232,8 +232,8 @@ func (s *Server) copiesRefusal(ctx context.Context, acct *Account, app string, n
}
rootfs = rootfs || rec.Runtime == provision.RuntimeRootfsV1
}
- v, err := s.loadFleetView(ctx, fleet)
- if err != nil || !v.Active {
+ v, err := s.loadFleetViewRequiredAt(ctx, fleet, time.Now(), true)
+ if err != nil || !v.Complete {
return unread()
}
build := s.consoleBuild
diff --git a/internal/console/appcopies_test.go b/internal/console/appcopies_test.go
index 2b0745b70..c56bb75e4 100644
--- a/internal/console/appcopies_test.go
+++ b/internal/console/appcopies_test.go
@@ -156,6 +156,36 @@ func TestCopiesDefaultsAndBounds(t *testing.T) {
t.Fatalf("default: %d %s", code, out)
}
}
+
+func TestCopiesSingleBoxCapacity(t *testing.T) {
+ for _, unread := range []bool{false, true} {
+ t.Run(map[bool]string{false: "readable", true: "unreadable"}[unread], func(t *testing.T) {
+ fx, token := copiesWorld(t)
+ reg := openTestReg(t, fx)
+ defer reg.Close()
+ if err := reg.SetFleetBoxStatus("pi", "pi-2", "detached"); err != nil {
+ t.Fatal(err)
+ }
+ if unread {
+ key := "fleets/pi/status/boxes/pi-1.json"
+ _, tag, err := fx.rel.Get(context.Background(), key)
+ if err != nil {
+ t.Fatal(err)
+ }
+ if _, err := fx.rel.Put(context.Background(), key, []byte("broken"), tag); err != nil {
+ t.Fatal(err)
+ }
+ }
+ wantCode, want := http.StatusConflict, "2 copies need 2 eligible boxes. this fleet has 1"
+ if unread {
+ wantCode, want = http.StatusServiceUnavailable, copiesUnread
+ }
+ if code, out := copiesPut(t, fx, token, `{"copies":2}`); code != wantCode || !strings.Contains(out, want) {
+ t.Fatalf("got %d %s; want %d %s", code, out, wantCode, want)
+ }
+ })
+ }
+}
func TestCopiesReleaseFloorComplete(t *testing.T) {
for _, v := range []string{"v0.34.0", "", "dev", release.StatelessReplicasFloor} {
t.Run("box-"+v, func(t *testing.T) {
diff --git a/internal/console/fleetbox.go b/internal/console/fleetbox.go
index 47fb60387..033343b66 100644
--- a/internal/console/fleetbox.go
+++ b/internal/console/fleetbox.go
@@ -279,6 +279,11 @@ func (s *Server) loadFleetView(ctx context.Context, fleet string) (fleetView, er
// Otherwise anything that could not be read whole (the fleet's heartbeats,
// the deployment's, the inventory) leaves Active false.
func (s *Server) loadFleetViewAt(ctx context.Context, fleet string, now time.Time) (fleetView, error) {
+ return s.loadFleetViewRequiredAt(ctx, fleet, now, false)
+}
+
+// Count admission needs the complete view even when labelling is inactive.
+func (s *Server) loadFleetViewRequiredAt(ctx context.Context, fleet string, now time.Time, requireComplete bool) (fleetView, error) {
v := fleetView{Load: map[string]int{}}
reg, err := s.openPassRegistry()
if err != nil {
@@ -301,7 +306,7 @@ func (s *Server) loadFleetViewAt(ctx context.Context, fleet string, now time.Tim
if err != nil {
return v, err
}
- if len(v.Boxes) < 2 && len(v.ReplicaApps) == 0 {
+ if !requireComplete && len(v.Boxes) < 2 && len(v.ReplicaApps) == 0 {
if !v.labelled() {
return v, nil
}
diff --git a/internal/host/fleetbind.go b/internal/host/fleetbind.go
index d8fcdfcc9..6ed1efbcb 100644
--- a/internal/host/fleetbind.go
+++ b/internal/host/fleetbind.go
@@ -484,21 +484,26 @@ type statelessBindingPublisher struct {
var armedStatelessBindings atomic.Pointer[statelessBindingPublisher]
func (p *statelessBindingPublisher) publish(ctx context.Context, rec provision.Record, rt registry.Route) error {
+ _, err := p.publishCurrent(ctx, rec, rt)
+ return err
+}
+
+func (p *statelessBindingPublisher) publishCurrent(ctx context.Context, rec provision.Record, rt registry.Route) (bool, error) {
if p == nil || p.coordinator == nil || !rt.Stateless || rt.IsSidecar() || rt.IsForward() || !rt.Provisioned || rt.Status != "ready" || rt.Host != rec.Host || rt.Account != rec.Account || rt.App != rec.App || rt.Assigned != rec.FleetBoxAt {
- return nil
+ return false, nil
}
fleet, ok := registry.FleetPlacement(rec.Region)
if !ok || fleet != p.fleet || provision.ReplicaCoordinatorBox(&rec, time.Now()) != p.box || rec.Coordinator == nil || rec.Coordinator.Box != p.box {
- return nil
+ return false, nil
}
incarnation, err := provision.Incarnation(rec.Account, rec.App, rec.Host, rec.CreatedAt)
if err != nil {
- return err
+ return false, err
}
id := replicas.Identity{Account: rec.Account, App: rec.App, Host: rec.Host, Incarnation: incarnation}
a := p.coordinator.Held(id)
if a == nil {
- return nil
+ return false, nil
}
state, _ := json.Marshal(struct {
Identity replicas.Identity
@@ -509,12 +514,12 @@ func (p *statelessBindingPublisher) publish(ctx context.Context, rec provision.R
p.mu.Lock()
defer p.mu.Unlock()
if p.published[rec.Host] == string(state) {
- return nil
+ return true, nil
}
binding := FleetBinding{Host: rec.Host, Fleet: p.fleet, Box: p.box, BoundAt: time.Now().UnixMilli()}
if rec.ReplicaAssignment != nil {
if !rt.ValidReplicaProjection() || rt.ReplicaIncarnation != incarnation || rt.ReplicaRevision != rec.ReplicaAssignment.Revision {
- return replicas.ErrFenced
+ return false, replicas.ErrFenced
}
binding.Box = ""
binding.Boxes = slices.Clone(rec.ReplicaAssignment.Boxes)
@@ -522,13 +527,13 @@ func (p *statelessBindingPublisher) publish(ctx context.Context, rec provision.R
binding.AssignmentRevision = rec.ReplicaAssignment.Revision
}
if err := writeFleetBinding(ctx, p.store, binding, true, a); err != nil {
- return err
+ return false, err
}
if p.published == nil {
p.published = make(map[string]string)
}
p.published[rec.Host] = string(state)
- return nil
+ return true, nil
}
func validReplicaFleetBinding(reg *registry.Registry, rt registry.Route, b FleetBinding) bool {
diff --git a/internal/host/replica_request_budget_test.go b/internal/host/replica_request_budget_test.go
index 7bf85726f..91105d93c 100644
--- a/internal/host/replica_request_budget_test.go
+++ b/internal/host/replica_request_budget_test.go
@@ -179,6 +179,74 @@ func TestReplicaRetirementProofAndTickRetry(t *testing.T) {
}
}
+func TestReplicaCoordinatorPlacementSettlesUntilRevisionChanges(t *testing.T) {
+ ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
+ defer cancel()
+ reg := testRegistry(t)
+ store := &replicaTraceStore{Store: release.NewDirStore(t.TempDir())}
+ now := time.Now()
+ rec := provision.Record{Account: "bab", App: "shop", Host: "shop.example.com", Region: "fleet/pi", FleetBox: "a", CreatedAt: time.Unix(1, 0), Hibernate: new(bool), RecordSeq: 1, ReplicaAssignment: &replicas.Assignment{Revision: 1, Desired: 2, Boxes: []string{"a", "b"}}}
+ lease := replicas.Coordinator{Term: "term", Box: "a", BootID: "boot", ExpiresAt: now.Add(time.Hour)}
+ client := activator.NewCoordinatorClient("a", "boot", func(context.Context, replicas.Identity, replicas.CoordinatorChange) (replicas.CoordinatorReply, error) {
+ return replicas.CoordinatorReply{Lease: lease, RemainingMS: replicas.CoordinatorTTL.Milliseconds()}, nil
+ }, nil)
+ defer client.Close(ctx)
+ publisher := &statelessBindingPublisher{store: store, fleet: "pi", box: "a", coordinator: client}
+ w := &replicaPlacementWorker{reg: reg, box: "a", coordinator: client, publisher: publisher}
+ if err := reg.Upsert(provision.RouteFor(rec, t.TempDir(), "", false, nil)); err != nil {
+ t.Fatal(err)
+ }
+ w.observe(rec)
+ w.run(ctx, now)
+ if w.pending[rec.Host].done || len(store.trace) != 0 {
+ t.Fatal("acquisition without an observed coordinator counted as publication")
+ }
+ rec.Coordinator = &lease
+ rec.RecordSeq++
+ w.observe(rec)
+ w.run(ctx, now.Add(time.Second))
+ if !w.pending[rec.Host].done || len(store.trace) != 2 {
+ t.Fatalf("successful publication did not settle: %+v, trace %v", w.pending[rec.Host], store.trace)
+ }
+ settled := w.pending[rec.Host].retry
+ store.trace = nil
+ for i := 1; i <= 3; i++ {
+ rec.RecordSeq++
+ w.observe(rec)
+ w.run(ctx, now.Add(time.Duration(i)*time.Minute))
+ if p := w.pending[rec.Host]; !p.done || p.retry != settled || len(store.trace) != 0 {
+ t.Fatalf("unchanged assignment retried: %+v, trace %v", p, store.trace)
+ }
+ }
+ next := *rec.ReplicaAssignment
+ next.Revision++
+ rec.ReplicaAssignment = &next
+ rec.RecordSeq++
+ inc, err := provision.Incarnation(rec.Account, rec.App, rec.Host, rec.CreatedAt)
+ if err != nil {
+ t.Fatal(err)
+ }
+ if err := reg.SetReplicaAssignment(rec.Host, inc, next, true); err != nil {
+ t.Fatal(err)
+ }
+ w.observe(rec)
+ if p := w.pending[rec.Host]; p.done || !p.retry.IsZero() || p.delay != 0 {
+ t.Fatalf("revision did not re-arm work: %+v", p)
+ }
+ w.run(ctx, now.Add(4*time.Minute))
+ if !w.pending[rec.Host].done || len(store.trace) != 2 {
+ t.Fatalf("revision was not published: %+v, trace %v", w.pending[rec.Host], store.trace)
+ }
+ raw, _, err := store.Store.Get(ctx, fleetBindingKey("pi", rec.Host))
+ if err != nil {
+ t.Fatal(err)
+ }
+ var binding FleetBinding
+ if err := json.Unmarshal(raw, &binding); err != nil || binding.AssignmentRevision != next.Revision {
+ t.Fatalf("binding revision: %+v, %v", binding, err)
+ }
+}
+
func TestReplicaHubBindingReader(t *testing.T) {
reg := testRegistry(t)
ctx := context.Background()
diff --git a/internal/host/replicaplacement.go b/internal/host/replicaplacement.go
index 60ef1fd07..ea901d089 100644
--- a/internal/host/replicaplacement.go
+++ b/internal/host/replicaplacement.go
@@ -20,6 +20,7 @@ type replicaPlacementWork struct {
rec provision.Record
retry time.Time
delay time.Duration
+ done bool
}
type replicaPlacementWorker struct {
@@ -55,6 +56,7 @@ func (w *replicaPlacementWorker) observe(rec provision.Record) {
if old.rec.ReplicaAssignment == nil || old.rec.CreatedAt != rec.CreatedAt || old.rec.ReplicaAssignment.Revision != rec.ReplicaAssignment.Revision {
old.retry = time.Time{}
old.delay = 0
+ old.done = false
}
old.rec = rec
w.pending[rec.Host] = old
@@ -88,7 +90,7 @@ func (w *replicaPlacementWorker) run(ctx context.Context, now time.Time) {
w.mu.Lock()
work := make([]replicaPlacementWork, 0, len(w.pending))
for _, p := range w.pending {
- if !now.Before(p.retry) {
+ if !p.done && !now.Before(p.retry) {
work = append(work, p)
}
}
@@ -121,7 +123,7 @@ func (w *replicaPlacementWorker) run(ctx context.Context, now time.Time) {
} else if err == nil && a.Contains(w.box) && rt != nil && rt.ReplicaIncarnation == inc && rt.ReplicaRevision == a.Revision && provision.ReplicaCoordinatorBox(&rec, now) == w.box && w.coordinator != nil {
if _, err = w.coordinator.Acquire(rctx, id); err == nil && w.publisher != nil {
// Acquire's new term reaches the publisher through the next record pass.
- err = w.publisher.publish(rctx, rec, *rt)
+ done, err = w.publisher.publishCurrent(rctx, rec, *rt)
}
}
cancel()
@@ -129,7 +131,8 @@ func (w *replicaPlacementWorker) run(ctx context.Context, now time.Time) {
current := w.pending[rec.Host]
if current.rec.RecordSeq == rec.RecordSeq && current.rec.CreatedAt == rec.CreatedAt && current.rec.ReplicaAssignment != nil && current.rec.ReplicaAssignment.Revision == a.Revision {
if done {
- delete(w.pending, rec.Host)
+ current.done = true
+ w.pending[rec.Host] = current
} else {
p.delay = min(max(p.delay*2, time.Second), time.Minute)
p.retry = now.Add(p.delay)
diff --git a/internal/provision/provision.go b/internal/provision/provision.go
index 2ab054728..8c88f3458 100644
--- a/internal/provision/provision.go
+++ b/internal/provision/provision.go
@@ -1047,9 +1047,6 @@ func SetRecordRegion(ctx context.Context, s release.Store, acct, app, host, regi
if rec.ReplicaAssignment != nil {
return ErrFleetBoxMoved
}
- if err := replicaAssignmentMoveRefusal(rec); err != nil {
- return err
- }
if err := seedMoveRefusal(rec); err != nil {
return err
}
diff --git a/internal/provision/reconcile.go b/internal/provision/reconcile.go
index 7142c8100..fcd366538 100644
--- a/internal/provision/reconcile.go
+++ b/internal/provision/reconcile.go
@@ -885,8 +885,7 @@ func shapeMismatch(existing, want registry.Route) string {
// caller has to count for itself. A dry run writes nothing and returns nil.
func convergeOwned(reg *registry.Registry, existing registry.Route, rec Record, policy *UpdatePolicy, policyKnown bool, ap appPolicyCols, dryRun bool) (policyMoved bool, err error) {
if rec.ReplicaAssignment == nil && existing.FleetBoxes != "" {
- inc, e := Incarnation(rec.Account, rec.App, rec.Host, rec.CreatedAt)
- if e != nil || inc != existing.ReplicaIncarnation || rec.FleetBox == "" {
+ if !existing.Provisioned || existing.Account != rec.Account || existing.App != rec.App || existing.Host != rec.Host || existing.Incarnation > rec.Incarnation || rec.FleetBox == "" {
return false, registry.ErrReplicaAssignment
}
if !dryRun {
@@ -2379,10 +2378,14 @@ func Reconcile(ctx context.Context, s release.Store, reg *registry.Registry, cfg
continue
}
if rec, ok := sc.observed[rt.Host]; ok && (rec.ReplicaAssignment != nil || rt.FleetBoxes != "") {
- if rec.ReplicaAssignment == nil || !replicaAssignmentAdmitted(rec) || !replicaRowLifetimeAllowed(rec, rt) {
+ if rec.ReplicaAssignment == nil {
+ if rt.Incarnation > rec.Incarnation {
+ continue
+ }
+ } else if !replicaAssignmentAdmitted(rec) || !replicaRowLifetimeAllowed(rec, rt) {
continue
}
- if cfg.inScope(rec.Region, rec.Pool, everywhereClass(rec)) && cfg.ownsRecord(rec) && !trashFor(rec.Account, rec.App).removable {
+ if rec.ReplicaAssignment != nil && cfg.inScope(rec.Region, rec.Pool, everywhereClass(rec)) && cfg.ownsRecord(rec) && !trashFor(rec.Account, rec.App).removable {
continue
}
}
diff --git a/internal/provision/replicas_test.go b/internal/provision/replicas_test.go
index a0ab33c3d..44afda718 100644
--- a/internal/provision/replicas_test.go
+++ b/internal/provision/replicas_test.go
@@ -267,6 +267,63 @@ func TestReplicaReconcileRecreatedMember(t *testing.T) {
}
}
+func TestReplicaReconcileLegacySuccessor(t *testing.T) {
+ for _, judged := range []bool{false, true} {
+ for _, ordering := range []string{"older", "installed", "newer"} {
+ t.Run(fmt.Sprintf("judged=%v/%s", judged, ordering), func(t *testing.T) {
+ s, rec, cfg := replicaReconcileFixture(t)
+ rec.Incarnation = 1
+ old := RouteFor(rec, cfg.DataDir, "", false, nil)
+ rec.CreatedAt = rec.CreatedAt.Add(time.Hour)
+ rec.Incarnation = 2
+ rec.ReplicaAssignment = nil
+ rec.FleetBox = "a"
+ if ordering == "installed" {
+ old.Incarnation = rec.Incarnation
+ } else if ordering == "newer" {
+ old.Incarnation = rec.Incarnation + 1
+ }
+ judgePut(t, s, RecordKey(rec.Account, rec.App, rec.Host), rec)
+ if judged {
+ cfg.Judge = NewLifetimeJudge()
+ judgePut(t, s, HostIncarnationKey(rec.Host), HostIncarnation{Account: rec.Account, App: rec.App, Incarnation: rec.Incarnation, State: SlotLive})
+ }
+ for _, box := range []string{"a", "b"} {
+ reg := regWith(t, old)
+ defer reg.Close()
+ before := *mustGet(t, reg, rec.Host)
+ cfg.FleetBox = box
+ passes := 1
+ if judged && ordering == "older" && box == "a" {
+ // Installing the pair invalidates the first pass's exact-row CAS.
+ passes = 2
+ }
+ for pass := 0; pass < passes; pass++ {
+ if err := Reconcile(ctx, s, reg, cfg); err != nil {
+ t.Fatal(err)
+ }
+ }
+ got, err := reg.Get(rec.Host)
+ if err != nil {
+ t.Fatal(err)
+ }
+ if ordering == "newer" {
+ if got == nil || *got != before {
+ t.Fatalf("%s: newer row changed: %+v", box, got)
+ }
+ } else if box == "b" {
+ if got != nil {
+ t.Fatalf("former member retained row: %+v", got)
+ }
+ } else if got == nil || got.FleetBoxes != "" || got.Copies != 0 || got.ReplicaRevision != 0 || got.ReplicaIncarnation != "" || got.FleetBox != "a" || got.FleetLabel != "a" {
+ t.Fatalf("owner did not recover legacy projection: %+v", got)
+ }
+ }
+ })
+ }
+ }
+}
+
func TestReplicaAssignmentInvalidProjection(t *testing.T) {
s, rec, cfg := replicaReconcileFixture(t)
cfg.FleetBox = "a"
diff --git a/internal/provision/stateless_placement_census_test.go b/internal/provision/stateless_placement_census_test.go
index 0b1cbf682..b75452d89 100644
--- a/internal/provision/stateless_placement_census_test.go
+++ b/internal/provision/stateless_placement_census_test.go
@@ -34,7 +34,8 @@ func statelessPlacementWriteCensusInventory() []censusEntry {
// projection without changing Retiring or claiming a stop proof.
// Slice 3b, author inspection; independent approval pending: Reports only validated scoped replica records from the existing complete pass snapshot to the tick worker; does not ACK removal. Binding callback now permits set rows.
// merge of origin/main 9b8b2c50: Retain departure inventory and completeness reporting alongside replica observations, membership, and removal gates.
- {"internal/provision/reconcile.go", "Reconcile", "key-site", "key:ParseRecordKey,key:RecordKey,lit:instances", "7d48c47eb99360cc61d76f155f35c4e2cba2ce7e81a368575b7fed710a89a095"},
+ // Final fix I1, author inspection: legacy successor records reach the existing ownership judgement; newer row counters remain protected. Same record reads and removal writers. Independent census approval remains controller-owned.
+ {"internal/provision/reconcile.go", "Reconcile", "key-site", "key:ParseRecordKey,key:RecordKey,lit:instances", "bd80261427c3f136a15f80e53c1212e841045eb97c32b3d6d944c513346c5a82"},
// Slice 3a, author-inspected: the only assignment writer here is the
// existing typed CAS. It receives selected canonical manifest evidence
// under app/fleet exclusion, and unchanged assignments are not written.
@@ -67,7 +68,8 @@ func statelessPlacementWriteCensusInventory() []censusEntry {
{"internal/provision/replicaassignment.go", "RecordReplicaRetired", "record-writer", "key:RecordReplicaRetired,key:updateRecord", "e3d68c95519faa17c34324310a2421cb3f49dca82f0b0097eb761eefa6159a2e"},
// Slice 2b: same region CAS/read, now refuse a region change while any
// set remains. A region-only edit cannot move the set or prove termination.
- {"internal/provision/provision.go", "SetRecordRegion", "record-writer", "key:SetRecordRegion,key:updateRecord", "beae6f23aadb7625e9fc85ec35b35efa5e55cb29bc803359ccd3f091a12d3e28"},
+ // Final minor 2, author inspection: removed an unreachable duplicate replica refusal. Existing assignment refusal and typed region CAS remain; no write authority or destination changed. Independent census approval remains controller-owned.
+ {"internal/provision/provision.go", "SetRecordRegion", "record-writer", "key:SetRecordRegion,key:updateRecord", "846bef0bb088624d4214d0fb1dd2ceede30a10f8ee7fd99c50fbaba921cd7b56"},
// Slice 2b: same label CAS; a changed label must already be in the set.
// Records without an assignment keep the previous read/write path.
{"internal/provision/fleetbox.go", "SetRecordFleetBox", "record-writer", "key:SetRecordFleetBox,key:updateRecord", "44a7facbc2de04197c584a0e1f30f104ead59844b2ed88554e6869a6b90548b2"},
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv
index 1e275e025..bfda0f4fc 100644
--- a/internal/provision/testdata/plan14-root-reads-chain.tsv
+++ b/internal/provision/testdata/plan14-root-reads-chain.tsv
@@ -75,4 +75,4 @@ plan14-root-reads-domains-check-country.tsv b0fc198c53bb0dacba33a54c3d8bf8fe5ac0
plan14-root-reads-static-stream-extract.tsv 7fb932b118e67e23b33a374c6a4020b38976667c7ec4cfb855c0f8b598b1756b
plan14-root-reads-ls284.tsv 744b16d970f22476b79982e57c326157ca5137fa96ccaee4a7ae10c25248d124
plan14-root-reads-region-ha-p1b3b-t.tsv c68e2453bfc8afaf3794eb4c08850428982fa6954269b6b99bddfda4e6242929
-plan14-root-reads-stateless-replicas-2.tsv 57f095e19d4d433b74eb92a565f87f069bc0e3804f1f889333ab1e38b11bed1e
+plan14-root-reads-stateless-replicas-2.tsv 50a986ac29a27830da86785a82c251a39ed8cf8569fd35b65331320110fb3525
diff --git a/internal/provision/testdata/plan14-root-reads-stateless-replicas-2.tsv b/internal/provision/testdata/plan14-root-reads-stateless-replicas-2.tsv
index e02e6243b..8c964a422 100644
--- a/internal/provision/testdata/plan14-root-reads-stateless-replicas-2.tsv
+++ b/internal/provision/testdata/plan14-root-reads-stateless-replicas-2.tsv
@@ -1,6 +1,6 @@
# Census overlay stateless-replicas-2, written by census-propose (#369). census-ruling-stateless-replicas-2, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-stateless-replicas-2.md.
# 6 body, 2 sites, 8 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
-# 35 new dispositions: 18 reads re-frozen at their disposition with the claim, 16 new units frozen accepted-legacy, 0 quiet units retired while they read nothing, 1 other.
+# 36 new dispositions: 18 reads re-frozen at their disposition with the claim, 17 new units frozen accepted-legacy, 0 quiet units retired while they read nothing, 1 other.
@legacy 8d01d7dec69e7c2eb19ca6a5918a995c5bdbcc7869af1f945889244b2a6e5d90 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. Final review I3: signal the owned renewal worker instead of waiting for its sequential console HTTP calls. Existing convergence and record read unchanged.;rev3=census-ruling-stateless-replicas-2;basis=Slice 3b: signals the owned replica worker on the existing tick; coalesced asynchronous execution, no timer or bucket scan added. registry:Host@4858 0db52bba7ecb350f03ba7727af326aa3b0370a01d63ede95bd5df1744d8bcf84
@legacy 79055c0f7e0c310deb5796a2b8bce0410f5de648d69b7d919e211d3a4273facb internal/registry/forward.go Registry.SetFleetBoxIf legacy accepted-legacy accepted-legacy;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 1: one conditional UPDATE of fleet_box judging placement on the fleet (region = 'fleet/'||fleet), kind (not a sidecar) and ACTIVE membership in fleet_boxes at the write; returns whether a row changed (+file:Exec, +registry:Changed, +registry:remote x2, +registry:sql, +whole:remoteClient x2). Replaces SetFleetBox.;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Task 5, rule 3): the one conditional UPDATE gains AND fleet_label = '', so a labelled forward row's fleet_box is never changed by a binding. Read sites unchanged (7). It writes less, never more. Agent hub's bindings pass, not root.;rev3=census-ruling-stateless-replicas-2;basis=Existing conditional SQL write refuses every replica projection; a binding cannot collapse a set. No new read source. file:Exec@259,registry:Changed@225,registry:remote@112,registry:remote@80,registry:sql@259,whole:remoteClient@114,whole:remoteClient@82 3ce7adcfb074126b83a93efbd284d9063a62ac0ed8bece4561283705bfdba4f3
@legacy 2341d52700480b570ac5c809280fb50ad29154a11856912c7613c3239ed6351a internal/registry/forward.go Route.InertForward legacy accepted-legacy accepted-legacy;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 2: true only when every one of the 50 forbidden columns of §4.2 is zero (one +registry:<field> site each, nothing else). Pure.;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Task 2): two more forbidden fields must be zero on a forward row, Assigned == "" and !Moved (fleet_assigned, fleet_moved in ForwardForbidden). Stricter, never looser.;rev3=census-ruling-stateless-replicas-2;basis=Pure validation additionally refuses malformed set projections; all unrelated forbidden fields still must be zero. registry:Addr@114,registry:Addrs@132,registry:Args@819,registry:AssetGen@304,registry:AssetsOff@287,registry:Assigned@1172,registry:Backing@745,registry:BuildState@1009,registry:Canary@666,registry:Caps@579,registry:ClaimIncarnation@1071,registry:ClaimOwner@1124,registry:ClaimRowID@1148,registry:ClaimStamp@1101,registry:DBPath@349,registry:EgressAllow@937,registry:Environment@534,registry:Gate@647,registry:GoodDemand@464,registry:GoodDigest@440,registry:GoodVersion@415,registry:HA@616,registry:Health@151,registry:Hibernate@598,registry:HoldOp@171,registry:IdleSeconds@837,registry:ImportGate@262,registry:Incarnation@191,registry:LastError@326,registry:MaxRunSeconds@861,registry:Moved@1195,registry:NextDue@705,registry:Platform@785,registry:PolicyExpiresAt@980,registry:Pool@516,registry:PrevVersion@390,registry:Replica@1056,registry:Replicas@1033,registry:Replication@680,registry:Runtime@626,registry:Seed@801,registry:SeedSource@238,registry:ServingSeq@215,registry:ServingVersion@488,registry:Size@962,registry:Socket@94,registry:StatusNamed@726,registry:Steering@887,registry:Tunnel@559,registry:Unit@766,registry:UpdateSettings@909,registry:Version@369 9f79218887204b816bca2d371e96b7a175033136070104a84d8618ef27b2b2da
@@ -8,9 +8,10 @@
@legacy 815085ecaea6595b9c76ac0a51a484a3e7b35fe121caaf9775a9b009e06e4163 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.;rev3=census-ruling-stateless-replicas-2;basis=P12: existing guarded upsert keeps the whole set and its stateless projection when the incoming row has zero set fields, only for the same tenant. A retenant never inherits a set. Same statement and read sources. file:Exec@116,registry:Host@5987,whole:Route@5863 9bfe70a414c39096e6a5ba4513e47d37ac88236c78f5d34b61517dd3aa066ff9
@legacy 7ed3af12ead8e933261bff16e72a907119357bb0e6009913c486a82c5d32ecd7 internal/activator/replicaretirement.go ExecBackend.ReplicaRetirementEmpty legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-2;basis=Slice 3b: read-only local termination proof reads both the host systemd slice cgroup.events via existing CgroupEvents helper and flat host cgroup via existing openHostCgroup. Host comes from a validated scoped record; caller requires absent local route and quiet activator under reconcile exclusion. Any population/read error/no delegation refuses; never kills or touches application data. registry:Backing@128,registry:Host@323,registry:Host@445,registry:Host@76,registry:Unit@111 b0074b0d35bbe9489eb731550d9d49d21e68952c8f7c846244fe89cd23ee663b
@legacy c2884b0d5b53dc03c9be18f949be500c2cf8a6be869b99c6f63a8bcf6dda68a6 internal/activator/wakeidentity.go Service.CheckReplicaAssignment legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-2;basis=Only set rows invoke existing registry/instance-record wake recheck. Legacy returns without reading; not a new polling loop. registry:FleetBoxes@93,whole:Route@169 43e922e015b61f736ed118ad44113802ca1944b676e9586388d6f9e00d691eba
+@legacy 9ab5a98f3e8db4db9503bba254f78e21e2715aa9ef59531f087028384d4ef45b internal/host/fleetbind.go statelessBindingPublisher.publishCurrent legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-2;basis=Final fix I3: moved existing publish implementation, retaining route, fleet, coordinator, held-authority and projection checks and exact binding path. Returns false for skipped work; true only for the matching cached publication or a successful authority-gated write. No new path, read or writer. registry:Account@288,registry:App@317,registry:Assigned@338,registry:Host@265,registry:Provisioned@223,registry:ReplicaIncarnation@1471,registry:ReplicaRevision@1511,registry:ServingVersion@1134,registry:Stateless@170,registry:Status@241 1a6a65cb4531b1599b6cc6d57a929f2bb08cf1883889993b01f8cc3411baa08e
@legacy 072ae1402ea5fdb49413a17fbc0de9cf8987b930a899d24c353f878a664edf2d internal/host/fleetbind.go validReplicaFleetBinding legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-2;basis=Slice 3b: validates canonical boxes, host, fleet, lifetime and exact assignment revision against existing route; local registry fleet owner and active labels must match. No bucket call; no writer. registry:Account@643,registry:Account@657,registry:Copies@481,registry:FleetBoxes@132,registry:FleetBoxes@540,registry:Host@373,registry:Label@856,registry:Region@331,registry:ReplicaIncarnation@188,registry:ReplicaRevision@230,registry:Status@878,whole:FleetBox@842 2c20af701cc19717ba83d02c9361c3a34da18fe68e8fac862deaa9787b025ebb
@legacy 0209cc9c5299a0027e5a4334ddf745b648e911ef89850656f8d596cb621ef7e2 internal/host/fleetidentity.go recheckReplicaPickup legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-2;basis=Only set rows require a launcher with the activator current-membership check; missing check refuses pickup. Reads supplied Route only. registry:FleetBoxes@98,whole:Route@322 7af336690a854d75b8a68b2f8031f8fb2cbd8441117e73c30610307d8f0dd7ca
-@legacy 1b6f96670996e91b298bbc687cfc7d99d3820ad716d6d8664750b0c11abc6030 internal/host/replicaplacement.go replicaPlacementWorker.run legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-2;basis=Slice 3b: existing tick processes already-read records with bounded exponential backoff. Reads local registry only. Under reconcile exclusion, absent row plus activator quiet plus both cgroup layouts empty precede authenticated retired API POST for exact lifetime/revision. Members only acquire for the deterministic chosen coordinator; others do no publication. API timeout/cancellation bounds shutdown; successful or fenced ACKs leave the queue, while transient failures retry with backoff. A new record observation can queue a new revision. No new bucket polling. registry:ReplicaIncarnation@1235,registry:ReplicaRevision@1267,whole:Route@1000,whole:Route@1222,whole:Route@1584,whole:Route@848 88bd40ca3d72c93b4973bf294ff1c32ed48d45049bef2964206e611bdcc264d1
+@legacy 7f7a812012ceadf5327cce2aa6876ee69709d264f1a4acf1a4457aed40d34a3e internal/host/replicaplacement.go replicaPlacementWorker.run legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-2;basis=Final fix I3: retain completed lifetime/revision observations and skip their work; only confirmed current binding publication after coordinator acquisition, or existing successful/fenced retirement ACK, completes work. Existing local registry read, authority and retirement checks, and 30-second request deadline remain. No new reads or polling. registry:ReplicaIncarnation@1246,registry:ReplicaRevision@1278,whole:Route@1011,whole:Route@1233,whole:Route@1608,whole:Route@859 212936a21eea1a64a48a7b57130d81db83bc6b6f01032519974205ab10d33c26
@legacy 9ee0215e87836c375afd79bb0afd249425eaf6ae649f80003172ef145f960e79 internal/provision/forward.go forwardRowFor legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-2;basis=Projects declarative set fields from supplied record; keeps socket, database, execution and all other forbidden fields zero. whole:Route@436,whole:Route@453 9ba6c562aa2b720af029d069b5855b8d1dc32ff76c742c90ad13604f8f19970d
@legacy 1c2e463b33d41c6d7eb010c2cf99c5d9d1e607065ebfa9bba0766476ccf0b31d internal/provision/replicaassignment.go projectReplicaAssignment legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-2;basis=P12: pure projection marks a present assignment invalid before validation, so an invalid shape cannot silently become the legacy empty set. No store read or path authority. registry:Copies@465,registry:FleetBox@616,registry:FleetBoxes@254,registry:FleetBoxes@450,registry:FleetLabel@629,registry:ReplicaIncarnation@496,registry:ReplicaRevision@476,registry:Stateless@595 be1287470cf6b9cfbef39e9740c21b461d952b265098d72c9e32c37e6326e383
@legacy 9ddce30c4b6dd6b38b67adc32c93cbc530cf7daaea612100893877de65f63d0f internal/provision/replicaassignment.go replicaRowLifetimeAllowed legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-2;basis=P11: pure comparison of the already-read record and local route. Requires same owner and managed instance kind; accepts unprojected legacy rows for membership, matching lifetimes, or a proven older monotonic counter. Newer/unknown ordering refuses. registry:Account@145,registry:App@174,registry:Canary@132,registry:FleetBoxes@387,registry:Host@195,registry:Incarnation@218,registry:Kind@92,registry:Platform@117,registry:Provisioned@74,registry:ReplicaIncarnation@410,registry:ReplicaIncarnation@442,whole:Route@495 03c64806b231b7af2844dc47eaeefc52549bbce0e6afd56ed3d103d87f2f42a0
@@ -26,16 +27,16 @@
@legacy 2a9189ec9dee7006909290df15aade44740c8331bb156fb08385b9a69689eff1 internal/activator/cmd.go Service.RunCmd legacy accepted-legacy accepted-legacy;rev3=census-ruling-carlos-run;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): admits one run against an awake entry under the agent's own lease, fence and swap checks; it starts nothing itself and root validates what it later names;rev3=census-ruling-edge-request-records;basis=passes nil for begin's new req parameter; no read added;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R: a carlos run is refused with ErrCmdBusy while a release record of the host is open (a.releaseOps[rt.Host], in-memory), as a run already in flight refuses it; new site +registry:Host (that map lookup); adds a refusal only;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a: AfterSettled honoured on every path (called before return on each path that starts no unit, else by the settle that proves the unit gone); a rootfs run is refused as a lost lease (CmdStoppedError StopLeaseLost) when its entry is not under the lease watch (residentWatchedLocked), and, off a.mu, when the replica's in-memory SafeUntil leaves less than oneShotStartLead (oneShotHeadroom); new sites are e.route.Rootfs() and a log line; adds refusals only Task 9 (PF-17): a session (spec.TTY) takes the entry's tty slot and a run its cmd slot (holdSlot), the hold carrying its role (newCmdHold); each is refused only for its own role (holdBusyLocked: ErrCmdBusy or ErrTTYBusy), so a run and a session coexist; a release command (a.releaseOps) refuses a run only, since the session's tty unit is its own; no read added, read sites unchanged Task 12 fix round 1 (Astra P1, incarnation binding): a session (spec.TTY) is refused with ErrCmdIncarnation, under a.mu, at admission (before the hold is attached, so nothing of it runs) and again at the last check before the start, unless the awake entry's row lifetime (e.route.Incarnation) equals spec.Incarnation, the lifetime the box's grant authorized; Task 12 fix round 2 (revised ruling): only a mismatch refuses, and 0 matches 0 (a record and row with no lifetime fields); a run is not checked; refuses more, starts nothing new, no read added beyond the in-memory e.route field (sessionIncarnationLocked);rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Take command/TTY mode from the actual serving generation alongside the existing captured environment; no authority comes from a route flag.;rev3=census-ruling-stateless-replicas-2;basis=Only a set command chains the existing exec gate to the current record membership recheck immediately before exec; preserves caller gate and legacy path. file:Prepare@2688,file:Prepare@2722,registry:FleetBoxes@9308,registry:Host@1502,registry:Host@2098,registry:Host@7932,registry:Host@9168,registry:Kind@437,registry:Stateless@5132,whole:Route@683,whole:Route@8336,whole:Route@869,whole:Route@8800,whole:Route@9497,whole:Route@9538 1c58059ab419d2a1fc1647c031f2e81647c1f892642656134cf1721b4d90d689
@legacy dfb973413e87bb5bb88322163377956d199442b4ca9df87126c8ec3c51f10256 internal/activator/cmdunit.go ExecBackend.StartCmd legacy accepted-legacy accepted-legacy;rev3=census-ruling-carlos-run;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): writes launch.cmd.json in the instance's own directory and asks instance control to start the cmd unit; root validates the staged executable it names (refuseStagedExe) and decides the start;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a: after the layout and run-directory checks, a rootfs row returns startRootfsRun (backend_rootfs.go) before nestedGate; the binary path is byte-identical (TestBinaryStartCmdLaunchGolden); new site +whole:Route is rt.Rootfs(); Plan 6 Task 8: a session (spec.TTY): checkCmdLaunch refuses before anything is listened on or written a launch shape (errCmdLaunchShape: process and argv both or neither, a process other than console, a run naming a process, a session with a run directory or streams, an id that is not one path element) and a process on a binary row (errBinaryProcess); then the session verbs (TTYControl) or ErrNoTTY; on a binary row the same nested gate, live link or staged build, launch environment and replica gate as a run; prepare(rt, RoleTTY); the pty and its handoff socket (openTTY) in place of the two streams; launch.tty.json with argv [live link, args...] and childEnv(ttyVars); then TTYControl.TTY, or TTYExe naming the staged build (POST /tty; root Task 6 handler validates it); the run path is unchanged (TestBinaryStartCmdLaunchGolden); new sites are rt to checkCmdLaunch and rt.Host in its error;rev3=census-ruling-stateless-replicas-2;basis=Only a set row invokes the caller's exec gate after binary command launch preparation and before any Cmd/TTY control call. Existing single-copy/stateful command path is unchanged; rootfs commands already invoke the gate. registry:FleetBoxes@2475,registry:Host@1092,registry:Host@1201,registry:Host@1972,registry:Host@2176,registry:Host@218,registry:Host@2404,registry:Host@2693,registry:Host@2767,registry:Host@2841,registry:Host@2915,registry:Host@3299,registry:Host@3432,registry:Host@3468,registry:Host@367,registry:Host@473,registry:Host@685,registry:Host@983,whole:Route@130,whole:Route@1788,whole:Route@1895,whole:Route@2220,whole:Route@2313,whole:Route@2585,whole:Route@298,whole:Route@3233,whole:Route@3237,whole:Route@3519,whole:Route@3523,whole:Route@414,whole:Route@755,whole:Route@792 cf3e3d38b9143532a9821578987c84e0d7dcea85e97a36a6d2aaba585f8081d7
@legacy b0d3308438211ee6ced08e1d63e4179dd0c71fdcd9d35f77f82c3364a7ae32fc internal/activator/rootfsworkers.go Service.runWorkerStart legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-3-workers;basis=rootfs Plan 3 Group W: one worker start off a.mu: publishes the build's pins, launches through the gate, installs only on the same entry still awake; always ends with the start done and what it started installed, proven gone or a stray;rev3=census-ruling-stateless-replicas-2;basis=Declared stateless set workers use the instance route and existing wake record recheck at actual launch, between two existing local worker gates. No read on a tick without a start, no new reads for stateful or unset assignments. Sidecar entry-point refusal remains. registry:FleetBoxes@2042,registry:Host@1971,registry:Host@2580,registry:Host@2771,registry:Host@3197,whole:Route@1656,whole:Route@2210,whole:Route@2342,whole:Route@2849,whole:Route@3261 924ee9f484d2ae2eaaf1dd250d889cc7f005ddf307aeeafb30874f3003f7fa67
-@legacy 2fdba081c7b8c93c93a77d81d5640be1b269d92137360e531879cfdd1cbd9d80 internal/activator/startrule.go ExecBackend.establishAssignment legacy accepted-legacy accepted-legacy;rev3=census-ruling-managed-fleets-1b;basis=new (Task 3, rule 6): on a labelled row (rt.Assigned set), MkdirAll the instance directory (0700) and write rt.Assigned to <db>.assigned via writeDurable. Unlabelled rows write nothing. Agent as carlos, not root.;rev3=census-ruling-stateless-replicas-2;basis=A set projection refuses this SQLite marker path; verified stateless launches already bypass it. Legacy behavior unchanged. registry:Assigned@207,registry:Assigned@543,registry:FleetBoxes@159,registry:Host@348,registry:Host@463,registry:Host@679 084270cbed04e3ae3d69dd3d0796aad58bb2e1c9a4c57a0a7a9f0e66caebfa21
-@legacy a4a4c60476a1ef167f17d08b452d61b6e23a3bb7775b088b6460279064bf5958 internal/activator/startrule.go ExecBackend.reconcileAssignment legacy accepted-legacy accepted-legacy;rev3=census-ruling-managed-fleets-1b;basis=new (Task 3, rule 6): on a labelled row, Lstat the instance dir, read the <db>.assigned marker with instancefs.ReadBeneathLimitOrAbsent (no symlink follow, 128 bytes max), Lstat the database; a copy not kept under rt.Assigned is moved by supersede into <DataDir>/.superseded/<host>/<nanos> (RenameBetweenNoReplace, fsync barriers), never deleted. Any read failure refuses the wake. Agent as carlos in the instance directory, not root.;rev3=census-ruling-stateless-replicas-2;basis=A set projection refuses this SQLite set-aside path before any filesystem read or move. Verified stateless launches bypass it; legacy unchanged. file:Lstat@379,file:Lstat@804,registry:Assigned@1332,registry:Assigned@1429,registry:Assigned@1463,registry:Assigned@207,registry:Assigned@777,registry:FleetBoxes@159,registry:Host@1022,registry:Host@1192,registry:Host@1547,registry:Host@1677,registry:Host@1803,registry:Host@348,registry:Host@542,registry:Host@727 2d3c4b0dc36bc1dee209f00a80c6871543a2b07cfe8f2acef5c2bd8b6ab26782
-@legacy be13da7e0d2a07dee196e48ef757c031984dca615586f773f1349e8ae6b41af8 internal/activator/startrule.go ExecBackend.startAllowed legacy accepted-legacy accepted-legacy;rev3=census-ruling-managed-fleets-1b;basis=new (Task 3, rule 6): the start rule: an unlabelled or restored start is allowed; a kept local copy must match rt.Assigned in its marker; an empty start of a labelled row is refused (ErrNothingToRestore) when a set-aside entry exists for the host or rt.Moved is set. Only refuses. Agent, not root.;rev3=census-ruling-stateless-replicas-2;basis=A set projection refuses this SQLite empty-start rule; does not turn a route hint into bypass authority. Legacy rule unchanged. registry:Assigned@211,registry:Assigned@668,registry:Assigned@820,registry:FleetBoxes@163,registry:Host@268,registry:Moved@1407,whole:Route@315 c0576b3af038f2a714e43ae6263d259110825f3ea18f5c9798214d7baf6958e4
+@legacy 36129990d1be9050bedbbd4f70e1fa6a87906e0da4f7aa1c7b8e47b0bb40b2bf internal/activator/startrule.go ExecBackend.establishAssignment legacy accepted-legacy accepted-legacy;rev3=census-ruling-managed-fleets-1b;basis=new (Task 3, rule 6): on a labelled row (rt.Assigned set), MkdirAll the instance directory (0700) and write rt.Assigned to <db>.assigned via writeDurable. Unlabelled rows write nothing. Agent as carlos, not root.;rev3=census-ruling-stateless-replicas-2;basis=A set projection refuses this SQLite marker path; verified stateless launches already bypass it. Legacy behavior unchanged. registry:Assigned@240,registry:Assigned@576,registry:FleetBoxes@192,registry:Host@381,registry:Host@496,registry:Host@712 20268f8d091b76847330eabd820c4842d294f856f68b49b97ffe2def77ffd7b8
+@legacy d94ff05b42270db83e20f4da251cbbc3a1777db241b772ff2fb5ef81afc9d972 internal/activator/startrule.go ExecBackend.reconcileAssignment legacy accepted-legacy accepted-legacy;rev3=census-ruling-managed-fleets-1b;basis=new (Task 3, rule 6): on a labelled row, Lstat the instance dir, read the <db>.assigned marker with instancefs.ReadBeneathLimitOrAbsent (no symlink follow, 128 bytes max), Lstat the database; a copy not kept under rt.Assigned is moved by supersede into <DataDir>/.superseded/<host>/<nanos> (RenameBetweenNoReplace, fsync barriers), never deleted. Any read failure refuses the wake. Agent as carlos in the instance directory, not root.;rev3=census-ruling-stateless-replicas-2;basis=A set projection refuses this SQLite set-aside path before any filesystem read or move. Verified stateless launches bypass it; legacy unchanged. file:Lstat@412,file:Lstat@837,registry:Assigned@1365,registry:Assigned@1462,registry:Assigned@1496,registry:Assigned@240,registry:Assigned@810,registry:FleetBoxes@192,registry:Host@1055,registry:Host@1225,registry:Host@1580,registry:Host@1710,registry:Host@1836,registry:Host@381,registry:Host@575,registry:Host@760 80bfe6d3bbc36333f0fafc5f959f92238405467016855853656c8ea036b54798
+@legacy aa4d2909d1ea2850596fd8f86dfadcc3f199493751dc3d611f0ba040364cfb6c internal/activator/startrule.go ExecBackend.startAllowed legacy accepted-legacy accepted-legacy;rev3=census-ruling-managed-fleets-1b;basis=new (Task 3, rule 6): the start rule: an unlabelled or restored start is allowed; a kept local copy must match rt.Assigned in its marker; an empty start of a labelled row is refused (ErrNothingToRestore) when a set-aside entry exists for the host or rt.Moved is set. Only refuses. Agent, not root.;rev3=census-ruling-stateless-replicas-2;basis=A set projection refuses this SQLite empty-start rule; does not turn a route hint into bypass authority. Legacy rule unchanged. registry:Assigned@244,registry:Assigned@701,registry:Assigned@853,registry:FleetBoxes@196,registry:Host@301,registry:Moved@1440,whole:Route@348 3f384dd99de5a7ef60bb7cd27c468a2f5f6e4a55186f1302b39ac001d0582552
@legacy 8a1cdcb513d1b84a59949d90b575f60448a6010d2ffb38381e6d82cf4b1bcbeb internal/activator/wakeidentity.go Service.currentWakeRoute legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Extract existing registry and labelled fleet record recheck for reuse without a serving lease; return the observed row and record and refuse a nil record. No writer or new path.;rev3=census-ruling-stateless-replicas-2;basis=Existing registry/record recheck validates canonical set, membership, lifetime, revision, owner and managed stateless shape. Reuses the one wake record read; unknown fleet and malformed projection refuse. registry:Account@1846,registry:App@1871,registry:Assigned@2821,registry:Assigned@3031,registry:Assigned@510,registry:Channel@2015,registry:Copies@2407,registry:Environment@2077,registry:FleetBoxes@1523,registry:FleetBoxes@2357,registry:FleetBoxes@531,registry:FleetBoxes@641,registry:Host@1114,registry:Host@1243,registry:Host@1410,registry:Host@1893,registry:Host@281,registry:Host@2956,registry:Host@379,registry:Host@971,registry:Kind@1592,registry:Region@1918,registry:Region@1949,registry:ReplicaIncarnation@2323,registry:ReplicaRevision@2454,registry:Runtime@2044,whole:Route@1327,whole:Route@229,whole:Route@2751,whole:Route@3056,whole:Route@427,whole:Route@431,whole:Route@488,whole:Route@499,whole:Route@563,whole:Route@721 abf3135d80b76a02b2047a9bcedc85852d38625eab20f550848878485b4d2e16
@legacy 82e2db3ec3ff76eedea214649dba1a3ce0f2824d358cf46bf1bf0415534bf262 internal/activator/wakeidentity.go leaseRouteChanged legacy accepted-legacy accepted-legacy;rev3=census-ruling-managed-fleets-1b;basis=new (branch review R1 P1-1): a pure comparison of the row a wake began from (began) with the row doWake read under the lease (now): nil now is a row that is gone; then wakeRouteChanged's identity checks; then Assigned and Moved; then Region. It answers an error naming the change, wrapping errRouteChangedUnderLease, or nil. No read beyond its arguments. Agent, not root; it only refuses.;rev3=census-ruling-stateless-replicas-2;basis=Pure comparison adds set/count/revision/lifetime changes to existing wake fence; no new input source. registry:Assigned@559,registry:Assigned@577,registry:Assigned@771,registry:Assigned@796,registry:Copies@388,registry:Copies@404,registry:FleetBoxes@350,registry:FleetBoxes@370,registry:Host@164,registry:Host@732,registry:Host@940,registry:Moved@593,registry:Moved@608,registry:Moved@785,registry:Moved@812,registry:Region@831,registry:Region@847,registry:Region@979,registry:Region@991,registry:ReplicaIncarnation@466,registry:ReplicaIncarnation@494,registry:ReplicaRevision@418,registry:ReplicaRevision@443,whole:Route@234,whole:Route@242,whole:Route@91 692ba8509b2b5dc40a1bd39bf5038b68c5d8c41e8fdc264a1f4041892d300210
@legacy ad34e97563b1a6499face57e5e49fa2dd3dc579e26664ec839a8016eca371929 internal/host/fleetbind.go ReconcileFleetBindings legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): §4.5: runs on the hub only (hubArmed); a binding whose object key is not fleetBindingKey(b.Fleet, b.Host) is skipped and logged before anything else; the stamp is SetFleetBoxIf, one conditional write judging placement, kind and active fleet membership at the instant of the write (SetFleetBox removed); a write that changes nothing is logged. Read sites unchanged (3); it stamps less, never more.;rev3=census-ruling-stateless-replicas-2;basis=Slice 3b: same existing binding list/Get. Key checked before join; set bindings validate current local projection and fleet ownership/membership. Legacy stamps cannot change a set, set stamps cannot change legacy routes. Current declarative assignment stays authoritative. registry:FleetBox@2768,registry:FleetBoxes@1265,registry:Region@2559,whole:Route@1187,whole:Route@1679 66e7b52d2548ff14039f1b7add0d81f95b8765d3eff7856922e6f99e0669cad6
-@legacy 37bf1c69ed631e5e8755fcf427823463217524bb8437b9cc274db60c2d0d66da internal/host/fleetbind.go statelessBindingPublisher.publish legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Task 3b: consume the applied record and serving route already read by reconcile, check instance/account/app/assignment/status/fleet/box and exact held coordinator lifetime, then publish the existing binding key. A per-host state cache excludes expiry-only renewals and avoids unchanged binding I/O. No instance-record scan or root exec; no typed record writer added.;rev3=census-ruling-stateless-replicas-2;basis=Slice 3b: existing coordinator authority gates one binding object per host. Set fields come from matching record and route lifetime/revision. Cached assignment/deploy state prevents periodic bucket work; legacy path retains previous encoding with new fields omitted. registry:Account@273,registry:App@302,registry:Assigned@323,registry:Host@250,registry:Provisioned@208,registry:ReplicaIncarnation@1422,registry:ReplicaRevision@1462,registry:ServingVersion@1091,registry:Stateless@155,registry:Status@226 3f9b0440c0c690de0b7f8fba52c05d8f9a4a3e715a39a379fec9890aa7790eab
+@legacy a8ee93afd3373605f4c65e0bb680c44f774c1482fc3d3555cc3c871aa597adba internal/host/fleetbind.go statelessBindingPublisher.publish legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Task 3b: consume the applied record and serving route already read by reconcile, check instance/account/app/assignment/status/fleet/box and exact held coordinator lifetime, then publish the existing binding key. A per-host state cache excludes expiry-only renewals and avoids unchanged binding I/O. No instance-record scan or root exec; no typed record writer added.;rev3=census-ruling-stateless-replicas-2;basis=Final fix I3: delegate unchanged publication checks and writes to publishCurrent, discarding its completion boolean for existing callers. No additional reads or authority. whole:Route@152 fc20462e3f9956092e3facf6c310c7abc51f66983724e138e4a65fa9057f0412
@legacy 122fa7f57714580041b4e16316fc152a4156a94f1caf344f19a385a1a12d5021 internal/provision/forward.go forwardCurrent legacy accepted-legacy accepted-legacy;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 10: compares the existing forward row's declared fields with the wanted one (+registry:Account, App, Channel, Provisioned, RateLimit, Region, Slug, Status, each x2). Pure.;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Task 5): the forward row is current only if FleetLabel also matches and, for a labelled want, FleetBox equals the label (+registry:FleetBox x2, +registry:FleetLabel x3). The hub's forward phase in the agent, not root; it may write a row it skipped before, never fewer checks.;rev3=census-ruling-stateless-replicas-2;basis=Pure comparison covers explicit count/set/revision/lifetime and assigned mode; legacy nil-assignment mode comparison remains unchanged. registry:Account@550,registry:Account@570,registry:App@520,registry:App@536,registry:Channel@624,registry:Channel@644,registry:Copies@137,registry:Copies@156,registry:FleetBox@376,registry:FleetBox@774,registry:FleetBox@795,registry:FleetBoxes@118,registry:FleetBoxes@282,registry:FleetBoxes@351,registry:FleetBoxes@95,registry:FleetLabel@704,registry:FleetLabel@727,registry:FleetLabel@749,registry:Provisioned@442,registry:Provisioned@466,registry:RateLimit@662,registry:RateLimit@684,registry:Region@588,registry:Region@607,registry:ReplicaIncarnation@223,registry:ReplicaIncarnation@254,registry:ReplicaRevision@171,registry:ReplicaRevision@199,registry:Slug@488,registry:Slug@505,registry:Stateless@307,registry:Stateless@329,registry:Status@406,registry:Status@425 35f2010c3c11b810e2a7f06c0575c2d08cf1777b71b091d9c432f1835f187c5a
-@legacy c7132c137adf777c1b2329d599afcfad55c72dbd9ea8afede75da3e3aec7f7fd internal/provision/reconcile.go Reconcile legacy accepted-legacy accepted-legacy;rev3=census-ruling-self-serve-moves-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos), from its reconcile loops: each listed record is observed through the box's lifetime judge (ObserveWith: the record, then its host incarnation slot) before the shape, channel and scope checks, a stale record is left out and an unjudgeable one protected; the removal phase observes a row's own record key when the pass holds none for it under that key, and deletes a held row whose record is gone or stale through DeleteIfHold; a nil judge (claims on) is main's body; registry read sites unchanged, offsets moved; fix round 1: the removal phase observes a row's own key only under an account the listing trusts, so a retired or unmaterialised account's row keeps record gone, and the pass arms its own context with the judge; Task 7: under a judge an existing provisioned row of the record's own app and account follows the existing-row rules (heldByVanishedPredecessor and retireHeldPredecessor's DeleteIfHold first, the record then minted on the same pass; the hold; installRowLifetime), each a separate write under the host's hold lock; registry read sites unchanged, offsets moved;rev3=census-ruling-instance-egress-sizes-328-329;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=#328/#329 plan 1 Task 7: the pass reads its apps' policy objects (control/app-policy/<sqid>/<app>.json in the bucket) through the agent's PolicyCache, each verified with ReleasePub by apppolicy.VerifyKey (ed25519 over the policy's own domain line, bound to the account and app, unexpired, not future-dated; anything else is no policy), and carries the columns into its rows. New kinds registry:EgressAllow, registry:Size and registry:PolicyExpiresAt, one site each, all the assignment of a fresh row's columns (nr) from policies.cols; plus one whole:Route site, the existing row handed to policies.forRow. Other read sites unchanged, offsets moved; the agent's own pass, no root decision;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos, from its reconcile loops: after the scan, hands the in-scope records to cfg.Lifetimes (the box's lifetime index): Merge after a failed read or partial listing, Replace after a complete one, nothing on a dry run or with no index; the scan, judge and removal phases unchanged; the same 166 sites, no read added;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Tasks 2 and 5 (D5, spec §5.0): a seeded record over a row with a runtime is skipped and logged; a row with a runtime (or a new record with one) takes no seed; runtime and a rootfs row's hibernation are never converged from a record (a mismatch is logged; a record claiming a runtime its row lacks is not applied); reads Runtime of the record and the row; the box writes less; fix wave 1 (ceea6353, whole-branch P1-2): before minting a row for a record with no runtime and no row (both mint paths), the pass reads the app's kind marker once per app per pass (release.ReadAppKindMarker: one GET of the create-only kind.json from the release store s, through freshStore, validated by readAppKindMarker); a rootfs marker leaves the record unmaterialized and logged (an older console stripped its runtime), and a marker that cannot be read defers the mint this pass; a refusal before minting only, registry read sites unchanged, the box writes less; fix wave 2 (whole-branch r2 P1): the kind-marker read and its refusal apply only to a socket-backed instance record (DerivesPaths), so a static or upstream-backed record of a rootfs app, which carries no runtime by design, is minted as before with no read; fewer reads, registry read sites unchanged;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 10: the forward phase on the hub (FleetOwners set): the scan keeps the fleet-placed records it skips and counts records per host; a trash-only marker prefetch; disputed (failed-GET) hosts; armed, a host an in-scope and a fleet record both name is given neither, its journal waits and the removal phase keeps its row (+registry:Account, +registry:App, +registry:Host x2: the collision guard, its log line and report mark); the instance loop leaves a forward host; retirable excludes forward rows. Same record keys; writes only the registry (PutForward, DeleteForward); no bucket write.;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Task 4, rules 2 and 9): after inScope, a record failing cfg.ownsRecord (on a fleet box, labelled for another box: rec.FleetBox != "" and != cfg.FleetBox) is skipped as out of scope, so it is never minted here; in the removal phase such a record no longer keeps the row (inScope && ownsRecord), so the row goes as record gone. Off a fleet ownsRecord is always true. Read sites unchanged (178). The agent's reconcile loops, not root; it mints less, never more.;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 3: in the per-record loop, beside the RunSeen call, calls cfg.InteractiveSeen(rec) when the hook is set and the in-scope record carries an interactive-session marker (rec.Interactive != nil), once per record per pass, before the pass acts on it; the hook is the box worker's non-blocking note (Task 12). Same record keys and literal; no read added (registry read sites unchanged, 178); nothing written by the call; merge of origin/main 6f1f6ca6: main's fleet-box ownsRecord skip in the record scan and in the removal phase is kept as main has it (census-ruling-managed-fleets-1b); this branch's change is the same as above; read sites unchanged (178);rev3=census-ruling-stateless-replicas-1;basis=Task 3b: call the optional binding callback only for applied, owned stateless rows outside dry run. Reuses this pass record and route reads after existing collision, scope, hold, policy and shape checks; no new record read or typed writer. Fix 3b round 1 I1: binding callback failure is logged and falls through to pr.applied; same per-host callback, record writers, scope and removal gates. TestStatelessBindingFailureContinuesReconcile covers second-record convergence, removal, applied bookkeeping and next-pass retry.;rev3=census-ruling-region-ha-p1b3b-t;basis=B3b: collect validated instance records from the existing scan before pool filtering; report source completeness separately. Record reads, writes, scope and removal authority unchanged.;rev3=census-ruling-stateless-replicas-2;basis=Slice 3b: reports validated scoped assignments from the existing complete record scan to the worker; validated legacy observations cancel stale queued ACKs after a lost reply and P16 conversion; no termination ACK inferred from route deletion. Existing local removal unchanged. Applied set routes can use the coordinator-gated binding callback. Prior P11/P14 claims remain applicable. merge of origin/main 9b8b2c50: combine departureRecords/departureInvalid with observed replica records; both completeness reporting and replica admission/removal/ACK observation survive. No new record read introduced by resolution. registry:Account@38931,registry:Account@40687,registry:Account@59005,registry:Account@59051,registry:Account@60362,registry:Account@60739,registry:Account@60965,registry:Account@61032,registry:Account@61078,registry:Account@61171,registry:Account@61213,registry:Account@61861,registry:Account@62119,registry:Account@63021,registry:Account@63069,registry:Account@63478,registry:Account@63524,registry:Account@63769,registry:Account@64194,registry:Account@64682,registry:Account@65418,registry:Account@65611,registry:Account@66023,registry:Account@66202,registry:Account@66525,registry:Account@67090,registry:App@38904,registry:App@40660,registry:App@59025,registry:App@59063,registry:App@60374,registry:App@60751,registry:App@60977,registry:App@61052,registry:App@61090,registry:App@61191,registry:App@61873,registry:App@62131,registry:App@63033,registry:App@63081,registry:App@63498,registry:App@63536,registry:App@63781,registry:App@64206,registry:App@64694,registry:App@65430,registry:App@65623,registry:App@66035,registry:App@66214,registry:App@66537,registry:App@67102,registry:Canary@59518,registry:ClaimOwnership@39518,registry:DBPath@48866,registry:DBPath@48881,registry:DBPath@49127,registry:DBPath@49730,registry:DBPath@49743,registry:EgressAllow@38017,registry:FleetBoxes@59479,registry:FleetBoxes@59627,registry:FleetBoxes@65811,registry:Gate@45211,registry:Gate@45351,registry:Gate@45638,registry:Hibernate@43883,registry:Hibernate@44081,registry:Hibernate@44146,registry:Hibernate@44485,registry:Hibernate@44836,registry:Hibernate@45146,registry:HoldOp@30110,registry:HoldOp@65163,registry:HoldOp@65254,registry:HoldOp@65389,registry:HoldOp@65765,registry:Host@28007,registry:Host@30513,registry:Host@30653,registry:Host@58984,registry:Host@59578,registry:Host@60338,registry:Host@60715,registry:Host@60879,registry:Host@60985,registry:Host@61881,registry:Host@62087,registry:Host@63361,registry:Host@63633,registry:Host@63748,registry:Host@64071,registry:Host@64168,registry:Host@64559,registry:Host@64656,registry:Host@64870,registry:Host@65245,registry:Host@65380,registry:Host@65584,registry:Host@65657,registry:Host@65756,registry:Host@65996,registry:Host@66175,registry:Host@66254,registry:Host@66341,registry:Host@66499,registry:Host@66574,registry:Host@66660,registry:Host@67067,registry:Incarnation@30286,registry:Kind@30498,registry:Kind@30638,registry:Kind@39660,registry:Kind@39912,registry:Kind@40194,registry:Kind@40414,registry:Kind@48784,registry:Kind@48797,registry:Kind@48907,registry:Kind@48920,registry:Kind@49641,registry:Kind@49652,registry:Kind@58108,registry:Kind@64861,registry:Kind@65371,registry:Kind@65747,registry:Kind@65987,registry:Kind@66332,registry:Kind@66490,registry:Kind@66651,registry:Platform@59503,registry:PolicyExpiresAt@38042,registry:Pool@58194,registry:Provisioned@38880,registry:Provisioned@40636,registry:Provisioned@58153,registry:RateLimit@45724,registry:RateLimit@45875,registry:RateLimit@46162,registry:Region@58183,registry:ReplicaIncarnation@29994,registry:ReplicaIncarnation@30031,registry:Replication@44570,registry:Replication@44697,registry:Runtime@31682,registry:Runtime@31860,registry:Runtime@34065,registry:Runtime@43250,registry:Runtime@43304,registry:Runtime@43508,registry:Seed@47264,registry:SeedSource@46747,registry:Size@38033,registry:Socket@48832,registry:Socket@48847,registry:Socket@49144,registry:Socket@49700,registry:Socket@49713,registry:Stateless@49801,registry:Unit@48750,registry:Unit@48763,registry:Unit@49667,registry:Unit@49678,whole:ClaimOwnership@39521,whole:ClaimOwnership@39538,whole:Route@27989,whole:Route@28000,whole:Route@28018,whole:Route@29299,whole:Route@29886,whole:Route@30097,whole:Route@30412,whole:Route@30698,whole:Route@30712,whole:Route@30725,whole:Route@30748,whole:Route@32177,whole:Route@32184,whole:Route@32224,whole:Route@32585,whole:Route@32923,whole:Route@33370,whole:Route@33421,whole:Route@33458,whole:Route@35130,whole:Route@35339,whole:Route@35678,whole:Route@35687,whole:Route@35733,whole:Route@37966,whole:Route@38525,whole:Route@38996,whole:Route@39006,whole:Route@39363,whole:Route@39370,whole:Route@39438,whole:Route@39743,whole:Route@39813,whole:Route@39824,whole:Route@40252,whole:Route@41285,whole:Route@44236,whole:Route@48976,whole:Route@49914,whole:Route@50801,whole:Route@50846,whole:Route@50856,whole:Route@51726,whole:Route@52753,whole:Route@58219,whole:Route@58367,whole:Route@59464,whole:Route@59756,whole:Route@60290,whole:Route@60672,whole:Route@62523,whole:Route@65902,whole:Route@66412,whole:Route@66997,whole:Route@67047 7d48c47eb99360cc61d76f155f35c4e2cba2ce7e81a368575b7fed710a89a095
-@legacy d5f43ff3fdf7ad708ef35d9d1bda2d1b55c11ff01e4a6fab82ac26dec22980e5 internal/provision/reconcile.go convergeOwned legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-edge-asset-cache-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): the owned-converge arm gains the asset pair beside steering: when the row's assets_off or asset_gen differs from the record's (Record.AssetsOn, Record.AssetGen), Registry.SetAssets converges both in one UPDATE (dry-run logs only); the new kinds are registry:AssetsOff and registry:AssetGen, three sites each, all existing.AssetsOff and existing.AssetGen (the comparison and the two log lines); it now also returns the converge errors it already logged, joined, so Reconcile's completeness report can tell an applied record from one that was not; no other read is added; the agent's own pass, no root decision;rev3=census-ruling-instance-egress-sizes-328-329;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=#328/#329 plan 1 Task 7: the owned-converge arm gains the app policy: when the row's egress_allow, size or policy_expires_at differs from the pass's columns (ap, only when Known), Registry.SetPolicy writes all three in one UPDATE (dry run logs only), and it reports whether the allow or size moved so Reconcile can call PolicyChanged. New kinds registry:EgressAllow (three sites), registry:Size (three) and registry:PolicyExpiresAt (one), all existing.* of the agent's own row: the comparison and the two log lines; no other read added; the agent's own pass, no root decision;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos: when the record says HA and the existing row does not, marks the row with reg.SetHA (a dry run logs instead; an error is appended to the pass's errors); converges one way only, nothing clears the mark; +registry:HA is existing.HA; keeps legacy;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Task 2): when the row's Assigned or Moved differs from the record's FleetBoxAt or FleetBoxMoved, one reg.SetFleetAssignment call (dry-run logs instead); a failure is logged and counted. Agent provision pass, not root.;rev3=census-ruling-stateless-replicas-2;basis=Slice 3b P16: a legacy record for the same lifetime clears an existing projection through an exact observed-row CAS; refuses changed lifetime or empty FleetBox. Reads supplied record/route only; no new bucket read. registry:Addr@3527,registry:Addr@3749,registry:Addr@4176,registry:Addrs@3554,registry:Addrs@3770,registry:Addrs@4197,registry:AssetGen@5034,registry:AssetGen@5220,registry:AssetGen@5611,registry:AssetsOff@5004,registry:AssetsOff@5194,registry:AssetsOff@5585,registry:Assigned@8317,registry:Assigned@8521,registry:Assigned@8970,registry:Channel@1262,registry:Channel@1392,registry:Channel@1723,registry:Copies@699,registry:Copies@718,registry:EgressAllow@10236,registry:EgressAllow@10492,registry:EgressAllow@10914,registry:Environment@1765,registry:Environment@1907,registry:Environment@2266,registry:FleetBoxes@219,registry:FleetBoxes@657,registry:FleetBoxes@680,registry:HA@7694,registry:Health@3581,registry:Health@3793,registry:Health@4220,registry:Moved@8356,registry:Moved@8540,registry:Moved@8989,registry:PolicyExpiresAt@10317,registry:Replica@7053,registry:Replica@7181,registry:Replica@7513,registry:ReplicaIncarnation@1097,registry:ReplicaIncarnation@342,registry:ReplicaIncarnation@785,registry:ReplicaIncarnation@816,registry:ReplicaIncarnation@906,registry:ReplicaIncarnation@989,registry:ReplicaRevision@733,registry:ReplicaRevision@761,registry:Replicas@6184,registry:Replicas@6309,registry:Replicas@6631,registry:Size@10278,registry:Size@10530,registry:Size@10952,registry:Stateless@844,registry:StatusNamed@2342,registry:StatusNamed@2486,registry:StatusNamed@2850,registry:Steering@4256,registry:Steering@4389,registry:Steering@4727,registry:UpdateSettings@9294,registry:UpdateSettings@9434,registry:UpdateSettings@9794,whole:Route@500,whole:Route@979 ad187116e118cb52b7a24bff3631c35df90cf417124c09da07107af297d541f3
+@legacy f63a9ae6945adc1d993ebd2983d80c55a606a08b096a926cb5f9f3e9c229d6e2 internal/provision/reconcile.go Reconcile legacy accepted-legacy accepted-legacy;rev3=census-ruling-self-serve-moves-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos), from its reconcile loops: each listed record is observed through the box's lifetime judge (ObserveWith: the record, then its host incarnation slot) before the shape, channel and scope checks, a stale record is left out and an unjudgeable one protected; the removal phase observes a row's own record key when the pass holds none for it under that key, and deletes a held row whose record is gone or stale through DeleteIfHold; a nil judge (claims on) is main's body; registry read sites unchanged, offsets moved; fix round 1: the removal phase observes a row's own key only under an account the listing trusts, so a retired or unmaterialised account's row keeps record gone, and the pass arms its own context with the judge; Task 7: under a judge an existing provisioned row of the record's own app and account follows the existing-row rules (heldByVanishedPredecessor and retireHeldPredecessor's DeleteIfHold first, the record then minted on the same pass; the hold; installRowLifetime), each a separate write under the host's hold lock; registry read sites unchanged, offsets moved;rev3=census-ruling-instance-egress-sizes-328-329;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=#328/#329 plan 1 Task 7: the pass reads its apps' policy objects (control/app-policy/<sqid>/<app>.json in the bucket) through the agent's PolicyCache, each verified with ReleasePub by apppolicy.VerifyKey (ed25519 over the policy's own domain line, bound to the account and app, unexpired, not future-dated; anything else is no policy), and carries the columns into its rows. New kinds registry:EgressAllow, registry:Size and registry:PolicyExpiresAt, one site each, all the assignment of a fresh row's columns (nr) from policies.cols; plus one whole:Route site, the existing row handed to policies.forRow. Other read sites unchanged, offsets moved; the agent's own pass, no root decision;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos, from its reconcile loops: after the scan, hands the in-scope records to cfg.Lifetimes (the box's lifetime index): Merge after a failed read or partial listing, Replace after a complete one, nothing on a dry run or with no index; the scan, judge and removal phases unchanged; the same 166 sites, no read added;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Tasks 2 and 5 (D5, spec §5.0): a seeded record over a row with a runtime is skipped and logged; a row with a runtime (or a new record with one) takes no seed; runtime and a rootfs row's hibernation are never converged from a record (a mismatch is logged; a record claiming a runtime its row lacks is not applied); reads Runtime of the record and the row; the box writes less; fix wave 1 (ceea6353, whole-branch P1-2): before minting a row for a record with no runtime and no row (both mint paths), the pass reads the app's kind marker once per app per pass (release.ReadAppKindMarker: one GET of the create-only kind.json from the release store s, through freshStore, validated by readAppKindMarker); a rootfs marker leaves the record unmaterialized and logged (an older console stripped its runtime), and a marker that cannot be read defers the mint this pass; a refusal before minting only, registry read sites unchanged, the box writes less; fix wave 2 (whole-branch r2 P1): the kind-marker read and its refusal apply only to a socket-backed instance record (DerivesPaths), so a static or upstream-backed record of a rootfs app, which carries no runtime by design, is minted as before with no read; fewer reads, registry read sites unchanged;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 10: the forward phase on the hub (FleetOwners set): the scan keeps the fleet-placed records it skips and counts records per host; a trash-only marker prefetch; disputed (failed-GET) hosts; armed, a host an in-scope and a fleet record both name is given neither, its journal waits and the removal phase keeps its row (+registry:Account, +registry:App, +registry:Host x2: the collision guard, its log line and report mark); the instance loop leaves a forward host; retirable excludes forward rows. Same record keys; writes only the registry (PutForward, DeleteForward); no bucket write.;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Task 4, rules 2 and 9): after inScope, a record failing cfg.ownsRecord (on a fleet box, labelled for another box: rec.FleetBox != "" and != cfg.FleetBox) is skipped as out of scope, so it is never minted here; in the removal phase such a record no longer keeps the row (inScope && ownsRecord), so the row goes as record gone. Off a fleet ownsRecord is always true. Read sites unchanged (178). The agent's reconcile loops, not root; it mints less, never more.;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 3: in the per-record loop, beside the RunSeen call, calls cfg.InteractiveSeen(rec) when the hook is set and the in-scope record carries an interactive-session marker (rec.Interactive != nil), once per record per pass, before the pass acts on it; the hook is the box worker's non-blocking note (Task 12). Same record keys and literal; no read added (registry read sites unchanged, 178); nothing written by the call; merge of origin/main 6f1f6ca6: main's fleet-box ownsRecord skip in the record scan and in the removal phase is kept as main has it (census-ruling-managed-fleets-1b); this branch's change is the same as above; read sites unchanged (178);rev3=census-ruling-stateless-replicas-1;basis=Task 3b: call the optional binding callback only for applied, owned stateless rows outside dry run. Reuses this pass record and route reads after existing collision, scope, hold, policy and shape checks; no new record read or typed writer. Fix 3b round 1 I1: binding callback failure is logged and falls through to pr.applied; same per-host callback, record writers, scope and removal gates. TestStatelessBindingFailureContinuesReconcile covers second-record convergence, removal, applied bookkeeping and next-pass retry.;rev3=census-ruling-region-ha-p1b3b-t;basis=B3b: collect validated instance records from the existing scan before pool filtering; report source completeness separately. Record reads, writes, scope and removal authority unchanged.;rev3=census-ruling-stateless-replicas-2;basis=Final fix I1: legacy records now reach the legacy ownership/removal judgement for former set rows; a greater local incarnation remains protected. Current set-record lifetime and membership checks remain. Same record/registry reads and removal writers. TestReplicaReconcileLegacySuccessor covers both boxes with and without the judge; P11 newer/unknown set protections remain covered. registry:Account@38931,registry:Account@40687,registry:Account@59005,registry:Account@59051,registry:Account@60472,registry:Account@60849,registry:Account@61075,registry:Account@61142,registry:Account@61188,registry:Account@61281,registry:Account@61323,registry:Account@61971,registry:Account@62229,registry:Account@63131,registry:Account@63179,registry:Account@63588,registry:Account@63634,registry:Account@63879,registry:Account@64304,registry:Account@64792,registry:Account@65528,registry:Account@65721,registry:Account@66133,registry:Account@66312,registry:Account@66635,registry:Account@67200,registry:App@38904,registry:App@40660,registry:App@59025,registry:App@59063,registry:App@60484,registry:App@60861,registry:App@61087,registry:App@61162,registry:App@61200,registry:App@61301,registry:App@61983,registry:App@62241,registry:App@63143,registry:App@63191,registry:App@63608,registry:App@63646,registry:App@63891,registry:App@64316,registry:App@64804,registry:App@65540,registry:App@65733,registry:App@66145,registry:App@66324,registry:App@66647,registry:App@67212,registry:Canary@59518,registry:ClaimOwnership@39518,registry:DBPath@48866,registry:DBPath@48881,registry:DBPath@49127,registry:DBPath@49730,registry:DBPath@49743,registry:EgressAllow@38017,registry:FleetBoxes@59479,registry:FleetBoxes@59627,registry:FleetBoxes@65921,registry:Gate@45211,registry:Gate@45351,registry:Gate@45638,registry:Hibernate@43883,registry:Hibernate@44081,registry:Hibernate@44146,registry:Hibernate@44485,registry:Hibernate@44836,registry:Hibernate@45146,registry:HoldOp@30110,registry:HoldOp@65273,registry:HoldOp@65364,registry:HoldOp@65499,registry:HoldOp@65875,registry:Host@28007,registry:Host@30513,registry:Host@30653,registry:Host@58984,registry:Host@59578,registry:Host@60448,registry:Host@60825,registry:Host@60989,registry:Host@61095,registry:Host@61991,registry:Host@62197,registry:Host@63471,registry:Host@63743,registry:Host@63858,registry:Host@64181,registry:Host@64278,registry:Host@64669,registry:Host@64766,registry:Host@64980,registry:Host@65355,registry:Host@65490,registry:Host@65694,registry:Host@65767,registry:Host@65866,registry:Host@66106,registry:Host@66285,registry:Host@66364,registry:Host@66451,registry:Host@66609,registry:Host@66684,registry:Host@66770,registry:Host@67177,registry:Incarnation@30286,registry:Incarnation@59696,registry:Kind@30498,registry:Kind@30638,registry:Kind@39660,registry:Kind@39912,registry:Kind@40194,registry:Kind@40414,registry:Kind@48784,registry:Kind@48797,registry:Kind@48907,registry:Kind@48920,registry:Kind@49641,registry:Kind@49652,registry:Kind@58108,registry:Kind@64971,registry:Kind@65481,registry:Kind@65857,registry:Kind@66097,registry:Kind@66442,registry:Kind@66600,registry:Kind@66761,registry:Platform@59503,registry:PolicyExpiresAt@38042,registry:Pool@58194,registry:Provisioned@38880,registry:Provisioned@40636,registry:Provisioned@58153,registry:RateLimit@45724,registry:RateLimit@45875,registry:RateLimit@46162,registry:Region@58183,registry:ReplicaIncarnation@29994,registry:ReplicaIncarnation@30031,registry:Replication@44570,registry:Replication@44697,registry:Runtime@31682,registry:Runtime@31860,registry:Runtime@34065,registry:Runtime@43250,registry:Runtime@43304,registry:Runtime@43508,registry:Seed@47264,registry:SeedSource@46747,registry:Size@38033,registry:Socket@48832,registry:Socket@48847,registry:Socket@49144,registry:Socket@49700,registry:Socket@49713,registry:Stateless@49801,registry:Unit@48750,registry:Unit@48763,registry:Unit@49667,registry:Unit@49678,whole:ClaimOwnership@39521,whole:ClaimOwnership@39538,whole:Route@27989,whole:Route@28000,whole:Route@28018,whole:Route@29299,whole:Route@29886,whole:Route@30097,whole:Route@30412,whole:Route@30698,whole:Route@30712,whole:Route@30725,whole:Route@30748,whole:Route@32177,whole:Route@32184,whole:Route@32224,whole:Route@32585,whole:Route@32923,whole:Route@33370,whole:Route@33421,whole:Route@33458,whole:Route@35130,whole:Route@35339,whole:Route@35678,whole:Route@35687,whole:Route@35733,whole:Route@37966,whole:Route@38525,whole:Route@38996,whole:Route@39006,whole:Route@39363,whole:Route@39370,whole:Route@39438,whole:Route@39743,whole:Route@39813,whole:Route@39824,whole:Route@40252,whole:Route@41285,whole:Route@44236,whole:Route@48976,whole:Route@49914,whole:Route@50801,whole:Route@50846,whole:Route@50856,whole:Route@51726,whole:Route@52753,whole:Route@58219,whole:Route@58367,whole:Route@59464,whole:Route@59834,whole:Route@60400,whole:Route@60782,whole:Route@62633,whole:Route@66012,whole:Route@66522,whole:Route@67107,whole:Route@67157 bd80261427c3f136a15f80e53c1212e841045eb97c32b3d6d944c513346c5a82
+@legacy 4eb536eeede196fc9d6996bd24cce1d7063983ac6ff5bb339030a9d34f615e34 internal/provision/reconcile.go convergeOwned legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-edge-asset-cache-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): the owned-converge arm gains the asset pair beside steering: when the row's assets_off or asset_gen differs from the record's (Record.AssetsOn, Record.AssetGen), Registry.SetAssets converges both in one UPDATE (dry-run logs only); the new kinds are registry:AssetsOff and registry:AssetGen, three sites each, all existing.AssetsOff and existing.AssetGen (the comparison and the two log lines); it now also returns the converge errors it already logged, joined, so Reconcile's completeness report can tell an applied record from one that was not; no other read is added; the agent's own pass, no root decision;rev3=census-ruling-instance-egress-sizes-328-329;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=#328/#329 plan 1 Task 7: the owned-converge arm gains the app policy: when the row's egress_allow, size or policy_expires_at differs from the pass's columns (ap, only when Known), Registry.SetPolicy writes all three in one UPDATE (dry run logs only), and it reports whether the allow or size moved so Reconcile can call PolicyChanged. New kinds registry:EgressAllow (three sites), registry:Size (three) and registry:PolicyExpiresAt (one), all existing.* of the agent's own row: the comparison and the two log lines; no other read added; the agent's own pass, no root decision;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos: when the record says HA and the existing row does not, marks the row with reg.SetHA (a dry run logs instead; an error is appended to the pass's errors); converges one way only, nothing clears the mark; +registry:HA is existing.HA; keeps legacy;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Task 2): when the row's Assigned or Moved differs from the record's FleetBoxAt or FleetBoxMoved, one reg.SetFleetAssignment call (dry-run logs instead); a failure is logged and counted. Agent provision pass, not root.;rev3=census-ruling-stateless-replicas-2;basis=Final fix I1: clear a legacy owned set row when the local incarnation is no greater than the record counter, even when CreatedAt changed its replica hash. Same exact-row ClearReplicaAssignment CAS and member/hold/projection refusals; no new read. A pair installed earlier in a pass invalidates the observed-row CAS and is retried next pass. registry:Account@277,registry:Addr@3564,registry:Addr@3786,registry:Addr@4213,registry:Addrs@3591,registry:Addrs@3807,registry:Addrs@4234,registry:App@312,registry:AssetGen@5071,registry:AssetGen@5257,registry:AssetGen@5648,registry:AssetsOff@5041,registry:AssetsOff@5231,registry:AssetsOff@5622,registry:Assigned@8354,registry:Assigned@8558,registry:Assigned@9007,registry:Channel@1299,registry:Channel@1429,registry:Channel@1760,registry:Copies@736,registry:Copies@755,registry:EgressAllow@10273,registry:EgressAllow@10529,registry:EgressAllow@10951,registry:Environment@1802,registry:Environment@1944,registry:Environment@2303,registry:FleetBoxes@219,registry:FleetBoxes@694,registry:FleetBoxes@717,registry:HA@7731,registry:Health@3618,registry:Health@3830,registry:Health@4257,registry:Host@339,registry:Incarnation@368,registry:Moved@8393,registry:Moved@8577,registry:Moved@9026,registry:PolicyExpiresAt@10354,registry:Provisioned@253,registry:Replica@7090,registry:Replica@7218,registry:Replica@7550,registry:ReplicaIncarnation@1026,registry:ReplicaIncarnation@1134,registry:ReplicaIncarnation@822,registry:ReplicaIncarnation@853,registry:ReplicaIncarnation@943,registry:ReplicaRevision@770,registry:ReplicaRevision@798,registry:Replicas@6221,registry:Replicas@6346,registry:Replicas@6668,registry:Size@10315,registry:Size@10567,registry:Size@10989,registry:Stateless@881,registry:StatusNamed@2379,registry:StatusNamed@2523,registry:StatusNamed@2887,registry:Steering@4293,registry:Steering@4426,registry:Steering@4764,registry:UpdateSettings@9331,registry:UpdateSettings@9471,registry:UpdateSettings@9831,whole:Route@1016,whole:Route@537 6bf48e070116b5662e9cc11ae7fd72a98bdeb42e7e0f5486fd91e9dfa57af279
@legacy 0488f5b1e5085bd4a355c1726dca26aa6189486c20ebf3ff2ecb88ec938de1aa internal/registry/forward.go Registry.PutForward legacy accepted-legacy accepted-legacy;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 2: the only writer of a forward row's declared columns: refuses an argument whose kind is not forward; copies only the declared fields from its argument (Status ready, Provisioned true; no forbidden column is ever written); inside one IMMEDIATE transaction refuses a host a non-forward row holds (ErrHostHeld); keeps FleetBox while Region is unchanged; preserves the observational columns (+file:Exec, +file:QueryRow, +registry:Account, App, Channel, RateLimit, Region, Slug, +registry:Host x3, +registry:Kind, +registry:remote x2, +whole:Route x3, +whole:remoteClient x2).;rev3=census-ruling-fleet-routes-followups;basis=refuses up front, with the new sentinel ErrNotForward and before any read or write, an rt that is not a forward row (as before, now a sentinel), has an empty Host, or whose Region is not a fleet placement (registry.FleetPlacement); +registry:Host x2 and +registry:Region x2 read only the argument in those checks; the transaction and statement are unchanged;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Task 5, rule 3), merged with main's ErrNotForward refusals (kept unchanged): the written row also carries FleetLabel = rt.FleetLabel and FleetBox = rt.FleetLabel; its conflict arm (forwardKept) writes fleet_label from the call and fleet_box as the call's label when set, else kept while the region is unchanged. The hub's forward phase in the agent, not root.;rev3=census-ruling-stateless-replicas-1;basis=Carry declarative Stateless into forward rows under existing transaction and shape guards; projection only.;rev3=census-ruling-stateless-replicas-2;basis=Validates canonical set projection, writes explicit declarative columns and clears single-box binding; all forbidden columns zero. Same transaction/read source. file:Exec@1509,file:QueryRow@1285,registry:Account@754,registry:App@731,registry:Channel@807,registry:Copies@1054,registry:FleetBox@1175,registry:FleetBoxes@1031,registry:FleetBoxes@1152,registry:FleetLabel@1187,registry:FleetLabel@942,registry:FleetLabel@972,registry:Host@1339,registry:Host@197,registry:Host@234,registry:Host@419,registry:Host@655,registry:Kind@206,registry:RateLimit@834,registry:Region@428,registry:Region@781,registry:Region@84,registry:ReplicaIncarnation@1122,registry:ReplicaRevision@1082,registry:Slug@707,registry:Stateless@1002,registry:remote@507,registry:remote@537,whole:Route@1542,whole:Route@592,whole:Route@600,whole:remoteClient@509,whole:remoteClient@539 cf547d7bae134b9ca326bd111378d02214373e65e6107ec809eac5e3aef5e7e7
@legacy 4bc653a2811cb1340e1c5ae87403e3cef0ce97105977adef72ea0e09556e5d9c internal/registry/registry.go scanRoute legacy accepted-legacy accepted-legacy;rev3=census-ruling-seeded-instances;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): main's body with the two new columns scanned;rev3=census-ruling-design-edge-rate-limit-358;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): main's body with the rate_limit column scanned into Route.RateLimit; the new kind is registry:RateLimit, one site; no other read;rev3=census-ruling-rootfs-apps-2;identity=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);basis=main's body with the runtime column scanned into Route.Runtime, before rate_limit; the new kind is registry:Runtime, one site; no other read; re-digested at the merge of origin/main 3c33f2eb: main's assets_off and asset_gen (edge asset cache plan 1) scanned beside runtime and rate_limit; routeColCount 59; re-digested again at the merge of origin/main 953b9fda: main's incarnation and serving_seq (self-serve moves plan 1) scanned after asset_gen; routeColCount 61;rev3=census-ruling-instance-egress-sizes-328-329;identity=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);basis=#328/#329 plan 1 Task 4: main's body with egress_allow, size and policy_expires_at scanned into Route.EgressAllow, Route.Size and Route.PolicyExpiresAt after serving_seq; the new kinds are registry:EgressAllow, registry:Size and registry:PolicyExpiresAt, one site each; routeColCount 64; no other read;rev3=census-ruling-region-ha-p1a;basis=scans one more column, ha, into Route.HA (+registry:HA); routeColCount 64 to 65; keeps legacy;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Tasks 2 and 5): scans three more columns, fleet_assigned, fleet_moved and fleet_label, into Route.Assigned, Moved and FleetLabel. Any root caller of Registry.Get sees three more fields, which no root decision reads (grep: only the activator start rule, edge, provision and registry read them).;rev3=census-ruling-stateless-replicas-1;basis=Decode the additive stateless registry column; no launch authority.;rev3=census-ruling-stateless-replicas-2;basis=Existing row scanner reads four additive SQL columns from the same row and connection. registry:Account@426,registry:Addr@194,registry:Addrs@516,registry:App@269,registry:Args@575,registry:AssetGen@885,registry:AssetsOff@1166,registry:Assigned@981,registry:Backing@351,registry:BuildState@800,registry:Canary@1220,registry:Caps@456,registry:CertExpiresAt@408,registry:Channel@299,registry:ClaimIncarnation@637,registry:ClaimOwner@673,registry:ClaimRowID@688,registry:ClaimStamp@658,registry:Copies@1044,registry:CreatedAt@559,registry:DBPath@230,registry:DNSCheckedAt@391,registry:DNSStatus@377,registry:EgressAllow@931,registry:Environment@440,registry:FleetBox@501,registry:FleetBoxes@1029,registry:FleetLabel@1002,registry:Gate@550,registry:GoodDemand@747,registry:GoodDigest@732,registry:GoodVersion@716,registry:HA@1128,registry:Health@526,registry:Hibernate@1196,registry:HoldOp@703,registry:Host@156,registry:IdleSeconds@584,registry:ImportGate@832,registry:Incarnation@898,registry:Kind@174,registry:LastError@216,registry:MaxRunSeconds@600,registry:Moved@1144,registry:NextDue@339,registry:Platform@1266,registry:PolicyExpiresAt@956,registry:Pool@277,registry:PrevVersion@253,registry:Provisioned@1290,registry:RateLimit@859,registry:Region@288,registry:Replica@1317,registry:ReplicaIncarnation@1075,registry:ReplicaRevision@1055,registry:Replicas@618,registry:Replication@323,registry:Runtime@847,registry:Seed@483,registry:SeedSource@817,registry:ServingSeq@914,registry:ServingVersion@762,registry:Size@947,registry:Slug@165,registry:Socket@183,registry:Stateless@1098,registry:Status@203,registry:StatusNamed@1241,registry:Steering@537,registry:Tunnel@465,registry:Unit@492,registry:UpdateSettings@781,registry:Version@241,whole:Route@1346 a0f26864ffc4267e026c166b681990dad201ce9059b4496c1c6ec0a33f7c8be0
@legacy c5cefae79cb3c213e9f3453e342712fc328e2531f0d25042f2a17c5767a222a5 internal/host/runs.go runsWorker.pickupOwned legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1b3b-t;basis=Gate pickup and detached exec. When the detached gate refuses before exec, finish with the existing RefusedIncarnation result, close the picked sink and forget the active handle. Existing guarded sink Finish and cleanup paths are reused; no new input or path read.;rev3=census-ruling-stateless-replicas-2;basis=merge of origin/main 9b8b2c50: main moved pickup into its HA duty wrapper. Retain the replica membership recheck before main's final dutyStillOwned check and the queued-to-picked CAS; close sink and forget on either refusal. Adds only a whole:Route argument to the existing replica check, no new path source. Detached execution remains under main's WithDuty gate. whole:Route@1200,whole:Route@1287,whole:Route@2053,whole:Route@2127,whole:Route@2395,whole:Route@956 6958c0dab18412fa45d93d0354504f1222c3fe325bfade1e1b13c06ed2aebe4a
@@ -47,9 +48,10 @@ internal/registry/registry.go Registry.Fingerprint legacy accepted-legacy accept
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.;rev3=census-ruling-stateless-replicas-2;basis=P12: existing guarded upsert keeps the whole set and its stateless projection when the incoming row has zero set fields, only for the same tenant. A retenant never inherits a set. Same statement and read sources. file:Exec@116,registry:Host@5987,whole:Route@5863 9bfe70a414c39096e6a5ba4513e47d37ac88236c78f5d34b61517dd3aa066ff9
internal/activator/replicaretirement.go ExecBackend.ReplicaRetirementEmpty legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-2;basis=Slice 3b: read-only local termination proof reads both the host systemd slice cgroup.events via existing CgroupEvents helper and flat host cgroup via existing openHostCgroup. Host comes from a validated scoped record; caller requires absent local route and quiet activator under reconcile exclusion. Any population/read error/no delegation refuses; never kills or touches application data. registry:Backing@128,registry:Host@323,registry:Host@445,registry:Host@76,registry:Unit@111 b0074b0d35bbe9489eb731550d9d49d21e68952c8f7c846244fe89cd23ee663b
internal/activator/wakeidentity.go Service.CheckReplicaAssignment legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-2;basis=Only set rows invoke existing registry/instance-record wake recheck. Legacy returns without reading; not a new polling loop. registry:FleetBoxes@93,whole:Route@169 43e922e015b61f736ed118ad44113802ca1944b676e9586388d6f9e00d691eba
+internal/host/fleetbind.go statelessBindingPublisher.publishCurrent legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-2;basis=Final fix I3: moved existing publish implementation, retaining route, fleet, coordinator, held-authority and projection checks and exact binding path. Returns false for skipped work; true only for the matching cached publication or a successful authority-gated write. No new path, read or writer. registry:Account@288,registry:App@317,registry:Assigned@338,registry:Host@265,registry:Provisioned@223,registry:ReplicaIncarnation@1471,registry:ReplicaRevision@1511,registry:ServingVersion@1134,registry:Stateless@170,registry:Status@241 1a6a65cb4531b1599b6cc6d57a929f2bb08cf1883889993b01f8cc3411baa08e
internal/host/fleetbind.go validReplicaFleetBinding legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-2;basis=Slice 3b: validates canonical boxes, host, fleet, lifetime and exact assignment revision against existing route; local registry fleet owner and active labels must match. No bucket call; no writer. registry:Account@643,registry:Account@657,registry:Copies@481,registry:FleetBoxes@132,registry:FleetBoxes@540,registry:Host@373,registry:Label@856,registry:Region@331,registry:ReplicaIncarnation@188,registry:ReplicaRevision@230,registry:Status@878,whole:FleetBox@842 2c20af701cc19717ba83d02c9361c3a34da18fe68e8fac862deaa9787b025ebb
internal/host/fleetidentity.go recheckReplicaPickup legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-2;basis=Only set rows require a launcher with the activator current-membership check; missing check refuses pickup. Reads supplied Route only. registry:FleetBoxes@98,whole:Route@322 7af336690a854d75b8a68b2f8031f8fb2cbd8441117e73c30610307d8f0dd7ca
-internal/host/replicaplacement.go replicaPlacementWorker.run legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-2;basis=Slice 3b: existing tick processes already-read records with bounded exponential backoff. Reads local registry only. Under reconcile exclusion, absent row plus activator quiet plus both cgroup layouts empty precede authenticated retired API POST for exact lifetime/revision. Members only acquire for the deterministic chosen coordinator; others do no publication. API timeout/cancellation bounds shutdown; successful or fenced ACKs leave the queue, while transient failures retry with backoff. A new record observation can queue a new revision. No new bucket polling. registry:ReplicaIncarnation@1235,registry:ReplicaRevision@1267,whole:Route@1000,whole:Route@1222,whole:Route@1584,whole:Route@848 88bd40ca3d72c93b4973bf294ff1c32ed48d45049bef2964206e611bdcc264d1
+internal/host/replicaplacement.go replicaPlacementWorker.run legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-2;basis=Final fix I3: retain completed lifetime/revision observations and skip their work; only confirmed current binding publication after coordinator acquisition, or existing successful/fenced retirement ACK, completes work. Existing local registry read, authority and retirement checks, and 30-second request deadline remain. No new reads or polling. registry:ReplicaIncarnation@1246,registry:ReplicaRevision@1278,whole:Route@1011,whole:Route@1233,whole:Route@1608,whole:Route@859 212936a21eea1a64a48a7b57130d81db83bc6b6f01032519974205ab10d33c26
internal/provision/forward.go forwardRowFor legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-2;basis=Projects declarative set fields from supplied record; keeps socket, database, execution and all other forbidden fields zero. whole:Route@436,whole:Route@453 9ba6c562aa2b720af029d069b5855b8d1dc32ff76c742c90ad13604f8f19970d
internal/provision/replicaassignment.go projectReplicaAssignment legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-2;basis=P12: pure projection marks a present assignment invalid before validation, so an invalid shape cannot silently become the legacy empty set. No store read or path authority. registry:Copies@465,registry:FleetBox@616,registry:FleetBoxes@254,registry:FleetBoxes@450,registry:FleetLabel@629,registry:ReplicaIncarnation@496,registry:ReplicaRevision@476,registry:Stateless@595 be1287470cf6b9cfbef39e9740c21b461d952b265098d72c9e32c37e6326e383
internal/provision/replicaassignment.go replicaRowLifetimeAllowed legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-2;basis=P11: pure comparison of the already-read record and local route. Requires same owner and managed instance kind; accepts unprojected legacy rows for membership, matching lifetimes, or a proven older monotonic counter. Newer/unknown ordering refuses. registry:Account@145,registry:App@174,registry:Canary@132,registry:FleetBoxes@387,registry:Host@195,registry:Incarnation@218,registry:Kind@92,registry:Platform@117,registry:Provisioned@74,registry:ReplicaIncarnation@410,registry:ReplicaIncarnation@442,whole:Route@495 03c64806b231b7af2844dc47eaeefc52549bbce0e6afd56ed3d103d87f2f42a0
@@ -65,16 +67,16 @@ internal/activator/activator.go Service.doWakeOnce legacy accepted-legacy accept
internal/activator/cmd.go Service.RunCmd legacy accepted-legacy accepted-legacy;rev3=census-ruling-carlos-run;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): admits one run against an awake entry under the agent's own lease, fence and swap checks; it starts nothing itself and root validates what it later names;rev3=census-ruling-edge-request-records;basis=passes nil for begin's new req parameter; no read added;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R: a carlos run is refused with ErrCmdBusy while a release record of the host is open (a.releaseOps[rt.Host], in-memory), as a run already in flight refuses it; new site +registry:Host (that map lookup); adds a refusal only;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a: AfterSettled honoured on every path (called before return on each path that starts no unit, else by the settle that proves the unit gone); a rootfs run is refused as a lost lease (CmdStoppedError StopLeaseLost) when its entry is not under the lease watch (residentWatchedLocked), and, off a.mu, when the replica's in-memory SafeUntil leaves less than oneShotStartLead (oneShotHeadroom); new sites are e.route.Rootfs() and a log line; adds refusals only Task 9 (PF-17): a session (spec.TTY) takes the entry's tty slot and a run its cmd slot (holdSlot), the hold carrying its role (newCmdHold); each is refused only for its own role (holdBusyLocked: ErrCmdBusy or ErrTTYBusy), so a run and a session coexist; a release command (a.releaseOps) refuses a run only, since the session's tty unit is its own; no read added, read sites unchanged Task 12 fix round 1 (Astra P1, incarnation binding): a session (spec.TTY) is refused with ErrCmdIncarnation, under a.mu, at admission (before the hold is attached, so nothing of it runs) and again at the last check before the start, unless the awake entry's row lifetime (e.route.Incarnation) equals spec.Incarnation, the lifetime the box's grant authorized; Task 12 fix round 2 (revised ruling): only a mismatch refuses, and 0 matches 0 (a record and row with no lifetime fields); a run is not checked; refuses more, starts nothing new, no read added beyond the in-memory e.route field (sessionIncarnationLocked);rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Take command/TTY mode from the actual serving generation alongside the existing captured environment; no authority comes from a route flag.;rev3=census-ruling-stateless-replicas-2;basis=Only a set command chains the existing exec gate to the current record membership recheck immediately before exec; preserves caller gate and legacy path. file:Prepare@2688,file:Prepare@2722,registry:FleetBoxes@9308,registry:Host@1502,registry:Host@2098,registry:Host@7932,registry:Host@9168,registry:Kind@437,registry:Stateless@5132,whole:Route@683,whole:Route@8336,whole:Route@869,whole:Route@8800,whole:Route@9497,whole:Route@9538 1c58059ab419d2a1fc1647c031f2e81647c1f892642656134cf1721b4d90d689
internal/activator/cmdunit.go ExecBackend.StartCmd legacy accepted-legacy accepted-legacy;rev3=census-ruling-carlos-run;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): writes launch.cmd.json in the instance's own directory and asks instance control to start the cmd unit; root validates the staged executable it names (refuseStagedExe) and decides the start;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a: after the layout and run-directory checks, a rootfs row returns startRootfsRun (backend_rootfs.go) before nestedGate; the binary path is byte-identical (TestBinaryStartCmdLaunchGolden); new site +whole:Route is rt.Rootfs(); Plan 6 Task 8: a session (spec.TTY): checkCmdLaunch refuses before anything is listened on or written a launch shape (errCmdLaunchShape: process and argv both or neither, a process other than console, a run naming a process, a session with a run directory or streams, an id that is not one path element) and a process on a binary row (errBinaryProcess); then the session verbs (TTYControl) or ErrNoTTY; on a binary row the same nested gate, live link or staged build, launch environment and replica gate as a run; prepare(rt, RoleTTY); the pty and its handoff socket (openTTY) in place of the two streams; launch.tty.json with argv [live link, args...] and childEnv(ttyVars); then TTYControl.TTY, or TTYExe naming the staged build (POST /tty; root Task 6 handler validates it); the run path is unchanged (TestBinaryStartCmdLaunchGolden); new sites are rt to checkCmdLaunch and rt.Host in its error;rev3=census-ruling-stateless-replicas-2;basis=Only a set row invokes the caller's exec gate after binary command launch preparation and before any Cmd/TTY control call. Existing single-copy/stateful command path is unchanged; rootfs commands already invoke the gate. registry:FleetBoxes@2475,registry:Host@1092,registry:Host@1201,registry:Host@1972,registry:Host@2176,registry:Host@218,registry:Host@2404,registry:Host@2693,registry:Host@2767,registry:Host@2841,registry:Host@2915,registry:Host@3299,registry:Host@3432,registry:Host@3468,registry:Host@367,registry:Host@473,registry:Host@685,registry:Host@983,whole:Route@130,whole:Route@1788,whole:Route@1895,whole:Route@2220,whole:Route@2313,whole:Route@2585,whole:Route@298,whole:Route@3233,whole:Route@3237,whole:Route@3519,whole:Route@3523,whole:Route@414,whole:Route@755,whole:Route@792 cf3e3d38b9143532a9821578987c84e0d7dcea85e97a36a6d2aaba585f8081d7
internal/activator/rootfsworkers.go Service.runWorkerStart legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-3-workers;basis=rootfs Plan 3 Group W: one worker start off a.mu: publishes the build's pins, launches through the gate, installs only on the same entry still awake; always ends with the start done and what it started installed, proven gone or a stray;rev3=census-ruling-stateless-replicas-2;basis=Declared stateless set workers use the instance route and existing wake record recheck at actual launch, between two existing local worker gates. No read on a tick without a start, no new reads for stateful or unset assignments. Sidecar entry-point refusal remains. registry:FleetBoxes@2042,registry:Host@1971,registry:Host@2580,registry:Host@2771,registry:Host@3197,whole:Route@1656,whole:Route@2210,whole:Route@2342,whole:Route@2849,whole:Route@3261 924ee9f484d2ae2eaaf1dd250d889cc7f005ddf307aeeafb30874f3003f7fa67
-internal/activator/startrule.go ExecBackend.establishAssignment legacy accepted-legacy accepted-legacy;rev3=census-ruling-managed-fleets-1b;basis=new (Task 3, rule 6): on a labelled row (rt.Assigned set), MkdirAll the instance directory (0700) and write rt.Assigned to <db>.assigned via writeDurable. Unlabelled rows write nothing. Agent as carlos, not root.;rev3=census-ruling-stateless-replicas-2;basis=A set projection refuses this SQLite marker path; verified stateless launches already bypass it. Legacy behavior unchanged. registry:Assigned@207,registry:Assigned@543,registry:FleetBoxes@159,registry:Host@348,registry:Host@463,registry:Host@679 084270cbed04e3ae3d69dd3d0796aad58bb2e1c9a4c57a0a7a9f0e66caebfa21
-internal/activator/startrule.go ExecBackend.reconcileAssignment legacy accepted-legacy accepted-legacy;rev3=census-ruling-managed-fleets-1b;basis=new (Task 3, rule 6): on a labelled row, Lstat the instance dir, read the <db>.assigned marker with instancefs.ReadBeneathLimitOrAbsent (no symlink follow, 128 bytes max), Lstat the database; a copy not kept under rt.Assigned is moved by supersede into <DataDir>/.superseded/<host>/<nanos> (RenameBetweenNoReplace, fsync barriers), never deleted. Any read failure refuses the wake. Agent as carlos in the instance directory, not root.;rev3=census-ruling-stateless-replicas-2;basis=A set projection refuses this SQLite set-aside path before any filesystem read or move. Verified stateless launches bypass it; legacy unchanged. file:Lstat@379,file:Lstat@804,registry:Assigned@1332,registry:Assigned@1429,registry:Assigned@1463,registry:Assigned@207,registry:Assigned@777,registry:FleetBoxes@159,registry:Host@1022,registry:Host@1192,registry:Host@1547,registry:Host@1677,registry:Host@1803,registry:Host@348,registry:Host@542,registry:Host@727 2d3c4b0dc36bc1dee209f00a80c6871543a2b07cfe8f2acef5c2bd8b6ab26782
-internal/activator/startrule.go ExecBackend.startAllowed legacy accepted-legacy accepted-legacy;rev3=census-ruling-managed-fleets-1b;basis=new (Task 3, rule 6): the start rule: an unlabelled or restored start is allowed; a kept local copy must match rt.Assigned in its marker; an empty start of a labelled row is refused (ErrNothingToRestore) when a set-aside entry exists for the host or rt.Moved is set. Only refuses. Agent, not root.;rev3=census-ruling-stateless-replicas-2;basis=A set projection refuses this SQLite empty-start rule; does not turn a route hint into bypass authority. Legacy rule unchanged. registry:Assigned@211,registry:Assigned@668,registry:Assigned@820,registry:FleetBoxes@163,registry:Host@268,registry:Moved@1407,whole:Route@315 c0576b3af038f2a714e43ae6263d259110825f3ea18f5c9798214d7baf6958e4
+internal/activator/startrule.go ExecBackend.establishAssignment legacy accepted-legacy accepted-legacy;rev3=census-ruling-managed-fleets-1b;basis=new (Task 3, rule 6): on a labelled row (rt.Assigned set), MkdirAll the instance directory (0700) and write rt.Assigned to <db>.assigned via writeDurable. Unlabelled rows write nothing. Agent as carlos, not root.;rev3=census-ruling-stateless-replicas-2;basis=A set projection refuses this SQLite marker path; verified stateless launches already bypass it. Legacy behavior unchanged. registry:Assigned@240,registry:Assigned@576,registry:FleetBoxes@192,registry:Host@381,registry:Host@496,registry:Host@712 20268f8d091b76847330eabd820c4842d294f856f68b49b97ffe2def77ffd7b8
+internal/activator/startrule.go ExecBackend.reconcileAssignment legacy accepted-legacy accepted-legacy;rev3=census-ruling-managed-fleets-1b;basis=new (Task 3, rule 6): on a labelled row, Lstat the instance dir, read the <db>.assigned marker with instancefs.ReadBeneathLimitOrAbsent (no symlink follow, 128 bytes max), Lstat the database; a copy not kept under rt.Assigned is moved by supersede into <DataDir>/.superseded/<host>/<nanos> (RenameBetweenNoReplace, fsync barriers), never deleted. Any read failure refuses the wake. Agent as carlos in the instance directory, not root.;rev3=census-ruling-stateless-replicas-2;basis=A set projection refuses this SQLite set-aside path before any filesystem read or move. Verified stateless launches bypass it; legacy unchanged. file:Lstat@412,file:Lstat@837,registry:Assigned@1365,registry:Assigned@1462,registry:Assigned@1496,registry:Assigned@240,registry:Assigned@810,registry:FleetBoxes@192,registry:Host@1055,registry:Host@1225,registry:Host@1580,registry:Host@1710,registry:Host@1836,registry:Host@381,registry:Host@575,registry:Host@760 80bfe6d3bbc36333f0fafc5f959f92238405467016855853656c8ea036b54798
+internal/activator/startrule.go ExecBackend.startAllowed legacy accepted-legacy accepted-legacy;rev3=census-ruling-managed-fleets-1b;basis=new (Task 3, rule 6): the start rule: an unlabelled or restored start is allowed; a kept local copy must match rt.Assigned in its marker; an empty start of a labelled row is refused (ErrNothingToRestore) when a set-aside entry exists for the host or rt.Moved is set. Only refuses. Agent, not root.;rev3=census-ruling-stateless-replicas-2;basis=A set projection refuses this SQLite empty-start rule; does not turn a route hint into bypass authority. Legacy rule unchanged. registry:Assigned@244,registry:Assigned@701,registry:Assigned@853,registry:FleetBoxes@196,registry:Host@301,registry:Moved@1440,whole:Route@348 3f384dd99de5a7ef60bb7cd27c468a2f5f6e4a55186f1302b39ac001d0582552
internal/activator/wakeidentity.go Service.currentWakeRoute legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Extract existing registry and labelled fleet record recheck for reuse without a serving lease; return the observed row and record and refuse a nil record. No writer or new path.;rev3=census-ruling-stateless-replicas-2;basis=Existing registry/record recheck validates canonical set, membership, lifetime, revision, owner and managed stateless shape. Reuses the one wake record read; unknown fleet and malformed projection refuse. registry:Account@1846,registry:App@1871,registry:Assigned@2821,registry:Assigned@3031,registry:Assigned@510,registry:Channel@2015,registry:Copies@2407,registry:Environment@2077,registry:FleetBoxes@1523,registry:FleetBoxes@2357,registry:FleetBoxes@531,registry:FleetBoxes@641,registry:Host@1114,registry:Host@1243,registry:Host@1410,registry:Host@1893,registry:Host@281,registry:Host@2956,registry:Host@379,registry:Host@971,registry:Kind@1592,registry:Region@1918,registry:Region@1949,registry:ReplicaIncarnation@2323,registry:ReplicaRevision@2454,registry:Runtime@2044,whole:Route@1327,whole:Route@229,whole:Route@2751,whole:Route@3056,whole:Route@427,whole:Route@431,whole:Route@488,whole:Route@499,whole:Route@563,whole:Route@721 abf3135d80b76a02b2047a9bcedc85852d38625eab20f550848878485b4d2e16
internal/activator/wakeidentity.go leaseRouteChanged legacy accepted-legacy accepted-legacy;rev3=census-ruling-managed-fleets-1b;basis=new (branch review R1 P1-1): a pure comparison of the row a wake began from (began) with the row doWake read under the lease (now): nil now is a row that is gone; then wakeRouteChanged's identity checks; then Assigned and Moved; then Region. It answers an error naming the change, wrapping errRouteChangedUnderLease, or nil. No read beyond its arguments. Agent, not root; it only refuses.;rev3=census-ruling-stateless-replicas-2;basis=Pure comparison adds set/count/revision/lifetime changes to existing wake fence; no new input source. registry:Assigned@559,registry:Assigned@577,registry:Assigned@771,registry:Assigned@796,registry:Copies@388,registry:Copies@404,registry:FleetBoxes@350,registry:FleetBoxes@370,registry:Host@164,registry:Host@732,registry:Host@940,registry:Moved@593,registry:Moved@608,registry:Moved@785,registry:Moved@812,registry:Region@831,registry:Region@847,registry:Region@979,registry:Region@991,registry:ReplicaIncarnation@466,registry:ReplicaIncarnation@494,registry:ReplicaRevision@418,registry:ReplicaRevision@443,whole:Route@234,whole:Route@242,whole:Route@91 692ba8509b2b5dc40a1bd39bf5038b68c5d8c41e8fdc264a1f4041892d300210
internal/host/fleetbind.go ReconcileFleetBindings legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): §4.5: runs on the hub only (hubArmed); a binding whose object key is not fleetBindingKey(b.Fleet, b.Host) is skipped and logged before anything else; the stamp is SetFleetBoxIf, one conditional write judging placement, kind and active fleet membership at the instant of the write (SetFleetBox removed); a write that changes nothing is logged. Read sites unchanged (3); it stamps less, never more.;rev3=census-ruling-stateless-replicas-2;basis=Slice 3b: same existing binding list/Get. Key checked before join; set bindings validate current local projection and fleet ownership/membership. Legacy stamps cannot change a set, set stamps cannot change legacy routes. Current declarative assignment stays authoritative. registry:FleetBox@2768,registry:FleetBoxes@1265,registry:Region@2559,whole:Route@1187,whole:Route@1679 66e7b52d2548ff14039f1b7add0d81f95b8765d3eff7856922e6f99e0669cad6
-internal/host/fleetbind.go statelessBindingPublisher.publish legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Task 3b: consume the applied record and serving route already read by reconcile, check instance/account/app/assignment/status/fleet/box and exact held coordinator lifetime, then publish the existing binding key. A per-host state cache excludes expiry-only renewals and avoids unchanged binding I/O. No instance-record scan or root exec; no typed record writer added.;rev3=census-ruling-stateless-replicas-2;basis=Slice 3b: existing coordinator authority gates one binding object per host. Set fields come from matching record and route lifetime/revision. Cached assignment/deploy state prevents periodic bucket work; legacy path retains previous encoding with new fields omitted. registry:Account@273,registry:App@302,registry:Assigned@323,registry:Host@250,registry:Provisioned@208,registry:ReplicaIncarnation@1422,registry:ReplicaRevision@1462,registry:ServingVersion@1091,registry:Stateless@155,registry:Status@226 3f9b0440c0c690de0b7f8fba52c05d8f9a4a3e715a39a379fec9890aa7790eab
+internal/host/fleetbind.go statelessBindingPublisher.publish legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Task 3b: consume the applied record and serving route already read by reconcile, check instance/account/app/assignment/status/fleet/box and exact held coordinator lifetime, then publish the existing binding key. A per-host state cache excludes expiry-only renewals and avoids unchanged binding I/O. No instance-record scan or root exec; no typed record writer added.;rev3=census-ruling-stateless-replicas-2;basis=Final fix I3: delegate unchanged publication checks and writes to publishCurrent, discarding its completion boolean for existing callers. No additional reads or authority. whole:Route@152 fc20462e3f9956092e3facf6c310c7abc51f66983724e138e4a65fa9057f0412
internal/provision/forward.go forwardCurrent legacy accepted-legacy accepted-legacy;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 10: compares the existing forward row's declared fields with the wanted one (+registry:Account, App, Channel, Provisioned, RateLimit, Region, Slug, Status, each x2). Pure.;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Task 5): the forward row is current only if FleetLabel also matches and, for a labelled want, FleetBox equals the label (+registry:FleetBox x2, +registry:FleetLabel x3). The hub's forward phase in the agent, not root; it may write a row it skipped before, never fewer checks.;rev3=census-ruling-stateless-replicas-2;basis=Pure comparison covers explicit count/set/revision/lifetime and assigned mode; legacy nil-assignment mode comparison remains unchanged. registry:Account@550,registry:Account@570,registry:App@520,registry:App@536,registry:Channel@624,registry:Channel@644,registry:Copies@137,registry:Copies@156,registry:FleetBox@376,registry:FleetBox@774,registry:FleetBox@795,registry:FleetBoxes@118,registry:FleetBoxes@282,registry:FleetBoxes@351,registry:FleetBoxes@95,registry:FleetLabel@704,registry:FleetLabel@727,registry:FleetLabel@749,registry:Provisioned@442,registry:Provisioned@466,registry:RateLimit@662,registry:RateLimit@684,registry:Region@588,registry:Region@607,registry:ReplicaIncarnation@223,registry:ReplicaIncarnation@254,registry:ReplicaRevision@171,registry:ReplicaRevision@199,registry:Slug@488,registry:Slug@505,registry:Stateless@307,registry:Stateless@329,registry:Status@406,registry:Status@425 35f2010c3c11b810e2a7f06c0575c2d08cf1777b71b091d9c432f1835f187c5a
-internal/provision/reconcile.go Reconcile legacy accepted-legacy accepted-legacy;rev3=census-ruling-self-serve-moves-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos), from its reconcile loops: each listed record is observed through the box's lifetime judge (ObserveWith: the record, then its host incarnation slot) before the shape, channel and scope checks, a stale record is left out and an unjudgeable one protected; the removal phase observes a row's own record key when the pass holds none for it under that key, and deletes a held row whose record is gone or stale through DeleteIfHold; a nil judge (claims on) is main's body; registry read sites unchanged, offsets moved; fix round 1: the removal phase observes a row's own key only under an account the listing trusts, so a retired or unmaterialised account's row keeps record gone, and the pass arms its own context with the judge; Task 7: under a judge an existing provisioned row of the record's own app and account follows the existing-row rules (heldByVanishedPredecessor and retireHeldPredecessor's DeleteIfHold first, the record then minted on the same pass; the hold; installRowLifetime), each a separate write under the host's hold lock; registry read sites unchanged, offsets moved;rev3=census-ruling-instance-egress-sizes-328-329;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=#328/#329 plan 1 Task 7: the pass reads its apps' policy objects (control/app-policy/<sqid>/<app>.json in the bucket) through the agent's PolicyCache, each verified with ReleasePub by apppolicy.VerifyKey (ed25519 over the policy's own domain line, bound to the account and app, unexpired, not future-dated; anything else is no policy), and carries the columns into its rows. New kinds registry:EgressAllow, registry:Size and registry:PolicyExpiresAt, one site each, all the assignment of a fresh row's columns (nr) from policies.cols; plus one whole:Route site, the existing row handed to policies.forRow. Other read sites unchanged, offsets moved; the agent's own pass, no root decision;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos, from its reconcile loops: after the scan, hands the in-scope records to cfg.Lifetimes (the box's lifetime index): Merge after a failed read or partial listing, Replace after a complete one, nothing on a dry run or with no index; the scan, judge and removal phases unchanged; the same 166 sites, no read added;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Tasks 2 and 5 (D5, spec §5.0): a seeded record over a row with a runtime is skipped and logged; a row with a runtime (or a new record with one) takes no seed; runtime and a rootfs row's hibernation are never converged from a record (a mismatch is logged; a record claiming a runtime its row lacks is not applied); reads Runtime of the record and the row; the box writes less; fix wave 1 (ceea6353, whole-branch P1-2): before minting a row for a record with no runtime and no row (both mint paths), the pass reads the app's kind marker once per app per pass (release.ReadAppKindMarker: one GET of the create-only kind.json from the release store s, through freshStore, validated by readAppKindMarker); a rootfs marker leaves the record unmaterialized and logged (an older console stripped its runtime), and a marker that cannot be read defers the mint this pass; a refusal before minting only, registry read sites unchanged, the box writes less; fix wave 2 (whole-branch r2 P1): the kind-marker read and its refusal apply only to a socket-backed instance record (DerivesPaths), so a static or upstream-backed record of a rootfs app, which carries no runtime by design, is minted as before with no read; fewer reads, registry read sites unchanged;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 10: the forward phase on the hub (FleetOwners set): the scan keeps the fleet-placed records it skips and counts records per host; a trash-only marker prefetch; disputed (failed-GET) hosts; armed, a host an in-scope and a fleet record both name is given neither, its journal waits and the removal phase keeps its row (+registry:Account, +registry:App, +registry:Host x2: the collision guard, its log line and report mark); the instance loop leaves a forward host; retirable excludes forward rows. Same record keys; writes only the registry (PutForward, DeleteForward); no bucket write.;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Task 4, rules 2 and 9): after inScope, a record failing cfg.ownsRecord (on a fleet box, labelled for another box: rec.FleetBox != "" and != cfg.FleetBox) is skipped as out of scope, so it is never minted here; in the removal phase such a record no longer keeps the row (inScope && ownsRecord), so the row goes as record gone. Off a fleet ownsRecord is always true. Read sites unchanged (178). The agent's reconcile loops, not root; it mints less, never more.;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 3: in the per-record loop, beside the RunSeen call, calls cfg.InteractiveSeen(rec) when the hook is set and the in-scope record carries an interactive-session marker (rec.Interactive != nil), once per record per pass, before the pass acts on it; the hook is the box worker's non-blocking note (Task 12). Same record keys and literal; no read added (registry read sites unchanged, 178); nothing written by the call; merge of origin/main 6f1f6ca6: main's fleet-box ownsRecord skip in the record scan and in the removal phase is kept as main has it (census-ruling-managed-fleets-1b); this branch's change is the same as above; read sites unchanged (178);rev3=census-ruling-stateless-replicas-1;basis=Task 3b: call the optional binding callback only for applied, owned stateless rows outside dry run. Reuses this pass record and route reads after existing collision, scope, hold, policy and shape checks; no new record read or typed writer. Fix 3b round 1 I1: binding callback failure is logged and falls through to pr.applied; same per-host callback, record writers, scope and removal gates. TestStatelessBindingFailureContinuesReconcile covers second-record convergence, removal, applied bookkeeping and next-pass retry.;rev3=census-ruling-region-ha-p1b3b-t;basis=B3b: collect validated instance records from the existing scan before pool filtering; report source completeness separately. Record reads, writes, scope and removal authority unchanged.;rev3=census-ruling-stateless-replicas-2;basis=Slice 3b: reports validated scoped assignments from the existing complete record scan to the worker; validated legacy observations cancel stale queued ACKs after a lost reply and P16 conversion; no termination ACK inferred from route deletion. Existing local removal unchanged. Applied set routes can use the coordinator-gated binding callback. Prior P11/P14 claims remain applicable. merge of origin/main 9b8b2c50: combine departureRecords/departureInvalid with observed replica records; both completeness reporting and replica admission/removal/ACK observation survive. No new record read introduced by resolution. registry:Account@38931,registry:Account@40687,registry:Account@59005,registry:Account@59051,registry:Account@60362,registry:Account@60739,registry:Account@60965,registry:Account@61032,registry:Account@61078,registry:Account@61171,registry:Account@61213,registry:Account@61861,registry:Account@62119,registry:Account@63021,registry:Account@63069,registry:Account@63478,registry:Account@63524,registry:Account@63769,registry:Account@64194,registry:Account@64682,registry:Account@65418,registry:Account@65611,registry:Account@66023,registry:Account@66202,registry:Account@66525,registry:Account@67090,registry:App@38904,registry:App@40660,registry:App@59025,registry:App@59063,registry:App@60374,registry:App@60751,registry:App@60977,registry:App@61052,registry:App@61090,registry:App@61191,registry:App@61873,registry:App@62131,registry:App@63033,registry:App@63081,registry:App@63498,registry:App@63536,registry:App@63781,registry:App@64206,registry:App@64694,registry:App@65430,registry:App@65623,registry:App@66035,registry:App@66214,registry:App@66537,registry:App@67102,registry:Canary@59518,registry:ClaimOwnership@39518,registry:DBPath@48866,registry:DBPath@48881,registry:DBPath@49127,registry:DBPath@49730,registry:DBPath@49743,registry:EgressAllow@38017,registry:FleetBoxes@59479,registry:FleetBoxes@59627,registry:FleetBoxes@65811,registry:Gate@45211,registry:Gate@45351,registry:Gate@45638,registry:Hibernate@43883,registry:Hibernate@44081,registry:Hibernate@44146,registry:Hibernate@44485,registry:Hibernate@44836,registry:Hibernate@45146,registry:HoldOp@30110,registry:HoldOp@65163,registry:HoldOp@65254,registry:HoldOp@65389,registry:HoldOp@65765,registry:Host@28007,registry:Host@30513,registry:Host@30653,registry:Host@58984,registry:Host@59578,registry:Host@60338,registry:Host@60715,registry:Host@60879,registry:Host@60985,registry:Host@61881,registry:Host@62087,registry:Host@63361,registry:Host@63633,registry:Host@63748,registry:Host@64071,registry:Host@64168,registry:Host@64559,registry:Host@64656,registry:Host@64870,registry:Host@65245,registry:Host@65380,registry:Host@65584,registry:Host@65657,registry:Host@65756,registry:Host@65996,registry:Host@66175,registry:Host@66254,registry:Host@66341,registry:Host@66499,registry:Host@66574,registry:Host@66660,registry:Host@67067,registry:Incarnation@30286,registry:Kind@30498,registry:Kind@30638,registry:Kind@39660,registry:Kind@39912,registry:Kind@40194,registry:Kind@40414,registry:Kind@48784,registry:Kind@48797,registry:Kind@48907,registry:Kind@48920,registry:Kind@49641,registry:Kind@49652,registry:Kind@58108,registry:Kind@64861,registry:Kind@65371,registry:Kind@65747,registry:Kind@65987,registry:Kind@66332,registry:Kind@66490,registry:Kind@66651,registry:Platform@59503,registry:PolicyExpiresAt@38042,registry:Pool@58194,registry:Provisioned@38880,registry:Provisioned@40636,registry:Provisioned@58153,registry:RateLimit@45724,registry:RateLimit@45875,registry:RateLimit@46162,registry:Region@58183,registry:ReplicaIncarnation@29994,registry:ReplicaIncarnation@30031,registry:Replication@44570,registry:Replication@44697,registry:Runtime@31682,registry:Runtime@31860,registry:Runtime@34065,registry:Runtime@43250,registry:Runtime@43304,registry:Runtime@43508,registry:Seed@47264,registry:SeedSource@46747,registry:Size@38033,registry:Socket@48832,registry:Socket@48847,registry:Socket@49144,registry:Socket@49700,registry:Socket@49713,registry:Stateless@49801,registry:Unit@48750,registry:Unit@48763,registry:Unit@49667,registry:Unit@49678,whole:ClaimOwnership@39521,whole:ClaimOwnership@39538,whole:Route@27989,whole:Route@28000,whole:Route@28018,whole:Route@29299,whole:Route@29886,whole:Route@30097,whole:Route@30412,whole:Route@30698,whole:Route@30712,whole:Route@30725,whole:Route@30748,whole:Route@32177,whole:Route@32184,whole:Route@32224,whole:Route@32585,whole:Route@32923,whole:Route@33370,whole:Route@33421,whole:Route@33458,whole:Route@35130,whole:Route@35339,whole:Route@35678,whole:Route@35687,whole:Route@35733,whole:Route@37966,whole:Route@38525,whole:Route@38996,whole:Route@39006,whole:Route@39363,whole:Route@39370,whole:Route@39438,whole:Route@39743,whole:Route@39813,whole:Route@39824,whole:Route@40252,whole:Route@41285,whole:Route@44236,whole:Route@48976,whole:Route@49914,whole:Route@50801,whole:Route@50846,whole:Route@50856,whole:Route@51726,whole:Route@52753,whole:Route@58219,whole:Route@58367,whole:Route@59464,whole:Route@59756,whole:Route@60290,whole:Route@60672,whole:Route@62523,whole:Route@65902,whole:Route@66412,whole:Route@66997,whole:Route@67047 7d48c47eb99360cc61d76f155f35c4e2cba2ce7e81a368575b7fed710a89a095
-internal/provision/reconcile.go convergeOwned legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-edge-asset-cache-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): the owned-converge arm gains the asset pair beside steering: when the row's assets_off or asset_gen differs from the record's (Record.AssetsOn, Record.AssetGen), Registry.SetAssets converges both in one UPDATE (dry-run logs only); the new kinds are registry:AssetsOff and registry:AssetGen, three sites each, all existing.AssetsOff and existing.AssetGen (the comparison and the two log lines); it now also returns the converge errors it already logged, joined, so Reconcile's completeness report can tell an applied record from one that was not; no other read is added; the agent's own pass, no root decision;rev3=census-ruling-instance-egress-sizes-328-329;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=#328/#329 plan 1 Task 7: the owned-converge arm gains the app policy: when the row's egress_allow, size or policy_expires_at differs from the pass's columns (ap, only when Known), Registry.SetPolicy writes all three in one UPDATE (dry run logs only), and it reports whether the allow or size moved so Reconcile can call PolicyChanged. New kinds registry:EgressAllow (three sites), registry:Size (three) and registry:PolicyExpiresAt (one), all existing.* of the agent's own row: the comparison and the two log lines; no other read added; the agent's own pass, no root decision;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos: when the record says HA and the existing row does not, marks the row with reg.SetHA (a dry run logs instead; an error is appended to the pass's errors); converges one way only, nothing clears the mark; +registry:HA is existing.HA; keeps legacy;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Task 2): when the row's Assigned or Moved differs from the record's FleetBoxAt or FleetBoxMoved, one reg.SetFleetAssignment call (dry-run logs instead); a failure is logged and counted. Agent provision pass, not root.;rev3=census-ruling-stateless-replicas-2;basis=Slice 3b P16: a legacy record for the same lifetime clears an existing projection through an exact observed-row CAS; refuses changed lifetime or empty FleetBox. Reads supplied record/route only; no new bucket read. registry:Addr@3527,registry:Addr@3749,registry:Addr@4176,registry:Addrs@3554,registry:Addrs@3770,registry:Addrs@4197,registry:AssetGen@5034,registry:AssetGen@5220,registry:AssetGen@5611,registry:AssetsOff@5004,registry:AssetsOff@5194,registry:AssetsOff@5585,registry:Assigned@8317,registry:Assigned@8521,registry:Assigned@8970,registry:Channel@1262,registry:Channel@1392,registry:Channel@1723,registry:Copies@699,registry:Copies@718,registry:EgressAllow@10236,registry:EgressAllow@10492,registry:EgressAllow@10914,registry:Environment@1765,registry:Environment@1907,registry:Environment@2266,registry:FleetBoxes@219,registry:FleetBoxes@657,registry:FleetBoxes@680,registry:HA@7694,registry:Health@3581,registry:Health@3793,registry:Health@4220,registry:Moved@8356,registry:Moved@8540,registry:Moved@8989,registry:PolicyExpiresAt@10317,registry:Replica@7053,registry:Replica@7181,registry:Replica@7513,registry:ReplicaIncarnation@1097,registry:ReplicaIncarnation@342,registry:ReplicaIncarnation@785,registry:ReplicaIncarnation@816,registry:ReplicaIncarnation@906,registry:ReplicaIncarnation@989,registry:ReplicaRevision@733,registry:ReplicaRevision@761,registry:Replicas@6184,registry:Replicas@6309,registry:Replicas@6631,registry:Size@10278,registry:Size@10530,registry:Size@10952,registry:Stateless@844,registry:StatusNamed@2342,registry:StatusNamed@2486,registry:StatusNamed@2850,registry:Steering@4256,registry:Steering@4389,registry:Steering@4727,registry:UpdateSettings@9294,registry:UpdateSettings@9434,registry:UpdateSettings@9794,whole:Route@500,whole:Route@979 ad187116e118cb52b7a24bff3631c35df90cf417124c09da07107af297d541f3
+internal/provision/reconcile.go Reconcile legacy accepted-legacy accepted-legacy;rev3=census-ruling-self-serve-moves-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos), from its reconcile loops: each listed record is observed through the box's lifetime judge (ObserveWith: the record, then its host incarnation slot) before the shape, channel and scope checks, a stale record is left out and an unjudgeable one protected; the removal phase observes a row's own record key when the pass holds none for it under that key, and deletes a held row whose record is gone or stale through DeleteIfHold; a nil judge (claims on) is main's body; registry read sites unchanged, offsets moved; fix round 1: the removal phase observes a row's own key only under an account the listing trusts, so a retired or unmaterialised account's row keeps record gone, and the pass arms its own context with the judge; Task 7: under a judge an existing provisioned row of the record's own app and account follows the existing-row rules (heldByVanishedPredecessor and retireHeldPredecessor's DeleteIfHold first, the record then minted on the same pass; the hold; installRowLifetime), each a separate write under the host's hold lock; registry read sites unchanged, offsets moved;rev3=census-ruling-instance-egress-sizes-328-329;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=#328/#329 plan 1 Task 7: the pass reads its apps' policy objects (control/app-policy/<sqid>/<app>.json in the bucket) through the agent's PolicyCache, each verified with ReleasePub by apppolicy.VerifyKey (ed25519 over the policy's own domain line, bound to the account and app, unexpired, not future-dated; anything else is no policy), and carries the columns into its rows. New kinds registry:EgressAllow, registry:Size and registry:PolicyExpiresAt, one site each, all the assignment of a fresh row's columns (nr) from policies.cols; plus one whole:Route site, the existing row handed to policies.forRow. Other read sites unchanged, offsets moved; the agent's own pass, no root decision;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos, from its reconcile loops: after the scan, hands the in-scope records to cfg.Lifetimes (the box's lifetime index): Merge after a failed read or partial listing, Replace after a complete one, nothing on a dry run or with no index; the scan, judge and removal phases unchanged; the same 166 sites, no read added;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Tasks 2 and 5 (D5, spec §5.0): a seeded record over a row with a runtime is skipped and logged; a row with a runtime (or a new record with one) takes no seed; runtime and a rootfs row's hibernation are never converged from a record (a mismatch is logged; a record claiming a runtime its row lacks is not applied); reads Runtime of the record and the row; the box writes less; fix wave 1 (ceea6353, whole-branch P1-2): before minting a row for a record with no runtime and no row (both mint paths), the pass reads the app's kind marker once per app per pass (release.ReadAppKindMarker: one GET of the create-only kind.json from the release store s, through freshStore, validated by readAppKindMarker); a rootfs marker leaves the record unmaterialized and logged (an older console stripped its runtime), and a marker that cannot be read defers the mint this pass; a refusal before minting only, registry read sites unchanged, the box writes less; fix wave 2 (whole-branch r2 P1): the kind-marker read and its refusal apply only to a socket-backed instance record (DerivesPaths), so a static or upstream-backed record of a rootfs app, which carries no runtime by design, is minted as before with no read; fewer reads, registry read sites unchanged;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 10: the forward phase on the hub (FleetOwners set): the scan keeps the fleet-placed records it skips and counts records per host; a trash-only marker prefetch; disputed (failed-GET) hosts; armed, a host an in-scope and a fleet record both name is given neither, its journal waits and the removal phase keeps its row (+registry:Account, +registry:App, +registry:Host x2: the collision guard, its log line and report mark); the instance loop leaves a forward host; retirable excludes forward rows. Same record keys; writes only the registry (PutForward, DeleteForward); no bucket write.;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Task 4, rules 2 and 9): after inScope, a record failing cfg.ownsRecord (on a fleet box, labelled for another box: rec.FleetBox != "" and != cfg.FleetBox) is skipped as out of scope, so it is never minted here; in the removal phase such a record no longer keeps the row (inScope && ownsRecord), so the row goes as record gone. Off a fleet ownsRecord is always true. Read sites unchanged (178). The agent's reconcile loops, not root; it mints less, never more.;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 3: in the per-record loop, beside the RunSeen call, calls cfg.InteractiveSeen(rec) when the hook is set and the in-scope record carries an interactive-session marker (rec.Interactive != nil), once per record per pass, before the pass acts on it; the hook is the box worker's non-blocking note (Task 12). Same record keys and literal; no read added (registry read sites unchanged, 178); nothing written by the call; merge of origin/main 6f1f6ca6: main's fleet-box ownsRecord skip in the record scan and in the removal phase is kept as main has it (census-ruling-managed-fleets-1b); this branch's change is the same as above; read sites unchanged (178);rev3=census-ruling-stateless-replicas-1;basis=Task 3b: call the optional binding callback only for applied, owned stateless rows outside dry run. Reuses this pass record and route reads after existing collision, scope, hold, policy and shape checks; no new record read or typed writer. Fix 3b round 1 I1: binding callback failure is logged and falls through to pr.applied; same per-host callback, record writers, scope and removal gates. TestStatelessBindingFailureContinuesReconcile covers second-record convergence, removal, applied bookkeeping and next-pass retry.;rev3=census-ruling-region-ha-p1b3b-t;basis=B3b: collect validated instance records from the existing scan before pool filtering; report source completeness separately. Record reads, writes, scope and removal authority unchanged.;rev3=census-ruling-stateless-replicas-2;basis=Final fix I1: legacy records now reach the legacy ownership/removal judgement for former set rows; a greater local incarnation remains protected. Current set-record lifetime and membership checks remain. Same record/registry reads and removal writers. TestReplicaReconcileLegacySuccessor covers both boxes with and without the judge; P11 newer/unknown set protections remain covered. registry:Account@38931,registry:Account@40687,registry:Account@59005,registry:Account@59051,registry:Account@60472,registry:Account@60849,registry:Account@61075,registry:Account@61142,registry:Account@61188,registry:Account@61281,registry:Account@61323,registry:Account@61971,registry:Account@62229,registry:Account@63131,registry:Account@63179,registry:Account@63588,registry:Account@63634,registry:Account@63879,registry:Account@64304,registry:Account@64792,registry:Account@65528,registry:Account@65721,registry:Account@66133,registry:Account@66312,registry:Account@66635,registry:Account@67200,registry:App@38904,registry:App@40660,registry:App@59025,registry:App@59063,registry:App@60484,registry:App@60861,registry:App@61087,registry:App@61162,registry:App@61200,registry:App@61301,registry:App@61983,registry:App@62241,registry:App@63143,registry:App@63191,registry:App@63608,registry:App@63646,registry:App@63891,registry:App@64316,registry:App@64804,registry:App@65540,registry:App@65733,registry:App@66145,registry:App@66324,registry:App@66647,registry:App@67212,registry:Canary@59518,registry:ClaimOwnership@39518,registry:DBPath@48866,registry:DBPath@48881,registry:DBPath@49127,registry:DBPath@49730,registry:DBPath@49743,registry:EgressAllow@38017,registry:FleetBoxes@59479,registry:FleetBoxes@59627,registry:FleetBoxes@65921,registry:Gate@45211,registry:Gate@45351,registry:Gate@45638,registry:Hibernate@43883,registry:Hibernate@44081,registry:Hibernate@44146,registry:Hibernate@44485,registry:Hibernate@44836,registry:Hibernate@45146,registry:HoldOp@30110,registry:HoldOp@65273,registry:HoldOp@65364,registry:HoldOp@65499,registry:HoldOp@65875,registry:Host@28007,registry:Host@30513,registry:Host@30653,registry:Host@58984,registry:Host@59578,registry:Host@60448,registry:Host@60825,registry:Host@60989,registry:Host@61095,registry:Host@61991,registry:Host@62197,registry:Host@63471,registry:Host@63743,registry:Host@63858,registry:Host@64181,registry:Host@64278,registry:Host@64669,registry:Host@64766,registry:Host@64980,registry:Host@65355,registry:Host@65490,registry:Host@65694,registry:Host@65767,registry:Host@65866,registry:Host@66106,registry:Host@66285,registry:Host@66364,registry:Host@66451,registry:Host@66609,registry:Host@66684,registry:Host@66770,registry:Host@67177,registry:Incarnation@30286,registry:Incarnation@59696,registry:Kind@30498,registry:Kind@30638,registry:Kind@39660,registry:Kind@39912,registry:Kind@40194,registry:Kind@40414,registry:Kind@48784,registry:Kind@48797,registry:Kind@48907,registry:Kind@48920,registry:Kind@49641,registry:Kind@49652,registry:Kind@58108,registry:Kind@64971,registry:Kind@65481,registry:Kind@65857,registry:Kind@66097,registry:Kind@66442,registry:Kind@66600,registry:Kind@66761,registry:Platform@59503,registry:PolicyExpiresAt@38042,registry:Pool@58194,registry:Provisioned@38880,registry:Provisioned@40636,registry:Provisioned@58153,registry:RateLimit@45724,registry:RateLimit@45875,registry:RateLimit@46162,registry:Region@58183,registry:ReplicaIncarnation@29994,registry:ReplicaIncarnation@30031,registry:Replication@44570,registry:Replication@44697,registry:Runtime@31682,registry:Runtime@31860,registry:Runtime@34065,registry:Runtime@43250,registry:Runtime@43304,registry:Runtime@43508,registry:Seed@47264,registry:SeedSource@46747,registry:Size@38033,registry:Socket@48832,registry:Socket@48847,registry:Socket@49144,registry:Socket@49700,registry:Socket@49713,registry:Stateless@49801,registry:Unit@48750,registry:Unit@48763,registry:Unit@49667,registry:Unit@49678,whole:ClaimOwnership@39521,whole:ClaimOwnership@39538,whole:Route@27989,whole:Route@28000,whole:Route@28018,whole:Route@29299,whole:Route@29886,whole:Route@30097,whole:Route@30412,whole:Route@30698,whole:Route@30712,whole:Route@30725,whole:Route@30748,whole:Route@32177,whole:Route@32184,whole:Route@32224,whole:Route@32585,whole:Route@32923,whole:Route@33370,whole:Route@33421,whole:Route@33458,whole:Route@35130,whole:Route@35339,whole:Route@35678,whole:Route@35687,whole:Route@35733,whole:Route@37966,whole:Route@38525,whole:Route@38996,whole:Route@39006,whole:Route@39363,whole:Route@39370,whole:Route@39438,whole:Route@39743,whole:Route@39813,whole:Route@39824,whole:Route@40252,whole:Route@41285,whole:Route@44236,whole:Route@48976,whole:Route@49914,whole:Route@50801,whole:Route@50846,whole:Route@50856,whole:Route@51726,whole:Route@52753,whole:Route@58219,whole:Route@58367,whole:Route@59464,whole:Route@59834,whole:Route@60400,whole:Route@60782,whole:Route@62633,whole:Route@66012,whole:Route@66522,whole:Route@67107,whole:Route@67157 bd80261427c3f136a15f80e53c1212e841045eb97c32b3d6d944c513346c5a82
+internal/provision/reconcile.go convergeOwned legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-edge-asset-cache-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): the owned-converge arm gains the asset pair beside steering: when the row's assets_off or asset_gen differs from the record's (Record.AssetsOn, Record.AssetGen), Registry.SetAssets converges both in one UPDATE (dry-run logs only); the new kinds are registry:AssetsOff and registry:AssetGen, three sites each, all existing.AssetsOff and existing.AssetGen (the comparison and the two log lines); it now also returns the converge errors it already logged, joined, so Reconcile's completeness report can tell an applied record from one that was not; no other read is added; the agent's own pass, no root decision;rev3=census-ruling-instance-egress-sizes-328-329;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=#328/#329 plan 1 Task 7: the owned-converge arm gains the app policy: when the row's egress_allow, size or policy_expires_at differs from the pass's columns (ap, only when Known), Registry.SetPolicy writes all three in one UPDATE (dry run logs only), and it reports whether the allow or size moved so Reconcile can call PolicyChanged. New kinds registry:EgressAllow (three sites), registry:Size (three) and registry:PolicyExpiresAt (one), all existing.* of the agent's own row: the comparison and the two log lines; no other read added; the agent's own pass, no root decision;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos: when the record says HA and the existing row does not, marks the row with reg.SetHA (a dry run logs instead; an error is appended to the pass's errors); converges one way only, nothing clears the mark; +registry:HA is existing.HA; keeps legacy;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Task 2): when the row's Assigned or Moved differs from the record's FleetBoxAt or FleetBoxMoved, one reg.SetFleetAssignment call (dry-run logs instead); a failure is logged and counted. Agent provision pass, not root.;rev3=census-ruling-stateless-replicas-2;basis=Final fix I1: clear a legacy owned set row when the local incarnation is no greater than the record counter, even when CreatedAt changed its replica hash. Same exact-row ClearReplicaAssignment CAS and member/hold/projection refusals; no new read. A pair installed earlier in a pass invalidates the observed-row CAS and is retried next pass. registry:Account@277,registry:Addr@3564,registry:Addr@3786,registry:Addr@4213,registry:Addrs@3591,registry:Addrs@3807,registry:Addrs@4234,registry:App@312,registry:AssetGen@5071,registry:AssetGen@5257,registry:AssetGen@5648,registry:AssetsOff@5041,registry:AssetsOff@5231,registry:AssetsOff@5622,registry:Assigned@8354,registry:Assigned@8558,registry:Assigned@9007,registry:Channel@1299,registry:Channel@1429,registry:Channel@1760,registry:Copies@736,registry:Copies@755,registry:EgressAllow@10273,registry:EgressAllow@10529,registry:EgressAllow@10951,registry:Environment@1802,registry:Environment@1944,registry:Environment@2303,registry:FleetBoxes@219,registry:FleetBoxes@694,registry:FleetBoxes@717,registry:HA@7731,registry:Health@3618,registry:Health@3830,registry:Health@4257,registry:Host@339,registry:Incarnation@368,registry:Moved@8393,registry:Moved@8577,registry:Moved@9026,registry:PolicyExpiresAt@10354,registry:Provisioned@253,registry:Replica@7090,registry:Replica@7218,registry:Replica@7550,registry:ReplicaIncarnation@1026,registry:ReplicaIncarnation@1134,registry:ReplicaIncarnation@822,registry:ReplicaIncarnation@853,registry:ReplicaIncarnation@943,registry:ReplicaRevision@770,registry:ReplicaRevision@798,registry:Replicas@6221,registry:Replicas@6346,registry:Replicas@6668,registry:Size@10315,registry:Size@10567,registry:Size@10989,registry:Stateless@881,registry:StatusNamed@2379,registry:StatusNamed@2523,registry:StatusNamed@2887,registry:Steering@4293,registry:Steering@4426,registry:Steering@4764,registry:UpdateSettings@9331,registry:UpdateSettings@9471,registry:UpdateSettings@9831,whole:Route@1016,whole:Route@537 6bf48e070116b5662e9cc11ae7fd72a98bdeb42e7e0f5486fd91e9dfa57af279
internal/registry/forward.go Registry.PutForward legacy accepted-legacy accepted-legacy;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 2: the only writer of a forward row's declared columns: refuses an argument whose kind is not forward; copies only the declared fields from its argument (Status ready, Provisioned true; no forbidden column is ever written); inside one IMMEDIATE transaction refuses a host a non-forward row holds (ErrHostHeld); keeps FleetBox while Region is unchanged; preserves the observational columns (+file:Exec, +file:QueryRow, +registry:Account, App, Channel, RateLimit, Region, Slug, +registry:Host x3, +registry:Kind, +registry:remote x2, +whole:Route x3, +whole:remoteClient x2).;rev3=census-ruling-fleet-routes-followups;basis=refuses up front, with the new sentinel ErrNotForward and before any read or write, an rt that is not a forward row (as before, now a sentinel), has an empty Host, or whose Region is not a fleet placement (registry.FleetPlacement); +registry:Host x2 and +registry:Region x2 read only the argument in those checks; the transaction and statement are unchanged;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Task 5, rule 3), merged with main's ErrNotForward refusals (kept unchanged): the written row also carries FleetLabel = rt.FleetLabel and FleetBox = rt.FleetLabel; its conflict arm (forwardKept) writes fleet_label from the call and fleet_box as the call's label when set, else kept while the region is unchanged. The hub's forward phase in the agent, not root.;rev3=census-ruling-stateless-replicas-1;basis=Carry declarative Stateless into forward rows under existing transaction and shape guards; projection only.;rev3=census-ruling-stateless-replicas-2;basis=Validates canonical set projection, writes explicit declarative columns and clears single-box binding; all forbidden columns zero. Same transaction/read source. file:Exec@1509,file:QueryRow@1285,registry:Account@754,registry:App@731,registry:Channel@807,registry:Copies@1054,registry:FleetBox@1175,registry:FleetBoxes@1031,registry:FleetBoxes@1152,registry:FleetLabel@1187,registry:FleetLabel@942,registry:FleetLabel@972,registry:Host@1339,registry:Host@197,registry:Host@234,registry:Host@419,registry:Host@655,registry:Kind@206,registry:RateLimit@834,registry:Region@428,registry:Region@781,registry:Region@84,registry:ReplicaIncarnation@1122,registry:ReplicaRevision@1082,registry:Slug@707,registry:Stateless@1002,registry:remote@507,registry:remote@537,whole:Route@1542,whole:Route@592,whole:Route@600,whole:remoteClient@509,whole:remoteClient@539 cf547d7bae134b9ca326bd111378d02214373e65e6107ec809eac5e3aef5e7e7
internal/registry/registry.go routeArgs authority E3 rev3=census-ruling-seeded-instances;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), wherever a route is inserted: Upsert, the cold handover restore and the import journal's inserts: the bind list from Registry.Upsert's body (and RestoreClaimRows'), with seed_source and import_gate added; E3, the same family as Registry.Upsert, whose body it came from;rev3=census-ruling-design-edge-rate-limit-358;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), wherever a route is inserted: the bind list gains t.RateLimit for the new rate_limit column (routeCols and Upsert's conflict clause gain it too); the new kind is registry:RateLimit, one site; it binds the value and decides nothing; E3, as before;rev3=census-ruling-rootfs-apps-2;identity=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);basis=the bind list gains t.Runtime for the new runtime column (routeCols, routeColCount 57 with main's rate_limit, and Upsert's conflict clause gain it too); the new kind is registry:Runtime, one site; it binds the value and decides nothing; E3, as before; re-digested at the merge of origin/main 3c33f2eb: main's assets_off and asset_gen (edge asset cache plan 1) bound beside runtime and rate_limit; routeColCount 59; re-digested again at the merge of origin/main 953b9fda: main's incarnation and serving_seq (self-serve moves plan 1) bound after asset_gen; routeColCount 61;rev3=census-ruling-instance-egress-sizes-328-329;identity=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);basis=#328/#329 plan 1 Task 4: the bind list gains t.EgressAllow, t.Size and t.PolicyExpiresAt for the three new columns (routeCols, routeColCount 64, and Upsert's conflict clause gain them too); the new kinds are registry:EgressAllow, registry:Size and registry:PolicyExpiresAt, one site each; it binds the values and decides nothing; E3, as before;rev3=census-ruling-region-ha-p1a;basis=binds one more column, ha, as an integer from Route.HA (+registry:HA); keeps authority E3;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Tasks 2 and 5): binds three more columns, t.Assigned, b2iDB(t.Moved) and t.FleetLabel (routeColCount 65 to 68).;rev3=census-ruling-stateless-replicas-1;basis=Encode the additive Stateless flag in the shared SQL insert argument list; no launch authority.;rev3=census-ruling-stateless-replicas-2;basis=Supplied Route contributes four additive declarative SQL values; no external read or new executable path. registry:Account@355,registry:Addr@83,registry:Addrs@451,registry:App@152,registry:Args@505,registry:AssetGen@818,registry:AssetsOff@804,registry:Assigned@916,registry:Backing@253,registry:BuildState@730,registry:Canary@216,registry:Caps@381,registry:CertExpiresAt@338,registry:Channel@177,registry:ClaimIncarnation@577,registry:ClaimOwner@611,registry:ClaimRowID@625,registry:ClaimStamp@597,registry:Copies@992,registry:CreatedAt@492,registry:DBPath@116,registry:DNSCheckedAt@320,registry:DNSStatus@307,registry:EgressAllow@861,registry:Environment@366,registry:FleetBox@439,registry:FleetBoxes@978,registry:FleetLabel@944,registry:Gate@484,registry:GoodDemand@680,registry:GoodDigest@666,registry:GoodVersion@651,registry:HA@909,registry:Health@460,registry:Hibernate@196,registry:HoldOp@639,registry:Host@49,registry:IdleSeconds@513,registry:ImportGate@760,registry:Incarnation@830,registry:Kind@65,registry:LastError@101,registry:MaxRunSeconds@528,registry:Moved@934,registry:NextDue@242,registry:Platform@294,registry:PolicyExpiresAt@884,registry:Pool@159,registry:PrevVersion@137,registry:Provisioned@407,registry:RateLimit@785,registry:Region@167,registry:Replica@565,registry:ReplicaIncarnation@1021,registry:ReplicaRevision@1002,registry:Replicas@547,registry:Replication@227,registry:Runtime@774,registry:Seed@423,registry:SeedSource@746,registry:ServingSeq@845,registry:ServingVersion@694,registry:Size@876,registry:Slug@57,registry:Socket@73,registry:Stateless@964,registry:Status@91,registry:StatusNamed@272,registry:Steering@472,registry:Tunnel@389,registry:Unit@431,registry:UpdateSettings@712,registry:Version@126 aac8acafa9ee736e00f8b3071f02589c74c7b6a167ec9f2b3fb94abc85181ac6
internal/registry/registry.go scanRoute legacy accepted-legacy accepted-legacy;rev3=census-ruling-seeded-instances;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): main's body with the two new columns scanned;rev3=census-ruling-design-edge-rate-limit-358;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): main's body with the rate_limit column scanned into Route.RateLimit; the new kind is registry:RateLimit, one site; no other read;rev3=census-ruling-rootfs-apps-2;identity=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);basis=main's body with the runtime column scanned into Route.Runtime, before rate_limit; the new kind is registry:Runtime, one site; no other read; re-digested at the merge of origin/main 3c33f2eb: main's assets_off and asset_gen (edge asset cache plan 1) scanned beside runtime and rate_limit; routeColCount 59; re-digested again at the merge of origin/main 953b9fda: main's incarnation and serving_seq (self-serve moves plan 1) scanned after asset_gen; routeColCount 61;rev3=census-ruling-instance-egress-sizes-328-329;identity=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);basis=#328/#329 plan 1 Task 4: main's body with egress_allow, size and policy_expires_at scanned into Route.EgressAllow, Route.Size and Route.PolicyExpiresAt after serving_seq; the new kinds are registry:EgressAllow, registry:Size and registry:PolicyExpiresAt, one site each; routeColCount 64; no other read;rev3=census-ruling-region-ha-p1a;basis=scans one more column, ha, into Route.HA (+registry:HA); routeColCount 64 to 65; keeps legacy;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Tasks 2 and 5): scans three more columns, fleet_assigned, fleet_moved and fleet_label, into Route.Assigned, Moved and FleetLabel. Any root caller of Registry.Get sees three more fields, which no root decision reads (grep: only the activator start rule, edge, provision and registry read them).;rev3=census-ruling-stateless-replicas-1;basis=Decode the additive stateless registry column; no launch authority.;rev3=census-ruling-stateless-replicas-2;basis=Existing row scanner reads four additive SQL columns from the same row and connection. registry:Account@426,registry:Addr@194,registry:Addrs@516,registry:App@269,registry:Args@575,registry:AssetGen@885,registry:AssetsOff@1166,registry:Assigned@981,registry:Backing@351,registry:BuildState@800,registry:Canary@1220,registry:Caps@456,registry:CertExpiresAt@408,registry:Channel@299,registry:ClaimIncarnation@637,registry:ClaimOwner@673,registry:ClaimRowID@688,registry:ClaimStamp@658,registry:Copies@1044,registry:CreatedAt@559,registry:DBPath@230,registry:DNSCheckedAt@391,registry:DNSStatus@377,registry:EgressAllow@931,registry:Environment@440,registry:FleetBox@501,registry:FleetBoxes@1029,registry:FleetLabel@1002,registry:Gate@550,registry:GoodDemand@747,registry:GoodDigest@732,registry:GoodVersion@716,registry:HA@1128,registry:Health@526,registry:Hibernate@1196,registry:HoldOp@703,registry:Host@156,registry:IdleSeconds@584,registry:ImportGate@832,registry:Incarnation@898,registry:Kind@174,registry:LastError@216,registry:MaxRunSeconds@600,registry:Moved@1144,registry:NextDue@339,registry:Platform@1266,registry:PolicyExpiresAt@956,registry:Pool@277,registry:PrevVersion@253,registry:Provisioned@1290,registry:RateLimit@859,registry:Region@288,registry:Replica@1317,registry:ReplicaIncarnation@1075,registry:ReplicaRevision@1055,registry:Replicas@618,registry:Replication@323,registry:Runtime@847,registry:Seed@483,registry:SeedSource@817,registry:ServingSeq@914,registry:ServingVersion@762,registry:Size@947,registry:Slug@165,registry:Socket@183,registry:Stateless@1098,registry:Status@203,registry:StatusNamed@1241,registry:Steering@537,registry:Tunnel@465,registry:Unit@492,registry:UpdateSettings@781,registry:Version@241,whole:Route@1346 a0f26864ffc4267e026c166b681990dad201ce9059b4496c1c6ec0a33f7c8be0
@@ -82,10 +84,10 @@ internal/registry/remote_dispatch.go Registry.dispatchRemote hint E2 rev3=census
internal/host/runs.go runsWorker.pickupOwned legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1b3b-t;basis=Gate pickup and detached exec. When the detached gate refuses before exec, finish with the existing RefusedIncarnation result, close the picked sink and forget the active handle. Existing guarded sink Finish and cleanup paths are reused; no new input or path read.;rev3=census-ruling-stateless-replicas-2;basis=merge of origin/main 9b8b2c50: main moved pickup into its HA duty wrapper. Retain the replica membership recheck before main's final dutyStillOwned check and the queued-to-picked CAS; close sink and forget on either refusal. Adds only a whole:Route argument to the existing replica check, no new path source. Detached execution remains under main's WithDuty gate. whole:Route@1200,whole:Route@1287,whole:Route@2053,whole:Route@2127,whole:Route@2395,whole:Route@956 6958c0dab18412fa45d93d0354504f1222c3fe325bfade1e1b13c06ed2aebe4a
internal/provision/reconcile.go RouteFor authority C,E3 rev3=census-ruling-self-serve-moves-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos); also root, in the claim root's landing registration (ClaimRootHTTP.rootLandingRoute) and the relocation install (relocationRecord): census-ruling-seeded-instances's body with two more fields from the record: the row's lifetime pair (rec.Incarnation, rec.MoveSeq), so a row minted outside a move takes the record's lifetime and its last move's sequence (0, 0 for a fieldless record with no move history); every caller gets it, the root ones included: the root callers (ClaimRootHTTP.rootLandingRoute, relocationRecord) now mint (0, move_seq) on a claims-on record, a non-zero sequence once that record has had an offline move (move_seq advances on claims-on offline moves too), which moves Fingerprint and SnapshotFingerprint once for that row; main's C,E3 authority retained; self-serve moves 1 Task 7 (fix round 1: root callers named);rev3=census-ruling-region-ha-p1a;basis=the agent's reconcile passes, and also root's callers (rootupdates.go, rootinventory_install.go and relocationinstall.go on HEAD): one more field copied from the record, HA: rec.HA, so a row minted from a record stamped HA carries the sticky born-HA mark; the record is the console-written instance record each caller already read; root's own code reads nothing of Route.HA, and Fingerprint does not include it (SnapshotFingerprint does, for a set mark); the same nine sites, no read added;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 2: the row is minted with the record's Runtime (the console-written instance record, guarded by WriteRecord's runtimeFixed); a rootfs row always gets the nested socket and db path under dataDir and no seed or seed source; the paths are computed from the host, not read from the record;rev3=census-ruling-fresh-box-446;basis=#446: a born-HA record mints the nested paths whatever nested says, as a rootfs row already does; same reads;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Task 2, rule 6): the route also carries Assigned = rec.FleetBoxAt and Moved = rec.FleetBoxMoved, copied from the record it is handed. Read sites unchanged (13). In the agent; in root's claim landing registration (ClaimRootHTTP.rootLandingRoute, shelved claims code) the canonical route gains these two copied fields, which no root check compares (the comparison at rootinventory.go and ValidateAgentInventory read neither). No new input to root.;rev3=census-ruling-stateless-replicas-2;basis=Projects count, canonical boxes, revision, CreatedAt-derived lifetime and stateless hint from the supplied record. No store read; hint does not authorize a database bypass. registry:Addr@2736,registry:Addrs@2745,registry:DBPath@1709,registry:DBPath@2232,registry:DBPath@2654,registry:Health@2755,registry:Hibernate@2176,registry:Seed@2700,registry:SeedSource@2709,registry:Socket@1671,registry:Socket@2194,registry:Socket@2617,whole:Route@1635,whole:Route@2793 996c873399acd5b3ced960e82b699abd8400f89b09877d0522c310710132a6e9
@coverage . 8a95aab1e762eedd3cfd51a13a5d7e322a1f36e12bedaf0923bd628798e96078
-@coverage internal/activator c744baf3b4952a6861177e8ede9e75e75721c0755b3b5599059bfd0e49d40d4e
+@coverage internal/activator 25c775ff6d7225b3e2a3e7488eeaae8f9573fefab76d66b58e4ff7f8855c1830
@coverage internal/appconfig 32d5f27628b319917ed88ac39e0b22e25292f8f16ba5ef4e69a57ea35471bf77
-@coverage internal/host 6f2a6a95e78083352b153309dd850e0bf5f32ba55a12311447691f771f553ef8
-@coverage internal/provision b7ddfbad68ff5aac9c097c040d06843fd47fc0dae6bcb04863d9818fb46b1757
+@coverage internal/host 376126a2512ae9be9a0c613c11f59f40c90149b06670db8dcffe51a003efd711
+@coverage internal/provision 49e1e19ee6668cd6379e270b9ff3be44f5ab94314cdaaf9f80c80f976cb45040
@coverage internal/registry 0732b21161c008a3c9808ad3a946f17fda11e44a668667ee5e7ac02246f38995
@coverage internal/release 4e8817e83c244513f5fa3d099185e8f866c874cb3da0acb43f76c79928ce05ec
@coverage internal/replicas 6fbf542a6720e5b969b92f8401c7cc8b01f89a0b8b11141e7e7e99a3de612c73