region HA §25: streams end at the move's start; the drain's snapshot
Spec text for the two move-speed changes, and the census overlay. §25.4 step 2: at the move's start A ends the host's SSE responses at an event boundary, closes its upgraded connections and its edge-held streams; ordinary requests keep the 10 s bound. Step 3: the drain's release writes a snapshot at the final position before the store closes; a failed snapshot changes nothing else. Step 5: only streams opened during the move are closed at the take. §25.8: SSE streams and upgraded connections are closed at the move's start, not at the take; they reconnect and are held, then forwarded once taken. The pause estimate now counts a one-file restore. §25.10: +1 PUT (the snapshot) per moved host per planned handover, and one more stored copy for the retention window; no steady-state requests. §25.15 records the build change, the W4 numbers behind it and that R3.5 already allows the reconnect. Census: make census-propose NAME=held-move-speed; six changed units (body and sites) and one new unit, eventBoundaryBody.Read, whose reads are the proxied SSE body. Card at docs/superpowers/notes/census-proposal-held-move-speed.md; it needs the independent reviewer's verdict before the merge.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4 files changed,
+62
−6
docs/superpowers/notes/census-proposal-held-move-speed.md+33 −0docs/superpowers/specs/2026-10-26-region-ha-without-claims-design.md+8 −6internal/provision/testdata/plan14-root-reads-chain.tsv+1 −0internal/provision/testdata/plan14-root-reads-held-move-speed.tsv+20 −0
CI passed — run details
Intent
Attributed to this commit: 50.9 g CO₂e (6,627,820 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on held-move-speed, never backward from it. A turn that produced more than one commit books all of its tokens to the last one, and a concurrent session on this branch can add to the same figure. Some of it was priced using the shared default rate, because no model-specific factor row exists yet for at least one model involved. The Carbon view has the repo total, which is never derived from this attribution.
diff --git a/docs/superpowers/notes/census-proposal-held-move-speed.md b/docs/superpowers/notes/census-proposal-held-move-speed.md| new file mode 100644 |
| index 000000000..2a899c735 |
| --- /dev/null |
| +++ b/docs/superpowers/notes/census-proposal-held-move-speed.md |
| @@ -0,0 +1,33 @@ |
| +# Census approval: held-move-speed |
| + |
| +Ruling `census-ruling-held-move-speed`. The independent reviewer approves or rejects every change below, 1 with a new disposition; nothing goes to the census owner (Paul, #280, 2026-10-26). |
| + |
| +| unit | change | read sites | what changed | |
| +|---|---|---|---| |
| +| `internal/activator/activator.go` `type Service` | body | unchanged (0) | the agent as carlos: one new field, moveStreams (per-host in-memory set of edge.StreamEnd for requests in flight, own mutex), for the move's early stream end; actEntry gains drainRelease (bool, under a.mu), set by DrainStop; declarations only, no read added | |
| +| `internal/activator/handover.go` `Service.BeginMove` | body | unchanged (3) | also clears the host's in-memory moveStreams ending flag for the new move (moveStreams.reset); no read added | |
| +| `internal/edge/cookiescope.go` `Edge.responseModifier` | body | unchanged (2) | last, calls MarkMoveStream(resp): marks the request's in-memory StreamEnd when the response is a 101 or a text/event-stream, and wraps an SSE body in eventBoundaryBody so a move can end it at an event boundary; reads only the proxied response's status and Content-Type; read sites unchanged (2); no read added | |
| +| `internal/host/hadrain.go` `drainDriver.moveOne` | body | unchanged (2) | right after BeginMove and before the ticket and in-flight wait, calls Service.EndMoveStreams(host) and Edge.CloseHeldHost(host) (memory only: ends the host's SSE streams at an event boundary, closes upgraded connections, closes edge-held streams); the later CloseHeldHost after SetMoveTaken is kept; no read added | |
| +| `internal/activator/activator.go` `Service.serve` | sites | +registry:Host | after begin succeeds, wraps r with an edge.StreamEnd and tracks it under rt.Host in the in-memory moveStreams until the request ends (+registry:Host: the supplied route's Host as the map key); no new kind of read, no root decision | |
| +| `internal/activator/harelease.go` `Service.releaseHAClean` | sites | +registry:Host | reads the entry's drainRelease flag under a.mu; for the drain's release calls the replica's FinishSnapshot (final sync, then a litestream snapshot at the final position, before the store's close) instead of Finish, and logs a snapshot failure naming rt.Host (+registry:Host, the supplied route); marker order, budgets and clean rule unchanged; no new read | |
| + |
| +Envelopes re-pinned: `internal/activator`, `internal/edge`, `internal/host`, `internal/lease`. |
| + |
| +Review: a model from the other family than the author reads the branch's diff against main on the amadan.net remote (`origin` or `amadan`, whichever points at amadan.net) and gives a verdict for every unit and every re-pinned envelope above. For a unit, compare the change with its recorded disposition and basis below; for an envelope, read every changed function in the package and what it reaches. Reject if the change lets root open, run, query or follow anything it did not before from a path or input a tenant, an app or a box agent can create, write or name; if it weakens a check, refusal, validation, argument or environment the basis relies on; or if the diff cannot settle either. Otherwise approve. Record each verdict on #280 with the tip. A rejected unit goes back to the author to correct; nothing escalates to the census owner. |
| + |
| +Recorded dispositions, which each change must still satisfy: |
| + |
| +- `internal/activator/activator.go` `type Service`: authority, task B,C,D,F,J4. Basis: rev3=PROPOSED-seed; existing activator lifecycle and due-wake state plus owned seed exclusion and incarnation-keyed diagnostics; normal refusal and preparation ordering remain authoritative; PROPOSED-plans-2-box-limits adds the idleFor hook field, which only narrows idle windows;rev3=census-ruling-plans-4c-box-throttle;basis=gains the maxRunFor hook field beside idleFor (plans 4c). No read added.;rev3=census-ruling-plans-4d-lapse;basis=gains the disabledFor hook field beside maxRunFor (plans 4d). No read added.;rev3=census-ruling-remote-instance-metrics;basis=gains tenancySeq, hostTenants and hostMixed, in-memory fields for Tenancies; no read added;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos: one more field, markers (markerRetry: an atomic running flag and the last log time) for retryOwedMarkers; no read added; merge of origin/main d7ae1d76: main's fields are kept as main has them (census-ruling-remote-instance-metrics: tenancySeq, hostTenants, hostMixed); this branch's change is the same as above;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Tasks 7 and 8: new fields for rootfs admission (rootfsArmed, rootfsSwept), the per-host gate ask and refusal memo, and residency state (lister, backoff, start ceiling, cursor, test seam); no read;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R: one new field, releaseOps (host to the in-memory release record, under a.mu); no read;rev3=census-ruling-rootfs-apps-3-workers;basis=rootfs Plan 3 Group W: one new field, leaseNow (a clock seam for a worker start's headroom against the lease deadline, nil is the real clock); no read;rev3=census-ruling-region-ha-p1b2;basis=region HA P1b-2: gains the holder cache and its single-flight state; no read;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (controller ruling after branch review R1, and Paul's R2 ruling): one field, Fleet (activator.FleetWake: the box's fleet state, not on a fleet by default, on a fleet with a known label and a record reader, or on a fleet with an invalid identity), set by the agent before Start and read only by routeCurrentUnderLease. No read in the declaration. Agent, not root.;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a fix round 1: one field, drainBudget (time.Duration), which New copies from residentDrainBudget and a rootfs entry's lease watch reads in its place, so a test's change of the package var never races a watch goroutine; declaration only, reads nothing; merge of origin/main 6f1f6ca6: main's one field, Fleet (activator.FleetWake), is kept as main has it (census-ruling-managed-fleets-1b); this branch's change is the same as above;rev3=census-ruling-region-ha-p1b3a;basis=Add bounded placement peer and diagnostic state and the over-capacity callback; no read in this declaration and no new root authority.;rev3=census-ruling-stateless-replicas-1;basis=Add coordinator, existing-record observation callback and per-host preparation locks; no read in the declaration. Task 3a: Add optional canonical storage-selection and durable deploy-ID callbacks; declaration only, no read or authority in these fields.;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): adds the heldLegs map to actEntry (legs by id, under a.mu) and heldWakeHook (atomic pointer to a callback) and heldLegSeq (atomic counter) to Service. State only, in memory; no read of tenant, app or box-agent-writable input.;rev3=census-ruling-wake-storm-cap;basis=the agent as carlos: one field, wakeSlots (chan struct{}, the wake semaphore made by New from Config.WakeSlots, default 4); declaration only, no read.;rev3=census-ruling-region-ha-p1b3b-t;basis=Add the B2 DutyStore interface field and process-local duty view, suppression and invalidation state. No read added. B2 adds the verified-successor identity callback; no read in the declaration. B3b adds a nonblocking departure-suspicion callback, invoked only after an accepted holder-forward failure and after cache locks release; it cannot authorize a take.;rev3=census-ruling-region-ha-p3a;basis=P3a Task 3: immutable callbacks installed before Start for tenant admission, local start permission, fixed route exemptions and shutdown closure; nil callbacks preserve switch-off behavior; no new reads. Fix R1: add an immutable startup-phase callback for response copy, set before service startup. No new read or execution authority.;rev3=census-ruling-region-ha-g2-fixes;basis=Add in-memory HA loss state and pool withdrawal jobs; no new read.;rev3=census-ruling-region-ha-held-build;basis=region HA held-requests Task 1: one new field, drain (drainSources: two atomic func pointers for this box's and peers' drain state); no read added. region HA held-requests Task 2: one new field, moves (moveTable: per-host move state, hold counts and admission tickets in memory, under mu); no read added |
| +- `internal/activator/handover.go` `Service.BeginMove`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-region-ha-held-build;basis=new: Task 5 driver API; sets in-memory holding for an awake HA entry; refuses on a latched loss; no read. Fix round 1: records the awake entry's route (in memory) as the move's lifetime identity; no read added |
| +- `internal/edge/cookiescope.go` `Edge.responseModifier`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-edge-asset-cache-3;basis=the ModifyResponse hook now also strips any asset cache header or trailer the app set (stripAssetResponseHeaders, stripAssetTrailers: X-Carlos-Asset-Fill, X-Carlos-Asset-Fill-Ack, X-Carlos-Asset-Expires, Carlos-Cache) between the purge channel and the cookie scoping; it deletes response headers only; read sites unchanged (2); no read added;rev3=census-ruling-region-ha-p1b2;basis=region HA P1b-2: strips an app-supplied X-Carlos-Holder (header, announced trailer name, trailer values at body close) so only the platform names a lease holder; same reads;rev3=census-ruling-edge-page-cache-1;basis=after the purge channel, records the app's Carlos-Page-Cache response header into the request's in-memory page mark holder (takePageMark, final responses only) and calls a nil-in-production test seam, before the existing scrub deletes the header; read sites unchanged (2); no read added |
| +- `internal/host/hadrain.go` `drainDriver.moveOne`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-region-ha-held-build;basis=new: one host's move (BeginMove, tickets and in-flight wait, DrainStop, take, SetMoveTaken or SetMoveLeft); reads the in-memory route Host; no read of its own; Task 5 fix 1: after SetMoveTaken, closes the host's edge-held streams on this edge at an event boundary (Edge.CloseHeldHost, memory only); no read added |
| +- `internal/activator/activator.go` `Service.serve`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-hotfix281;basis=Startup repeats the existing Kind and Hibernate checks; error logging moved to serveWakeError. A request held through startup re-reads its own route's Socket and Addr and can only refuse (wake-timeout 503) when recovery moved them; agent-side, deny-only, no root decision.;rev3=census-ruling-edge-request-records;basis=passes the member request r to begin's new req parameter; no read added;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 5: the activator-managed test is Route.ActivatorOwned instead of Kind and Hibernate inline, so a resident rootfs instance is the activator's; same deploy-safety for binary rows;rev3=census-ruling-region-ha-p1b2;basis=region HA P1b-2: a verified HA hop this box cannot serve gets the holder diagnostic; two new whole:Route sites pass the route to answerForwarded/noteNoHolder; no new kind of read;rev3=census-ruling-region-ha-g2-fixes;basis=Refuse latched HA lease loss before startup wait or proxy accounting, and schedule bounded recovery; reads supplied route, no new external read here.;rev3=census-ruling-region-ha-held-build;basis=region HA held-requests Task 2: after begin succeeds, edge.ReleaseMoveTicket(r) ends the request's in-memory admission ticket; on the sidecar path the same after BeginSidecarRequest; no read added |
| +- `internal/activator/harelease.go` `Service.releaseHAClean`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-region-ha-p1a;basis=new: an HA entry's release, in order: host slice read empty through haHostEmpty (else errHostSliceUnproven and nothing written; the same check, moved into that helper by final fix F1), stop and join the files publisher, its final publish (2 min budget), the replica's final sync (Finish, 30 s), the local release record, then the release marker PUT (10 s), clean only when the final publish was complete and the sync and record succeeded; a failed PUT is a persisted lease obligation; +registry:Host, +whole:Route x4;rev3=census-ruling-region-ha-p1b3b-t;basis=Record advisory local-release basis only after ReleaseMarker succeeds. Add a whole-route argument to local duty bookkeeping; release order and lease authority unchanged.;rev3=census-ruling-region-ha-g2-fixes;basis=Latch unexpected lease loss before release and mark intentional release so ErrSpent alone is not treated as loss; no new read.;rev3=census-ruling-region-ha-graceful-terminate-t2;basis=Cap Final, Finish and marker contexts by the shutdown deadline and reserves; keep calls synchronous and stop proof unchanged; record successful marker completion under the service mutex. No read added.;rev3=census-ruling-region-ha-held-build;basis=region HA held-requests Task 5: records the written marker's clean flag on the entry (haReleaseClean) beside haReleased, for the drain report; no read added |
| + |
| +New dispositions, which census-propose wrote and the reviewer checks against the unit's reads and the diff: |
| + |
| +- new `internal/edge/movestreams.go:eventBoundaryBody.Read`: reads +file:Read ×2; written legacy, accepted-legacy, frozen |
| + |
| +Seal: `158a30344d45448de74c9d6fbcc46eeab1ef76980c17a6baef3bb36e38cac00c` → `8d96d0e9711703cb18f9f21c3f7c30bb9f461983329f8b6081d947593dde93d5`. |
| + |
| +Overlay: `internal/provision/testdata/plan14-root-reads-held-move-speed.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`. |
diff --git a/docs/superpowers/specs/2026-10-26-region-ha-without-claims-design.md b/docs/superpowers/specs/2026-10-26-region-ha-without-claims-design.md| index b0cf8d1b0..ff31ac7c5 100644 |
| --- a/docs/superpowers/specs/2026-10-26-region-ha-without-claims-design.md |
| +++ b/docs/superpowers/specs/2026-10-26-region-ha-without-claims-design.md |
| @@ -1102,10 +1102,10 @@ The roll tool runs a new root verb, `carlos system group-maintenance drain`, ove |
| 2. **Quiesce (H5).** A closes its local start gate for tenant leases. It then settles everything that crossed the gate before it closed: wakes that are restoring, acquires waiting on their conditional PUT, and lost-lease recovery workers. Each either ends awake, and is then moved in step 3, or fails. Pending stops and marker obligations are kept and settled (§5.2). Nothing is cancelled in a way that would drop a writer proof. |
| 3. **Move each awake host H,** up to 4 at a time, busiest first: |
| 1. *Hold.* From now `MoveState(H)` is `holding` (§25.5). |
| - 2. *Finish in-flight work.* Requests already admitted to H's app get up to 10 s, today's HTTP drain bound. Then the stop proceeds as a shutdown stop does, which ends long requests, WebSockets and edge-held stream legs (#432 G5). |
| - 3. *Release.* `finishStop` writes the marker (§5.2), with the drain as its stop reason and the existing budgets. |
| + 2. *Finish in-flight work.* First, at the move's start, A ends H's long-lived responses on A, because none of them ends on its own: SSE responses (`text/event-stream`) end at their next event boundary, upgraded connections (WebSockets) are closed, and edge-held SSE streams are closed at an event boundary. A stream that opens later in the move, on a request admitted before it, is ended as soon as its response head shows it is a stream. Their clients reconnect and are held like any other request (§25.8). Every other request already admitted to H's app gets up to 10 s, today's HTTP drain bound. Then the stop proceeds as a shutdown stop does, which ends long requests and edge-held stream legs (#432 G5). (Build change, 2026-11-10: the streams used to be closed at step 5, so one open stream held every move for the whole 10 s.) |
| + 3. *Release.* `finishStop` writes the marker (§5.2), with the drain as its stop reason and the existing budgets. The drain's release, and only the drain's, writes a litestream snapshot (level 9) at the final position after the final sync succeeds and before the store closes, so the snapshot's TXID is the marker's and the successor restores one file instead of every L0 file since the last compaction. If the snapshot fails, A logs it and the release goes on as before: the marker is as clean as it would have been, and the restore replays the L0 files. An idle sleep writes no snapshot. (Build change, 2026-11-10.) |
| 4. *Take.* A chooses a successor B: `ChooseRoomiest` over its eligible serving set (§6.3). **Always-on workers are not taken** (build ruling, 2026-11-09): the duty rule (§7.1, A11) gives a released worker's duties to its releaser, and a take that moved them would need new authority in the duty layer, the I3 family. A drain releases each worker with a marker, which leaves no lease naming A (H5), and the worker resumes on its HRW box (A10) through the departure scan's import (§7.4) after the provider action. The report lists such workers as released. A sends B a signed take request (§25.7). B acquires and wakes H, then answers with the owner it now sees in `lock.json`. That owner is the **confirmed holder**: B, or a third box that won the marker first (§6.7). |
| - 5. *Release the holds* (§25.5). Edge-held SSE streams for H whose outer connection is on A are closed now, per host, at an event boundary, so they reconnect to the new holder without waiting for the rest of the drain (R3.5). `MoveState(H)` becomes `taken(holder, lock generation)` and stays so until `drained` is acknowledged (§25.15 R3.4). |
| + 5. *Release the holds* (§25.5). H's edge-held SSE streams on A were closed at step 2. Any opened on A during the move are closed now, per host, at an event boundary, so they reconnect to the new holder without waiting for the rest of the drain (R3.5). `MoveState(H)` becomes `taken(holder, lock generation)` and stays so until `drained` is acknowledged (§25.15 R3.4). |
| 4. **Drain the connections.** When no lease names A, it publishes `drained` and asks for the same acknowledgement as in step 1. Peers drop holder-cache entries naming A (§6.6). A then closes a barrier: a request that arrives after it gets today's 503 with `Retry-After: 10` through the bounded exit and is never forwarded. A sends `Connection: close` on every response, closes idle keep-alive connections, and closes every edge-held SSE stream still open through it at an event boundary; the browser reconnects through the NLB to another box, with `Last-Event-ID`. A then waits up to 60 s for the requests it is still forwarding to finish. WebSockets and responses still running at 60 s are cancelled and their connections closed, and the report counts them. The drain fails if they have not all ended 10 s after that. |
| 5. **Report.** The report lists hosts moved, each one's confirmed holder, the longest hold, holds that got today's answer, unclean releases, connections closed at the bound, and the agent's incarnation. The agent keeps it until it exits, for the tool's pre-action check (H5). |
| @@ -1181,7 +1181,7 @@ Both control paths, `/.carlos/ha-take` and `/.carlos/ha-drain`, are reserved on |
| ### 25.8 What clients see |
| -- **Zero errors** for every request whose first attempt reaches A. That covers requests through the NLB before Standby, from a peer whose cache names A (the normal in-region case), or through a fixed forwarder in the region. The body must be empty, or have a known length of at most 64 KiB and be copied whole before the first send (H2). An unknown-length body, however small, is not replayable. A request that reached A directly streams its body and has no size limit. The condition is the attempt number on arrival at A and the body's framing (R3.6). Paul's Q2 ruling (2026-11-08) scopes the body rule to in-region traffic: a box has trusted HA metadata only for its own region's hosts, so a cross-region (backhaul) first box replays only bodyless requests, and its requests with bodies stream and are never replayed. The pause is the rest of H's in-flight work (up to 10 s, usually milliseconds), plus the release (about 1 to 3 s), plus the successor's acquire and restore. The target is under 5 s for a small host. |
| +- **Zero errors** for every request whose first attempt reaches A. That covers requests through the NLB before Standby, from a peer whose cache names A (the normal in-region case), or through a fixed forwarder in the region. The body must be empty, or have a known length of at most 64 KiB and be copied whole before the first send (H2). An unknown-length body, however small, is not replayable. A request that reached A directly streams its body and has no size limit. The condition is the attempt number on arrival at A and the body's framing (R3.6). Paul's Q2 ruling (2026-11-08) scopes the body rule to in-region traffic: a box has trusted HA metadata only for its own region's hosts, so a cross-region (backhaul) first box replays only bodyless requests, and its requests with bodies stream and are never replayed. The pause is the rest of H's in-flight work (up to 10 s for an ordinary request, usually milliseconds; streams are ended at once), plus the release (about 1 to 3 s, with the snapshot), plus the successor's acquire and restore of one snapshot file. The target is under 5 s for a small host. |
| - **Today's 503 with `Retry-After: 10`,** only in the seconds that host is moving, for: |
| - a hop whose body is over 64 KiB or of unknown length; |
| - a request whose first attempt went to another box that named A, on any ingress path; most cross-region requests are like this (H3); |
| @@ -1189,7 +1189,7 @@ Both control paths, `/.carlos/ha-take` and `/.carlos/ha-drain`, are reserved on |
| - a call through the edge-local door (#175 P7), a tunnel delivery, or a request on a regional name for the moving host. None of these can be forwarded to another box, so A refuses them at once through the bounded exit (§25.15 R3.3) rather than holding them (build ruling, 2026-11-08); |
| - a request that arrives at A after its connection drain has begun (§25.4 step 4); |
| - any bound hit or failed move. |
| -- **Connections:** keep-alive connections are closed between requests. Any backhaul that carries a body closes the client's connection when the upstream answers before the client has finished sending, so the edge never drains an unbounded upload after an early answer; the client reconnects once and sees no error (build ruling, 2026-11-08). SSE streams reconnect with `Last-Event-ID` after the browser's retry delay. WebSockets still open through A 60 s after its leases have moved are closed, and their clients reconnect. Requests already dispatched to an app (uploads, downloads, upgrades) that run past H's 10 s drain, or past the final 60 s, are cut and never retried, because they may have reached the app (R3.5). |
| +- **Connections:** keep-alive connections are closed between requests. Any backhaul that carries a body closes the client's connection when the upstream answers before the client has finished sending, so the edge never drains an unbounded upload after an early answer; the client reconnects once and sees no error (build ruling, 2026-11-08). SSE streams and upgraded connections (WebSockets) for H are closed at the move's start, not at the take: SSE at an event boundary, so the browser sees a clean end after a whole event and reconnects with `Last-Event-ID` after its retry delay. The reconnect is held like any other request and forwarded once H is taken. WebSockets of hosts that were not moved and are still open through A 60 s after its leases have moved are closed, and their clients reconnect. Requests already dispatched to an app (uploads, downloads, upgrades) that run past H's 10 s drain, or past the final 60 s, are cut and never retried, because they may have reached the app (R3.5). |
| - **Always-on workers** pause from their release until the departure finishes, a few minutes. They serve no HTTP requests. |
| - **An unplanned death:** today's behaviour, unchanged. |
| @@ -1211,7 +1211,7 @@ A drain is only safe when every box that may send A a request understands the ne |
| - two edges mutations (the drain state, then `drained`), each with its change-index update and §18's reader amplification; a roll adds a third when fence-clear makes the restarted member placeable again; |
| - two acknowledgement rounds, each costing one fold read per live box (one LIST plus one GET per edges file, as at any fold). A failed fold read is retried at the 5 s cadence, so the worst case is 24 fold reads per box per round. The change-index fold that the publication triggers anyway is separate; |
| - the tool's lock check (the sweep): one delimited LIST of the lock prefix (one page per 1,000 hosts), then for each host under it, HA or not, one exact-key LIST and one GET when its `lock.json` exists. A replace or remove sweeps twice, before the action check and again after the edge stops; a resumed or retried stop sweeps again. Per transaction only, never on a timer. |
| -- **Per host moved:** the marker PUT, as at any sleep, plus the successor's acquire (1 GET + 1 PUT) and restore, which the host's next wake would have cost anyway. |
| +- **Per host moved:** the marker PUT, as at any sleep, plus one PUT for the drain's snapshot of the database (§25.4 step 3.3), plus the successor's acquire (1 GET + 1 PUT) and restore, which the host's next wake would have cost anyway. The snapshot makes that restore one GET instead of one per L0 file. Snapshots are kept for the replica's retention (a week), so each planned handover also stores one more copy of the database for that time. No steady-state requests. |
| - **Example:** replacing all 4 members of a region with 200 awake hosts, some moved twice, costs about 300 markers and acquires, 8 edges mutations, 8 acknowledgement rounds over 6 boxes, and 8 lock sweeps (two per replacement) of 500 hosts, each about one LIST and one GET per host. That is about $0.03 in S3 requests, plus retries and the restore GETs. |
| **Simulation (§21.1).** It adds: |
| @@ -1330,6 +1330,8 @@ Paul approved all four §25.14 recommendations and Q1 to Q3 as recommended: drai |
| **The redirect lasts the whole drain (R3.4).** `taken(holder, gen)` is kept per host lifetime until `drained` is acknowledged, not for 30 s. Before A answers a hop from it, A checks the lock with one coalesced read, at most one per host per 5 s. The answer names the current owner, or, when the lock is a release marker, A's placement choice, which a hop receiver may acquire from the marker (§6.4). Anything else gets the bounded refusal. Budget: at most one lock GET per moved host per 5 s on the draining box, only while stale hops arrive. |
| +**Move speed (build change, 2026-11-10).** W4 on dev measured moves of 25 to 42 s: about 10 s waiting for the probe's SSE stream, which never ends, to reach the in-flight bound, and 27 to 29 s of restore replaying over 1,000 L0 files. Two changes, approved by the agent manager: streams are ended at the move's start rather than at the take (§25.4 step 2, §25.8), which R3.5 already allows since the reconnect is at an event boundary; and the drain's release writes a snapshot at the final position (§25.4 step 3.3, +1 PUT per moved host in §25.10). Holds' bounds, I1 and H1 to H5 are unchanged. A snapshot at every clean sleep, which would make every cross-box wake fast too, is a separate proposal for Paul. |
| + |
| **What the build left owed (2026-11-09).** These are outside the branch and need their own steps: |
| - **The operator policy.** The module code carries the new resource-scoped grants (terminate in this group only, launch-template version reads, and S3 list and get on `control/edges/` and the region's lock keys). Applying them with tofu is a step on a card Paul approves. |
| - **One attended live call on dev** (§25.6) with the operator's real transport, before any window: in particular, a terminate of a Standby member without decrement must leave desired unchanged. |
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv| index 8f9dcfa06..87e0f5257 100644 |
| --- a/internal/provision/testdata/plan14-root-reads-chain.tsv |
| +++ b/internal/provision/testdata/plan14-root-reads-chain.tsv |
| @@ -151,3 +151,4 @@ plan14-root-reads-gvisor-probe-retry.tsv 499c08fd29787c5de2aa0197c05f82f6db0ab77 |
| plan14-root-reads-billing-dash-2-pages.tsv 499c08fd29787c5de2aa0197c05f82f6db0ab7760eb7d980bb24211e289e4c24 |
| plan14-root-reads-group-roll-verb.tsv 9668105384b1abd5009d76a73e37eef7f5c358eb5b08a3d1fe35f7c411e4d200 |
| plan14-root-reads-warm-set-published-724.tsv 158a30344d45448de74c9d6fbcc46eeab1ef76980c17a6baef3bb36e38cac00c |
| +plan14-root-reads-held-move-speed.tsv 8d96d0e9711703cb18f9f21c3f7c30bb9f461983329f8b6081d947593dde93d5 |
diff --git a/internal/provision/testdata/plan14-root-reads-held-move-speed.tsv b/internal/provision/testdata/plan14-root-reads-held-move-speed.tsv| new file mode 100644 |
| index 000000000..bdedc409f |
| --- /dev/null |
| +++ b/internal/provision/testdata/plan14-root-reads-held-move-speed.tsv |
| @@ -0,0 +1,20 @@ |
| +# Census overlay held-move-speed, written by census-propose (#369). census-ruling-held-move-speed, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-held-move-speed.md. |
| +# 4 body, 2 sites, 4 envelope: each changed unit re-frozen at its existing disposition with its claim appended. |
| +# 1 new dispositions: 0 reads re-frozen at their disposition with the claim, 1 new units frozen accepted-legacy, 0 quiet units retired while they read nothing, 0 other. |
| +@legacy e64cf805e37d1f046d902c1b9069cd461361a6a1b304ecbbbeb6ac19cf10ad6e internal/activator/handover.go Service.BeginMove legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-held-build;basis=new: Task 5 driver API; sets in-memory holding for an awake HA entry; refuses on a latched loss; no read. Fix round 1: records the awake entry's route (in memory) as the move's lifetime identity; no read added;rev3=census-ruling-held-move-speed;basis=also clears the host's in-memory moveStreams ending flag for the new move (moveStreams.reset); no read added whole:Route@331,whole:Route@489,whole:Route@498 580cc7aabf4b01e7e473070f48a5b9657e95dcf184e878989cd88a954c82aebf |
| +@legacy 6123da1d81bea8999d2caadf860e2e5838833b702e8157934e53c6a56eec0d73 internal/edge/cookiescope.go Edge.responseModifier legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-edge-asset-cache-3;basis=the ModifyResponse hook now also strips any asset cache header or trailer the app set (stripAssetResponseHeaders, stripAssetTrailers: X-Carlos-Asset-Fill, X-Carlos-Asset-Fill-Ack, X-Carlos-Asset-Expires, Carlos-Cache) between the purge channel and the cookie scoping; it deletes response headers only; read sites unchanged (2); no read added;rev3=census-ruling-region-ha-p1b2;basis=region HA P1b-2: strips an app-supplied X-Carlos-Holder (header, announced trailer name, trailer values at body close) so only the platform names a lease holder; same reads;rev3=census-ruling-edge-page-cache-1;basis=after the purge channel, records the app's Carlos-Page-Cache response header into the request's in-memory page mark holder (takePageMark, final responses only) and calls a nil-in-production test seam, before the existing scrub deletes the header; read sites unchanged (2); no read added;rev3=census-ruling-held-move-speed;basis=last, calls MarkMoveStream(resp): marks the request's in-memory StreamEnd when the response is a 101 or a text/event-stream, and wraps an SSE body in eventBoundaryBody so a move can end it at an event boundary; reads only the proxied response's status and Content-Type; read sites unchanged (2); no read added whole:Route@106,whole:Route@394 09c3267cab18b61a26c62594eb98d8eff228a896a2e348ce09b808cb315b5e3d |
| +@legacy e7cdd884e29b0cd6c9c7dfcfa1df1cc965abfd08f4ccf2622806256bbd03b212 internal/host/hadrain.go drainDriver.moveOne legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-held-build;basis=new: one host's move (BeginMove, tickets and in-flight wait, DrainStop, take, SetMoveTaken or SetMoveLeft); reads the in-memory route Host; no read of its own; Task 5 fix 1: after SetMoveTaken, closes the host's edge-held streams on this edge at an event boundary (Edge.CloseHeldHost, memory only); no read added;rev3=census-ruling-held-move-speed;basis=right after BeginMove and before the ticket and in-flight wait, calls Service.EndMoveStreams(host) and Edge.CloseHeldHost(host) (memory only: ends the host's SSE streams at an event boundary, closes upgraded connections, closes edge-held streams); the later CloseHeldHost after SetMoveTaken is kept; no read added registry:Host@135,whole:Route@137 267945a579180574680077bd84ecfff059e2a1bc106365dcb73e8cbd4935a38f |
| +@legacy bc8d2db81abd45488a509371d2b0c817896871c6e50742b1acec38a8a48ce69c internal/edge/movestreams.go eventBoundaryBody.Read legacy accepted-legacy accepted-legacy;rev3=census-ruling-held-move-speed;basis=new: reads the proxied upstream SSE response body (an io.ReadCloser from the tenant reverse proxy, the same bytes the proxy already copies to the client) and ends it with io.EOF at an event boundary once a move asked; the two Read sites are that body, not a file; agent-side (carlos-edge as carlos), no root decision file:Read@230,file:Read@28 b68a9cc1b908a084bc05c13e22ee91bd8b5be07e061a6b884eb605ab88f08f81 |
| +@legacy feb1253bbc1063e40780e7e8610d56db06e62b3e696557af616ef555005af62d internal/activator/activator.go Service.serve legacy accepted-legacy accepted-legacy;rev3=census-ruling-hotfix281;basis=Startup repeats the existing Kind and Hibernate checks; error logging moved to serveWakeError. A request held through startup re-reads its own route's Socket and Addr and can only refuse (wake-timeout 503) when recovery moved them; agent-side, deny-only, no root decision.;rev3=census-ruling-edge-request-records;basis=passes the member request r to begin's new req parameter; no read added;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 5: the activator-managed test is Route.ActivatorOwned instead of Kind and Hibernate inline, so a resident rootfs instance is the activator's; same deploy-safety for binary rows;rev3=census-ruling-region-ha-p1b2;basis=region HA P1b-2: a verified HA hop this box cannot serve gets the holder diagnostic; two new whole:Route sites pass the route to answerForwarded/noteNoHolder; no new kind of read;rev3=census-ruling-region-ha-g2-fixes;basis=Refuse latched HA lease loss before startup wait or proxy accounting, and schedule bounded recovery; reads supplied route, no new external read here.;rev3=census-ruling-region-ha-held-build;basis=region HA held-requests Task 2: after begin succeeds, edge.ReleaseMoveTicket(r) ends the request's in-memory admission ticket; on the sidecar path the same after BeginSidecarRequest; no read added;rev3=census-ruling-held-move-speed;basis=after begin succeeds, wraps r with an edge.StreamEnd and tracks it under rt.Host in the in-memory moveStreams until the request ends (+registry:Host: the supplied route's Host as the map key); no new kind of read, no root decision registry:Addr@1131,registry:Addr@1145,registry:Host@1056,registry:Host@1256,registry:Host@4002,registry:Socket@1102,registry:Socket@1118,whole:Route@1081,whole:Route@1190,whole:Route@1324,whole:Route@198,whole:Route@261,whole:Route@2873,whole:Route@2974,whole:Route@298,whole:Route@3788,whole:Route@3851,whole:Route@526 fbdd029dbe4180c6138f2cdfe20428a55c6288d4f8081cc7a4846066f1195b71 |
| +@legacy e6a6037e6ce093cedffa414a7f4f436428da38d9ec1adabd23a05bfc33b868eb internal/activator/harelease.go Service.releaseHAClean legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1a;basis=new: an HA entry's release, in order: host slice read empty through haHostEmpty (else errHostSliceUnproven and nothing written; the same check, moved into that helper by final fix F1), stop and join the files publisher, its final publish (2 min budget), the replica's final sync (Finish, 30 s), the local release record, then the release marker PUT (10 s), clean only when the final publish was complete and the sync and record succeeded; a failed PUT is a persisted lease obligation; +registry:Host, +whole:Route x4;rev3=census-ruling-region-ha-p1b3b-t;basis=Record advisory local-release basis only after ReleaseMarker succeeds. Add a whole-route argument to local duty bookkeeping; release order and lease authority unchanged.;rev3=census-ruling-region-ha-g2-fixes;basis=Latch unexpected lease loss before release and mark intentional release so ErrSpent alone is not treated as loss; no new read.;rev3=census-ruling-region-ha-graceful-terminate-t2;basis=Cap Final, Finish and marker contexts by the shutdown deadline and reserves; keep calls synchronous and stop proof unchanged; record successful marker completion under the service mutex. No read added.;rev3=census-ruling-region-ha-held-build;basis=region HA held-requests Task 5: records the written marker's clean flag on the entry (haReleaseClean) beside haReleased, for the drain report; no read added;rev3=census-ruling-held-move-speed;basis=reads the entry's drainRelease flag under a.mu; for the drain's release calls the replica's FinishSnapshot (final sync, then a litestream snapshot at the final position, before the store's close) instead of Finish, and logs a snapshot failure naming rt.Host (+registry:Host, the supplied route); marker order, budgets and clean rule unchanged; no new read registry:Host@1403,registry:Host@2484,whole:Route@109,whole:Route@1505,whole:Route@1643,whole:Route@2393,whole:Route@267 7d5428b8024aa8f51ee187e08968beeb855f93cfa36c3acf014f279b289a7b35 |
| +internal/activator/activator.go type Service authority B,C,D,F,J4 rev3=PROPOSED-seed; existing activator lifecycle and due-wake state plus owned seed exclusion and incarnation-keyed diagnostics; normal refusal and preparation ordering remain authoritative; PROPOSED-plans-2-box-limits adds the idleFor hook field, which only narrows idle windows;rev3=census-ruling-plans-4c-box-throttle;basis=gains the maxRunFor hook field beside idleFor (plans 4c). No read added.;rev3=census-ruling-plans-4d-lapse;basis=gains the disabledFor hook field beside maxRunFor (plans 4d). No read added.;rev3=census-ruling-remote-instance-metrics;basis=gains tenancySeq, hostTenants and hostMixed, in-memory fields for Tenancies; no read added;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos: one more field, markers (markerRetry: an atomic running flag and the last log time) for retryOwedMarkers; no read added; merge of origin/main d7ae1d76: main's fields are kept as main has them (census-ruling-remote-instance-metrics: tenancySeq, hostTenants, hostMixed); this branch's change is the same as above;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Tasks 7 and 8: new fields for rootfs admission (rootfsArmed, rootfsSwept), the per-host gate ask and refusal memo, and residency state (lister, backoff, start ceiling, cursor, test seam); no read;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R: one new field, releaseOps (host to the in-memory release record, under a.mu); no read;rev3=census-ruling-rootfs-apps-3-workers;basis=rootfs Plan 3 Group W: one new field, leaseNow (a clock seam for a worker start's headroom against the lease deadline, nil is the real clock); no read;rev3=census-ruling-region-ha-p1b2;basis=region HA P1b-2: gains the holder cache and its single-flight state; no read;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (controller ruling after branch review R1, and Paul's R2 ruling): one field, Fleet (activator.FleetWake: the box's fleet state, not on a fleet by default, on a fleet with a known label and a record reader, or on a fleet with an invalid identity), set by the agent before Start and read only by routeCurrentUnderLease. No read in the declaration. Agent, not root.;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a fix round 1: one field, drainBudget (time.Duration), which New copies from residentDrainBudget and a rootfs entry's lease watch reads in its place, so a test's change of the package var never races a watch goroutine; declaration only, reads nothing; merge of origin/main 6f1f6ca6: main's one field, Fleet (activator.FleetWake), is kept as main has it (census-ruling-managed-fleets-1b); this branch's change is the same as above;rev3=census-ruling-region-ha-p1b3a;basis=Add bounded placement peer and diagnostic state and the over-capacity callback; no read in this declaration and no new root authority.;rev3=census-ruling-stateless-replicas-1;basis=Add coordinator, existing-record observation callback and per-host preparation locks; no read in the declaration. Task 3a: Add optional canonical storage-selection and durable deploy-ID callbacks; declaration only, no read or authority in these fields.;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): adds the heldLegs map to actEntry (legs by id, under a.mu) and heldWakeHook (atomic pointer to a callback) and heldLegSeq (atomic counter) to Service. State only, in memory; no read of tenant, app or box-agent-writable input.;rev3=census-ruling-wake-storm-cap;basis=the agent as carlos: one field, wakeSlots (chan struct{}, the wake semaphore made by New from Config.WakeSlots, default 4); declaration only, no read.;rev3=census-ruling-region-ha-p1b3b-t;basis=Add the B2 DutyStore interface field and process-local duty view, suppression and invalidation state. No read added. B2 adds the verified-successor identity callback; no read in the declaration. B3b adds a nonblocking departure-suspicion callback, invoked only after an accepted holder-forward failure and after cache locks release; it cannot authorize a take.;rev3=census-ruling-region-ha-p3a;basis=P3a Task 3: immutable callbacks installed before Start for tenant admission, local start permission, fixed route exemptions and shutdown closure; nil callbacks preserve switch-off behavior; no new reads. Fix R1: add an immutable startup-phase callback for response copy, set before service startup. No new read or execution authority.;rev3=census-ruling-region-ha-g2-fixes;basis=Add in-memory HA loss state and pool withdrawal jobs; no new read.;rev3=census-ruling-region-ha-held-build;basis=region HA held-requests Task 1: one new field, drain (drainSources: two atomic func pointers for this box's and peers' drain state); no read added. region HA held-requests Task 2: one new field, moves (moveTable: per-host move state, hold counts and admission tickets in memory, under mu); no read added;rev3=census-ruling-held-move-speed;basis=the agent as carlos: one new field, moveStreams (per-host in-memory set of edge.StreamEnd for requests in flight, own mutex), for the move's early stream end; actEntry gains drainRelease (bool, under a.mu), set by DrainStop; declarations only, no read added d8e71373ba27185116b52624445629f307bfe57845bd0e88793308378441d4d5 |
| +internal/activator/handover.go Service.BeginMove legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-held-build;basis=new: Task 5 driver API; sets in-memory holding for an awake HA entry; refuses on a latched loss; no read. Fix round 1: records the awake entry's route (in memory) as the move's lifetime identity; no read added;rev3=census-ruling-held-move-speed;basis=also clears the host's in-memory moveStreams ending flag for the new move (moveStreams.reset); no read added whole:Route@331,whole:Route@489,whole:Route@498 580cc7aabf4b01e7e473070f48a5b9657e95dcf184e878989cd88a954c82aebf |
| +internal/edge/cookiescope.go Edge.responseModifier legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-edge-asset-cache-3;basis=the ModifyResponse hook now also strips any asset cache header or trailer the app set (stripAssetResponseHeaders, stripAssetTrailers: X-Carlos-Asset-Fill, X-Carlos-Asset-Fill-Ack, X-Carlos-Asset-Expires, Carlos-Cache) between the purge channel and the cookie scoping; it deletes response headers only; read sites unchanged (2); no read added;rev3=census-ruling-region-ha-p1b2;basis=region HA P1b-2: strips an app-supplied X-Carlos-Holder (header, announced trailer name, trailer values at body close) so only the platform names a lease holder; same reads;rev3=census-ruling-edge-page-cache-1;basis=after the purge channel, records the app's Carlos-Page-Cache response header into the request's in-memory page mark holder (takePageMark, final responses only) and calls a nil-in-production test seam, before the existing scrub deletes the header; read sites unchanged (2); no read added;rev3=census-ruling-held-move-speed;basis=last, calls MarkMoveStream(resp): marks the request's in-memory StreamEnd when the response is a 101 or a text/event-stream, and wraps an SSE body in eventBoundaryBody so a move can end it at an event boundary; reads only the proxied response's status and Content-Type; read sites unchanged (2); no read added whole:Route@106,whole:Route@394 09c3267cab18b61a26c62594eb98d8eff228a896a2e348ce09b808cb315b5e3d |
| +internal/host/hadrain.go drainDriver.moveOne legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-held-build;basis=new: one host's move (BeginMove, tickets and in-flight wait, DrainStop, take, SetMoveTaken or SetMoveLeft); reads the in-memory route Host; no read of its own; Task 5 fix 1: after SetMoveTaken, closes the host's edge-held streams on this edge at an event boundary (Edge.CloseHeldHost, memory only); no read added;rev3=census-ruling-held-move-speed;basis=right after BeginMove and before the ticket and in-flight wait, calls Service.EndMoveStreams(host) and Edge.CloseHeldHost(host) (memory only: ends the host's SSE streams at an event boundary, closes upgraded connections, closes edge-held streams); the later CloseHeldHost after SetMoveTaken is kept; no read added registry:Host@135,whole:Route@137 267945a579180574680077bd84ecfff059e2a1bc106365dcb73e8cbd4935a38f |
| +internal/edge/movestreams.go eventBoundaryBody.Read legacy accepted-legacy accepted-legacy;rev3=census-ruling-held-move-speed;basis=new: reads the proxied upstream SSE response body (an io.ReadCloser from the tenant reverse proxy, the same bytes the proxy already copies to the client) and ends it with io.EOF at an event boundary once a move asked; the two Read sites are that body, not a file; agent-side (carlos-edge as carlos), no root decision file:Read@230,file:Read@28 b68a9cc1b908a084bc05c13e22ee91bd8b5be07e061a6b884eb605ab88f08f81 |
| +internal/activator/activator.go Service.serve legacy accepted-legacy accepted-legacy;rev3=census-ruling-hotfix281;basis=Startup repeats the existing Kind and Hibernate checks; error logging moved to serveWakeError. A request held through startup re-reads its own route's Socket and Addr and can only refuse (wake-timeout 503) when recovery moved them; agent-side, deny-only, no root decision.;rev3=census-ruling-edge-request-records;basis=passes the member request r to begin's new req parameter; no read added;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 5: the activator-managed test is Route.ActivatorOwned instead of Kind and Hibernate inline, so a resident rootfs instance is the activator's; same deploy-safety for binary rows;rev3=census-ruling-region-ha-p1b2;basis=region HA P1b-2: a verified HA hop this box cannot serve gets the holder diagnostic; two new whole:Route sites pass the route to answerForwarded/noteNoHolder; no new kind of read;rev3=census-ruling-region-ha-g2-fixes;basis=Refuse latched HA lease loss before startup wait or proxy accounting, and schedule bounded recovery; reads supplied route, no new external read here.;rev3=census-ruling-region-ha-held-build;basis=region HA held-requests Task 2: after begin succeeds, edge.ReleaseMoveTicket(r) ends the request's in-memory admission ticket; on the sidecar path the same after BeginSidecarRequest; no read added;rev3=census-ruling-held-move-speed;basis=after begin succeeds, wraps r with an edge.StreamEnd and tracks it under rt.Host in the in-memory moveStreams until the request ends (+registry:Host: the supplied route's Host as the map key); no new kind of read, no root decision registry:Addr@1131,registry:Addr@1145,registry:Host@1056,registry:Host@1256,registry:Host@4002,registry:Socket@1102,registry:Socket@1118,whole:Route@1081,whole:Route@1190,whole:Route@1324,whole:Route@198,whole:Route@261,whole:Route@2873,whole:Route@2974,whole:Route@298,whole:Route@3788,whole:Route@3851,whole:Route@526 fbdd029dbe4180c6138f2cdfe20428a55c6288d4f8081cc7a4846066f1195b71 |
| +internal/activator/harelease.go Service.releaseHAClean legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1a;basis=new: an HA entry's release, in order: host slice read empty through haHostEmpty (else errHostSliceUnproven and nothing written; the same check, moved into that helper by final fix F1), stop and join the files publisher, its final publish (2 min budget), the replica's final sync (Finish, 30 s), the local release record, then the release marker PUT (10 s), clean only when the final publish was complete and the sync and record succeeded; a failed PUT is a persisted lease obligation; +registry:Host, +whole:Route x4;rev3=census-ruling-region-ha-p1b3b-t;basis=Record advisory local-release basis only after ReleaseMarker succeeds. Add a whole-route argument to local duty bookkeeping; release order and lease authority unchanged.;rev3=census-ruling-region-ha-g2-fixes;basis=Latch unexpected lease loss before release and mark intentional release so ErrSpent alone is not treated as loss; no new read.;rev3=census-ruling-region-ha-graceful-terminate-t2;basis=Cap Final, Finish and marker contexts by the shutdown deadline and reserves; keep calls synchronous and stop proof unchanged; record successful marker completion under the service mutex. No read added.;rev3=census-ruling-region-ha-held-build;basis=region HA held-requests Task 5: records the written marker's clean flag on the entry (haReleaseClean) beside haReleased, for the drain report; no read added;rev3=census-ruling-held-move-speed;basis=reads the entry's drainRelease flag under a.mu; for the drain's release calls the replica's FinishSnapshot (final sync, then a litestream snapshot at the final position, before the store's close) instead of Finish, and logs a snapshot failure naming rt.Host (+registry:Host, the supplied route); marker order, budgets and clean rule unchanged; no new read registry:Host@1403,registry:Host@2484,whole:Route@109,whole:Route@1505,whole:Route@1643,whole:Route@2393,whole:Route@267 7d5428b8024aa8f51ee187e08968beeb855f93cfa36c3acf014f279b289a7b35 |
| +@coverage internal/activator ba0b7f50814873c69635a8673174a4eee50cf55e8d8eb920232a21338612430d |
| +@coverage internal/edge 028cce0f8d3a51cd21d2287cf7764a487f2d75e3146be867abcb5df60aea94b4 |
| +@coverage internal/host b1ad7db55dc86fceee066db2806a461a5dfdc79f873c27a9a8f9a38a3afb205d |
| +@coverage internal/lease 34c056ec827799061d3c31f78e5e4b45eac3c68fb0c5a258fe2a65819220df92 |