carlos / platform Public

hibernate-verify: leave no host out when the prior record is unreadable

Astra round 2: an unreadable history is not an absent one. When the
run's first read of control/verify/<ref>.json fails (not a missing
record), the drill now leaves no host out that night (Drill.PriorUnknown),
so a host that once had data stays unverified instead of dropping out of
the alerts on a bad read. Drill-level and run-level tests; the root-read
census overlay is re-proposed for hibernateRun.run's new digest.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 9c2f51e0ad20c84c7597e1657edfdaa87cd84994 parent 341f5f6
7 files changed, +76 −8
  • docs/superpowers/notes/census-proposal-member-backups-drill-nodb.md +1 −1
  • internal/ops/hibernate_verify.go +5 −1
  • internal/ops/hibernate_verify_run_test.go +59 −0
  • internal/ops/hibernate_verify_test.go +3 −0
  • internal/ops/ops.go +4 −2
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −1
  • internal/provision/testdata/plan14-root-reads-member-backups-drill-nodb.tsv +3 −3

CI cancelled — superseded by a newer push — run details

Intent

Human

<task-notification> <task-id>a60818bef0d374247</task-id> <tool-use-id>toolu_01XE14URC2y36fQaQwXoAvhY</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/ab362fc0-f177-4a7f-a92e-4a29ea210aad/tasks/a60818bef0d374247.output</output-file> <status>completed</status> <summary>Agent "Implement drill no-DB + fleet skip fix" 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>All three review findings are fixed in two new commits on top of `3d241ff8`. Everything passes, but both census tests went red, so I re-proposed both overlays. They need the census reviewer to look again. **Commits** (not pushed) - `f4d86145` hibernate-verify: left-out hosts need proof, and rotate (review round 1) - `341f5f6b` census: re-propose the drill fix after review round 1 **How HA ownership is decided** - Freshness's lease check is now its own function, `Drill.holdsLease`, at `internal/ops/hibernate_verify.go:781`. It is the same `lockState` read as before: no error, held, `hafresh.ParseOwner` accepts the owner, and the owner's ref is this box. `freshness` now calls it instead of its inline copy. - For an HA route with nothing replicated, `drillOne` calls `holdsLease` before the bracket closes, the same place freshness reads it. Freshness only runs on a clean restore, so this check is a second call of the same read, not a new kind of read. - An HA route is left out only when `holdsLease` is true. No holder, another holder, a read error or a cancelled context all keep unverified/nothing_replicated. - **Prior data:** the run passes the record it already loaded as `Drill.Prior`. A host is never left out if its prior verdict for the same incarnation was passed or failed, or has a non-zero TXID, or a LastDecidedAt. I treat a prior verdict with no recorded identity as the same incarnation, to be safe. **Starvation** - The record has a new field, `left_out` (host → {at, incarnation}), omitted when empty. It stays v 2. Every reader decodes leniently: `dbverify.Load`, `PublishOver`, `RemoveHost` and `metrics.ReadVerify` all use plain `json.Unmarshal`. The only strict decoder nearby (`boxself.readStrict`) reads self.json and the assignment file, not this record. - A new `dbverify.MergeLeftOut` keeps every host in exactly one of the two maps: - hosts left out tonight go to `left_out`, whatever they had before; - an unvisited host keeps what it had, a verdict or its `left_out` entry; - any result tonight, including an abandoned attempt, moves the host into `hosts`; - hosts no longer in the fleet drop out of both. - `Merge` now just calls it with nothing left out. - `OldestFirst` orders a left-out host by its `left_out` time. - The publisher's list of hosts it already knows about now includes `left_out`. `RemoveHost` and `PublishOver` clear it the same way they clear `hosts`. **Relative paths:** `noDatabase` returns false unless `filepath.IsAbs(DBPath)`. **Tests** - New drill cases: HA where this box holds the lease, has no holder, another box holds it, or the read errors; prior passed, failed, with a TXID, with a LastDecidedAt, with unknown identity, or from another incarnation; a relative path. - New run tests: - two nights with `--max 1`: the database host is drilled on night 2; - five left-out hosts using up the time budget: the database host is drilled by night 2, and again within six nights; - a database reappearing: the host leaves `left_out` and passes; - prior data through the full run: the host stays unverified with streak 1. - New dbverify tests cover `left_out` in the merge, `RemoveHost` and `PublishOver`; a metrics test covers `ReadVerify` with `left_out`. - I broke each guard on purpose (OldestFirst ordering, the HA check, the prior-data check, the absolute-path check), and each time the matching tests failed. - Results: - `go vet` on ops, dbverify and metrics: clean. `gofmt`: clean. - `go test ./internal/ops/`: ok (16.6s). - `go test ./internal/dbverify/`: ok. - `go test ./internal/metrics/ -run Verify`: ok. - The three census tests (`TestPlan14RootReadCensus`, `TestPlan9B8RecordWriteCensus`, `TestCensusScopeIsTheRootBinary`): ok. - `GOOS=darwin` and `GOOS=windows` builds of ops and dbverify: ok. **Census** - **Root reads:** re-ran `make census-propose NAME=member-backups-drill-nodb` with claims covering the whole branch, since a re-run proposes against the chain before its own overlay. It is the same two units and the same reads: `noDatabase` +file:Lstat, now only for absolute paths, and `hibernateRun.run`. The `internal/ops` and `internal/dbverify` envelopes are re-pinned, so this approval round needs a fresh look. - **Record writes (9B8):** this did flag the new field's write sites, `dbverify.PublishOver` and `dbverify.RemoveHost`, as digest changes only. Class (`nonrecord`) and kind (`sel:Put`) are unchanged and no record write is added. I added `internal/provision/member_backups_drill_nodb_census_test.go`, layered on the previous tip's inventory (`staticSiteGeo962WriteCensusInventory`), and pointed `plan9_b8_census_test.go` at it. I got the new digests from the census's own collector through a throwaway test, which I deleted. **Unsure about** - A sleeping HA host with no database and no lease holder stays unverified, as you accepted. In practice that is probably most sleeping HA static sites, so on the flagship verify_unverified can still fire for them on night 3. - An abandoned attempt moves a left-out host into `hosts` as not_reached. A host that can never finish then shows up in coverage instead of hiding in `left_out`; I chose that deliberately. - `Drill.Prior` is the record loaded at the start of the run. If that load failed (the run "starts the record over"), there is no prior-data protection that night. Scratch files are removed.</result> <usage><subagent_tokens>302244</subagent_tokens><tool_uses>44</tool_uses><duration_ms>653291</duration_ms></usage> </task-notification>

