drill: bracket the record's version, not just its content (#898 R1c)
Astra's review of R1b: a legacy move (MovesEnabled false) completes through MoveComplete, which clears Move and flips Region without writing LastMove. A round trip there and back inside one host's test, with the promotion done and staging dropped before the close, left the record's bytes, ETag and LastMove unchanged and both staging checks empty: passed on the old copy, or failed on a mixed read. The bracket now captures the record object's stamp (ETag, version id, last-modified, from the record GET it already makes) at the open and compares it at the close. Same identity and any write in between: moving if the record is mid-move or its LastMove changed, else record_changed. The LastMove stamp stays. Tests drive the real legacy transitions (SetRecordMove with MoveRequest, MovePromoteReady, MoveMarkCutting, MoveComplete) uk->us->uk with distinct old and new replicas, a real exact-mirror promotion and staging dropped before the close; the promotion-race test now also covers a completed promotion. The drill fixture's deployment store is versioned, as the bucket is.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4 files changed,
+360
−24
internal/ops/drillidentity.go+27 −14internal/ops/hibernate_verify_staging_test.go+43 −9internal/ops/hibernate_verify_stamp_test.go+289 −0internal/ops/hibernate_verify_test.go+1 −1
diff --git a/internal/ops/drillidentity.go b/internal/ops/drillidentity.go| index e80ea90cd..81e60206f 100644 |
| --- a/internal/ops/drillidentity.go |
| +++ b/internal/ops/drillidentity.go |
| @@ -40,17 +40,25 @@ type drillRecord struct { |
| created time.Time |
| moving bool |
| lastMove string // moveStamp of the record's LastMove |
| + // stamp is the record object's stamp from the same read (ETag, and |
| + // on the versioned deployment bucket its version id and time). |
| + stamp release.ObjectStamp |
| } |
| // drillIdentity is what the bracket captures at its open and confirms at |
| -// its close: the instance's identity, which the verdict publishes, and a |
| -// stamp of the record's latest closed move, which only the bracket sees. |
| -// Move is set only from a move's prepare to its close, so a whole move |
| -// that began and closed between the two reads (R1b) is seen only because |
| -// its close left a new outcome in LastMove. |
| +// its close: the instance's identity, which the verdict publishes, and two |
| +// things only the bracket sees. lastMove stamps the record's latest |
| +// closed move: Move is set only from a move's prepare to its close, so a |
| +// whole move that began and closed between the two reads (R1b) shows as a |
| +// new outcome in LastMove. record is the record object's stamp, which |
| +// changes on every write of it: a legacy move (MovesEnabled false) closes |
| +// through MoveComplete and writes no LastMove, and a round trip there and |
| +// back leaves the record's bytes, and so its ETag, as they were, but not |
| +// its version (Astra's review of R1b). |
| type drillIdentity struct { |
| dbreads.Identity |
| lastMove string |
| + record release.ObjectStamp |
| } |
| // moveStamp is the record's latest closed move, every field of it ("" when |
| @@ -88,7 +96,7 @@ func captureDrillIdentity(ctx context.Context, s release.Store, region string, r |
| return drillIdentity{}, "", "", fmt.Errorf("the record's identity: %w", err) |
| } |
| id = drillIdentity{Identity: dbreads.Identity{Account: rec.account, App: rec.app, Host: rec.host, Region: region, Incarnation: inc}, |
| - lastMove: rec.lastMove} |
| + lastMove: rec.lastMove, record: rec.stamp} |
| if rec.moving { |
| return id, dbreads.CodeMoving, "", nil |
| } |
| @@ -99,8 +107,11 @@ func captureDrillIdentity(ctx context.Context, s release.Store, region string, r |
| // want's host, and dbreads.CodeRecordChanged unless it finds want's |
| // identity. A record that has gone (or left this region) since the |
| // bracket opened is CodeRecordChanged, never codeNoRecord, and a change |
| -// outranks a move. The same identity with another latest closed move is |
| -// dbreads.CodeMoving: a whole move ran inside the test (R1b). |
| +// outranks a move. The same identity mid-move, or with another latest |
| +// closed move, is dbreads.CodeMoving: a move ran inside the test (R1b). |
| +// Otherwise any write of the record object between the two reads is |
| +// CodeRecordChanged, whatever it left in the bytes: the record a verdict |
| +// is bound to must be the one the test began on. |
| func confirmDrillIdentity(ctx context.Context, s release.Store, rt HibernatingRoute, want drillIdentity) (code string, err error) { |
| got, code, _, err := captureDrillIdentity(ctx, s, want.Region, rt) |
| switch { |
| @@ -108,17 +119,19 @@ func confirmDrillIdentity(ctx context.Context, s release.Store, rt HibernatingRo |
| return "", err |
| case code == codeNoRecord, got.Identity != want.Identity: |
| return dbreads.CodeRecordChanged, nil |
| - case code == "" && got.lastMove != want.lastMove: |
| + case code == dbreads.CodeMoving, got.lastMove != want.lastMove: |
| return dbreads.CodeMoving, nil |
| + case !got.record.Same(want.record): |
| + return dbreads.CodeRecordChanged, nil |
| } |
| - return code, nil |
| + return "", nil |
| } |
| // readDrillRecord reads rt's record from its family. A host with none, or |
| // whose record names another host, is a detail saying so and no error. |
| func readDrillRecord(ctx context.Context, s release.Store, rt HibernatingRoute) (drillRecord, string, error) { |
| if !rt.Sidecar { |
| - rec, err := provision.GetRecord(ctx, s, rt.Account, rt.App, rt.Host) |
| + rec, st, err := provision.GetRecordStamped(ctx, s, rt.Account, rt.App, rt.Host) |
| if errors.Is(err, os.ErrNotExist) { |
| return drillRecord{}, "this box has the host, but there is no instance record for it", nil |
| } |
| @@ -126,13 +139,13 @@ func readDrillRecord(ctx context.Context, s release.Store, rt HibernatingRoute) |
| return drillRecord{}, "", err |
| } |
| return drillRecord{account: rec.Account, app: rec.App, host: rec.Host, region: rec.Region, |
| - created: rec.CreatedAt, moving: rec.Move != nil, lastMove: moveStamp(rec.LastMove)}, "", nil |
| + created: rec.CreatedAt, moving: rec.Move != nil, lastMove: moveStamp(rec.LastMove), stamp: st}, "", nil |
| } |
| name, ok := sidecarName(rt.Host) |
| if !ok { |
| return drillRecord{}, "this box has a sidecar route whose host names no sidecar", nil |
| } |
| - rec, err := provision.GetSidecarRecord(ctx, s, rt.Account, rt.App, name) |
| + rec, st, err := provision.GetSidecarRecordStamped(ctx, s, rt.Account, rt.App, name) |
| if errors.Is(err, os.ErrNotExist) { |
| return drillRecord{}, "this box has the sidecar, but there is no sidecar record for it", nil |
| } |
| @@ -142,7 +155,7 @@ func readDrillRecord(ctx context.Context, s release.Store, rt HibernatingRoute) |
| if rec.Host != rt.Host { |
| return drillRecord{}, fmt.Sprintf("the sidecar record %q names host %q, not this one", name, rec.Host), nil |
| } |
| - return drillRecord{account: rec.Account, app: rec.App, host: rec.Host, region: rec.Region, created: rec.CreatedAt}, "", nil |
| + return drillRecord{account: rec.Account, app: rec.App, host: rec.Host, region: rec.Region, created: rec.CreatedAt, stamp: st}, "", nil |
| } |
| // sidecarName is the sidecar name a sidecar host carries, its first label |
diff --git a/internal/ops/hibernate_verify_staging_test.go b/internal/ops/hibernate_verify_staging_test.go| index 7a0864a3a..c6eaff6bf 100644 |
| --- a/internal/ops/hibernate_verify_staging_test.go |
| +++ b/internal/ops/hibernate_verify_staging_test.go |
| @@ -12,6 +12,7 @@ import ( |
| "github.com/carlosframework/platform/internal/activator" |
| "github.com/carlosframework/platform/internal/dbdoor" |
| + "github.com/carlosframework/platform/internal/dbdoor/dbdoortest" |
| "github.com/carlosframework/platform/internal/dbverify" |
| "github.com/carlosframework/platform/internal/lease" |
| "github.com/carlosframework/platform/internal/provision" |
| @@ -138,38 +139,71 @@ func TestDrillLandedCopyAwaitingPromotionIsMoving(t *testing.T) { |
| // A move's staged copy that arrives while the host is under test (its |
| // promotion racing the restore): whatever the restore found, damaged or |
| // clean, the verdict is unverified, moving. Never failed, never passed. |
| +// Either the staging is still there at the close, or the promotion |
| +// completed (a distinct new replica mirrored over the one under test, its |
| +// staging dropped before the close) and the move's close is in the |
| +// record's LastMove; the legacy move, which writes no LastMove, is |
| +// TestDrillLegacyRoundTripInsideTheTestIsNeverAResult's. |
| func TestDrillStagedCopyArrivingDuringTheTestIsMoving(t *testing.T) { |
| const host = "a.example.com" |
| mixed := fmt.Errorf("%w: integrity_check: page 4 corrupt", lease.ErrCheckFailed) |
| + newReplica := t.TempDir() |
| + dbdoortest.Replicate(t, newReplica, 5) |
| for name, c := range map[string]struct { |
| duringPlan bool // the copy lands while the plan lists, not while the restore reads |
| - restoreErr error // what the restore reports |
| + promoted bool // the promotion completes and drops the staging before the close |
| + restoreErr error // what the restore reports, over its own result |
| }{ |
| "mixed lineage reads as damage": {restoreErr: mixed}, |
| "old lineage restores clean": {}, |
| "lands while planning": {duringPlan: true}, |
| "lands while planning, damage": {duringPlan: true, restoreErr: mixed}, |
| + "promoted, old copy restored": {promoted: true}, |
| + "promoted, mixed read": {promoted: true, restoreErr: mixed}, |
| } { |
| t.Run(name, func(t *testing.T) { |
| fx := newDrillFx(t, host) |
| + hostDir := filepath.Join(t.TempDir(), "replica") |
| + copyTree(t, fx.replica, hostDir) |
| + fx.replicaFor[fx.prefix(host)] = hostDir |
| + land := func() { |
| + if !c.promoted { |
| + fx.stage(host) |
| + return |
| + } |
| + fx.stageFrom(host, newReplica) |
| + copyTree(t, newReplica, hostDir) // the first wake's promotion: an exact mirror |
| + fx.dropStaging(host) |
| + fx.putRecord(fxAccount, host, fxCreated, func(r *provision.Record) { |
| + r.LastMove = &provision.MoveOutcome{ID: "mv_in", Outcome: "done", At: time.Date(2026, 11, 12, 3, 0, 30, 0, time.UTC)} |
| + }) |
| + } |
| if c.duringPlan { |
| - fx.onList[fx.prefix(host)] = func() { fx.stage(host) } |
| + fx.onList[fx.prefix(host)] = land |
| } |
| - fx.stubVerify(func(context.Context, string, string, uint64) (uint32, error) { |
| + swap(t, &verifyAt, func(ctx context.Context, rd lease.ReplicaReader, prefix, dir string, txid uint64) (uint32, error) { |
| + counter, err := lease.VerifyReaderAt(ctx, rd, prefix, dir, txid) // the real restore of what was planned |
| if !c.duringPlan { |
| - fx.stage(host) |
| + land() |
| + } |
| + if c.restoreErr != nil { |
| + return 0, c.restoreErr |
| } |
| - return 1, c.restoreErr |
| + return counter, err |
| }) |
| v := fx.run(context.Background(), fx.drill(), fx.routes(host), nil)[host] |
| if v.Result != dbverify.ResultUnverified || v.Reason != ReasonMoving { |
| t.Fatalf("verdict %+v, want unverified/moving", v) |
| } |
| - if len(fx.verifies) != 1 { |
| - t.Fatalf("restored %d times, want once (the copy arrived after the bracket opened)", len(fx.verifies)) |
| + // With staging left, the close's record check passes and its |
| + // staging check decides; with the promotion done, the record |
| + // check decides first. |
| + want := 2 |
| + if c.promoted { |
| + want = 1 |
| } |
| - if n := fx.listedStaging(host); n != 2 { |
| - t.Fatalf("staging listed %d times, want twice (open and close)", n) |
| + if n := fx.listedStaging(host); n != want { |
| + t.Fatalf("staging listed %d times, want %d", n, want) |
| } |
| fx.scratchEmpty() |
| }) |
diff --git a/internal/ops/hibernate_verify_stamp_test.go b/internal/ops/hibernate_verify_stamp_test.go| new file mode 100644 |
| index 000000000..6c1aaffba |
| --- /dev/null |
| +++ b/internal/ops/hibernate_verify_stamp_test.go |
| @@ -0,0 +1,289 @@ |
| +package ops |
| + |
| +import ( |
| + "context" |
| + "fmt" |
| + "io/fs" |
| + "os" |
| + "path/filepath" |
| + "strconv" |
| + "sync" |
| + "testing" |
| + |
| + "github.com/carlosframework/platform/internal/activator" |
| + "github.com/carlosframework/platform/internal/dbdoor" |
| + "github.com/carlosframework/platform/internal/dbdoor/dbdoortest" |
| + "github.com/carlosframework/platform/internal/dbverify" |
| + "github.com/carlosframework/platform/internal/lease" |
| + "github.com/carlosframework/platform/internal/provision" |
| + "github.com/carlosframework/platform/internal/release" |
| +) |
| + |
| +// Astra's review of R1b: a legacy move (MovesEnabled false) completes |
| +// through MoveComplete, which clears Move and flips Region without writing |
| +// LastMove. A round trip there and back inside one host's test, with the |
| +// first wake's promotion done and its staging dropped before the close, |
| +// leaves the record's bytes as they were, so its identity, its LastMove, |
| +// its ETag (a content hash) and both staging checks all match. The bracket |
| +// therefore also compares the record's stamp: on the versioned deployment |
| +// bucket every write has a new version id, whatever its bytes. |
| + |
| +// versionedStore is a DirStore with S3's versioning: every Put and Delete |
| +// of a key is a new version, and GetStamped reports the current one with |
| +// the ETag (DirStore's, a content hash like SSE-S3's MD5). |
| +type versionedStore struct { |
| + *release.DirStore |
| + mu sync.Mutex |
| + versions map[string]int |
| +} |
| + |
| +func newVersionedStore(dir string) *versionedStore { |
| + return &versionedStore{DirStore: release.NewDirStore(dir), versions: map[string]int{}} |
| +} |
| + |
| +func (v *versionedStore) bump(key string) { |
| + v.mu.Lock() |
| + v.versions[key]++ |
| + v.mu.Unlock() |
| +} |
| + |
| +func (v *versionedStore) Put(ctx context.Context, key string, body []byte, ifMatch string) (string, error) { |
| + etag, err := v.DirStore.Put(ctx, key, body, ifMatch) |
| + if err == nil { |
| + v.bump(key) |
| + } |
| + return etag, err |
| +} |
| + |
| +func (v *versionedStore) Delete(ctx context.Context, key string) error { |
| + err := v.DirStore.Delete(ctx, key) |
| + if err == nil { |
| + v.bump(key) |
| + } |
| + return err |
| +} |
| + |
| +func (v *versionedStore) GetStamped(ctx context.Context, key string) ([]byte, release.ObjectStamp, error) { |
| + body, etag, err := v.DirStore.Get(ctx, key) |
| + if err != nil { |
| + return nil, release.ObjectStamp{}, err |
| + } |
| + v.mu.Lock() |
| + n := v.versions[key] |
| + v.mu.Unlock() |
| + return body, release.ObjectStamp{ETag: etag, VersionID: "v" + strconv.Itoa(n)}, nil |
| +} |
| + |
| +var _ release.StampedGetter = (*versionedStore)(nil) |
| + |
| +// legacyMove drives host's record to region `to` through the transitions a |
| +// legacy move makes, as the box's move pass applies them (SetRecordMove): |
| +// request, ready, cutting, and MoveComplete, which flips Region and clears |
| +// Move and writes no LastMove. |
| +func (fx *drillFx) legacyMove(host, to string) { |
| + fx.t.Helper() |
| + ctx := context.Background() |
| + for _, mut := range []func(*provision.Record) error{ |
| + provision.MoveRequest(to, fx.clock.Now()), |
| + provision.MovePromoteReady(fx.clock.Now()), |
| + provision.MoveMarkCutting(), |
| + provision.MoveComplete(), |
| + } { |
| + if _, err := provision.SetRecordMove(ctx, fx.store, fxAccount, fxApp, host, mut); err != nil { |
| + fx.t.Fatalf("legacy move of %s to %s: %v", host, to, err) |
| + } |
| + } |
| + if rec := fx.record(host); rec.Region != to || rec.Move != nil || rec.LastMove != nil { |
| + fx.t.Fatalf("fixture: after the legacy move the record is in %q, move %+v, last move %+v", rec.Region, rec.Move, rec.LastMove) |
| + } |
| +} |
| + |
| +// copyTree replaces dst's contents with src's: a file replica mirrored |
| +// exactly, as the promotion's MirrorPrefix does (own keys the source lacks |
| +// are deleted). |
| +func copyTree(t *testing.T, src, dst string) { |
| + t.Helper() |
| + if err := os.RemoveAll(dst); err != nil { |
| + t.Fatal(err) |
| + } |
| + err := filepath.WalkDir(src, func(p string, de fs.DirEntry, err error) error { |
| + if err != nil { |
| + return err |
| + } |
| + rel, err := filepath.Rel(src, p) |
| + if err != nil { |
| + return err |
| + } |
| + out := filepath.Join(dst, rel) |
| + if de.IsDir() { |
| + return os.MkdirAll(out, 0o755) |
| + } |
| + b, err := os.ReadFile(p) |
| + if err != nil { |
| + return err |
| + } |
| + return os.WriteFile(out, b, 0o644) |
| + }) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| +} |
| + |
| +// stageFrom puts a move's staged copy of host under moves/<host>/: every |
| +// object of the replica in dir, at its relative key. |
| +func (fx *drillFx) stageFrom(host, dir string) { |
| + fx.t.Helper() |
| + err := filepath.WalkDir(dir, func(p string, de fs.DirEntry, err error) error { |
| + if err != nil || de.IsDir() { |
| + return err |
| + } |
| + rel, err := filepath.Rel(dir, p) |
| + if err != nil { |
| + return err |
| + } |
| + b, err := os.ReadFile(p) |
| + if err != nil { |
| + return err |
| + } |
| + _, err = fx.staging.Put(context.Background(), activator.MovesPrefix(host)+filepath.ToSlash(rel), b, "") |
| + return err |
| + }) |
| + if err != nil { |
| + fx.t.Fatal(err) |
| + } |
| +} |
| + |
| +// dropStaging deletes every staged key of host, as the first wake's |
| +// dropStagedReplica does once its restore succeeds. |
| +func (fx *drillFx) dropStaging(host string) { |
| + fx.t.Helper() |
| + keys, err := fx.staging.List(context.Background(), activator.MovesPrefix(host)) |
| + if err != nil || len(keys) == 0 { |
| + fx.t.Fatalf("fixture: nothing staged to drop (%v)", err) |
| + } |
| + for _, k := range keys { |
| + if err := fx.staging.Delete(context.Background(), k); err != nil { |
| + fx.t.Fatal(err) |
| + } |
| + } |
| +} |
| + |
| +// A legacy round trip (uk -> us -> uk) with the returning move's staged |
| +// copy promoted over the replica under test and its staging dropped, all |
| +// inside the host's test. The old and new replicas are distinct lineages. |
| +// Whether the restore read the old copy before the round trip (a stale |
| +// pass), the promoted new copy after it, or reported damage from a mixed |
| +// read, the verdict is unverified, record_changed: never passed, never |
| +// failed. The fixture proves the record's bytes, ETag and LastMove come |
| +// back unchanged and staging is gone at the close, so only the stamp can |
| +// see it. |
| +func TestDrillLegacyRoundTripInsideTheTestIsNeverAResult(t *testing.T) { |
| + const host = "a.example.com" |
| + newReplica := t.TempDir() |
| + dbdoortest.Replicate(t, newReplica, 5) |
| + for name, c := range map[string]struct { |
| + restoreFirst bool // the restore reads before the round trip, else after the promotion |
| + damage error // what the restore reports instead of its own result, when set |
| + }{ |
| + "old copy restored, then the round trip": {restoreFirst: true}, |
| + "round trip, then the promoted copy": {}, |
| + "round trip, then a mixed read": {damage: fmt.Errorf("%w: integrity_check: page 4 corrupt", lease.ErrCheckFailed)}, |
| + } { |
| + t.Run(name, func(t *testing.T) { |
| + fx := newDrillFx(t, host) |
| + hostDir := filepath.Join(t.TempDir(), "replica") |
| + copyTree(t, fx.replica, hostDir) |
| + fx.replicaFor[fx.prefix(host)] = hostDir |
| + _, etagBefore, err := fx.store.Get(context.Background(), provision.RecordKey(fxAccount, fxApp, host)) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + |
| + roundTrip := func() { |
| + fx.legacyMove(host, "us") |
| + fx.legacyMove(host, fxRegion) |
| + fx.stageFrom(host, newReplica) |
| + copyTree(t, newReplica, hostDir) // the first wake's promotion: an exact mirror |
| + fx.dropStaging(host) |
| + _, etagAfter, err := fx.store.Get(context.Background(), provision.RecordKey(fxAccount, fxApp, host)) |
| + if err != nil || etagAfter != etagBefore { |
| + t.Fatalf("fixture: the round trip changed the record's bytes (etag %q -> %q, %v); it must not, to be the case under test", etagBefore, etagAfter, err) |
| + } |
| + } |
| + swap(t, &verifyAt, func(ctx context.Context, rd lease.ReplicaReader, prefix, dir string, txid uint64) (uint32, error) { |
| + var counter uint32 |
| + var err error |
| + if c.restoreFirst { |
| + counter, err = lease.VerifyReaderAt(ctx, rd, prefix, dir, txid) |
| + roundTrip() |
| + } else { |
| + roundTrip() |
| + counter, err = lease.VerifyReaderAt(ctx, rd, prefix, dir, txid) |
| + } |
| + if c.damage != nil { |
| + return 0, c.damage |
| + } |
| + return counter, err |
| + }) |
| + plans := 0 |
| + real := openReplica |
| + swap(t, &openReplica, func(ctx context.Context, bucket, prefix, region string) (dbdoor.ReplicaReader, error) { |
| + plans++ |
| + return real(ctx, bucket, prefix, region) |
| + }) |
| + |
| + v := fx.run(context.Background(), fx.drill(), fx.routes(host), nil)[host] |
| + if v.Result != dbverify.ResultUnverified || v.Reason != ReasonRecordChanged { |
| + t.Fatalf("verdict %s/%s, want unverified/record_changed (%+v)", v.Result, v.Reason, v) |
| + } |
| + if v.TXID != 0 || v.RestoredBytes != 0 { |
| + t.Fatalf("a discarded restore left its findings in the verdict: %+v", v) |
| + } |
| + // Staging was empty at the open (listed once) and dropped before |
| + // the close, whose record check decided first: no staging check |
| + // could have seen this. |
| + if n := fx.listedStaging(host); n != 1 { |
| + t.Fatalf("staging listed %d times, want once, at the open", n) |
| + } |
| + if keys, err := fx.staging.List(context.Background(), activator.MovesPrefix(host)); err != nil || len(keys) != 0 { |
| + t.Fatalf("staging at the close: %v, %v; want none", keys, err) |
| + } |
| + fx.scratchEmpty() |
| + }) |
| + } |
| +} |
| + |
| +// Any write of the record during the test is a change, even one that |
| +// leaves its bytes as they were: unverified, record_changed. A record |
| +// nobody wrote passes, as before. |
| +func TestDrillAnyRecordWriteDuringTheTestIsAChange(t *testing.T) { |
| + const host = "a.example.com" |
| + for name, c := range map[string]struct { |
| + write bool |
| + result string |
| + reason string |
| + }{ |
| + "untouched": {false, dbverify.ResultPassed, ""}, |
| + "rewritten, same bytes": {true, dbverify.ResultUnverified, ReasonRecordChanged}, |
| + } { |
| + t.Run(name, func(t *testing.T) { |
| + fx := newDrillFx(t, host) |
| + fx.stubVerify(func(context.Context, string, string, uint64) (uint32, error) { |
| + if c.write { |
| + raw, etag, err := fx.store.Get(context.Background(), provision.RecordKey(fxAccount, fxApp, host)) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + if _, err := fx.store.Put(context.Background(), provision.RecordKey(fxAccount, fxApp, host), raw, etag); err != nil { |
| + t.Fatal(err) |
| + } |
| + } |
| + return 1, nil |
| + }) |
| + v := fx.run(context.Background(), fx.drill(), fx.routes(host), nil)[host] |
| + if v.Result != c.result || v.Reason != c.reason { |
| + t.Fatalf("verdict %s/%s, want %s/%s (%+v)", v.Result, v.Reason, c.result, c.reason, v) |
| + } |
| + }) |
| + } |
| +} |
diff --git a/internal/ops/hibernate_verify_test.go b/internal/ops/hibernate_verify_test.go| index f15c8074b..2f2f7fa8e 100644 |
| --- a/internal/ops/hibernate_verify_test.go |
| +++ b/internal/ops/hibernate_verify_test.go |
| @@ -235,7 +235,7 @@ func newDrillFx(t *testing.T, hosts ...string) *drillFx { |
| t.Helper() |
| fx := &drillFx{ |
| t: t, |
| - store: release.NewDirStore(t.TempDir()), |
| + store: newVersionedStore(t.TempDir()), // versioned, as the deployment bucket is |
| replica: sharedReplica(t), |
| empty: t.TempDir(), |
| clock: &fakeClock{t: at("2026-11-12T03:00:00Z")}, |