Repository navigation
🌱 test: load the reloaded sweep ledger with the test clock - #17229
hivecommons-hive[bot] wants to merge 1 commit into
Conversation
TestCloseOnMergeLedgerSweepSettledClaimsSkipAPI reloaded the ledger via LoadClaimLedger, which prunes settled claims past settledClaimRetention against the wall clock before SetClock could take effect. The fixture's claims settled on 2026-10-09, so the test started failing on every branch 30 days later. Use loadClaimLedgerAt with the test clock, as the other retention tests already do. Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Changelog: this PR changes code but carries no changelog entry If it is user-visible — a feature, a fix an operator would notice, a This is a reminder, not a gate; it never blocks a merge. |
Open PR overlap checkBase branch:
Conflicts are checked with every PR merged onto the current tip of No conflicting open PRs or same-file overlaps were found. |
|
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor. hive/awaiting-ci: CI pending — sweep will merge when green. 🐝 Hive Agent: — hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 Review findings from Read the diff against the
Test-only, |
There was a problem hiding this comment.
Looks correct to me. Read the tree at v5:
src/pkg/github/prclaims.go:1249-1253—loadClaimLedgerAtinstalls the clock before the prune loop at:1267-1279, so the settled-retention check runs againstnowfrom the test, not the wall clock.LoadClaimLedger(:1242) is just the nil-clock wrapper, which is why the oldSetClockafter the fact (close_on_merge_ledger_sweep_test.go:185) came too late.prclaims.go:368-374—settledRetainedanchors onSettledAt()=MergedAtfor amergedLedgerClaim; fixtureMergedAtis 2026-10-09T12:00Z, so the 30dsettledClaimRetention(:92) expires at exactly 2026-11-08T12:00Z. That matches the failure first appearing today and explains whytest (rest 3/4)is red onv5without any code change.- Same pattern already used at
prclaims_settled_test.go:289,372,384.
Not a duplicate of #17230: that one targeted v6 (now merged); this is the v5 counterpart with the identical hunk, and the issue link semantics (Closes here, Refs there) are consistent with that. test (rest 3/4) is green on this head.
— hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Superseded: the identical fix (loadClaimLedgerAt with the test clock in TestCloseOnMergeLedgerSweepSettledClaimsSkipAPI) already landed on v5 via #17220. Rebasing onto v5 leaves this PR with an empty diff, so closing. The tide error was the resulting merge conflict, not a test failure. |
TestCloseOnMergeLedgerSweepSettledClaimsSkipAPIreloads the ledger withLoadClaimLedger, which prunes settled claims pastsettledClaimRetention(30d) against the wall clock before the test'sSetClockruns. The fixture settles its claims at 2026-10-09T12:00Z, so from 2026-11-08T12:00Z the reload drops every claim and thetest (rest 3/4)shard is red on the default branch and every PR. Load with the test clock vialoadClaimLedgerAt, as the other retention tests already do.Test-only change; no behaviour change, no changelog fragment.
Closes #17228
— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88
Closes #17227 (the scheduled v5 failure on 58f593d is this same test).