carlos / platform Public

member backups: 2a landing-fix ledger and report (#898)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev f4af3b9b531c15bd994c8b7e283ca103d16c2acb parent dbcaa54
2 files changed, +34 −0
  • docs/superpowers/notes/sdd-ledgers/member-backups-2a-landing-ledger.md +13 −0
  • docs/superpowers/notes/sdd-ledgers/member-backups-2a-landing-report.md +21 −0

CI failed — run details

Intent

Human

<task-notification> <task-id>btjjkq5k5</task-id> <tool-use-id>toolu_013tjDh8VxSuT1x6kTFGSe3d</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/ab362fc0-f177-4a7f-a92e-4a29ea210aad/tasks/btjjkq5k5.output</output-file> <status>completed</status> <summary>Background command "Commit census findings, push (triggers CI), wait" completed (exit code 0)</summary> </task-notification>

diff --git a/docs/superpowers/notes/sdd-ledgers/member-backups-2a-landing-ledger.md b/docs/superpowers/notes/sdd-ledgers/member-backups-2a-landing-ledger.md
new file mode 100644
index 000000000..50278252f
--- /dev/null
+++ b/docs/superpowers/notes/sdd-ledgers/member-backups-2a-landing-ledger.md
@@ -0,0 +1,13 @@
+# 2a landing fix ledger
+R1 2a6daefa, R2 4a9f46b4, R3 06f609fe, census b6dd6e23 (seal 677c2e52); R1b requested
+Ruling: a partial staging delete leaving a host 'moving' nightly (3-run alert) is the right signal — a later cold wake would promote the leftover — costs an operator alert until cleaned.
+Paul 2026-11-12 (1b): export-only home scope; drop the email sentence from the preparing note.
+Astra code review: Needs fixes (Important: legacy MoveComplete doesn't write LastMove; Minor: promotion-race test stubs restore). Census R1 READY; CI passed at 0cfd5ad7a.
+Ruling: bracket compares the record object's version (ETag) at open/close; any change → unverified (moving if a move shows, else record_changed) — closes legacy and future move kinds — costs an unverified night for hosts whose record changes mid-test.
+R1c implemented a29c2252 6cc46369, census 1eb84b68 (seal bf37ccf4)
+Ruling: region change mid-test stays record_changed (identity change outranks move; unverified either way) — costs a less specific reason.
+Ruling: unversioned stores fall back to ETag (byte-identical round trip invisible there) — production deployment bucket is versioned — costs a gap on self-hosted unversioned stores.
+Fable scoped re-review: all findings addressed, no new breakage (fable-rereview.md); waiting on census R2 (Astra 09:41Z) + CI
+Census R2 READY; CI 4930964a failed TestLargeManifestReleaseThenKeep (main f2cf2828 green incl. 2a); rerun
+CI: TestLargeManifestReleaseThenKeep failed 2/3 runs on this branch (main green) — investigating as possibly branch-related
+CI flake root-caused (TestMoveTicketsPausePoints leaks a running stop; main 87/300 failures too); test-only fix 82eb03c6
diff --git a/docs/superpowers/notes/sdd-ledgers/member-backups-2a-landing-report.md b/docs/superpowers/notes/sdd-ledgers/member-backups-2a-landing-report.md
new file mode 100644
index 000000000..1532b66c1
--- /dev/null
+++ b/docs/superpowers/notes/sdd-ledgers/member-backups-2a-landing-report.md
@@ -0,0 +1,21 @@
+# Slice 2a landing fixes: report (from the implementer, condensed by the controller)
+
+Commits: 4a9f46b4 R2, 2a6daefa R1, 06f609fe R3, d8f9824a R1b, b6dd6e23 + 445ed3be census (seal b130b2d6 -> 45c6afd0). Base 178dcfe5 (main).
+
+R1 (landed, awaiting promotion): the first-wake promotion (promoteStagedReplica, activator/backend_exec.go) trusts only a listing of moves/<host>/ in the box's own data bucket ("staging wins"); record Move is nil after landing and the registry row exists before promotion, so neither can say "awaiting promotion". The drill uses the promotion's own test (one-key ListPage with trailing slash, like the console's hostHasStaging #658): at the bracket's open (before scratch/plan/restore) and at the close (after confirmDrillIdentity): staging present -> unverified/moving; listing error -> unverified/storage_unavailable (never "nothing staged"). Tests: hibernate_verify_staging_test.go (landed orphan copy -> moving, never restored; staging arriving mid-test with clean or damaged restore -> always moving; promoted -> unchanged pass; per-host; unreadable -> storage_unavailable). RED: stale pass (passed TXID 3) and false failed (mixed lineage) reproduced.
+
+R2 (read-only restore): dbdoor.PlanListed returns the plan plus its cached listing as a list/open-only reader; lease.VerifyReaderAt restores through readOnlyClient (writes return ErrReadOnly; not a ReplicaClientV3). Pinned TXID, CheckDBContext, damage marking, cleanup, replan on ErrNotExist/ErrTxNotAvailable unchanged; VerifyReplicaAt kept for other callers. Tests: TestVerifyReaderAt(+MissingObject), TestPlanListed*, TestVerifyHibernatingListsEachLevelOncePerHost (levels 0-9 once per host). Cost: 12 LIST + (F+4) GET per host (was 20 LIST).
+
+R3 (home region): gate becomes r.Region != "" && !ValidRegion && !fleet; bracket compares regions exactly; assignment/publish/freshness don't read CARLOS_REGION. Tests: hibernate_verify_home_test.go (home box drills home instance through the real run path; uk record on a home box -> no_record; malformed regions still refuse).
+
+R1b (whole move inside one test): drill-only lastMove stamp (ID, Outcome, At, OfflineS of rec.LastMove) captured at open, compared at close; changed identity -> record_changed (outranks), same identity + different stamp -> moving. No new requests. Tests: "a move completed" bracket case (all restore outcomes), TestDrillBracketSeesACompletedMove.
+
+Checks: gofmt, vet (ops, lease, dbdoor), linux/darwin/windows builds, TestPlan14RootReadCensus + TestPlan9B8RecordWriteCensus pass. Census card docs/superpowers/notes/census-proposal-member-backups-2a-landing.md (unit hibernateRun.run; envelopes ops, lease, dbdoor).
+
+Concerns: (1) leftover staging keeps a host 'moving' nightly -> 3-run alert (right signal); (2) listing moves/<host>/ with the instance role untested live (activator already does it); (3) phase1 boxes: staging present -> moving (safe); (4) R1b relies on every move close writing LastMove (true today).
+
+## R1c (record version in the bracket), commits a29c2252, 6cc46369, census 1eb84b68 (seal b130b2d6 -> bf37ccf4)
+ETag alone misses a legacy round trip (versioned SSE-S3 bucket: ETag = MD5 of identical bytes). release.ObjectStamp{ETag, VersionID, LastModified} via an optional StampedGetter (S3Store.GetStamped: same single GetObject); provision.GetRecordStamped / GetSidecarRecordStamped; drillIdentity carries the record stamp; confirm order: read error -> error; no record or identity change -> record_changed; mid-move or LastMove changed -> moving; any other stamp change -> record_changed. Tests: TestS3GetStampedCarriesTheVersion, TestGetStampedFallsBackToTheETag, TestRecordStampedReads, TestDrillLegacyRoundTripInsideTheTestIsNeverAResult (real MoveComplete uk->us->uk, distinct replicas, real promotion, staging dropped; 3 variants -> unverified/record_changed), TestDrillAnyRecordWriteDuringTheTestIsAChange; staging test now runs the real restore with completed promotions. RED reproduced (passed on old copy, passed after promotion, failed on mixed read, passed on same-bytes rewrite). Census: new unit S3Store.GetStamped (legacy/accepted), envelopes dbdoor, lease, ops, provision, release; record-write census adds the two stamped getters as read-only key-sites. Concerns: unversioned stores fall back to ETag (byte-identical round trip invisible there); any record write mid-test -> one unverified night; region change stays record_changed (identity outranks move).
+
+## CI flake: TestLargeManifestReleaseThenKeep (fix 82eb03c6, test-only)
+Not this branch: the activator test binary doesn't link the changed code. Cause: TestMoveTicketsPausePoints' subtest "while begin waits on a stop" returns with a stop still running; its release marker fails against the closed fake S3 and is queued "owed" in lease's process-wide store; the next test's wake retries it (the extra PUT lock.json). Repro with CPU hogs, CI order pair x300: tip 78 failures, main f2cf2828 87; after the fix 0. Fix: the subtest waits for its stop and asserts nothing is owed for its lock (RED 3/3 before). Deeper weakness: the owed-marker store is process-wide and HA tests reuse shop.example.com — an end-of-test "nothing owed" check in the HA fixture would catch this class generally (follow-up).