From 432326264f6c34ceec1fb67f5ca9d450b4caaa1d Mon Sep 17 00:00:00 2001 From: jochen Date: Sun, 1 Nov 2026 03:20:00 +0100 Subject: [PATCH] artifact-store-tools: date the sweep test's builder log on the real clock The test copies aMesh's log, dated from 2026-10-01 for a fixed clock, but runs the holder on time.Now; since 2026-10-31 every entry fell outside the log's 30 days, so the sweep rightly kept every copy as unrecorded and the mirror act was missing. The sweep is right; the fixture is shifted to now (issue 1955, L7a). Claude-Session: https://claude.ai/code/session_01NcbgfJ9Gum47zkFKWRaovL --- .../cmd/artifact-store-tools/holder_integration_test.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/artifact-store-tools/cmd/artifact-store-tools/holder_integration_test.go b/modules/artifact-store-tools/cmd/artifact-store-tools/holder_integration_test.go index f1264823..5cac1aff 100644 --- a/modules/artifact-store-tools/cmd/artifact-store-tools/holder_integration_test.go +++ b/modules/artifact-store-tools/cmd/artifact-store-tools/holder_integration_test.go @@ -138,7 +138,13 @@ func TestTheSeatSweepsAtABuildsEndOnARealBusOnceTheLeaseIsAway(t *testing.T) { // The mesh as aMesh lays it, copied onto the real buckets: letta's seven builds, a want, the store's listing. mem, memb, door, _ := aMesh(t, &buscompose.LeaseHolder{Instance: "c1", Host: "novox", Epoch: 3}) - bus.log = memb.log + // The builder's log as written today: aMesh dates it from 2026-10-01 for its fixed clock, and this holder runs on the + // real clock, so read as dated the entries fall out of the log's 30 days and every copy is kept as unrecorded. + shift := time.Since(memb.log[len(memb.log)-1].At) + for _, e := range memb.log { + e.At = e.At.Add(shift) + bus.log = append(bus.log, e) + } for _, s := range []string{BuildsRead, WantsRead, LeaseRead, ManifestsRead} { keys, _ := memb.Keys(s) for _, k := range keys[:min(len(keys), 6)] { // the seventh build ends later, on the bus