region HA DR-2: departures delete the retired member's status snapshot
A retired group member's status/boxes snapshot stays fresh for 15 minutes after its last write, while its departure deletes the edges file within minutes. edgesfile.JoinLive reads a fresh snapshot with no edges file as incomplete evidence, so every automatic create outside the home region was refused until the snapshot aged out (dev rehearsal 2026-11-07). The departure now deletes the snapshot on its ETag after the edges phases, for group references only. It is best-effort and time-bounded, leaving the completion save 2 s. JoinLive is unchanged. Reviews: Astra R1 (no P1; P2 deadline fix applied and checked). Census approved (#280). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Squashed from fix/dr2-departed-member-snapshot into main.
6 files changed,
+280
−0
docs/superpowers/notes/2026-11-07-region-ha-g3-fixes-follow-ups.md+1 −0docs/superpowers/notes/census-proposal-region-ha-dr2.md+19 −0internal/host/hadepartures_dr2_test.go+208 −0internal/host/hadepartures_scan.go+46 −0internal/provision/testdata/plan14-root-reads-chain.tsv+1 −0internal/provision/testdata/plan14-root-reads-region-ha-dr2.tsv+5 −0
CI passed — run details
diff --git a/docs/superpowers/notes/2026-11-07-region-ha-g3-fixes-follow-ups.md b/docs/superpowers/notes/2026-11-07-region-ha-g3-fixes-follow-ups.md| index 085035753..2701fcc83 100644 |
| --- a/docs/superpowers/notes/2026-11-07-region-ha-g3-fixes-follow-ups.md |
| +++ b/docs/superpowers/notes/2026-11-07-region-ha-g3-fixes-follow-ups.md |
| @@ -11,6 +11,7 @@ Branch `region-ha-g3-fixes` (2026-11-07). These are the P3s and deferred items f |
| 6. The simulation's churn never mutates records that carry duties. (T2 review) |
| 7. The journal `Visited` map grows with the deployment: about 40 KB per save at 300 records. (T2 review) |
| 8. Retiring a group member leaves its `status/boxes`, `alerts/boxes` and `metrics/boxes` objects behind until they age out (24 h). This branch makes the readers that page or block ignore a proven member with no edges file. The departure itself should delete these objects on their ETags after the edges file. That is a new delete on the termination path, so it needs its own review and census row. (8a3d302 finding, inv/status-rows.md) |
| + DR-2 (2026-11-07) does the `status/boxes` part: a group member's departure deletes that snapshot on its ETag after the edges file, best-effort. `alerts/boxes` stays: deleting it would clear a firing alert as gone, which wants its own decision. `metrics/boxes` stays: it is history under many keys and blocks nothing. |
| ## Steering |
| 9. Bisecting a refused chunk is not paced against Route 53's 5 requests per second. Known foreign latency records in the same region are not filtered out up front, and the shrink guard can refuse a whole pass after a large drop. (T1 review) |
diff --git a/docs/superpowers/notes/census-proposal-region-ha-dr2.md b/docs/superpowers/notes/census-proposal-region-ha-dr2.md| new file mode 100644 |
| index 000000000..0ff4759ae |
| --- /dev/null |
| +++ b/docs/superpowers/notes/census-proposal-region-ha-dr2.md |
| @@ -0,0 +1,19 @@ |
| +# Census approval: region-ha-dr2 |
| + |
| +Ruling `census-ruling-region-ha-dr2`. The independent reviewer approves or rejects every change below, 0 with a new disposition; nothing goes to the census owner (Paul, #280, 2026-10-26). |
| + |
| +| unit | change | read sites | what changed | |
| +|---|---|---|---| |
| +| `internal/host/hadepartures_scan.go` `Controller.complete` | sites | +whole:HADeparture | DR-2: after the edges phases, calls retireStatusSnapshot, which for a deterministic account/iid group reference only does one GET of status/boxes/<ref>.json in the deployment store and a conditional delete of that exact revision (ETag). Best-effort and time-bounded (at most 5 s, always leaving 2 s of the step for the completion save; Astra R1 P2): any failure or timeout is logged and never holds completion, paging or acknowledgement. Fixed refs untouched. No filesystem, executable or new authority read; no change to the edges deletion, completion gates or ordering. | |
| + |
| +Envelopes re-pinned: `internal/host`. |
| + |
| +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/host/hadepartures_scan.go` `Controller.complete`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-region-ha-p1b3b-t;basis=B4: Read the durable departure/scan and current inventory, then conditionally delete only the retained exact edges key/revision. Reread uncertain results and refuse replacement identities. Persist deletion and acknowledged index phases before complete; queue receipts stay in memory and only complete rows acknowledge. Fresh process evidence is required before authority checkpoint reuse. Fix r1/P15: ignore the old scan-level ETag override and delete only the original departure ETag. Exact-key readback retries the same tag; a changed tag is never deleted and advances only with a different verified iid under the same ref/account/scope, otherwise holds and pages. Persist permission fault episodes; route completion faults through bounded retry. No new filesystem or executable input. B4 fix r4/P18 supersedes fixed-ref deletion: only the deterministic account/iid group reference may delete its retained exact ETag. Every other ref performs an exact-key GET and stays pending unless absent or the existing verified newer-incarnation check succeeds; the live replacement file is left intact. Group revision changes stay pending. No new key or authority read. B5: Increment completion counter only after the durable complete phase; C4 ordering stays after that commit.;rev3=census-ruling-region-ha-p3b;basis=Require registered admitted work before completing a departure or acknowledging it. Existing coverage, inventory, lease and successor reads remain; closed members defer rather than clear obligations.;rev3=census-ruling-region-ha-g2r-fixes;basis=W3: drops the per-departure nudge bookkeeping (moved to a fixed-size global limiter). Completion gates, exact-ETag deletion and reads unchanged.;rev3=census-ruling-region-ha-g3-fixes;basis=Require current inventory visit coverage and re-read group edges before conditional deletion. Verify identity and scope before rebinding a changed ETag; preserve fixed-ref retention and exact-ETag deletion. Reads scan EdgesETag and coverage state; no new object key or read source. |
| + |
| +Seal: `5b31785441c6a48ddae93e9f3c0f8962f7983b55d89b3acb90d9a6b505647b36` → `7247af7f4de84593d83c6f60c0147d0a04836146197dd60c2ed2bf78919cad22`. |
| + |
| +Overlay: `internal/provision/testdata/plan14-root-reads-region-ha-dr2.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`. |
diff --git a/internal/host/hadepartures_dr2_test.go b/internal/host/hadepartures_dr2_test.go| new file mode 100644 |
| index 000000000..813d13b98 |
| --- /dev/null |
| +++ b/internal/host/hadepartures_dr2_test.go |
| @@ -0,0 +1,208 @@ |
| +package host |
| + |
| +import ( |
| + "context" |
| + "errors" |
| + "os" |
| + "strings" |
| + "testing" |
| + "time" |
| + |
| + "github.com/carlosframework/platform/internal/edgesfile" |
| + "github.com/carlosframework/platform/internal/hafresh" |
| + "github.com/carlosframework/platform/internal/provision" |
| + "github.com/carlosframework/platform/internal/registry" |
| + "github.com/carlosframework/platform/internal/release" |
| + "github.com/carlosframework/platform/internal/status" |
| +) |
| + |
| +// DR-2 (dev rehearsal 2026-11-07): a retired group member's status snapshot |
| +// stays fresh for 3 x status.SnapshotPeriod after its last write, while the |
| +// departure deletes its edges file within minutes. edgesfile.JoinLive reads a |
| +// fresh snapshot with no edges file as incomplete evidence (ruling (A)), so |
| +// every automatic non-home create was refused until the snapshot aged out. |
| +// The departure that deletes the edges file must take the snapshot with it. |
| + |
| +// dr2Finalize drives the departure to "complete" with the dead box's status |
| +// snapshot written lastWrite before the finalize, and returns the store's |
| +// snapshot read the console joins on, one minute after the finalize. |
| +func dr2Finalize(t *testing.T, x *g3Departure, lastWrite time.Duration) edgesfile.Snapshot { |
| + t.Helper() |
| + ctx := t.Context() |
| + for _, b := range []struct { |
| + ref string |
| + at time.Time |
| + }{{x.dead.Ref, x.now.Add(-lastWrite)}, {x.peer.Ref, x.now}} { |
| + if err := status.WriteBox(ctx, x.store, status.Box{Label: b.ref, GeneratedAt: b.at}); err != nil { |
| + t.Fatal(err) |
| + } |
| + } |
| + // The live peer publishes its own edges file: the read below must still |
| + // see one fresh, published box, so a pass that deleted everything fails. |
| + peer := x.dead |
| + x.dead = x.peer |
| + key, tag := x.edgesKey, x.edgesTag |
| + x.edgesKey, x.edgesTag = edgesfile.Key(x.peer.Ref), "" |
| + x.writeEdges(t) |
| + x.dead, x.edgesKey, x.edgesTag = peer, key, tag |
| + |
| + entry, _ := provision.LifetimeEntryOf(x.records[0]) |
| + raw, _ := hafresh.MarkerBody(5, hafresh.Marker{V: 1, Box: x.dead.Ref, IID: x.dead.InstanceID, Lifetime: entry.ID}) |
| + x.fx.PutLock("instances/"+x.records[0].Host, raw) |
| + for i := 0; i < 6 && x.row(t).Phase != "complete"; i++ { |
| + if err := x.c.step(ctx); err != nil { |
| + t.Fatal(err) |
| + } |
| + x.now = x.now.Add(31 * time.Second) |
| + } |
| + if d := x.row(t); d.Phase != "complete" { |
| + t.Fatalf("departure never finalized: %+v", d) |
| + } |
| + if _, _, err := x.store.Get(ctx, x.edgesKey); !errors.Is(err, os.ErrNotExist) { |
| + t.Fatalf("edges file survived the departure: %v", err) |
| + } |
| + snap, err := edgesfile.ReadLiveSnapshot(ctx, x.store, x.now.Add(time.Minute)) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + return snap |
| +} |
| + |
| +func TestDepartureDR2RetiredSnapshotGoesWithEdges(t *testing.T) { |
| + x := newG3Departure(t, 1) |
| + // The rehearsal's shape: last snapshot about four minutes before the |
| + // edges delete, so it stays fresh for another eleven. |
| + snap := dr2Finalize(t, x, 4*time.Minute) |
| + if !snap.BoxesComplete { |
| + t.Fatal("DR-2: a retired member's fresh status snapshot leaves the live read incomplete after its departure finalized") |
| + } |
| + if _, _, err := x.store.Get(t.Context(), "status/boxes/"+x.dead.Ref+".json"); !errors.Is(err, os.ErrNotExist) { |
| + t.Fatalf("retired member's status snapshot survived: %v", err) |
| + } |
| + if _, _, err := x.store.Get(t.Context(), "status/boxes/"+x.peer.Ref+".json"); err != nil { |
| + t.Fatalf("live peer's status snapshot was touched: %v", err) |
| + } |
| + fresh := 0 |
| + for _, f := range snap.Files { |
| + if f.Fresh { |
| + fresh++ |
| + } |
| + } |
| + if fresh != 1 || !snap.EvidenceComplete() { |
| + t.Fatalf("live read after departure: %d fresh, complete %v", fresh, snap.EvidenceComplete()) |
| + } |
| +} |
| + |
| +// statusDeleteRefused fails every delete of a status snapshot. |
| +type statusDeleteRefused struct { |
| + release.Store |
| + tries int |
| +} |
| + |
| +func (s *statusDeleteRefused) refuse(key string) error { |
| + if strings.HasPrefix(key, "status/boxes/") { |
| + s.tries++ |
| + return errors.New("AccessDenied") |
| + } |
| + return nil |
| +} |
| +func (s *statusDeleteRefused) Delete(ctx context.Context, key string) error { |
| + if err := s.refuse(key); err != nil { |
| + return err |
| + } |
| + return s.Store.Delete(ctx, key) |
| +} |
| +func (s *statusDeleteRefused) DeleteIfMatch(ctx context.Context, key, etag string) error { |
| + if err := s.refuse(key); err != nil { |
| + return err |
| + } |
| + return release.DeleteIfMatch(ctx, s.Store, key, etag) |
| +} |
| +func (s *statusDeleteRefused) DeleteRevision(ctx context.Context, key, etag string) error { |
| + if err := s.refuse(key); err != nil { |
| + return err |
| + } |
| + return s.Store.(release.IndexedDeleter).DeleteRevision(ctx, key, etag) |
| +} |
| +func (s *statusDeleteRefused) IndexDeletion(ctx context.Context, key string) error { |
| + return s.Store.(release.IndexedDeleter).IndexDeletion(ctx, key) |
| +} |
| + |
| +// The snapshot delete is a cleanup: refusing it must not hold the departure |
| +// (its duties are recovered and its edges file is gone), so the worst case is |
| +// the pre-fix window, never a stuck departure or a page. |
| +func TestDepartureDR2SnapshotDeleteFailureDoesNotBlock(t *testing.T) { |
| + x := newG3Departure(t, 1) |
| + refused := &statusDeleteRefused{Store: x.store} |
| + x.c.cfg.OpenStore = func(context.Context) (release.Store, error) { return refused, nil } |
| + snap := dr2Finalize(t, x, 4*time.Minute) |
| + if refused.tries == 0 { |
| + t.Fatal("the departure never tried to delete the retired snapshot") |
| + } |
| + if x.pages != 0 { |
| + t.Fatalf("a refused snapshot delete paged %d times", x.pages) |
| + } |
| + if snap.BoxesComplete { |
| + t.Fatal("the refused delete left no snapshot, so this test proves nothing") |
| + } |
| + if _, _, acks := x.queue.counts(); acks != 1 { |
| + t.Fatal("departure not acknowledged", acks) |
| + } |
| +} |
| + |
| +// A fixed reference is reused by the box that replaces it, so its departure |
| +// must leave the snapshot under that label alone: it may be the new box's. |
| +func TestDepartureDR2FixedReferenceKeepsSnapshot(t *testing.T) { |
| + store := release.NewDirStore(t.TempDir()) |
| + if err := status.WriteBox(t.Context(), store, status.Box{Label: "fixed", GeneratedAt: time.Now()}); err != nil { |
| + t.Fatal(err) |
| + } |
| + c := &Controller{cfg: DepartureConfig{Logf: func(string, ...any) {}}} |
| + d := registry.HADeparture{} |
| + d.Box.Ref, d.Box.Account, d.Box.InstanceID = "fixed", "111122223333", "i-1123456789abcdef0" |
| + c.retireStatusSnapshot(t.Context(), store, d) |
| + if _, _, err := store.Get(t.Context(), "status/boxes/fixed.json"); err != nil { |
| + t.Fatalf("a fixed reference's departure took the snapshot under its label: %v", err) |
| + } |
| +} |
| + |
| +// statusReadHangs answers every status snapshot read only when its context |
| +// ends: a store that has stopped answering. |
| +type statusReadHangs struct{ statusDeleteRefused } |
| + |
| +func (s *statusReadHangs) Get(ctx context.Context, key string) ([]byte, string, error) { |
| + if strings.HasPrefix(key, "status/boxes/") { |
| + s.tries++ |
| + <-ctx.Done() |
| + return nil, "", ctx.Err() |
| + } |
| + return s.Store.Get(ctx, key) |
| +} |
| + |
| +// Astra R1 P2: the cleanup must not spend the time the departure needs to |
| +// record that it is complete. A hung status read near the end of a step's |
| +// budget would otherwise fail save("complete") and page for a departure |
| +// whose duties and edges file are already settled. |
| +func TestDepartureDR2HungSnapshotReadDoesNotPage(t *testing.T) { |
| + x := newG3Departure(t, 1) |
| + hung := &statusReadHangs{statusDeleteRefused{Store: x.store}} |
| + x.c.cfg.OpenStore = func(context.Context) (release.Store, error) { return hung, nil } |
| + entry, _ := provision.LifetimeEntryOf(x.records[0]) |
| + raw, _ := hafresh.MarkerBody(5, hafresh.Marker{V: 1, Box: x.dead.Ref, IID: x.dead.InstanceID, Lifetime: entry.ID}) |
| + x.fx.PutLock("instances/"+x.records[0].Host, raw) |
| + for i := 0; i < 6 && x.row(t).Phase != "complete"; i++ { |
| + ctx, cancel := context.WithTimeout(t.Context(), snapshotRetireReserve+time.Second) |
| + _ = x.c.step(ctx) |
| + cancel() |
| + x.now = x.now.Add(31 * time.Second) |
| + } |
| + if d := x.row(t); d.Phase != "complete" { |
| + t.Fatalf("a hung snapshot read held the departure: %+v", d) |
| + } |
| + if x.pages != 0 { |
| + t.Fatalf("a hung snapshot read paged %d times", x.pages) |
| + } |
| + if hung.tries == 0 { |
| + t.Fatal("the cleanup never ran, so this test proves nothing") |
| + } |
| +} |
diff --git a/internal/host/hadepartures_scan.go b/internal/host/hadepartures_scan.go| index 990828a87..b9302e3ab 100644 |
| --- a/internal/host/hadepartures_scan.go |
| +++ b/internal/host/hadepartures_scan.go |
| @@ -669,6 +669,7 @@ func (c *Controller) complete(ctx context.Context, id string) (result error) { |
| return err |
| } |
| } |
| + c.retireStatusSnapshot(ctx, store, d) |
| if err = save("complete"); err != nil { |
| return err |
| } |
| @@ -679,6 +680,51 @@ func (c *Controller) complete(ctx context.Context, id string) (result error) { |
| return c.ackDeparture(ctx, d) |
| } |
| +// retireStatusSnapshot deletes a departed group member's status snapshot once |
| +// its edges file is gone (DR-2). The snapshot stays fresh for three status |
| +// periods after the box's last write, and edgesfile.JoinLive reads a fresh |
| +// snapshot with no edges file as incomplete evidence, which refuses every |
| +// automatic create outside the home region until it ages out. |
| +// |
| +// Only a group reference qualifies: it names one account and instance |
| +// forever, and that instance is proven terminated, so nothing else writes |
| +// this key. A fixed reference is reused by its replacement, whose snapshot |
| +// this must never take. The delete is conditional on the revision read here, |
| +// and it is a cleanup: any failure leaves the snapshot to age out as before |
| +// and never holds the departure. |
| +// snapshotRetireReserve is the time retireStatusSnapshot leaves for the |
| +// durable completion save that follows it. |
| +const snapshotRetireReserve = 2 * time.Second |
| + |
| +func (c *Controller) retireStatusSnapshot(ctx context.Context, store release.Store, d registry.HADeparture) { |
| + if d.Box.Ref != groupReferenceOf(d.Box.Account, d.Box.InstanceID) { |
| + return |
| + } |
| + key := "status/boxes/" + d.Box.Ref + ".json" |
| + // Leave the step the time it needs to record completion (Astra R1 P2): |
| + // a hung read here must not fail save("complete") and page. |
| + budget := 5 * time.Second |
| + if deadline, ok := ctx.Deadline(); ok { |
| + budget = min(budget, time.Until(deadline)-snapshotRetireReserve) |
| + } |
| + if budget <= 0 { |
| + c.logf("Box %s left its status report %s behind (no time left in this pass). It stops counting as fresh within 15 minutes.", d.Box.Ref, key) |
| + return |
| + } |
| + call, cancel := context.WithTimeout(ctx, budget) |
| + defer cancel() |
| + _, tag, err := store.Get(call, key) |
| + if errors.Is(err, os.ErrNotExist) { |
| + return |
| + } |
| + if err == nil { |
| + err = release.DeleteIfMatch(call, store, key, tag) |
| + } |
| + if err != nil { |
| + c.logf("Box %s left its status report %s behind (%v). It stops counting as fresh within 15 minutes.", d.Box.Ref, key, err) |
| + } |
| +} |
| + |
| func (c *Controller) bindDepartureEdges(ctx context.Context, d registry.HADeparture, raw []byte, tag string) error { |
| if tag == "" || c.cfg.Identities == nil || d.Box.Ref != groupReferenceOf(d.Box.Account, d.Box.InstanceID) { |
| return errDepartureIdentity |
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv| index 0a2517569..0a8131daf 100644 |
| --- a/internal/provision/testdata/plan14-root-reads-chain.tsv |
| +++ b/internal/provision/testdata/plan14-root-reads-chain.tsv |
| @@ -117,3 +117,4 @@ plan14-root-reads-signin-first-run-mobile.tsv 61027a32e31cb7ce017304f526f668c269 |
| plan14-root-reads-claim-ux-edge.tsv 889ce9f72f93b581b29527e5c5d4410b47732424ce8ce45c080904ebb6c52195 |
| plan14-root-reads-region-ha-g3-fixes.tsv cd001bf3a9a8871f12d1ca9cfa0a925760c1fc345dc911246ffaabc235dfabf6 |
| plan14-root-reads-claim-countdown.tsv 5b31785441c6a48ddae93e9f3c0f8962f7983b55d89b3acb90d9a6b505647b36 |
| +plan14-root-reads-region-ha-dr2.tsv 7247af7f4de84593d83c6f60c0147d0a04836146197dd60c2ed2bf78919cad22 |
diff --git a/internal/provision/testdata/plan14-root-reads-region-ha-dr2.tsv b/internal/provision/testdata/plan14-root-reads-region-ha-dr2.tsv| new file mode 100644 |
| index 000000000..c836b8b8b |
| --- /dev/null |
| +++ b/internal/provision/testdata/plan14-root-reads-region-ha-dr2.tsv |
| @@ -0,0 +1,5 @@ |
| +# Census overlay region-ha-dr2, written by census-propose (#369). census-ruling-region-ha-dr2, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-region-ha-dr2.md. |
| +# 0 body, 1 sites, 1 envelope: each changed unit re-frozen at its existing disposition with its claim appended. |
| +@legacy 96bc6eeef386b0a0a2cbbb9fcda68a84e458f26bd385510e2425f73f869dc337 internal/host/hadepartures_scan.go Controller.complete legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1b3b-t;basis=B4: Read the durable departure/scan and current inventory, then conditionally delete only the retained exact edges key/revision. Reread uncertain results and refuse replacement identities. Persist deletion and acknowledged index phases before complete; queue receipts stay in memory and only complete rows acknowledge. Fresh process evidence is required before authority checkpoint reuse. Fix r1/P15: ignore the old scan-level ETag override and delete only the original departure ETag. Exact-key readback retries the same tag; a changed tag is never deleted and advances only with a different verified iid under the same ref/account/scope, otherwise holds and pages. Persist permission fault episodes; route completion faults through bounded retry. No new filesystem or executable input. B4 fix r4/P18 supersedes fixed-ref deletion: only the deterministic account/iid group reference may delete its retained exact ETag. Every other ref performs an exact-key GET and stays pending unless absent or the existing verified newer-incarnation check succeeds; the live replacement file is left intact. Group revision changes stay pending. No new key or authority read. B5: Increment completion counter only after the durable complete phase; C4 ordering stays after that commit.;rev3=census-ruling-region-ha-p3b;basis=Require registered admitted work before completing a departure or acknowledging it. Existing coverage, inventory, lease and successor reads remain; closed members defer rather than clear obligations.;rev3=census-ruling-region-ha-g2r-fixes;basis=W3: drops the per-departure nudge bookkeeping (moved to a fixed-size global limiter). Completion gates, exact-ETag deletion and reads unchanged.;rev3=census-ruling-region-ha-g3-fixes;basis=Require current inventory visit coverage and re-read group edges before conditional deletion. Verify identity and scope before rebinding a changed ETag; preserve fixed-ref retention and exact-ETag deletion. Reads scan EdgesETag and coverage state; no new object key or read source.;rev3=census-ruling-region-ha-dr2;basis=DR-2: after the edges phases, calls retireStatusSnapshot, which for a deterministic account/iid group reference only does one GET of status/boxes/<ref>.json in the deployment store and a conditional delete of that exact revision (ETag). Best-effort and time-bounded (at most 5 s, always leaving 2 s of the step for the completion save; Astra R1 P2): any failure or timeout is logged and never holds completion, paging or acknowledgement. Fixed refs untouched. No filesystem, executable or new authority read; no change to the edges deletion, completion gates or ordering. registry:DeleteUncertain@3813,registry:DeleteUncertain@4198,registry:EdgesETag@1894,registry:EdgesETag@2906,registry:Hosts@5076,registry:InventoryGeneration@1846,registry:PermissionAlerted@2426,registry:PermissionAlerted@3559,registry:PermissionAlerted@4342,registry:PermissionAlerted@4746,registry:PermissionAlerted@841,registry:PermissionAlerted@883,registry:Phase@1002,registry:Phase@1042,registry:Phase@1538,registry:Phase@262,registry:Phase@3692,registry:Phase@4460,registry:Phase@680,registry:Phase@950,registry:Phase@967,registry:Version@665,whole:HADeparture@2846,whole:HADeparture@315,whole:HADeparture@442,whole:HADeparture@4872,whole:HADeparture@5125,whole:HADepartureHostScan@5078,whole:HADepartureScan@1718,whole:HADepartureScan@643 d27948e878037f10244e753357cf0686a69bfb065e44d5584117fabb707259c3 |
| +internal/host/hadepartures_scan.go Controller.complete legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1b3b-t;basis=B4: Read the durable departure/scan and current inventory, then conditionally delete only the retained exact edges key/revision. Reread uncertain results and refuse replacement identities. Persist deletion and acknowledged index phases before complete; queue receipts stay in memory and only complete rows acknowledge. Fresh process evidence is required before authority checkpoint reuse. Fix r1/P15: ignore the old scan-level ETag override and delete only the original departure ETag. Exact-key readback retries the same tag; a changed tag is never deleted and advances only with a different verified iid under the same ref/account/scope, otherwise holds and pages. Persist permission fault episodes; route completion faults through bounded retry. No new filesystem or executable input. B4 fix r4/P18 supersedes fixed-ref deletion: only the deterministic account/iid group reference may delete its retained exact ETag. Every other ref performs an exact-key GET and stays pending unless absent or the existing verified newer-incarnation check succeeds; the live replacement file is left intact. Group revision changes stay pending. No new key or authority read. B5: Increment completion counter only after the durable complete phase; C4 ordering stays after that commit.;rev3=census-ruling-region-ha-p3b;basis=Require registered admitted work before completing a departure or acknowledging it. Existing coverage, inventory, lease and successor reads remain; closed members defer rather than clear obligations.;rev3=census-ruling-region-ha-g2r-fixes;basis=W3: drops the per-departure nudge bookkeeping (moved to a fixed-size global limiter). Completion gates, exact-ETag deletion and reads unchanged.;rev3=census-ruling-region-ha-g3-fixes;basis=Require current inventory visit coverage and re-read group edges before conditional deletion. Verify identity and scope before rebinding a changed ETag; preserve fixed-ref retention and exact-ETag deletion. Reads scan EdgesETag and coverage state; no new object key or read source.;rev3=census-ruling-region-ha-dr2;basis=DR-2: after the edges phases, calls retireStatusSnapshot, which for a deterministic account/iid group reference only does one GET of status/boxes/<ref>.json in the deployment store and a conditional delete of that exact revision (ETag). Best-effort and time-bounded (at most 5 s, always leaving 2 s of the step for the completion save; Astra R1 P2): any failure or timeout is logged and never holds completion, paging or acknowledgement. Fixed refs untouched. No filesystem, executable or new authority read; no change to the edges deletion, completion gates or ordering. registry:DeleteUncertain@3813,registry:DeleteUncertain@4198,registry:EdgesETag@1894,registry:EdgesETag@2906,registry:Hosts@5076,registry:InventoryGeneration@1846,registry:PermissionAlerted@2426,registry:PermissionAlerted@3559,registry:PermissionAlerted@4342,registry:PermissionAlerted@4746,registry:PermissionAlerted@841,registry:PermissionAlerted@883,registry:Phase@1002,registry:Phase@1042,registry:Phase@1538,registry:Phase@262,registry:Phase@3692,registry:Phase@4460,registry:Phase@680,registry:Phase@950,registry:Phase@967,registry:Version@665,whole:HADeparture@2846,whole:HADeparture@315,whole:HADeparture@442,whole:HADeparture@4872,whole:HADeparture@5125,whole:HADepartureHostScan@5078,whole:HADepartureScan@1718,whole:HADepartureScan@643 d27948e878037f10244e753357cf0686a69bfb065e44d5584117fabb707259c3 |
| +@coverage internal/host 384d3a2e206f25d36cd2045f96e3311d618dc363fdc8ce633a3ccd8de7b8937c |