Human

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

Attributed to this commit: 22.4 g CO₂e (2,553,387 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 541c3f299..b7046fccd 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` → `8e40ffda985635df7a9fc05bf098fe979b0f701d062e0e47ac1ff47cc1d0b9fb`.
+Seal: `5e8a72175700a3e60c1e283b133c1ee25e36f292e2e319f02a19138f15186376` → `d78e183bdba2135abc60c70c220e1009a72c75781962bcbe11b5cb38f6c9dcbf`.
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 e6fb77162..d2209f0cd 100644
--- a/internal/ops/hibernate_verify.go
+++ b/internal/ops/hibernate_verify.go
@@ -198,6 +198,10 @@ 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.
@@ -549,7 +553,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 noDatabase(rt.DBPath) && (!rt.HA || ownsLease) && !d.hadData(rt.Host, v.Identity) {
+ if !d.PriorUnknown && 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 6d353db61..321019764 100644
--- a/internal/ops/hibernate_verify_run_test.go
+++ b/internal/ops/hibernate_verify_run_test.go
@@ -16,6 +16,7 @@ import (
"github.com/carlosframework/platform/internal/dbverify"
"github.com/carlosframework/platform/internal/metrics"
"github.com/carlosframework/platform/internal/registry"
+ "github.com/carlosframework/platform/internal/release"
)
// A failed periodic upload is not acknowledged: the next tick publishes
@@ -729,3 +730,61 @@ func TestRunHibernateVerifyPriorDataIsNeverLeftOut(t *testing.T) {
t.Fatalf("left out %+v", rec.LeftOut)
}
}
+
+// 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) {
+ const site = "site.example.com"
+ fx := newRunFx(t, site)
+ fx.writeSelf(fxSelf, false)
+ fx.replicaFor[fx.prefix(site)] = fx.empty
+ fx.holdLease(site)
+ prior := &dbverify.Record{V: 2, Box: fxSelf, CheckedAt: at("2026-11-11T03:00:00Z"), Hosts: map[string]dbverify.Verdict{
+ site: {Result: dbverify.ResultPassed, Identity: fx.identity(site), FirstSeen: at("2026-11-02T03:00:00Z"),
+ VerifiedAt: at("2026-11-11T03:00:00Z"), LastDecidedAt: at("2026-11-11T03:00:00Z"), TXID: 9},
+ }}
+ if err := dbverify.Publish(context.Background(), fx.store, prior); err != nil {
+ t.Fatal(err)
+ }
+ fx.store = &firstGetFails{Store: fx.store, key: dbverify.KeyFor(fxSelf)}
+
+ var code int
+ out := captureStdout(t, func() { code = fx.runner().run(context.Background()) })
+ if code != 0 {
+ t.Fatalf("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)
+ }
+ 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.
+type firstGetFails struct {
+ release.Store
+ key string
+ mu sync.Mutex
+ failed bool
+}
+
+func (s *firstGetFails) Get(ctx context.Context, key string) ([]byte, string, error) {
+ s.mu.Lock()
+ fail := key == s.key && !s.failed
+ if fail {
+ s.failed = true
+ }
+ s.mu.Unlock()
+ if fail {
+ return nil, "", errors.New("s3: get: SlowDown")
+ }
+ return s.Store.Get(ctx, key)
+}
diff --git a/internal/ops/hibernate_verify_test.go b/internal/ops/hibernate_verify_test.go
index fd3905c04..d3218e649 100644
--- a/internal/ops/hibernate_verify_test.go
+++ b/internal/ops/hibernate_verify_test.go
@@ -486,6 +486,7 @@ func TestVerifyHibernatingLeavesOutAHostWithNoDatabase(t *testing.T) {
ha bool
setup func(fx *drillFx)
prior func(fx *drillFx) dbverify.Verdict
+ unknown bool
leftOut bool
reason string
}{
@@ -529,6 +530,7 @@ 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, ""
@@ -548,6 +550,7 @@ 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 93951c754..3fc243f35 100644
--- a/internal/ops/ops.go
+++ b/internal/ops/ops.go
@@ -516,13 +516,15 @@ 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)", dbverify.KeyFor(ref), err)
+ 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
}
set, why := selectHosts(self, r.DataDir, r.Now(), hosts, r.Cfg.Prefix)
@@ -553,7 +555,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}
+ Budget: r.Budget, Max: r.Max, PublishEvery: r.PublishEvery, Prior: prior, PriorUnknown: priorUnknown}
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 0fd43418b..001b87197 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 8e40ffda985635df7a9fc05bf098fe979b0f701d062e0e47ac1ff47cc1d0b9fb
+plan14-root-reads-member-backups-drill-nodb.tsv d78e183bdba2135abc60c70c220e1009a72c75781962bcbe11b5cb38f6c9dcbf
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 6cd51b0e2..a97f25153 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 7563fb19b087f4171b5704e5f15e66e68df8c6f4e0459761cd2ba2ec4ce5c0ca 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 b413ed7f541a1c39401d4479deb999e35ce1977051eaa06be6660d99adb7a688
+@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 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 b413ed7f541a1c39401d4479deb999e35ce1977051eaa06be6660d99adb7a688
+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/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 3e8cd3b2f4f713c2a4ae8ceba534e05df92bfd5ebcb9f1c6db27ebd085ebb80e
+@coverage internal/ops 5fb9c1e091bfafdc4a096f33d5dba9d35780f96639bb61a0ef7397cd87a7ac4b