member backups: 2b plan rev 4, final (review complete) (#898)
Round 3 (Fable, standing in for rate-limited Astra) READY AFTER FIXES; P2s and P3s applied in place.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/superpowers/notes/reviews/member-backups/FABLE-FINDINGS-plan-2b-R3.md+51 −0docs/superpowers/plans/2026-11-12-member-backups-slice2b.md+32 −18
CI failed — run details
Intent
<task-notification> <task-id>b8x2bvizp</task-id> <tool-use-id>toolu_01Fc8PGDZyJLAnQ3dVFaYgnw</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/ab362fc0-f177-4a7f-a92e-4a29ea210aad/tasks/b8x2bvizp.output</output-file> <status>completed</status> <summary>Background command "Fable stands in for 2b plan round 3" completed (exit code 0)</summary> </task-notification>
<task-notification> <task-id>a3f8adc202e230fa3</task-id> <tool-use-id>toolu_017Q1qfDRT4mFW6X3NtwW7vx</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/ab362fc0-f177-4a7f-a92e-4a29ea210aad/tasks/a3f8adc202e230fa3.output</output-file> <status>completed</status> <summary>Agent "Fix 2a drill landing + read-only restore" finished</summary> <note>A task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.</note> <result>Status: DONE_WITH_CONCERNS. Both review findings are fixed and committed on member-backups-2a-landing (not pushed). I did not append to report.md: the harness blocks subagents writing report files, and a Bash heredoc would just get around that block, so the R1c section is pasted below for you to append. Commits: a29c2252 (stamped record reads in release and provision), 6cc46369 (R1c: the drill compares the record's version), 1eb84b68 (census). Tests: RED reproduced Astra's finding exactly (passed on the old copy, passed after the promotion, failed on a mixed read, passed on a same-bytes rewrite). All of those are now unverified, and the drill, release and provision tests pass. Census: re-proposed under the same NAME, seal b130b2d6 → bf37ccf4. Both census tests pass. Builds pass on linux, darwin and windows. Reviewer approval on #280 is still owed. Concerns: 1. **ETag alone would not have fixed this.** The deployment bucket is versioned with SSE-S3, so its ETag is the MD5 of the record's bytes. A legacy round trip leaves those bytes identical (my test checks this), so the ETag stays the same. The bracket therefore compares the S3 version ID and last-modified time as well. Both come back on the record GET the bracket already makes, so the cost is zero extra requests. 2. **Stores without versions.** A `DirStore` deployment store, or an unversioned S3-compatible bucket, falls back to the ETag (plus S3's last-modified time, to the second). There, a byte-identical round trip is still invisible. 3. **More `record_changed` verdicts.** Any write of the record during a host's test (a run, a PATCH) now gives unverified `record_changed`. That costs one night's verdict; the alert needs three in a row. 4. **Region change keeps its old reason.** Your ruling says a region change should read `moving`. I kept it as `record_changed`, because it is an identity change and the bracket's existing, reviewed rule is that an identity change outranks a move. It is unverified either way; say if you want the reason switched. --- ## R1c: the bracket compares the record's version (Astra's review of R1b) **Finding.** With `MovesEnabled` false, a legacy move completes through `MoveComplete`, which clears `Move` and flips `Region` but writes no `LastMove`. Take a round trip, uk → us → uk, where the returning move's staged copy is promoted and its staging dropped, all inside one host's test. At the close, the identity, `LastMove`, ETag and both staging checks all match what the open saw. The drill then reports passed on the old copy, or failed on a mixed read. **Why not ETag alone.** The deployment bucket is versioned (infra/modules/deployment-buckets/main.tf) and encrypted with SSE-S3 (AES256), so S3's ETag is the MD5 of the body. `DirStore`'s ETag is likewise a sha256 of the body. `RecordSeq` advances only under a claim context ("Legacy absent counters and no claim context retain the exact body bytes"). The round trip leaves the record byte-identical (the regression asserts the ETag is unchanged), so an ETag comparison would miss it. The S3 version ID and last-modified time differ on every PUT, and both come back on the same GetObject response. **Changes:** - **release** (stamped.go): `ObjectStamp{ETag, VersionID, LastModified}` with `Same`. `StampedGetter` is an optional, type-asserted capability. `GetStamped(ctx, s, key)` uses the store's stamped read where it exists and falls back to `Get` (ETag only) otherwise. `S3Store.GetStamped` makes the same single GetObject as `Get`, with the same NoSuchKey → `os.ErrNotExist` mapping. No write path changed. - **provision** (record_stamped.go): - `GetRecordStamped` and `GetSidecarRecordStamped` are `GetRecord` and `GetSidecarRecord` plus the stamp, refusing what those refuse (path disagreement, retired record). - `GetSidecarRecord`'s decode moved, unchanged, into `decodeSidecarAt` so both share it. - No writer changed. - **ops** (drillidentity.go): `drillIdentity` also carries `record ObjectStamp`, read through the stamped getters. That is the same GET as before, so there are no extra requests. `confirmDrillIdentity` decides in this order: 1. read error: error; 2. no record, or a different identity: `record_changed` (unchanged); 3. mid-move, or a different `LastMove`: `moving`; 4. any other change to the stamp: `record_changed`. The `LastMove` stamp from R1b stays. **Tests:** - **release** `TestS3GetStampedCarriesTheVersion` (httptest S3): two writes with the same ETag and different `x-amz-version-id` and `Last-Modified` give stamps that are not `Same`. One request per read; a missing key is `os.ErrNotExist`. - **release** `TestGetStampedFallsBackToTheETag`: a `DirStore` read is stamped with its ETag alone. - **provision** `TestRecordStampedReads`: the stamped getters return the same records and ETags as the plain ones, and refuse path disagreement, retired records and missing keys. - **ops** `TestDrillLegacyRoundTripInsideTheTestIsNeverAResult` drives the real legacy transitions (`SetRecordMove` with `MoveRequest`, `MovePromoteReady`, `MoveMarkCutting`, `MoveComplete`), uk → us → uk. It uses distinct old (3-transaction) and new (5-transaction) replicas, a real exact-mirror promotion over the host's replica, and staging dropped before the close. The fixture asserts the record's ETag is unchanged and staging is empty at the close. Three variants: - the real restore of the old copy runs, then the round trip; - the round trip runs, then the real restore of the promoted copy; - the round trip runs, then the restore reports damage. All three give unverified/`record_changed`, with no findings kept. - **ops** `TestDrillAnyRecordWriteDuringTheTestIsAChange`: an untouched record passes; a same-bytes rewrite gives `record_changed`. - **ops** `TestDrillStagedCopyArrivingDuringTheTestIsMoving` (Minor 2): now uses the real restore and adds two completed-promotion cases (distinct new replica mirrored over the old, staging dropped before the close, the move's close in `LastMove`): old copy restored, and a mixed read. Both give `moving`. - The drill fixture's deployment store is now a versioned `DirStore` wrapper, as the bucket is: every Put or Delete is a new version. **RED** (before the ops change), `go test ./internal/ops -run 'TestDrillLegacyRoundTrip|TestDrillAnyRecordWrite'`: ``` old_copy_restored,_then_the_round_trip: verdict passed/, want unverified/record_changed round_trip,_then_the_promoted_copy: verdict passed/, want unverified/record_changed round_trip,_then_a_mixed_read: verdict failed/restore_error, want unverified/record_changed rewritten,_same_bytes: verdict passed/, want unverified/record_changed ``` The release and provision tests failed first at compile (`undefined: GetStamped`, `undefined: GetRecordStamped`). **GREEN:** - `go test ./internal/ops -run 'TestDrill|TestVerifyHibernating|TestRunHibernateVerify|TestOldestFirst|TestHibernat'`: ok. - `go test ./internal/release -run 'Stamped|GetIfChanged|TestS3'`: ok. - `go test ./internal/provision -run 'TestRecordStampedReads|Sidecar|GetRecord'`: ok. - `go vet` on ops, release and provision: clean. gofmt: clean. **Census.** - `make census-propose NAME=member-backups-2a-landing` rerun in place: - unit `hibernateRun.run`: body changed, claim extended to cover R1c; - new unit `internal/release/stamped.go:S3Store.GetStamped` (reads +file:ReadAll), written legacy/accepted-legacy and frozen, with its claim; - envelopes re-pinned: dbdoor, lease, ops, provision, release. - Seal b130b2d6 → bf37ccf4. - Record-write census (plan9_b8_census_test.go inventory): - `GetRecordStamped` (key:RecordKey) and `GetSidecarRecordStamped` (key:SidecarRecordKey) added as key-sites, read only; - `GetSidecarRecord` re-digested, with a note that its decode moved unchanged into `decodeSidecarAt`. - I printed the digests with a throwaway test and deleted it. - `TestPlan14RootReadCensus` and `TestPlan9B8RecordWriteCensus`: both PASS. **Builds.** `go build ./...` passes for linux, darwin and windows. **Concerns:** 1. Zero extra requests: the stamp comes from the record GET the bracket already makes. 2. On a `DirStore` deployment store, or an unversioned S3-compatible bucket, the stamp is the ETag (plus S3 last-modified, to the second). An exact byte-identical round trip there stays invisible. 3. Any record write during a host's test now gives `record_changed` (one night unverified; the alert needs three in a row). 4. A region change stays `record_changed`, not `moving` as the ruling says, because identity changes outrank moves under the existing reviewed precedence. Unverified either way.</result> <usage><subagent_tokens>353475</subagent_tokens><tool_uses>48</tool_uses><duration_ms>749095</duration_ms></usage> </task-notification>
Attributed to this commit: 58.1 g CO₂e (7,628,667 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/FABLE-FINDINGS-plan-2b-R3.md b/docs/superpowers/notes/reviews/member-backups/FABLE-FINDINGS-plan-2b-R3.md| new file mode 100644 |
| index 000000000..556f74de3 |
| --- /dev/null |
| +++ b/docs/superpowers/notes/reviews/member-backups/FABLE-FINDINGS-plan-2b-R3.md |
| @@ -0,0 +1,51 @@ |
| +# Plan 2b, round 3 of 3: READY AFTER FIXES |
| + |
| +No P1. Two P2s and three P3s, all fixable in place without another round. Static review only: no files changed, no tests run, no other models used. |
| + |
| +## Round 2 findings |
| + |
| +- **R2-1 — resolved.** Plan:32 and :118 allow an empty `Region` with exact equality, which matches `drillidentity.go:68` and `server.go:675-678`; witnesses are in Tasks 3, 4 and 6. |
| +- **R2-2 (R1-5) — resolved by the cut.** Only confirmed email connectors with a sender count (plan:20, :147); `alertTarget` returns the plain target for email before any seal use (`alertnotify.go:701-703`), and the senders are the two `deliver` uses (`delivery.go:42`, `:70`). |
| +- **R2-3 — resolved.** `atomic.Pointer`, stored synchronously before the goroutine starts and before listening (plan:89, :107). The test's placement is new finding 2. |
| +- **R2-4 — resolved.** Fleet counts go through `acceptedTest` (plan:122, :181), with the reassigned-host test at plan:195. |
| + |
| +## New findings |
| + |
| +1. **P2 — Task 6 groups boxes by a region value that is not the records' vocabulary.** |
| + - Plan:191 keys regions on `rec.Region`, `status.Box.Region` and `Identity.Region` as if they were one value. |
| + - `status.Box.Region` is `STATUS_BOX_REGION` (`agent.go:4821`, `:4930`), described as "operator-set, coarse" (`snapshot.go:67`). Records and verdicts use `""` for home (`apiinstancemove.go:319-323`). |
| + - Existing console code translates before comparing: `s.homeRegionIn(b.Region) == region` (`teamfloor.go:99`). |
| + - Effect: a home box whose status carries the home name gets its quiet-box and unreadable-box rows under a second region entry, apart from that region's instances and counts. |
| + - This is the second consecutive round in **identity vocabulary compatibility** (R2-1), so I recommend the cut: list quiet and unreadable boxes once for the deployment, each with its own name and region as text, with no join to instance regions. |
| + - If the per-region placement stays, key boxes by `s.homeRegionIn(b.Region)` and add a `TestFleetBackupsQuietBoxes` case where the home box's status names the home region. |
| + |
| +2. **P2 — Task 2's race test calls code that Tasks 3 and 4 create.** |
| + - `TestVerifyReaderPublishedSafely` (plan:100) loops over the backups door and `acceptedTest`. |
| + - `acceptedTest` is produced by Task 3 (plan:122) and the door's `LastTest` by Task 4 (plan:146), so Task 2 cannot compile or pass at its own Step 4. |
| + - Fix: in Task 2, race `s.verify.Load()` with `For` and `Loaded` against `StartVerifyReader`. Move the door-level `-race` witness to Task 4, beside `TestAPIInstanceBackupsLastTest`. |
| + |
| +3. **P3 — Records of boxes that have left are re-read every 6 hours for good.** |
| + - Nothing deletes `control/verify/<ref>.json`; the only removal is per host (`dbverify.go:325`, `movespass.go:577`). |
| + - Relist conditional-GETs every listed ref (plan:87), and B-5 drops a gone box's verdicts but not its reads (plan:21). |
| + - Group boxes get a new ref on each replacement, so N in the request budget only grows. |
| + - Fix: once a ref's box is 7 days off the roster, skip its GET at relist and read it again only when its scope generation moves. Add a counting test. |
| + |
| +4. **P3 — The own-region prefix check fails closed without saying so.** |
| + - Plan:32 compares `Prefix` with `activator.HibernatePrefix(s.cfg.HibernatePrefix, host)`. |
| + - This check is the plan's addition; spec §3's rule (spec:337-339) is identity plus `copy_since`. |
| + - A console whose `CARLOS_HIBERNATE_*` is unset or differs from the boxes' refuses every own-region verdict, and `/fleet/backups` shows them all as never tested with no cause. |
| + - Fix: cut the check, or apply it only when `s.cfg.HibernateBucket != ""` and count refusals in the operator view. |
| + |
| +5. **P3 — `TestRestoreIsNewIdentity` (plan:129) uses a hand-built record.** |
| + - B-1 rests on the #658 restore producing a new `CreatedAt`. |
| + - Fix: drive the real restore door (`restore_door.go`, through `handleAPIInstanceCreate`) and assert the old incarnation's verdict is refused. |
| + |
| +## What I verified and found sound |
| + |
| +- **Names and signatures:** every helper, gate, route form, test and make target the plan names exists as stated, except the ones it creates. `recordcreators_guard_test.go` is in `internal/console`, as the plan implies. |
| +- **B-1:** every move close writes `LastMove.At` and clears `Move` (`provision.go:1744`, `:2249`, `:2774`, `:2848`; `offline_move.go:477`). |
| +- **B-2:** `apiSystemOperator` is the scanning gate and answers 403 with a scanning message (`apisystem.go:44-58`); `apiSystemRoller` is at `apisystemupdate.go:144`. |
| +- **B-5:** the status key and the verify ref are the same label (`snapshot.go:1282`, `metrics_loop.go:881`, `ops.go:502`). |
| +- **B-7:** the record has no run id or reached count (`dbverify.go:167-172`). |
| +- **Request budget:** the reader adds no polling. It reads `watch.Observed()`, and the watch is polled by the record view (`recordview.go:233`). `ReadGate` behaves as the plan assumes (`changewatch.go:221-247`). |
| +- **Authority:** both new doors are GET only, operator gated, and carry no contents. |
diff --git a/docs/superpowers/plans/2026-11-12-member-backups-slice2b.md b/docs/superpowers/plans/2026-11-12-member-backups-slice2b.md| index be6a75269..8b4f82b85 100644 |
| --- a/docs/superpowers/plans/2026-11-12-member-backups-slice2b.md |
| +++ b/docs/superpowers/plans/2026-11-12-member-backups-slice2b.md |
| @@ -4,7 +4,7 @@ |
| **Goal:** The console reads every box's `control/verify/<ref>.json`, shows an instance's last accepted restore test in the Backups section's third tile, in the door's `last_test` and in `carlos instances backups`, and gives operators `/fleet/backups` (and its JSON) with the fleet's restore-test evidence per region. |
| -**Plan rev 3** (2026-11-12): Astra plan round 2 (`CODEX-FINDINGS-plan-2b-R2.md`, NOT READY, 1 P1 + 2 P2 + R1-5 partly) applied, marked **(R2-N)**; R1-5's family hit two rounds, so the controller ruled a cut (B-4). Round 3 is the last under AGENTS.md "Stopping rules"; its P2s are fixed without reopening and a fourth round needs Paul. **Rev 2**: Astra plan round 1 (`docs/superpowers/notes/reviews/member-backups/CODEX-FINDINGS-plan-2b.md`, NOT READY, 1 P1 + 6 P2) applied; findings marked **(R1-N)**. Dispositions for both rounds at the end. Opus implements. Per-task review (rule 3, R1-7) only for Tasks 2 and 6 (caches over production storage), 4 (a cache beside a door) and 7 (a security gate); the rest is covered by the whole-branch review. Every review brief carries the round history and the stopping rules. |
| +**Plan rev 4 (final, review complete)** (2026-11-12): round 3 (Fable standing in for rate-limited Astra, `FABLE-FINDINGS-plan-2b-R3.md`, READY AFTER FIXES, no P1) applied in place, marked **(R3-N)**; no further plan round. **Rev 3**: Astra plan round 2 (`CODEX-FINDINGS-plan-2b-R2.md`, NOT READY, 1 P1 + 2 P2 + R1-5 partly) applied, marked **(R2-N)**; R1-5's family hit two rounds, so the controller ruled a cut (B-4). Round 3 is the last under AGENTS.md "Stopping rules"; its P2s are fixed without reopening and a fourth round needs Paul. **Rev 2**: Astra plan round 1 (`docs/superpowers/notes/reviews/member-backups/CODEX-FINDINGS-plan-2b.md`, NOT READY, 1 P1 + 6 P2) applied; findings marked **(R1-N)**. Dispositions for both rounds at the end. Opus implements. Per-task review (rule 3, R1-7) only for Tasks 2 and 6 (caches over production storage), 4 (a cache beside a door) and 7 (a security gate); the rest is covered by the whole-branch review. Every review brief carries the round history and the stopping rules. |
| **Architecture:** One in-memory reader in the console (`verifyReader`) lists `control/verify/` at start, then re-reads a box's record only when its change-index scope `control/verify/<ref>` moves, through a `release.ReadGate` with a 6-hour maximum age, and relists every 6 hours. One acceptance rule decides whether a verdict may be shown for an instance: the verdict's identity equals the instance's current identity, its bracket opened after the instance's `copy_since`, and its box hasn't left the roster for 7 days. The door, the instance page, the CLI and the operator view all go through that rule. Nothing on boxes changes. |
| @@ -18,7 +18,7 @@ |
| - **B-2 The JSON door is gated by `apiSystemRoller`** (ops-account owners and `CARLOS_SYSTEM_OPERATORS`), the gate of `GET /api/cli/system/status`. The spec names `apiSystemOperator`, which is the storage-scanning gate (`CARLOS_STORE_OPERATORS`) and refuses with a scanning message. |
| - **B-3 Owners see passed or failed only.** `last_test` is the newest *decided* verdict the acceptance rule admits, from any box record or from the reader's memory of earlier reads. An `unverified` verdict never appears to owners; it is operator evidence. |
| - **B-4 `last_test` gains `operators_alerted`** (true only for `failed` when the deployment would deliver `verify_failed`), so the CLI prints the page's "We've been alerted" line from the door alone. **Email connectors only (R2-2, controller ruling):** the assurance counts only a delivery path the console can prove configured without decrypting anything, which is a confirmed email connector (its target is stored in plain) with a sender configured. Slack and webhook connectors are sealed and never earn it, whatever the seal key's state; no shared eligibility check is added. A deployment whose only operator connectors are sealed shows no "We've been alerted". |
| -- **B-5 The roster** is `status/boxes/<ref>.json` (the same label as the verify ref, `metricsBoxLabel`), read by one `ListMod` per relist. A box's last-seen time is the later of that object's modified time and its record's `CheckedAt`; a record whose box was last seen over 7 days ago is dropped. Fleet boxes, whose status lives under `fleets/<name>/`, fall back to `CheckedAt` alone. |
| +- **B-5 The roster** (and gone boxes' records, R3-3) is `status/boxes/<ref>.json` (the same label as the verify ref, `metricsBoxLabel`), read by one `ListMod` per relist. A box's last-seen time is the later of that object's modified time and its record's `CheckedAt`; a record whose box was last seen over 7 days ago is dropped: its verdicts leave `For`, and the relist stops re-reading it (nothing deletes `control/verify/<ref>.json`, and group boxes get a new ref on each replacement, so without this N would only grow). A gone ref is read again only when its scope generation moves. Fleet boxes, whose status lives under `fleets/<name>/`, fall back to `CheckedAt` alone. |
| - **B-6 Seeding (2a note F2-7)** is the reader's in-memory `seen` map: per host, the newest decided verdict it has read and the box it came from. It covers a group host reassigned to another box between the old box dropping it and the new box drilling it. It is re-checked by the acceptance rule on every use and is lost on restart (the new box drills a never-verified host first, so the gap is one night at most). The box-side coverage clock restarting on reassignment is not fixable from the console and stays as 2a left it. |
| - **B-7 Not reached is not shown (R1-4).** 2a's record has no run identifier, no completion marker and no "not reached" count, and `Merge` keeps an unreached host's earlier verdict unchanged, so the console can't tell which hosts the last run skipped. The operator view shows that figure as not available (Task 0 decides how; the JSON has no field). An exact count needs the drill to publish it (a run id and a reached count in the record), a follow-up for the producer. |
| - **B-8 §4's "drill is inert"** has no box-side signal (the box status carries no timer state for `carlos-hibernate-verify`). The operator view lists **boxes with sleeping instances** (`status.Box.Routes.Hibernating > 0`) **whose record is missing or older than 36 hours**, which includes every inert box. Its box inventory is its own (R1-3): `status.LoadBoxesComplete` drops status objects older than 24 hours (`internal/status/fleet.go:258-277`), which would hide a box dark for 37 hours, so the view lists `status/boxes/` with `ListMod`, keeps every key modified within 7 days (the roster window of B-5), and reads those bodies. A box whose status is stale (`status.BoxStale`) is shown as such; one not seen for 7 days has left. A true inert flag would need a box status field and the root census; not in 2b. |
| @@ -29,7 +29,7 @@ |
| - The console only reads. No box, unit, provision transition or bucket record changes. No new per-box poll, no loop that lists replicas. |
| - Request budget (spec §9): at start one LIST of `control/verify/` and one GET per record; then one conditional GET per moved scope; every relist (at most every 6 hours) one LIST of `control/verify/`, one `ListMod` of `status/boxes/` and up to N conditional GETs (N = known records). With no change index (`CARLOS_CHANGE_INDEX` unset) or a watch that cannot vouch, only the start read and the relists run: never a per-minute read. **Failures back off to the maximum age (R1-2):** a failed start LIST is next tried at the next relist time; a failed record read is next tried 6 hours later (or at the relist, whichever is first), whatever the gate says; there is no fast retry. A ref found absent (a deleted record whose index scope stays, `changeindex.go:33-37`) is remembered with the generation it was absent at and read again only when that generation moves; the relist's LIST is its only other check. |
| - `ReadGate` maximum age: exactly 6 hours. Relist period: 6 hours minus up to 10% jitter (never more than 6 hours). |
| -- Acceptance (one function, `acceptVerdict`, used by every surface): `Result` is `passed` or `failed`; `Identity` equals the instance's current identity on all five fields exactly, with `Account`, `App`, `Host` and `Incarnation` non-empty and `Region` allowed to be empty, because the home region is `""` in the console's config, in records and in the drill's identity (`server.go:675-678`, `drillidentity.go:68`) (R2-1); `BracketOpenedAt` is non-zero and strictly after `copySince(rec)`; `rec.Move == nil`; for an instance in the console's own region, `Prefix == activator.HibernatePrefix(s.cfg.HibernatePrefix, host)`; the box was last seen within 7 days; `VerifiedAt` no more than 5 minutes ahead of now. Among accepted verdicts the newest `VerifiedAt` wins; on a tie, `failed` wins. |
| +- Acceptance (one function, `acceptVerdict`, used by every surface): `Result` is `passed` or `failed`; `Identity` equals the instance's current identity on all five fields exactly, with `Account`, `App`, `Host` and `Incarnation` non-empty and `Region` allowed to be empty, because the home region is `""` in the console's config, in records and in the drill's identity (`server.go:675-678`, `drillidentity.go:68`) (R2-1); `BracketOpenedAt` is non-zero and strictly after `copySince(rec)`; `rec.Move == nil`; for an instance in the console's own region and only when `s.cfg.HibernateBucket != ""`, `Prefix == activator.HibernatePrefix(s.cfg.HibernatePrefix, host)`, and a verdict refused by this check alone is reported, never silent: logged once per box ref per process and counted per region in the operator view (R3-4); the box was last seen within 7 days; `VerifiedAt` no more than 5 minutes ahead of now. Among accepted verdicts the newest `VerifiedAt` wins; on a tie, `failed` wins. |
| - A record is ignored (logged once per etag) when it is over 4 MiB, does not parse, has `V != 2`, or its `Box` is not the ref in its key. |
| - Only instances whose intrinsic class is replicated (`replicaIntrinsic`) get `last_test`; pooled and fleet-placed stay "not shown", as in slice 1. |
| - Never "backed up", "up to date" or "current" in any shown string; ages and dates only, in UTC as the page's other times are. No ticks, no em dashes, no left-border accents. |
| @@ -58,7 +58,7 @@ The exports row (3b); a box-side inert flag (B-8); a not-reached count, which ne |
| - [ ] **Step 1:** Copy `docs/console-mockup-kit/shell.html` (README there) and mock the instance page's Backups section with the third tile in each state: passed today; passed on an earlier date; failed with "We've been alerted"; failed without it; no accepted test (slice 1's "not shown yet"); and the sections where slice 1 hides the tiles (other region, too large, unavailable). Decide whether the test tile shows when the other two tiles don't; Task 4 implements what you decide. Draft wording from spec §8; the tile leads with the state (one or two words as the value), the date and time as the detail, the "using the copy up to" time only if it reads at a glance. |
| - [ ] **Step 2:** Mock the `carlos instances backups` output for the same states, as terminal text. |
| -- [ ] **Step 3:** Mock `/fleet/backups` from the operator shell's components (`docs/console-styleguide.md`: `.pagehead`, stat tiles, tables, chips): per region, restore-test tiles (passed in the last 7 days, failed, never tested, oldest test's age, and "not reached last run" in its not-available state, B-7), a short instances-by-class table with "not shown" reasons, the boxes not publishing tests (B-8) with their last record's age, the off-account row (B-9). States: a healthy region, a region with failures and a quiet box, a partial read (some records unreadable), evidence not loaded yet, no records at all. Failures and quiet boxes show as chips or tile tone, not sentences. |
| +- [ ] **Step 3:** Mock `/fleet/backups` from the operator shell's components (`docs/console-styleguide.md`: `.pagehead`, stat tiles, tables, chips): per region, restore-test tiles (passed in the last 7 days, failed, never tested, oldest test's age, and "not reached last run" in its not-available state, B-7), a short instances-by-class table with "not shown" reasons, the boxes not publishing tests (B-8) with their last record's age, the off-account row (B-9), and a count of tests refused because the console's replica prefix differs from the boxes' (R3-4). States: a healthy region, a region with failures and a quiet box, a partial read (some records unreadable), evidence not loaded yet, no records at all. Failures and quiet boxes show as chips or tile tone, not sentences. |
| - [ ] **Step 4:** Shoot each at 390 px and 1280 px, light and dark (README step 3). Run the `impeccable` skill's critique and distill passes on them; fix what reads badly, wraps or overflows. The bar: the state is the first thing seen, about a dozen words to understand the screen. |
| - [ ] **Step 5:** Keep the final HTML for Task 1's preview. Record the layout decisions (which states, tile values, tones, what shows where) as a short list at the top of Task 1's copy JSON (`"layout"` field). |
| @@ -66,7 +66,7 @@ The exports row (3b); a box-side inert flag (B-8); a not-reached count, which ne |
| **Files:** Create `docs/superpowers/plans/member-backups-slice2b-copy.json`; create `approved_member_backups_2b_copy_test.go` (repo root). |
| -- [ ] **Step 1:** Extract every new string from Task 0's mockups with IDs: `backups.test.passed`, `backups.test.failed`, `backups.test.when` (the date/time detail's pattern), `backups.test.copyupto` (if kept), `backups.test.alerted`, the CLI's test-row forms (`backups.cli.test.*`), and `fleetbackups.*` (rail label, page heading, region heading, every tile label and detail, table headings, class and reason labels, chips, the quiet-box heading and "never", the off-account label and "No record", the partial-read banner, the not-loaded line, the empty-state line). Reused slice 1 strings (`backups.test.label`, `backups.test.none`, the chips) keep their IDs and are not re-reviewed. |
| +- [ ] **Step 1:** Extract every new string from Task 0's mockups with IDs: `backups.test.passed`, `backups.test.failed`, `backups.test.when` (the date/time detail's pattern), `backups.test.copyupto` (if kept), `backups.test.alerted`, the CLI's test-row forms (`backups.cli.test.*`), and `fleetbackups.*` (rail label, page heading, region heading, every tile label and detail, table headings, class and reason labels, chips, the quiet-box heading and "never", the off-account label and "No record", the prefix-refusal count's label, the partial-read banner, the not-loaded line, the empty-state line). Reused slice 1 strings (`backups.test.label`, `backups.test.none`, the chips) keep their IDs and are not re-reviewed. |
| - [ ] **Step 2:** Run the copy-review skill with Task 0's HTML as the preview; apply Paul's edits verbatim to the JSON. Delete the scratch directory afterwards. |
| - [ ] **Step 3:** `TestApprovedMemberBackups2bCopy` via `checkApprovedCopy` (`approved_copy_test.go:71`) with the IDs pinned as a literal (as `approved_member_backups_2a_copy_test.go` does), `t.Skip` until Task 7 lands the last string. |
| - [ ] **Step 4:** Commit. |
| @@ -84,7 +84,7 @@ The exports row (3b); a box-side inert flag (B-8); a not-reached count, which ne |
| - `func (r *verifyReader) start(ctx context.Context) error`: LIST `control/verify/`, GET each `<ref>.json` whose ref passes `boxself.ValidRef`, `ListMod("status/boxes/")`; sets loaded only on a successful LIST. |
| - Attempt scheduling is the reader's own, beside the gate (R1-2): `nextTry map[string]time.Time` per scope and `nextStart time.Time`; `absentAt map[string]uint64` for refs read as absent. A read is attempted only when `gate.Due` says so **and** `now >= nextTry[scope]`; a failed read sets `nextTry[scope] = min(now + verifyReadMaxAge, nextRelist)` and marks the gate `ok=false`; a successful read, a record skipped as bad (its ETag kept, so the next conditional GET is a 304) and an absent answer all mark `ok=true`. A scope in `absentAt` is attempted only when its observed generation differs from the stored one. |
| - `func (r *verifyReader) tick(ctx context.Context, now time.Time)`: if not loaded and `now >= nextStart`, `start` (failure: `nextStart = nextRelist`); if the watch is non-nil and `Usable()`, for every known ref and every `control/verify/<ref>` scope in `watch.Observed()` not yet known, `gate.Due(scope, now)` and, when due, one conditional read (`GetIfChanged` with the held ETag; plain `Get` when the store isn't a `ConditionalGetter`), then `gate.Mark(scope, gen, now, ok)`; when the relist is due, `relist`. |
| - - `func (r *verifyReader) relist(ctx context.Context, now time.Time)`: LIST, drop refs no longer listed, conditional-read every listed ref (marking the gate), refresh the roster, prune `seen` entries whose `VerifiedAt` is over 30 days old, draw the next relist time. |
| + - `func (r *verifyReader) relist(ctx context.Context, now time.Time)`: LIST, drop refs no longer listed, conditional-read every listed ref except gone ones (B-5: last seen over 7 days ago; kept in a `gone map[string]uint64` with the scope generation at the time, and read again only when that generation moves) (R3-3), marking the gate, refresh the roster, prune `seen` entries whose `VerifiedAt` is over 30 days old, draw the next relist time. |
| - `func (r *verifyReader) Loaded() bool`, `func (r *verifyReader) For(host string) []boxVerdict` (every box's verdict for host plus the `seen` entry, B-6), `func (r *verifyReader) Boxes() []verifyBox` (a copy, for the operator view). |
| - `Server.verify` is an `atomic.Pointer[verifyReader]` (R2-3). `func (s *Server) StartVerifyReader(ctx context.Context, watch *release.ChangeWatch)`: no-op when `s.cfg.Releases == nil` or `s.cfg.HostClaim`; else builds the reader, stores it in `s.verify` **synchronously**, then starts the goroutine that runs `tick` every `verifyTick` under `instanceStoreTimeout` until ctx ends. The goroutine touches only the reader's own mutex-guarded state; every user loads the pointer with `s.verify.Load()`. |
| - The host index (`host -> []boxVerdict`) and `seen` are rebuilt under the reader's mutex on every record change; `For` takes a read lock and copies. |
| @@ -97,8 +97,9 @@ The exports row (3b); a box-side inert flag (B-8); a not-reached count, which ne |
| - `TestVerifyReaderFindsNewBoxFromIndex`: a new box's first publish appears in `watch.Observed()`; it is read on the next tick, before any relist. |
| - `TestVerifyReaderDropsDeletedAndGoneBoxes`: a record deleted from the bucket leaves at the relist; a box whose status object and record are both over 7 days old has no verdicts in `For`; a fleet box with no status object but a fresh `CheckedAt` keeps them. |
| - `TestVerifyReaderSkipsBadRecords` (Review Focus 2): oversize, v1, unparseable, and `Box` mismatching the key: each skipped with `Err` set in `Boxes()`, the good records still served. |
| - - `TestVerifyReaderPublishedSafely` (R2-3, run with `-race`): `StartVerifyReader` while goroutines call the backups door and `acceptedTest` in a loop; no race report, and every call after `StartVerifyReader` returns sees a non-nil reader. |
| - - `TestVerifyReaderSeedsReassignedHost` (B-6): box A's record has a pass for H; A's next record drops H; `For(H)` still returns A's pass from `seen`; after B publishes a newer verdict, B's wins in Task 3's selection. |
| + - `TestVerifyReaderPublishedSafely` (R2-3, R3-2, run with `-race`): `StartVerifyReader` while goroutines loop over `s.verify.Load()` and, when non-nil, `For` and `Loaded`; no race report, and every load after `StartVerifyReader` returns is non-nil. (The door-level race witness is in Task 4, which creates `last_test`.) |
| + - `TestVerifyReaderStopsReadingGoneBoxes` (R3-3): a box whose status object and record are both 8 days old; across four relists (24 hours) its record gets no GET while its scope generation is unchanged, and one GET after its scope moves. |
| + - `TestVerifyReaderSeedsReassignedHost` (B-6): box A's record has a pass for H; A's next record drops H; `For(H)` still returns A's pass from `seen`; after B publishes a newer verdict, `For(H)` returns both (which one wins is Task 3's `TestPickTestNewestWins`, R3-2). |
| - `TestVerifyReaderRelistNeverLaterThanSixHours`: 1,000 drawn relist periods all in (5h24m, 6h]. |
| - `TestVerifyReaderFailedStartBacksOff` (R1-2): the first LIST fails; 5 hours of one-minute ticks make no further request; the next relist time retries and loads. |
| - `TestVerifyReaderFailedGetBacksOff` (R1-2): one record's GET fails on every try while its scope keeps moving; over 12 hours of ticks it is tried at most three times (start, then 6-hour spacing), and other boxes' moved scopes are still read. |
| @@ -117,16 +118,16 @@ The exports row (3b); a box-side inert flag (B-8); a not-reached count, which ne |
| - Produces: |
| - `func verifyIdentityOf(rec provision.Record) (dbverify.Identity, bool)`: `{rec.Account, rec.App, rec.Host, rec.Region, provision.Incarnation(rec.Account, rec.App, rec.Host, rec.CreatedAt)}`; false on an `Incarnation` error or an empty `Account`, `App` or `Host`; `Region` may be `""` (home, R2-1). |
| - `func copySince(rec provision.Record) time.Time` (B-1). |
| - - `func acceptVerdict(rec provision.Record, ownRegion, ownPrefix string, bv boxVerdict, now time.Time) bool` (the Global Constraints rule; `ownPrefix` is "" for another region's instance). |
| - - `func pickTest(rec provision.Record, ownRegion, ownPrefix string, cands []boxVerdict, now time.Time) (dbverify.Verdict, string /*box*/, bool)`: newest accepted, failed on a tie. |
| - - `func (s *Server) acceptedTest(rec provision.Record, now time.Time) (dbverify.Verdict, bool)`: `pickTest` over `s.verify.Load().For(rec.Host)`; false when the reader is nil or not loaded. It is the **only** way any surface, the operator view included, picks an instance's test (R2-4). |
| + - `func acceptVerdict(rec provision.Record, ownRegion, ownPrefix string, bv boxVerdict, now time.Time) (ok, prefixOnly bool)` (the Global Constraints rule; `ownPrefix` is "" for another region's instance and when `s.cfg.HibernateBucket == ""`, which skips the prefix check; `prefixOnly` is true when the prefix check is the only rule that refused it, R3-4). |
| + - `func pickTest(rec provision.Record, ownRegion, ownPrefix string, cands []boxVerdict, now time.Time) (v dbverify.Verdict, box string, ok, prefixRefused bool)`: newest accepted, failed on a tie; `prefixRefused` when nothing was accepted and some candidate was refused by the prefix check alone. |
| + - `func (s *Server) acceptedTest(rec provision.Record, now time.Time) (v dbverify.Verdict, ok, prefixRefused bool)`: `pickTest` over `s.verify.Load().For(rec.Host)`; false when the reader is nil or not loaded; a prefix refusal is logged once per box ref per process. It is the **only** way any surface, the operator view included, picks an instance's test (R2-4). |
| - [ ] **Step 1: Failing tests:** |
| - `TestVerifyIdentityMatchesBracket`: for a sleeping instance record in a `DirStore`, `verifyIdentityOf(rec)` equals `dbreads.CaptureIdentity(ctx, store, rec.Region, ...)`'s identity field for field, for a named region and for the home region (`Region: ""`, R2-1). |
| - - `TestAcceptVerdictTable`: one row each, accepted or not: passed and failed accepted; unverified refused; another incarnation (recreate, same and other account); another region; a home-region verdict (`Region: ""`) for a home-region record accepted (R2-1), and refused for a record in a named region and vice versa; an empty account, app, host or incarnation refused; bracket equal to `LastMove.At` refused, one second after accepted; `rec.Move != nil` refused; own-region prefix mismatch refused, other-region prefix ignored; box last seen 7 days and one second ago refused; `VerifiedAt` 6 minutes ahead refused. |
| + - `TestAcceptVerdictTable`: one row each, accepted or not: passed and failed accepted; unverified refused; another incarnation (recreate, same and other account); another region; a home-region verdict (`Region: ""`) for a home-region record accepted (R2-1), and refused for a record in a named region and vice versa; an empty account, app, host or incarnation refused; bracket equal to `LastMove.At` refused, one second after accepted; `rec.Move != nil` refused; own-region prefix mismatch refused with `prefixOnly` true, other-region prefix ignored, and no prefix check when `HibernateBucket` is empty (R3-4); box last seen 7 days and one second ago refused; `VerifiedAt` 6 minutes ahead refused. |
| - `TestCopySinceEveryMoveOutcome`: `LastMove` done, rolled_back and aborted each hide a verdict whose bracket opened before `At`. |
| - `TestMoveThereAndBackHidesOldVerdict` (Review Focus 4). |
| - - `TestRestoreIsNewIdentity`: a record recreated through the create path's `CreatedAt = now` (#658) refuses the old incarnation's verdict. |
| + - `TestRestoreIsNewIdentity` (R3-5): drive the real restore through `handleAPIInstanceCreate` with the restore door's fixture (`newDoorFx`, `d.leaveReplica`, `d.restore`, as `TestRestoreRoundTrip` in `restore_door_test.go:189` does); bind a verdict to the original record's identity (read when the fixture creates it, before the delete); `acceptVerdict` refuses it against the restored record read back from the store, and accepts one bound to the restored record's identity. |
| - `TestPickTestNewestWins` (Review Focus 3): fail at T1 and pass at T2 on two boxes shows the pass; a tie shows the fail; a seen-only verdict loses to a newer record verdict. |
| - `TestCopySincePathInventory` (spec §3, "a test that fails when a new one appears"; R1-6): with `golang.org/x/tools/go/packages` (as `recordcreators_guard_test.go` does), load the module's non-test packages and run `scanCopyPaths(pkgs) map[string]map[string]int` (kind -> enclosing func -> count), which finds four kinds of site: (1) `field`: an assignment, tuple assignments included, whose left side is a field `LastMove`, `Region`, `CreatedAt`, `Account`, `App` or `Host` of a `provision.Record` value or pointer; (2) `literal`: every composite literal of type `provision.Record`, keyed or not, by value or `&` (the create path's `apiinstances.go:2165` is one); (3) `whole`: every assignment whose left side has type `provision.Record` (`*rec = x`, `rec = other`); (4) `write`: every call of `provision.WriteRecord`, `provision.UpdateRecord`, `provision.CreateRecord` and `provision.CreateRecordReplica`, the record-writing entry points. Pin the result, each entry with a comment saying why it needs no new `copy_since` source (a move close writing `LastMove`, a move flip of `Region`, a create that gives a new `CreatedAt`, or not a copy change). A new site fails with its position and asks the author to classify it and extend `copySince` if it starts a new copy. |
| - `TestScanCopyPathsFindsEveryForm` (R1-6): a fixture package supplied through `packages.Config.Overlay` (never on disk) holds one site of each kind (a field write, a tuple write, a keyed and an unkeyed literal, `&provision.Record{}`, a whole-record assignment through a pointer, a `WriteRecord` call); `scanCopyPaths` reports each exactly once. |
| @@ -151,10 +152,11 @@ The exports row (3b); a box-side inert flag (B-8); a not-reached count, which ne |
| - [ ] **Step 1: Failing tests:** |
| - `TestVerifyAlertsReach` (R1-5): false with a confirmed email connector but no sender; false with only a webhook or Slack connector, whether or not a seal key is loaded (R2-2); false with the rule disabled, with a suspended or unsubscribed connector, and on a store error; true with a confirmed email connector and `consoleMail` set. |
| - `TestShowRestoreTest` (backupswords): passed today, passed on an earlier date and an earlier year, failed with and without `Alerted`, no test; values, details, note and tone per Task 1; the forbidden-words loop of `TestShowEveryClassAndReason` extended to every new field. |
| + - `TestBackupsDoorRacesReaderStart` (R3-2, run with `-race`): the backups door called in a loop from several goroutines while `StartVerifyReader` runs; no race report. |
| - `TestAPIInstanceBackupsLastTest` (console, through the real router and gate, spec §12): a published passing record gives `last_test` with `result`, `at`, `copy_written_at`; a failing one adds `operators_alerted` only with a deliverable connector; no record or an unaccepted verdict omits the key; pooled and fleet records never carry it; a home-region instance (`Region: ""` on the record and in the console's config) with a home-region verdict gets `last_test` (R2-1). |
| - `TestBackupsLastTestNotMemoised`: a door call, then a new record read by the reader, then a second call within 5 minutes: the second shows the new test. |
| - `TestInstancePageBackupsRestoreTest`: the rendered section shows each state; Review Focus 1's no-records case shows the slice-1 "not shown yet"; the section contains no forbidden word. |
| -- [ ] **Step 2:** `go test ./internal/backupswords ./internal/console -run 'ShowRestoreTest|ShowEvery|APIInstanceBackups|BackupsLastTest|InstancePageBackups|VerifyAlertsReach'` → FAIL. |
| +- [ ] **Step 2:** `go test -race ./internal/backupswords ./internal/console -run 'ShowRestoreTest|ShowEvery|APIInstanceBackups|BackupsLastTest|BackupsDoorRaces|InstancePageBackups|VerifyAlertsReach'` → FAIL. |
| - [ ] **Step 3:** Implement. Styleguide classes only; the failed tone is the existing warning chip or tile class Task 0 chose. |
| - [ ] **Step 4:** Same command plus `TestConsoleStyleguideClassesExist` → PASS. |
| - [ ] **Step 5:** Commit. |
| @@ -181,19 +183,20 @@ The exports row (3b); a box-side inert flag (B-8); a not-reached count, which ne |
| - Consumes: `replicaIntrinsic` (slice 1), `s.acceptedTest` (Task 3) for every instance's test, so owner and operator views pick from the same candidates, `seen` included (R2-4); `verifyReader.Boxes`/`Loaded` (Task 2) for box diagnostics only (quiet and unreadable boxes, B-8), `s.recordWalkStore` + `provision.ListAllRecordsTolerant`, `release.ModLister` and `status.Box`/`status.BoxStale` (B-8), `regionlabel.ForCode`. |
| - Produces: |
| - `type fleetBackupsView struct { GeneratedAt time.Time; Loaded, Complete bool; Regions []fleetBackupsRegion }` |
| - - `type fleetBackupsRegion struct { Region, Label string; Classes fleetBackupsClasses; Tests fleetBackupsTests; QuietBoxes []fleetBackupsBox; UnreadableBoxes []string; Offsite string /*"no_record", B-9*/ }` |
| + - `type fleetBackupsRegion struct { Region, Label string; Classes fleetBackupsClasses; Tests fleetBackupsTests; QuietBoxes []fleetBackupsBox; UnreadableBoxes []string; PrefixRefused int /*R3-4*/; Offsite string /*"no_record", B-9*/ }` |
| - `type fleetBackupsClasses struct { Replicated int; NoCopy, NotShown map[string]int /*reason -> count*/ }` |
| - `type fleetBackupsTests struct { PassedWeek, Failed, NeverTested int; OldestAt *time.Time }`, over replicated instances only; `Failed` and `PassedWeek` from each host's `acceptedTest`; `NeverTested` is none; `OldestAt` the oldest accepted test's `VerifiedAt`. No not-reached count (B-7). |
| - `func loadBoxInventory(ctx context.Context, s release.Store, now time.Time) (boxes []status.Box, complete bool, err error)` (R1-3): `ListMod("status/boxes/")`, keep keys modified within 7 days, newest first, at most 200 (more: `complete` false), each body at most 1 MiB and parsed as `status.Box`; a failed or skipped read sets `complete` false. A store that isn't a `ModLister` falls back to `List` and keeps every key. |
| - `type fleetBackupsBox struct { Box, Name string; LastRecord *time.Time; StatusStale bool }`: B-8; `StatusStale` is `status.BoxStale(b, now, status.SnapshotPeriod)`. |
| - `func (s *Server) fleetBackups(ctx context.Context, now time.Time) (fleetBackupsView, error)`, memoised 5 minutes (one build in flight; the `backupsMemo` shape). |
| - JSON keys are the field names in snake case (`generated_at`, `passed_week`, `oldest_at` omitempty, `quiet_boxes`, `last_record`), since the system door serves this struct as is. |
| -- Regions: an instance's `rec.Region`, a box's `status.Box.Region`, a verdict's `Identity.Region`; labels through `regionlabel.ForCode(code, s.regionHome(), s.regionNames())`. |
| +- Regions are keyed in the records' vocabulary, home = `""` (R3-1): an instance's `rec.Region` and a verdict's `Identity.Region` as they are; a box's `status.Box.Region` (operator-set `STATUS_BOX_REGION`, which may name the home) through `s.homeRegionIn(b.Region)`, as `teamfloor.go:99` does; a record ref with no status object (a fleet box) goes under its verdicts' `Identity.Region`. Labels through `regionlabel.ForCode(code, s.regionHome(), s.regionNames())`. `PrefixRefused` counts replicated instances whose `acceptedTest` reports `prefixRefused`. |
| - [ ] **Step 1: Failing tests:** |
| - `TestFleetBackupsCountsPerRegion`: two regions; records of every class and reason; verdicts passed (3 days old), passed (9 days old), failed, unverified, and none; expect the counts and `OldestAt`; the JSON has no not-reached key. One of the two regions is the home region (`Region: ""` on records, verdicts and the console's config) and its tested instances are counted as tested, not never tested (R2-1). |
| - `TestFleetBackupsAgreesWithOwnerOnReassignedHost` (R2-4): box A passes host H, then A's next record drops H before B tests it; after the memo is rebuilt, the door's `last_test` for H is A's retained pass and `/fleet/backups` counts H as passed, not never tested; after B publishes a newer fail, both show the fail. |
| - - `TestFleetBackupsQuietBoxes`: four boxes: sleeping instances and a 37-hour-old record; sleeping instances and no record; sleeping instances and a fresh record; no sleeping instances and no record. Only the first two are listed, with `LastRecord` set for the first and nil for the second. |
| + - `TestFleetBackupsQuietBoxes`: four boxes: sleeping instances and a 37-hour-old record; sleeping instances and no record; sleeping instances and a fresh record; no sleeping instances and no record. Only the first two are listed, with `LastRecord` set for the first and nil for the second. A fifth case (R3-1): a home box whose status names the home region by its name is listed under the home region entry (`""`), beside that region's instances, never under a second entry. |
| + - `TestFleetBackupsCountsPrefixRefusals` (R3-4): a console whose `HibernatePrefix` differs from the boxes' counts the own-region instances under `PrefixRefused`, and the page shows that count (Task 7). |
| - `TestFleetBackupsDarkBoxStillListed` (R1-3): a box whose status object and verify record are both 37 hours old, with sleeping instances, is listed with `StatusStale` true; one whose status object is 8 days old is not. |
| - `TestFleetBackupsNoRecordsYet` (Review Focus 1): reader loaded, no records: every replicated instance is never tested; `Loaded` true. |
| - `TestFleetBackupsNotLoaded`: reader not loaded: `Loaded` false and no test counts. |
| @@ -225,7 +228,7 @@ The exports row (3b); a box-side inert flag (B-8); a not-reached count, which ne |
| ### Task 8: Census, branch close, release and dev check |
| - [ ] **Step 1:** Root census: `make census-card`; write `docs/superpowers/notes/census-claims-member-backups-2b.txt` (the `backupswords` display and words units, the CLI's `printBackups`/`backupsJSON`; no new reads); `make census-propose NAME=member-backups-2b CLAIMS=<file>`; post on #280; wait for the other-family reviewer's approval; commit the overlay, chain line and card. The record-write census is untouched (the console writes no record); confirm `go test ./internal/provision -run TestPlan9B8RecordWriteCensus` still passes. |
| -- [ ] **Step 2:** Changed packages only: `go test ./internal/backupswords ./internal/console ./internal/parity ./cmd/console . -run 'VerifyReader|VerifyIdentity|AcceptVerdict|CopySince|ScanCopyPaths|VerifyAlertsReach|MoveThereAndBack|RestoreIsNewIdentity|PickTest|ShowRestoreTest|ShowEvery|APIInstanceBackups|BackupsLastTest|InstancePageBackups|InstancesBackups|CLIGolden|FleetBackups|APISystemBackups|RouteDecls|EveryCLIDoor|ParityCLIPaths|CLIProjection|ApprovedMemberBackups|StyleguideClasses|Plan14'`. Push; `amadan ci status -branch <name>` green. |
| +- [ ] **Step 2:** Changed packages only: `go test -race ./internal/backupswords ./internal/console ./internal/parity ./cmd/console . -run 'VerifyReader|VerifyIdentity|AcceptVerdict|CopySince|ScanCopyPaths|VerifyAlertsReach|MoveThereAndBack|RestoreIsNewIdentity|PickTest|ShowRestoreTest|ShowEvery|APIInstanceBackups|BackupsLastTest|BackupsDoorRaces|InstancePageBackups|InstancesBackups|CLIGolden|FleetBackups|APISystemBackups|RouteDecls|EveryCLIDoor|ParityCLIPaths|CLIProjection|ApprovedMemberBackups|StyleguideClasses|Plan14'`. Push; `amadan ci status -branch <name>` green. |
| - [ ] **Step 3:** Whole-branch Astra review under AGENTS.md "Stopping rules": it stops at the first round with no P1, whose P2s are fixed without reopening; a fourth round needs Paul. The brief carries the plan's round history (plan round 1 NOT READY, rev 2) and the per-task reviews' outcomes. |
| - [ ] **Step 4:** Release and roll, dev first, after 2a's release (2b reads what 2a writes). Dev check (spec §12): after one night, a dev instance on a box with sleeping hosts shows its restore test on the page, in the door and in the CLI, with the same time; `/fleet/backups` counts match the boxes' records; move a dev instance to another region and back: its tile shows "not shown yet" until the next night's test. Report on #898; ask Paul before the flagship roll. |
| @@ -254,3 +257,14 @@ The exports row (3b); a box-side inert flag (B-8); a not-reached count, which ne |
| | R2-3 | P2 | `s.verify` published from a goroutine without synchronization (safe publication of shared state) | Accepted: `atomic.Pointer`, set synchronously by `StartVerifyReader` before the goroutine starts and before the server listens; `-race` test (Task 2). | |
| | R2-4 | P2 | Fleet counts use different candidates from the owner view (consistent evidence across surfaces) | Accepted: the operator view picks each instance's test through `acceptedTest`; `Boxes` is for box diagnostics only; reassigned-host test compares both surfaces (Task 6). | |
| +## Round 3 (Fable, standing in for Astra): dispositions |
| + |
| +`docs/superpowers/notes/reviews/member-backups/FABLE-FINDINGS-plan-2b-R3.md`, READY AFTER FIXES, no P1; R2-1 to R2-4 resolved. Applied in place; review complete (AGENTS.md stopping rule 1). |
| + |
| +| # | Sev | Finding (fault family) | Disposition | |
| +|---|---|---|---| |
| +| R3-1 | P2 | Task 6 joins boxes by `status.Box.Region`, which can name the home where records use `""` (identity vocabulary compatibility, second round) | Accepted with the controller's choice of Fable's second fix, not the cut: `agent.go:4821`, `teamfloor.go:99` and `apiinstancemove.go:323` confirmed. Regions keyed in the records' vocabulary; boxes through `s.homeRegionIn`; a home box naming the home is tested (Task 6). | |
| +| R3-2 | P2 | Task 2's race test calls code Tasks 3 and 4 create (task order) | Accepted: Task 2 races only `s.verify.Load()`, `For` and `Loaded`; the door-level race test moved to Task 4. Whole order re-checked: Task 2's reassigned-host test no longer asserts Task 3's selection (moved to `TestPickTestNewestWins`); every other task consumes only earlier tasks. | |
| +| R3-3 | P3 | Gone boxes' records are re-read every 6 hours forever (bounded background requests) | Accepted: `dbverify.go:325` and `movespass.go:577` confirmed (per-host removal only). Gone refs are skipped at relist and read only on generation movement; counting test (Task 2, B-5). | |
| +| R3-4 | P3 | The plan's own-region prefix check fails closed silently | Accepted: applied only with `HibernateBucket` set; refusals logged once per box and counted per region on `/fleet/backups` (Global Constraints, Tasks 3, 6, 0, 1). | |
| +| R3-5 | P3 | `TestRestoreIsNewIdentity` uses a hand-built record | Accepted: driven through the real restore door with `restore_door_test.go`'s fixture (Task 3). | |