carlos / platform Public

hibernate-verify: publish nothing when the prior record is unreadable

Astra round 3: leaving no host out on a failed read was not enough,
because the run still published a reset record, erasing the evidence
(passed verdict, TXID, LastDecidedAt) that a host once had data; the
next readable run could then leave that host out. A run that cannot
read control/verify/<ref>.json (any error but not-found) now publishes
nothing, bucket or local, and exits 1, so the record stands until it
can be read; a record that stays unreadable surfaces as verify_coverage.
This replaces Drill.PriorUnknown. Two-night regression test; root-read
census overlay re-proposed for hibernateRun.run's digest.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev a80c92ab148805d538c765559a37cd6c30ce20b2 parent 9c2f51e
7 files changed, +43 −34
  • docs/superpowers/notes/census-proposal-member-backups-drill-nodb.md +1 −1
  • internal/ops/hibernate_verify.go +1 −5
  • internal/ops/hibernate_verify_run_test.go +27 −12
  • internal/ops/hibernate_verify_test.go +0 −3
  • internal/ops/ops.go +10 −9
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −1
  • internal/provision/testdata/plan14-root-reads-member-backups-drill-nodb.tsv +3 −3

CI passed — run details

Intent

Human

<task-notification> <task-id>bznf2w8y2</task-id> <tool-use-id>toolu_017Ph7tMJgPRaTiumMHBhji5</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/ab362fc0-f177-4a7f-a92e-4a29ea210aad/tasks/bznf2w8y2.output</output-file> <status>completed</status> <summary>Background command "Astra scoped re-review round 3" completed (exit code 0)</summary> </task-notification>

