member backups: plans final; 2a rev 4 with Fable's group fixes (#898)
Astra plan round 3: slice 1 READY; slice 2a NOT READY on the repeated group-assignment family. Fable showed the asymmetry yields only a harmless double drill. Paul accepted double drills; Fable's changes applied: unassigned hosts recorded, the coverage test moved to internal/edge, the assignment read once per run, freshness limits stated, and notes for 2b.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/superpowers/notes/reviews/member-backups/CODEX-FINDINGS-member-backups-plans-R3.md+27 −0docs/superpowers/notes/reviews/member-backups/FABLE-GUIDANCE-group-assignment.md+30 −0docs/superpowers/plans/2026-11-11-member-backups-slice2a.md+9 −6
CI failed — run details
Intent
<task-notification> <task-id>bnsjttkif</task-id> <tool-use-id>toolu_01DEybtMMLiBWWSKLMFJKe9h</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/ab362fc0-f177-4a7f-a92e-4a29ea210aad/tasks/bnsjttkif.output</output-file> <status>completed</status> <summary>Background command "Run Astra plan review round 3" completed (exit code 0)</summary> </task-notification>
<task-notification> <task-id>b8l4dopz1</task-id> <tool-use-id>toolu_01FWkvnNXNj19T5ZTSDpJrYQ</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/ab362fc0-f177-4a7f-a92e-4a29ea210aad/tasks/b8l4dopz1.output</output-file> <status>completed</status> <summary>Background command "Run Fable 5.2 on group drill assignment" completed (exit code 0)</summary> </task-notification>
Attributed to this commit: 18.2 g CO₂e (2,133,543 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on design-member-backups, 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/reviews/member-backups/CODEX-FINDINGS-member-backups-plans-R3.md b/docs/superpowers/notes/reviews/member-backups/CODEX-FINDINGS-member-backups-plans-R3.md| new file mode 100644 |
| index 000000000..1c5d12a88 |
| --- /dev/null |
| +++ b/docs/superpowers/notes/reviews/member-backups/CODEX-FINDINGS-member-backups-plans-R3.md |
| @@ -0,0 +1,27 @@ |
| +| Finding | Disposition | Evidence in rev 3 | |
| +|---|---|---| |
| +| R1-9 — Group-box assignment | **PARTLY** | [Task 2](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups/docs/superpowers/plans/2026-11-11-member-backups-slice2a.md:75) adds periodic production and integration tests, but its source still cannot guarantee agreement between boxes. Details below. | |
| +| 15 — `dutyHRW` consumers | **FIXED** | [Line 69](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups/docs/superpowers/plans/2026-11-11-member-backups-slice2a.md:69) preserves the private wrapper, covering both the direct test caller and the existing `go:linkname`. | |
| +| 16 — Once-per-run streak | **FIXED** | [Line 149](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups/docs/superpowers/plans/2026-11-11-member-backups-slice2a.md:149) requires the immutable run-start baseline for every publication; line 142 adds the integration test. | |
| +| 17 — Response key set | **FIXED** | [Line 115](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups/docs/superpowers/plans/2026-11-11-member-backups-slice1.md:115) includes `files`, defines optional fields per class, and checks the nested key set. | |
| + |
| +Reviewed `ee211a5f0e2f824508840170db1aaa425720b422` on `design-member-backups`. Static review; no repository tests run or files changed. Existing working-tree changes were excluded. |
| + |
| +**R1-9 remains unresolved: complete, deterministic group assignment.** Slice 2a, Task 2 requires every box to compute the same assignment map from `Edge.DutySnapshot`, including when one box advertises only a subset of hosts. |
| + |
| +However, [`dutySnapshot`](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups/internal/edge/wakeplacement.go:184) checks host advertisement and dialability only for peers. Its own box bypasses those checks and enters `Serving`. This behavior is intentional and already covered by [`TestWakeSnapshotSelfAdoptsBeforePublication`](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups/internal/edge/wakeplacement_test.go:219). |
| + |
| +Consequently, even with identical edges files: |
| + |
| +- A and B advertise a host; C has its local route but has not advertised it. |
| +- A and B compute over `{A, B}`; C computes over `{A, B, C}`. |
| +- When C wins the larger set, C drills the host while the winner among A and B also drills it. |
| + |
| +The timer fixes demand-driven freshness, but it does not establish the authoritative assignment source requested after round 2. [Task 2’s agreement test](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/member-backups/docs/superpowers/plans/2026-11-11-member-backups-slice2a.md:78) cannot hold for this supported input under the specified algorithm. |
| + |
| +**Concrete fix:** defer group drilling with an explicit operator-visible refusal, preserving fixed-box drilling. If group drilling remains required, its assignment source must apply identical eligibility rules to every candidate, including self; persisting `DutySnapshot` is insufficient. Keep the counterexample above as a required producer-to-drill test. This remains the repeated R1-9 family, not a new finding or a fresh review budget. |
| + |
| +No new findings beyond that unresolved disposition. Round 3 is complete; no fourth round initiated. |
| + |
| +Slice 1 — **READY** |
| +Slice 2a — **NOT READY** |
| \ No newline at end of file |
diff --git a/docs/superpowers/notes/reviews/member-backups/FABLE-GUIDANCE-group-assignment.md b/docs/superpowers/notes/reviews/member-backups/FABLE-GUIDANCE-group-assignment.md| new file mode 100644 |
| index 000000000..0bc84a743 |
| --- /dev/null |
| +++ b/docs/superpowers/notes/reviews/member-backups/FABLE-GUIDANCE-group-assignment.md |
| @@ -0,0 +1,30 @@ |
| +**Verdict: SOUND WITH CHANGES.** Static read of ee211a5f; no files changed, nothing run. |
| + |
| +The core holds. A box always counts itself when its own file is usable and not denied; only peers must advertise the host and be dialable (`internal/edge/wakeplacement.go:177-193`). So the highest-scoring box always picks itself, and disagreement leans towards a double drill, which is harmless (own key per box, read-only restore). "Drilled by none" needs the top scorer to be dead with a file still under 15 minutes old, draining but not yet seen, or unusable. All three are transient or recorded. |
| + |
| +1. **Close the silent hole: a host in nobody's record.** `computeAssignment` walks `rt.HA` routes, but the drill walks `ActivatorLeased() && DBPath != ""` (`internal/ops/hibernate_verify.go:59`). A drill host in neither `Hosts` nor `Unknown` of a fresh file is unspecified in Task 5. Record it `not_reached`/`no_assignment`, never skip it. Alerts are per box, so a host no box records can never raise `verify_coverage`. |
| + |
| +2. **Fix the Task 2 test; as written it cannot be built and asserts something false.** |
| + - The fixture helpers (`wakeFile`, `wakeMap`) are unexported test code in `internal/edge` over an unexported `homeMap` (`wakeplacement_test.go:20,40`), so `internal/host` cannot use them. |
| + - "Each box gives the same `Hosts` map" contradicts `TestWakeSnapshotSelfAdoptsBeforePublication` (`wakeplacement_test.go:219`): an unpublished box counts itself while peers do not. |
| + - Put the three-box test in `internal/edge` and assert the property the drill uses: for every host, at least one usable box names itself, and exactly one in steady state. |
| + - Add cases: self not yet published (double allowed, none forbidden), a draining box, a peer file older than 15 minutes, a box with no signing key, a sidecar. |
| + - Keep `computeAssignment` in `internal/host` with a stub view, plus one witness that the agent passes the very closure at `agent.go:1267`, extracted and named once. |
| + |
| +3. **Say plainly that group boxes will almost never prove `stale`.** A sleeping HA host's lock is a release marker: expired in 1970, with an owner `ParseOwner` refuses (`internal/hafresh/lock.go:45-53,73`). An awake host is held by its server, which is the HRW winner only about one time in n. Freshness is therefore `unknown` nearly everywhere. Acceptable for 2a (restore and integrity are still proved), but put it in Global Constraints. A later refinement is "the holder drills what it holds awake". |
| + |
| +4. **Correct the plan's "same choice the HA duties use".** `DecideDuty` picks the release marker's box first (`haduties.go:68-70`) and HRW only when the lock is absent (`:63-66`). Reusing the evidence and HRW is still right. A marker or lease rule would be single-valued, but costs a lock GET per host per box per night, orphans hosts whose releasing box has gone, and piles drills onto the last server. I found no better roster. |
| + |
| +5. **The quiet-region worry (R1-9) does not apply here.** HA boxes rewrite their file every 5 minutes whenever headroom is present (`internal/host/edgesfile.go:1083`; `boxchoice/policy.go:23-27`), unlike the general "generation is arbitrarily old" case (`edgesfile/fold.go:25-28`). The fold is in memory (`wakeplacement.go:105`), so the 5-minute timer adds no S3 requests. Keep the quiet-box test case to pin this. |
| + |
| +6. **Read the assignment once at run start and use that snapshot for the whole run.** The timer fires at 03:00 with a 30-minute random delay (`carlos-hibernate-verify.timer:10-11`) and runs up to 45 minutes. A re-read mid-run would let hosts migrate between boxes during the drill. |
| + |
| +7. **Joins and leaves reset history.** |
| + - A reassigned host leaves the old box's record and arrives on the new one as never-seen with `FirstSeen = now`. Never-seen sorts first, so it is normally drilled that night, but the 7-day clock restarts and a `failed` alert clears on the old box unresolved. Seed the newcomer from the previous owner's verdict in 2b, or note the limit. |
| + - A departed box's `control/verify/<ref>.json` stays forever; 2b's reader must ignore records whose box is gone. |
| + |
| +8. **Minor, no change needed.** |
| + - A box with no signing key assigns every non-sidecar host to itself (`wakeplacement.go:185`): wasteful, bounded by the budget. |
| + - Sidecars are symmetric (`:180-183`); a failed lifetime lookup lands in `Unknown`. |
| + - Clock skew only matters in the 15-minute tail of a dead box; the assignment's own age check uses one box's clock. |
| + - Refs are box references, so a replacement box inherits both the assignment and the record. |
diff --git a/docs/superpowers/plans/2026-11-11-member-backups-slice2a.md b/docs/superpowers/plans/2026-11-11-member-backups-slice2a.md| index b25650927..22e35622f 100644 |
| --- a/docs/superpowers/plans/2026-11-11-member-backups-slice2a.md |
| +++ b/docs/superpowers/plans/2026-11-11-member-backups-slice2a.md |
| @@ -4,7 +4,7 @@ |
| **Goal:** Every box with sleeping instances runs the restore drill nightly and publishes its own record, `control/verify/<ref>.json`, whose verdicts are bound to the instance identity they tested, and operators are alerted when a test fails, keeps being unverified, or falls more than 7 days behind. |
| -**Plan rev 3** (2026-11-11): Astra plan round 2 (`CODEX-FINDINGS-member-backups-plans-R2.md`) applied, marked **(P2-N)**; for the repeated group-assignment family Paul chose to build an authoritative assignment source now (2026-11-11), Task 2. **Plan rev 2**: Astra plan round 1 (`docs/superpowers/notes/reviews/member-backups/CODEX-FINDINGS-member-backups-plans.md`, READY AFTER FIXES) fully applied; findings marked **(P-N)**. |
| +**Plan rev 4** (2026-11-11): Astra plan round 3 READY for slice 1 and NOT READY here on the repeated group-assignment family; Fable 5.2 (`FABLE-GUIDANCE-group-assignment.md`, SOUND WITH CHANGES) showed the asymmetry yields at worst a harmless double drill, never a missed host. Paul chose to accept double drills and apply Fable's changes (2026-11-11), marked **(F2-N)**; no fourth Astra round, the whole-branch build review covers it. **Plan rev 3**: Astra plan round 2 (`CODEX-FINDINGS-member-backups-plans-R2.md`) applied, marked **(P2-N)**; for the repeated group-assignment family Paul chose to build an authoritative assignment source now (2026-11-11), Task 2. **Plan rev 2**: Astra plan round 1 (`docs/superpowers/notes/reviews/member-backups/CODEX-FINDINGS-member-backups-plans.md`, READY AFTER FIXES) fully applied; findings marked **(P-N)**. |
| **Architecture:** `hibernate-verify` stops sharing one deployment-wide key. Each run opens the `dbreads` identity bracket per host, plans with `dbdoor.PlanFrom`, restores pinned to that TXID, closes the bracket, and records a v2 verdict. It works oldest first inside a 45-minute budget, publishes every 10 minutes, and leaves a local copy the box agent turns into alert rules. Freshness is compared only when this box holds the host's live lease. |
| @@ -16,11 +16,12 @@ |
| - Record key: `control/verify/<ref>.json`, one per box, written only by that box. `<ref>` is the box's lease reference (the agent's `metricsBoxLabel`), never `os.Hostname()`. |
| - `control/restore-verify.json` is no longer written or read by any code; its text mentions move to the new key. |
| +- On group boxes freshness will almost always be `unknown`: a sleeping HA host's lock is a release marker `ParseOwner` refuses (`internal/hafresh/lock.go:45-53,73`), and an awake host is held by its server, which is the assigned box only about one time in n. Restore integrity is still proved. "The holder drills what it holds awake" is a later refinement (F2-3). |
| - Verdicts never say "current". `stale` only when proved, and only when the lock read succeeded, `held == true`, `hafresh.ParseOwner` succeeded and `Ref == self` (`lockstate.go:39-47,78` keeps an expired owner string) (P-14); otherwise freshness is `unknown`, the local database is not read, and it is not a failure. |
| - Budget: drills oldest first (never verified, then stalest `VerifiedAt`), 45 minutes per run by default (`-budget`), `-max` default 0 (no count cap). Publish every 10 minutes and at the end. |
| - The bracket: identity captured before planning, confirmed after the last replica byte AND before every replica-derived outcome is recorded (empty plan, restore error, integrity failure, stale), as `dbreads` does (`read.go:119-135,174-179`) (P-11). Any difference discards the restore and records `unverified` with reason `record_changed` (from `dbreads.CodeRecordChanged`, `"record-changed"`) or `moving`. |
| - The budget is a deadline, not just a start cut-off: the run context's deadline reaches planning, download, restore and `CheckDBContext`; publishing uses its own 30-second context (P-10). |
| -- Group boxes (`CARLOS_BOX_REFERENCE=group`): a host is drilled only by the box its assignment names, where the assignment is `boxchoice.HRW(host, refs)` over that host's own `Serving` set from `Edge.DutySnapshot` (`internal/edge/wakeplacement.go:202`), the same per-host evidence and choice the HA duties use (`haduties.go:233-242`). The agent computes it for every HA host on a 5-minute timer, not on demand, and writes it locally (Task 2). Fixed boxes drill every local sleeping host as today (P-9, P2-9). |
| +- Group boxes (`CARLOS_BOX_REFERENCE=group`): a host is drilled only by the box its assignment names, where the assignment is `boxchoice.HRW(host, refs)` over that host's own `Serving` set from `Edge.DutySnapshot` (`internal/edge/wakeplacement.go:202`), the same per-host evidence and HRW the HA duties use when a host has no lock (`haduties.go:63-66,233-242`); the duties prefer the release marker's box first (`:68-70`), which the drill deliberately doesn't (F2-4). A box counts itself before it advertises a host (`wakeplacement.go:177-193`, `TestWakeSnapshotSelfAdoptsBeforePublication`), so two boxes may drill one host on the same night; that is accepted (own key per box, read-only restore). A host drilled by none needs the top scorer dead, draining unseen or unusable, all transient and recorded. The agent computes it for every HA host on a 5-minute timer, not on demand, and writes it locally (Task 2). Fixed boxes drill every local sleeping host as today (P-9, P2-9). |
| - Scratch stays on disk (`TMPDIR=%C/carlos-verify`, `TestVerifyDrillsRestoreToDiskNotTmpfs`). |
| - Alert thresholds: `verify_failed@<host>` on a failed verdict; `verify_unverified@<host>` after 3 consecutive unverified runs for any reason except `not_reached`; `verify_coverage` when any host's last decided verdict (passed or failed) is older than 7 days, or it has none and was first seen more than 7 days ago. |
| - Copy: only strings approved in Task 0, verbatim; no em dashes. |
| @@ -72,13 +73,14 @@ |
| - Produces: |
| - `type Self struct { Ref string; Group bool }`; `func Write(dataDir string, s Self) error` (atomic `<dataDir>/monitor/self.json`, `v: 1`, mode 0644); `func Read(dataDir string) (Self, error)` (`os.ErrNotExist` when absent; refuses an empty or invalid ref). |
| - `type Assignment struct { At time.Time; Hosts map[string]string /*host -> winning ref*/; Unknown []string /*HA hosts whose snapshot was not Usable or had no serving box*/ }`; `func WriteAssignment(dataDir string, a Assignment) error` and `func ReadAssignment(dataDir string) (Assignment, error)` (atomic `<dataDir>/monitor/verify-assign.json`). |
| + - In `internal/host`: the closure at `agent.go:1267` is extracted and named once, `func dutyView(e *edge.Edge, lifetimes ...) func(registry.Route) boxchoice.WakeSnapshot`, and passed to both `svc.SetDutyView` and the assignment loop (F2-2). |
| - In `internal/host`: `func computeAssignment(routes []registry.Route, snap func(registry.Route) boxchoice.WakeSnapshot, now time.Time) boxself.Assignment`: for each route with `rt.HA`, take `snap(rt)`; if `!Usable` or `len(Serving) == 0`, list it in `Unknown`; else `Hosts[rt.Host] = boxchoice.HRW(rt.Host, refs of Serving)`. The agent runs it every 5 minutes over the registry's routes with **the same view function it passes to `svc.SetDutyView`** (`agent.go:1267`: `SidecarDutySnapshot` for sidecars, `DutySnapshot` otherwise), named once and used by both, on group boxes only. |
| - `boxchoice.HRW` byte-identical to today's `dutyHRW`. |
| -- [ ] **Step 1: Failing tests:** `TestBoxSelfRoundTrip`, `TestBoxSelfReadMissing`, `TestBoxSelfRefusesEmpty`, `TestAssignmentRoundTrip`; in `internal/host`, `TestAgentWritesSelfRefEqualToLeaseRef` (fixed and group fixtures); `TestHRWMatchesDutyHRW` (golden values); `TestHRWAssignsEachHostOnce` (three refs, 1,000 hosts; removing one ref moves only its hosts); `TestComputeAssignmentFromEdgesFiles` — **end to end through the producer (P2-9):** three boxes' edges files in one region (built with the same fixture helpers the `wakeplacement` tests use), one box advertising a subset of hosts, one quiet box with no recent duty activity; each box's `computeAssignment` over `Edge.DutySnapshot` gives the same `Hosts` map, every HA host appears exactly once across `Hosts` and `Unknown`, a host advertised by only two boxes is never assigned to the third, and the result equals what `DecideDuty`'s absent-view branch picks for the same host. |
| +- [ ] **Step 1: Failing tests:** `TestBoxSelfRoundTrip`, `TestBoxSelfReadMissing`, `TestBoxSelfRefusesEmpty`, `TestAssignmentRoundTrip`; in `internal/host`, `TestAgentWritesSelfRefEqualToLeaseRef` (fixed and group fixtures); `TestHRWMatchesDutyHRW` (golden values); `TestHRWAssignsEachHostOnce` (three refs, 1,000 hosts; removing one ref moves only its hosts); **in `internal/edge`** (its fixture helpers `wakeFile`/`wakeMap` are unexported, `wakeplacement_test.go:20,40`) `TestDrillAssignmentCoversEveryHost` (F2-2, F2-5): three boxes' edges files in one region; for each box compute `HRW(host, refs of DutySnapshot(rt).Serving)`; assert for every host **at least one usable box names itself, and exactly one in steady state**. Cases: steady state (exactly one); a box whose own file doesn't yet advertise the host (a double is allowed, none is forbidden); a draining box; a peer file older than 15 minutes; a box with no signing key; a sidecar route; a quiet box (HA boxes rewrite their file every 5 minutes, `internal/host/edgesfile.go:1083`). In `internal/host`: `TestComputeAssignment` over a stub view (Usable/not, empty Serving → `Unknown`), and `TestAgentUsesOneDutyView` (the same `dutyView` value reaches `SetDutyView` and the assignment loop). |
| - [ ] **Step 2:** Run → FAIL. |
| - [ ] **Step 3:** Implement. Write after the group-reference wait, alongside `lease.SetSelf`. |
| -- [ ] **Step 4:** `go test ./internal/boxself ./internal/host -run 'BoxSelf|SelfRef'` → PASS. |
| +- [ ] **Step 4:** `go test ./internal/boxself ./internal/boxchoice ./internal/edge ./internal/host ./internal/activator -run 'BoxSelf|Assignment|SelfRef|HRW|DrillAssignment|DutyView|Duty'` → PASS. |
| - [ ] **Step 5:** Commit. |
| ### Task 3: Restore pinned to a planned transaction |
| @@ -126,7 +128,7 @@ |
| - Flags: `-budget` (default `45m`), `-max` (default 0), `-publish-every` (default `10m`, hidden). |
| - The local alert copy: after each publish, the record is also written atomically to `<data>/monitor/verify.json`. |
| -Host selection: fixed box, every local sleeping host; group box, only hosts whose `ReadAssignment(dataDir).Hosts[host] == self.Ref`. An assignment older than 15 minutes, missing, or listing the host in `Unknown`: the host is not drilled and is recorded `not_reached` with reason `no_assignment`. A host assigned to another box is not in this box's record at all (P-9, P2-9). |
| +Host selection: fixed box, every local sleeping host; group box, the assignment is **read once at run start and used for the whole run** (F2-6), and only hosts whose `Hosts[host] == self.Ref` are drilled. An assignment older than 15 minutes or missing, a host listed in `Unknown`, **or a drill host that appears in neither `Hosts` nor `Unknown`** (the drill walks `ActivatorLeased() && DBPath != ""`, `hibernate_verify.go:59`, the producer walks `rt.HA`) is recorded `not_reached` with reason `no_assignment`, never skipped silently, so `verify_coverage` can fire for it (F2-1). A host assigned to another box is not in this box's record (P-9, P2-9). |
| Per host, in order: `CaptureIdentity` (on a code: `unverified` with that reason, next host) → `PlanFrom(ctx, rd, time.Time{})` → `VerifyReplicaAt(ctx, ..., plan.TXID)` → **`ConfirmIdentity` before any outcome is recorded**, including an empty plan, a plan error, a restore error and an integrity failure (on a code: discard, `unverified`) (P-11) → only then: `ErrNothingReplicated` → `unverified`/`nothing_replicated`; restore or integrity error → `failed`/`restore_error`; otherwise freshness: `lease.LockState` must return no error and `held`, `hafresh.ParseOwner` must succeed and `Ref == self.Ref`, then the existing `hibernateFreshness` (stale → `failed`/`stale`); in every other case `unknown`, with no local database read (P-14) → verdict with the plan's `TXID`, `At`, `RestoredBytes`. The run context carries the budget's deadline into every step (P-10); when it expires, the host in progress is abandoned (scratch removed, no verdict) and the rest become `not_reached` through `Merge`. |
| @@ -138,7 +140,7 @@ Empty fleet (P-13): if this box has no hosts to drill but `dbverify.Load` finds |
| - `TestVerifyHibernatingFreshnessOnlyOnLeaseHolder`: lock held by another ref, expired self-owned lock, absent lock, malformed owner, unreadable lock → `unknown`, the local source never opened; held by self → stale detected as today (P-14). |
| - `TestVerifyHibernatingBudget` (fake clock; budget reached after N hosts; the rest `not_reached`; oldest first kept). |
| - `TestVerifyHibernatingDeadlineStopsBlockedWork`: a reader that blocks during download; at the deadline the step returns, scratch is empty, and the hosts finished before it are published through the separate publish context (P-10). |
| - - `TestVerifyHibernatingGroupAssignment`: three boxes, each reading the assignment file its own `computeAssignment` wrote from the shared edges-file fixture (Task 2), drill disjoint sets covering every host; a stale or missing assignment drills none and marks them `no_assignment` (P-9, P2-9). |
| + - `TestVerifyHibernatingGroupAssignment`: with assignment files naming each host once, three boxes drill disjoint sets covering every host; a stale or missing assignment drills none and marks them `no_assignment`; a drill host absent from both `Hosts` and `Unknown` is recorded `no_assignment`; rewriting the assignment file mid-run changes nothing in that run (P-9, P2-9, F2-1, F2-6). |
| - `TestVerifyHibernatingStreakOncePerRun`: one host unverified throughout a run with four periodic publishes and a final one: its `UnverifiedRuns` rises by exactly one (P2-16). |
| - `TestRunHibernateVerifyEmptyFleetClearsPrior`: a prior record with one host, then a run with none, publishes an empty record and an empty local copy; with no prior record nothing is published (P-13). |
| - `TestVerifyHibernatingPublishesPeriodically` (publish called at each 10-minute mark and at the end with everything finished so far). |
| @@ -192,4 +194,5 @@ The landing box clears any verdict for the host from its own record (one left fr |
| - [ ] **Step 2:** Record-write census: add a layered inventory function for the new `dbverify.Publish`/`RemoveHost` digests following `instance_restore_658_census_test.go`; `go test ./internal/... -run TestPlan9B8RecordWriteCensus` → PASS. |
| - [ ] **Step 3:** Changed packages only with `-run` for every test named above; push; `amadan ci status -branch <name>` green. |
| - [ ] **Step 4:** Whole-branch review: Astra, plus Fable (this arms a nightly job on every box). Three rounds at most. |
| +- [ ] **Notes for slice 2b (F2-7), not built here:** a host reassigned between group boxes arrives on the new box as never-seen (its 7-day clock restarts, and a `failed` alert on the old box clears unresolved); 2b's reader should seed from the previous owner's newest verdict for the same identity, and ignore `control/verify/<ref>.json` records whose box has left the roster. |
| - [ ] **Step 5:** Release and roll, dev first. Dev check: after one night every dev box with sleeping hosts has `control/verify/<ref>.json`, `control/restore-verify.json` is untouched since the roll, a move of a dev instance clears it from the landing box's record, and no alert fired spuriously. Report on #898. Then ask Paul before the flagship roll. |