Attributed to this commit: 36.4 g CO₂e (4,324,758 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on member-backups-drill-nodb, never backward from it. A turn that produced more than one commit books all of its tokens to the last one, and a concurrent session on this branch can add to the same figure. Some of it was priced using the shared default rate, because no model-specific factor row exists yet for at least one model involved. The Carbon view has the repo total, which is never derived from this attribution.

diff --git a/docs/superpowers/notes/census-proposal-member-backups-drill-nodb.md b/docs/superpowers/notes/census-proposal-member-backups-drill-nodb.md
index b7046fccd..86d9d70f9 100644
--- a/docs/superpowers/notes/census-proposal-member-backups-drill-nodb.md
+++ b/docs/superpowers/notes/census-proposal-member-backups-drill-nodb.md
@@ -18,6 +18,6 @@ New dispositions, which census-propose wrote and the reviewer checks against the
- new `internal/ops/hibernate_verify.go:noDatabase`: reads +file:Lstat; written legacy, accepted-legacy, frozen
-Seal: `5e8a72175700a3e60c1e283b133c1ee25e36f292e2e319f02a19138f15186376` → `d78e183bdba2135abc60c70c220e1009a72c75781962bcbe11b5cb38f6c9dcbf`.
+Seal: `5e8a72175700a3e60c1e283b133c1ee25e36f292e2e319f02a19138f15186376` → `07b748a749084fdaf61c5087a6edfca8a79273962822ce551dd4d42b0d20c063`.
Overlay: `internal/provision/testdata/plan14-root-reads-member-backups-drill-nodb.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`.
diff --git a/internal/ops/hibernate_verify.go b/internal/ops/hibernate_verify.go
index d2209f0cd..e6fb77162 100644
--- a/internal/ops/hibernate_verify.go
+++ b/internal/ops/hibernate_verify.go
@@ -198,10 +198,6 @@ type Drill struct {
// whose verdict there, for the same incarnation, shows it once had data
// is never left out for having none now.
Prior *dbverify.Record
- // PriorUnknown says the prior record could not be read this run. An
- // unreadable history is not an absent one, so no host is left out
- // while it is unknown: each keeps its unverified verdict instead.
- PriorUnknown bool
// staging is the data bucket the staged-copy check lists, opened once
// by VerifyHibernating; stagingErr is why it could not be.
@@ -553,7 +549,7 @@ func (d Drill) drillOne(ctx context.Context, rt HibernatingRoute, now func() tim
// on a proven absence: a file that is there is a database with
// nothing replicated, a real gap; so is a database this incarnation
// once had, now lost with its copy.
- if !d.PriorUnknown && noDatabase(rt.DBPath) && (!rt.HA || ownsLease) && !d.hadData(rt.Host, v.Identity) {
+ if noDatabase(rt.DBPath) && (!rt.HA || ownsLease) && !d.hadData(rt.Host, v.Identity) {
return v, drillNoDatabase
}
v.Result, v.Reason, v.Detail = dbverify.ResultUnverified, ReasonNothingReplicated, "no replica yet"
diff --git a/internal/ops/hibernate_verify_run_test.go b/internal/ops/hibernate_verify_run_test.go
index 321019764..33b0987d1 100644
--- a/internal/ops/hibernate_verify_run_test.go
+++ b/internal/ops/hibernate_verify_run_test.go
@@ -731,12 +731,12 @@ func TestRunHibernateVerifyPriorDataIsNeverLeftOut(t *testing.T) {
}
}
-// TestRunHibernateVerifyUnreadablePriorLeavesNoHostOut: an unreadable
-// history is not an absent one (Astra round 2). When the run's first read
-// of its record fails, a host with no database and nothing replicated is
-// not left out that night: it stays unverified, so a host that once had
-// data can't drop out of the alerts on a bad read.
-func TestRunHibernateVerifyUnreadablePriorLeavesNoHostOut(t *testing.T) {
+// TestRunHibernateVerifyUnreadablePriorPublishesNothing: an unreadable
+// history is not an absent one (Astra rounds 2 and 3). When the run's read
+// of its record fails, it publishes nothing and fails, so the record keeps
+// the evidence that a host once had data; the next run that can read it
+// still refuses to leave that host out.
+func TestRunHibernateVerifyUnreadablePriorPublishesNothing(t *testing.T) {
const site = "site.example.com"
fx := newRunFx(t, site)
fx.writeSelf(fxSelf, false)
@@ -749,23 +749,38 @@ func TestRunHibernateVerifyUnreadablePriorLeavesNoHostOut(t *testing.T) {
if err := dbverify.Publish(context.Background(), fx.store, prior); err != nil {
t.Fatal(err)
}
- fx.store = &firstGetFails{Store: fx.store, key: dbverify.KeyFor(fxSelf)}
+ under := fx.store
+ fx.store = &firstGetFails{Store: under, key: dbverify.KeyFor(fxSelf)}
+ // Night A: the read fails. Nothing is published, bucket or local.
var code int
out := captureStdout(t, func() { code = fx.runner().run(context.Background()) })
+ if code == 0 {
+ t.Fatalf("exited 0 over an unreadable record: %s\n%s", fx.logs, out)
+ }
+ fx.store = under
+ if rec := fx.published(fxSelf); !rec.Hosts[site].OK() || rec.Hosts[site].TXID != 9 || len(rec.LeftOut) != 0 {
+ t.Fatalf("the record was rewritten on a failed read: %+v", rec)
+ }
+ if _, err := fx.localCopy(); !errors.Is(err, os.ErrNotExist) {
+ t.Fatalf("a local copy was written on a failed read (err %v)", err)
+ }
+
+ // Night B: the read succeeds. The history still shows data, so the
+ // host is not left out.
+ fx.clock.Advance(24 * time.Hour)
+ fx.writeSelf(fxSelf, false)
+ out = captureStdout(t, func() { code = fx.runner().run(context.Background()) })
if code != 0 {
- t.Fatalf("exited %d: %s\n%s", code, fx.logs, out)
+ t.Fatalf("night B exited %d: %s\n%s", code, fx.logs, out)
}
rec := fx.published(fxSelf)
if len(rec.LeftOut) != 0 {
- t.Fatalf("left out %+v on a night the history could not be read", rec.LeftOut)
+ t.Fatalf("left out %+v: the host once had data", rec.LeftOut)
}
if v, ok := rec.Hosts[site]; !ok || !v.Unverified() || v.Reason != ReasonNothingReplicated {
t.Fatalf("%s: %+v (in record %v), want unverified/nothing_replicated", site, v, ok)
}
- if strings.Contains(out, "left out "+site) {
- t.Fatalf("the run log says %s was left out:\n%s", site, out)
- }
}
// firstGetFails fails the first read of key, then reads through.
diff --git a/internal/ops/hibernate_verify_test.go b/internal/ops/hibernate_verify_test.go
index d3218e649..fd3905c04 100644
--- a/internal/ops/hibernate_verify_test.go
+++ b/internal/ops/hibernate_verify_test.go
@@ -486,7 +486,6 @@ func TestVerifyHibernatingLeavesOutAHostWithNoDatabase(t *testing.T) {
ha bool
setup func(fx *drillFx)
prior func(fx *drillFx) dbverify.Verdict
- unknown bool
leftOut bool
reason string
}{
@@ -530,7 +529,6 @@ func TestVerifyHibernatingLeavesOutAHostWithNoDatabase(t *testing.T) {
prior: prior(func(_ *drillFx, v *dbverify.Verdict) {
v.Result, v.Reason, v.Identity = dbverify.ResultPassed, "", dbverify.Identity{}
})},
- "prior record unreadable": {dbPath: absent, unknown: true, reason: ReasonNothingReplicated},
"prior passed, another incarnation": {dbPath: absent, leftOut: true,
prior: prior(func(_ *drillFx, v *dbverify.Verdict) {
v.Result, v.Reason = dbverify.ResultPassed, ""
@@ -550,7 +548,6 @@ func TestVerifyHibernatingLeavesOutAHostWithNoDatabase(t *testing.T) {
if c.prior != nil {
d.Prior = &dbverify.Record{V: 2, Box: fxSelf, Hosts: map[string]dbverify.Verdict{host: c.prior(fx)}}
}
- d.PriorUnknown = c.unknown
res := fx.runAll(context.Background(), d, rt, nil)
v, decided := res.Verdicts[host]
lo, left := res.LeftOut[host]
diff --git a/internal/ops/ops.go b/internal/ops/ops.go
index 3fc243f35..15bd44131 100644
--- a/internal/ops/ops.go
+++ b/internal/ops/ops.go
@@ -516,15 +516,16 @@ func (r hibernateRun) run(ctx context.Context) int {
// (P2-16). It also orders the run, stalest first.
ref := self.Ref
prior, err := dbverify.Load(ctx, store, ref)
- priorUnknown := false
if err != nil {
- if len(hosts) == 0 {
- r.Logf("hibernate-verify: reading %s: %v; no hosts here, and whether a record needs clearing is unknown, so nothing is published", dbverify.KeyFor(ref), err)
- return 1
- }
- r.Logf("hibernate-verify: reading %s: %v (continuing; this run starts the record over and leaves no host out)", dbverify.KeyFor(ref), err)
- prior = nil
- priorUnknown = true
+ // An unreadable history is not an absent one: publishing over it
+ // would reset every streak and erase the evidence that a host once
+ // had data, which the leave-out rule relies on (a host with no
+ // database is left out only when its history shows none). So the
+ // run publishes nothing and fails; the record stands until a run
+ // can read it, and a record that stays unreadable surfaces as
+ // verify_coverage.
+ r.Logf("hibernate-verify: NOT RUN: reading %s: %v; nothing is published, so the record stands until it can be read", dbverify.KeyFor(ref), err)
+ return 1
}
set, why := selectHosts(self, r.DataDir, r.Now(), hosts, r.Cfg.Prefix)
@@ -555,7 +556,7 @@ func (r hibernateRun) run(ctx context.Context) int {
defer os.RemoveAll(tmp)
d := Drill{Cfg: r.Cfg, Store: store, Region: r.Region, SelfRef: ref, TmpDir: tmp,
- Budget: r.Budget, Max: r.Max, PublishEvery: r.PublishEvery, Prior: prior, PriorUnknown: priorUnknown}
+ Budget: r.Budget, Max: r.Max, PublishEvery: r.PublishEvery, Prior: prior}
results := VerifyHibernating(ctx, d, OldestFirst(set.Drill, prior), r.Now, pub.publish)
rec := pub.last
left := len(results.LeftOut)
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv
index 001b87197..fe105eb7f 100644
--- a/internal/provision/testdata/plan14-root-reads-chain.tsv
+++ b/internal/provision/testdata/plan14-root-reads-chain.tsv
@@ -201,4 +201,4 @@ plan14-root-reads-ha-unclean-marker-waits.tsv 821598970e60a776d4a62138d5adbfa393
plan14-root-reads-ha-unclean-files-only.tsv bc138ce5435f3ab37f6adff46656eea1c20f48168c569550fe94e390c69ba309
plan14-root-reads-edge-ppv2.tsv 44e5745a1d22ea2ddd6e73d775d87759afe7121666212b6ed2563c1518261bc4
plan14-root-reads-static-site-geo-962.tsv 5e8a72175700a3e60c1e283b133c1ee25e36f292e2e319f02a19138f15186376
-plan14-root-reads-member-backups-drill-nodb.tsv d78e183bdba2135abc60c70c220e1009a72c75781962bcbe11b5cb38f6c9dcbf
+plan14-root-reads-member-backups-drill-nodb.tsv 07b748a749084fdaf61c5087a6edfca8a79273962822ce551dd4d42b0d20c063
diff --git a/internal/provision/testdata/plan14-root-reads-member-backups-drill-nodb.tsv b/internal/provision/testdata/plan14-root-reads-member-backups-drill-nodb.tsv
index a97f25153..5ddec2bec 100644
--- a/internal/provision/testdata/plan14-root-reads-member-backups-drill-nodb.tsv
+++ b/internal/provision/testdata/plan14-root-reads-member-backups-drill-nodb.tsv
@@ -1,9 +1,9 @@
# Census overlay member-backups-drill-nodb, written by census-propose (#369). census-ruling-member-backups-drill-nodb, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-member-backups-drill-nodb.md.
# 1 body, 0 sites, 2 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
# 1 new dispositions: 0 reads re-frozen at their disposition with the claim, 1 new units frozen accepted-legacy, 0 quiet units retired while they read nothing, 0 other.
-@legacy b6beb9b49cf563c3d5578fa4f056644f50d8acfd7d80bb0ab1e34b3ec70e8264 internal/ops/ops.go hibernateRun.run legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-2a;basis=new, the drill (carlos ops hibernate-verify, user carlos): the verb's body, moved out of runHibernateVerify so a test can run it whole. First of all it refuses root (Root, from os.Geteuid() == 0 in runHibernateVerify): one log line, exit 1, before any monitor file is read, the deployment store opened or the registry opened (census round 1 P1, ls284: self.json, which the carlos user writes, names the record a run replaces). Then, as before: boxself.ReadFresh of self.json (refuses to run without a fresh record), dbreads.ValidRegion(CARLOS_REGION), openDeployStore, registry.Open(RegPath) (its +file:Open, the same registry the old body opened, closed after HibernatingHosts), dbverify.Load of this box's own control/verify/<ref>.json, selectHosts (verify-assign.json on a group box), MkdirTemp under the unit's on-disk TMPDIR, the drill, and dbverify.Publish to control/verify/<ref>.json only. Final fix wave (still refusing root first): the self.json read is retried every 15 s for up to 5 minutes (SelfWait, the same boxself.ReadFresh), a fleet box's CARLOS_REGION fleet/<name> is accepted beside dbreads.ValidRegion, it calls clearCrashedScratch on its own TmpDir right after the root refusal and the hibernate-config check, before the self record and both empty-fleet returns (re-review item 9), and its publisher now writes through dbverify.PublishOver (the same Get-then-CAS Put of control/verify/<ref>.json, also parsing the record it reads to drop hosts a landing removed). No new read source.;rev3=census-ruling-member-backups-2a-landing;basis=R3 (#898): an empty CARLOS_REGION (a home-region box) is the home region and no longer refuses; the bracket matches records whose region is "" exactly. A malformed non-empty region still refuses (dbreads.ValidRegion, or a fleet/<name> placement). No read added or changed: the same refusals in the same order (root first, then self.json, then the region gate), the same stores. Package envelopes: internal/ops adds one read-only bounded ListPage (one key) of moves/<host>/ in the drill's own data bucket at each end of a host's bracket (R1), and the bracket compares the record's LastMove (R1b) and the record object's stamp (R1c: ETag, version id, last-modified) at open and close, all from the same record GET it already made (now provision.GetRecordStamped / GetSidecarRecordStamped); internal/provision adds those two read-only getters (decodeSidecarAt shared with GetSidecarRecord, no writer touched); internal/release adds GetStamped, S3Store.GetStamped and ObjectStamp; internal/lease adds VerifyReaderAt and a read-only litestream client (R2); internal/dbdoor adds PlanListed, the planner's listing as a list/open reader (R2). The drill runs as carlos and refuses root.;rev3=census-ruling-member-backups-drill-nodb;basis=the drill (user carlos). No read added or changed, same refusals in the same order (root first, then self.json, then the region gate). One new exit: when openDeployStore answers errNoDeployStore (neither CARLOS_DEPLOYMENT_BUCKET nor CARLOS_DEPLOYMENT_DIR set) and Fleet (CARLOS_FLEET trimmed, read once in runHibernateVerify) is non-empty, it prints one line and returns 0 before the registry is opened, publishing nothing. Any other store error, and a platform box with no store, still log NOT RUN and return 1. The record it already loaded (dbverify.Load of its own control/verify/<ref>.json) is also handed to the drill as Drill.Prior, read only to refuse a leave-out for an incarnation that once had data. The publisher now takes RunResults and merges with dbverify.MergeLeftOut: hosts the run left out (no database) go to the record's additive left_out field instead of hosts, written by the same PublishOver Put of control/verify/<ref>.json and the same local copy <data>/monitor/verify.json; the summary lines count them. file:Open@2885 6c252884e795aa6bd1c33806a0e827349d3e7e96ec0a7cc903d7c7e6bf592561
+@legacy 8186546efb3553303c18ab31151b5129d3011e505cebee7caf84d21992202b42 internal/ops/ops.go hibernateRun.run legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-2a;basis=new, the drill (carlos ops hibernate-verify, user carlos): the verb's body, moved out of runHibernateVerify so a test can run it whole. First of all it refuses root (Root, from os.Geteuid() == 0 in runHibernateVerify): one log line, exit 1, before any monitor file is read, the deployment store opened or the registry opened (census round 1 P1, ls284: self.json, which the carlos user writes, names the record a run replaces). Then, as before: boxself.ReadFresh of self.json (refuses to run without a fresh record), dbreads.ValidRegion(CARLOS_REGION), openDeployStore, registry.Open(RegPath) (its +file:Open, the same registry the old body opened, closed after HibernatingHosts), dbverify.Load of this box's own control/verify/<ref>.json, selectHosts (verify-assign.json on a group box), MkdirTemp under the unit's on-disk TMPDIR, the drill, and dbverify.Publish to control/verify/<ref>.json only. Final fix wave (still refusing root first): the self.json read is retried every 15 s for up to 5 minutes (SelfWait, the same boxself.ReadFresh), a fleet box's CARLOS_REGION fleet/<name> is accepted beside dbreads.ValidRegion, it calls clearCrashedScratch on its own TmpDir right after the root refusal and the hibernate-config check, before the self record and both empty-fleet returns (re-review item 9), and its publisher now writes through dbverify.PublishOver (the same Get-then-CAS Put of control/verify/<ref>.json, also parsing the record it reads to drop hosts a landing removed). No new read source.;rev3=census-ruling-member-backups-2a-landing;basis=R3 (#898): an empty CARLOS_REGION (a home-region box) is the home region and no longer refuses; the bracket matches records whose region is "" exactly. A malformed non-empty region still refuses (dbreads.ValidRegion, or a fleet/<name> placement). No read added or changed: the same refusals in the same order (root first, then self.json, then the region gate), the same stores. Package envelopes: internal/ops adds one read-only bounded ListPage (one key) of moves/<host>/ in the drill's own data bucket at each end of a host's bracket (R1), and the bracket compares the record's LastMove (R1b) and the record object's stamp (R1c: ETag, version id, last-modified) at open and close, all from the same record GET it already made (now provision.GetRecordStamped / GetSidecarRecordStamped); internal/provision adds those two read-only getters (decodeSidecarAt shared with GetSidecarRecord, no writer touched); internal/release adds GetStamped, S3Store.GetStamped and ObjectStamp; internal/lease adds VerifyReaderAt and a read-only litestream client (R2); internal/dbdoor adds PlanListed, the planner's listing as a list/open reader (R2). The drill runs as carlos and refuses root.;rev3=census-ruling-member-backups-drill-nodb;basis=the drill (user carlos). No read added or changed, same refusals in the same order (root first, then self.json, then the region gate). One new exit: when openDeployStore answers errNoDeployStore (neither CARLOS_DEPLOYMENT_BUCKET nor CARLOS_DEPLOYMENT_DIR set) and Fleet (CARLOS_FLEET trimmed, read once in runHibernateVerify) is non-empty, it prints one line and returns 0 before the registry is opened, publishing nothing. Any other store error, and a platform box with no store, still log NOT RUN and return 1. The record it already loaded (dbverify.Load of its own control/verify/<ref>.json) is also handed to the drill as Drill.Prior, read only to refuse a leave-out for an incarnation that once had data. The publisher now takes RunResults and merges with dbverify.MergeLeftOut: hosts the run left out (no database) go to the record's additive left_out field instead of hosts, written by the same PublishOver Put of control/verify/<ref>.json and the same local copy <data>/monitor/verify.json; the summary lines count them. file:Open@2885 b3bf8afe0b9932aed22d86c1bdde1411078aafc72087001b7c4eb18615ae171e
@legacy eda29e15054dad56308472163a577413301cab4d12cf640768dc892458459f8a internal/ops/hibernate_verify.go noDatabase legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-drill-nodb;basis=new, the drill (user carlos): os.Lstat of a hibernating route's DBPath from this box's own registry (the path HibernatingHosts already returns and freshness already reads through localFreshness), only when the path is absolute (a relative or empty path answers false with no syscall); only its error is looked at, nothing is opened or followed (lstat does not follow a final symlink). Called once per host, only in drillOne's final restoreNothing case after the identity bracket and the move staging closed clean; not-exist leaves the host out of the record only if, for an HA route, this box holds the lease (the same lockState read freshness makes) and the prior record shows no data for the incarnation; anything else keeps unverified/nothing_replicated. file:Lstat@107 1a971e6818d7e0478444b0c2fc6904e7b772fa22cbe90c86a20d11f521ceeda1
-internal/ops/ops.go hibernateRun.run legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-2a;basis=new, the drill (carlos ops hibernate-verify, user carlos): the verb's body, moved out of runHibernateVerify so a test can run it whole. First of all it refuses root (Root, from os.Geteuid() == 0 in runHibernateVerify): one log line, exit 1, before any monitor file is read, the deployment store opened or the registry opened (census round 1 P1, ls284: self.json, which the carlos user writes, names the record a run replaces). Then, as before: boxself.ReadFresh of self.json (refuses to run without a fresh record), dbreads.ValidRegion(CARLOS_REGION), openDeployStore, registry.Open(RegPath) (its +file:Open, the same registry the old body opened, closed after HibernatingHosts), dbverify.Load of this box's own control/verify/<ref>.json, selectHosts (verify-assign.json on a group box), MkdirTemp under the unit's on-disk TMPDIR, the drill, and dbverify.Publish to control/verify/<ref>.json only. Final fix wave (still refusing root first): the self.json read is retried every 15 s for up to 5 minutes (SelfWait, the same boxself.ReadFresh), a fleet box's CARLOS_REGION fleet/<name> is accepted beside dbreads.ValidRegion, it calls clearCrashedScratch on its own TmpDir right after the root refusal and the hibernate-config check, before the self record and both empty-fleet returns (re-review item 9), and its publisher now writes through dbverify.PublishOver (the same Get-then-CAS Put of control/verify/<ref>.json, also parsing the record it reads to drop hosts a landing removed). No new read source.;rev3=census-ruling-member-backups-2a-landing;basis=R3 (#898): an empty CARLOS_REGION (a home-region box) is the home region and no longer refuses; the bracket matches records whose region is "" exactly. A malformed non-empty region still refuses (dbreads.ValidRegion, or a fleet/<name> placement). No read added or changed: the same refusals in the same order (root first, then self.json, then the region gate), the same stores. Package envelopes: internal/ops adds one read-only bounded ListPage (one key) of moves/<host>/ in the drill's own data bucket at each end of a host's bracket (R1), and the bracket compares the record's LastMove (R1b) and the record object's stamp (R1c: ETag, version id, last-modified) at open and close, all from the same record GET it already made (now provision.GetRecordStamped / GetSidecarRecordStamped); internal/provision adds those two read-only getters (decodeSidecarAt shared with GetSidecarRecord, no writer touched); internal/release adds GetStamped, S3Store.GetStamped and ObjectStamp; internal/lease adds VerifyReaderAt and a read-only litestream client (R2); internal/dbdoor adds PlanListed, the planner's listing as a list/open reader (R2). The drill runs as carlos and refuses root.;rev3=census-ruling-member-backups-drill-nodb;basis=the drill (user carlos). No read added or changed, same refusals in the same order (root first, then self.json, then the region gate). One new exit: when openDeployStore answers errNoDeployStore (neither CARLOS_DEPLOYMENT_BUCKET nor CARLOS_DEPLOYMENT_DIR set) and Fleet (CARLOS_FLEET trimmed, read once in runHibernateVerify) is non-empty, it prints one line and returns 0 before the registry is opened, publishing nothing. Any other store error, and a platform box with no store, still log NOT RUN and return 1. The record it already loaded (dbverify.Load of its own control/verify/<ref>.json) is also handed to the drill as Drill.Prior, read only to refuse a leave-out for an incarnation that once had data. The publisher now takes RunResults and merges with dbverify.MergeLeftOut: hosts the run left out (no database) go to the record's additive left_out field instead of hosts, written by the same PublishOver Put of control/verify/<ref>.json and the same local copy <data>/monitor/verify.json; the summary lines count them. file:Open@2885 6c252884e795aa6bd1c33806a0e827349d3e7e96ec0a7cc903d7c7e6bf592561
+internal/ops/ops.go hibernateRun.run legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-2a;basis=new, the drill (carlos ops hibernate-verify, user carlos): the verb's body, moved out of runHibernateVerify so a test can run it whole. First of all it refuses root (Root, from os.Geteuid() == 0 in runHibernateVerify): one log line, exit 1, before any monitor file is read, the deployment store opened or the registry opened (census round 1 P1, ls284: self.json, which the carlos user writes, names the record a run replaces). Then, as before: boxself.ReadFresh of self.json (refuses to run without a fresh record), dbreads.ValidRegion(CARLOS_REGION), openDeployStore, registry.Open(RegPath) (its +file:Open, the same registry the old body opened, closed after HibernatingHosts), dbverify.Load of this box's own control/verify/<ref>.json, selectHosts (verify-assign.json on a group box), MkdirTemp under the unit's on-disk TMPDIR, the drill, and dbverify.Publish to control/verify/<ref>.json only. Final fix wave (still refusing root first): the self.json read is retried every 15 s for up to 5 minutes (SelfWait, the same boxself.ReadFresh), a fleet box's CARLOS_REGION fleet/<name> is accepted beside dbreads.ValidRegion, it calls clearCrashedScratch on its own TmpDir right after the root refusal and the hibernate-config check, before the self record and both empty-fleet returns (re-review item 9), and its publisher now writes through dbverify.PublishOver (the same Get-then-CAS Put of control/verify/<ref>.json, also parsing the record it reads to drop hosts a landing removed). No new read source.;rev3=census-ruling-member-backups-2a-landing;basis=R3 (#898): an empty CARLOS_REGION (a home-region box) is the home region and no longer refuses; the bracket matches records whose region is "" exactly. A malformed non-empty region still refuses (dbreads.ValidRegion, or a fleet/<name> placement). No read added or changed: the same refusals in the same order (root first, then self.json, then the region gate), the same stores. Package envelopes: internal/ops adds one read-only bounded ListPage (one key) of moves/<host>/ in the drill's own data bucket at each end of a host's bracket (R1), and the bracket compares the record's LastMove (R1b) and the record object's stamp (R1c: ETag, version id, last-modified) at open and close, all from the same record GET it already made (now provision.GetRecordStamped / GetSidecarRecordStamped); internal/provision adds those two read-only getters (decodeSidecarAt shared with GetSidecarRecord, no writer touched); internal/release adds GetStamped, S3Store.GetStamped and ObjectStamp; internal/lease adds VerifyReaderAt and a read-only litestream client (R2); internal/dbdoor adds PlanListed, the planner's listing as a list/open reader (R2). The drill runs as carlos and refuses root.;rev3=census-ruling-member-backups-drill-nodb;basis=the drill (user carlos). No read added or changed, same refusals in the same order (root first, then self.json, then the region gate). One new exit: when openDeployStore answers errNoDeployStore (neither CARLOS_DEPLOYMENT_BUCKET nor CARLOS_DEPLOYMENT_DIR set) and Fleet (CARLOS_FLEET trimmed, read once in runHibernateVerify) is non-empty, it prints one line and returns 0 before the registry is opened, publishing nothing. Any other store error, and a platform box with no store, still log NOT RUN and return 1. The record it already loaded (dbverify.Load of its own control/verify/<ref>.json) is also handed to the drill as Drill.Prior, read only to refuse a leave-out for an incarnation that once had data. The publisher now takes RunResults and merges with dbverify.MergeLeftOut: hosts the run left out (no database) go to the record's additive left_out field instead of hosts, written by the same PublishOver Put of control/verify/<ref>.json and the same local copy <data>/monitor/verify.json; the summary lines count them. file:Open@2885 b3bf8afe0b9932aed22d86c1bdde1411078aafc72087001b7c4eb18615ae171e
internal/ops/hibernate_verify.go noDatabase legacy accepted-legacy accepted-legacy;rev3=census-ruling-member-backups-drill-nodb;basis=new, the drill (user carlos): os.Lstat of a hibernating route's DBPath from this box's own registry (the path HibernatingHosts already returns and freshness already reads through localFreshness), only when the path is absolute (a relative or empty path answers false with no syscall); only its error is looked at, nothing is opened or followed (lstat does not follow a final symlink). Called once per host, only in drillOne's final restoreNothing case after the identity bracket and the move staging closed clean; not-exist leaves the host out of the record only if, for an HA route, this box holds the lease (the same lockState read freshness makes) and the prior record shows no data for the incarnation; anything else keeps unverified/nothing_replicated. file:Lstat@107 1a971e6818d7e0478444b0c2fc6904e7b772fa22cbe90c86a20d11f521ceeda1
@coverage internal/dbverify 35634dfea8793484ea365d297ccfc4811c9dfe3db997603bcf6e37b0c1dd6c34
-@coverage internal/ops 5fb9c1e091bfafdc4a096f33d5dba9d35780f96639bb61a0ef7397cd87a7ac4b
+@coverage internal/ops c40936f746ee5dee21d2d11f98c3c7e52f0922c117bf331b53073e4c44df8157