Skip to content

Run reminder sweep tests on a fixed clock - #1

Merged
ToukirOfficial merged 1 commit into
mainfrom
fix/reminder-test-clock
Nov 10, 2026
Merged

ToukirOfficial merged 1 commit into
mainfrom
fix/reminder-test-clock

Conversation

@ToukirOfficial

Copy link
Copy Markdown
Owner

The overlap test ("sends each due reminder once, even when sweeps overlap") started failing on 9 Nov 2026. The first test plans a follow-up from a fixed date (applied 2 Nov, due 9 Nov 09:00), and once that date passed, the real-clock sweep in the overlap test emailed it as well (2 emails instead of 1). The stale-backlog test had the same problem.

  • Both tests now pass a fixed clock to sweeper.sweep(now), so only the reminder under test is due, whatever today's date is.
  • Assertions are unchanged. I checked that removing the atomic claim (sentAt: null in the claim's where clause) still fails the overlap test with 2 emails.
  • Full suite passes locally: 92/92, three runs in a row.

The overlap and stale-backlog tests swept on the real clock, so the follow-up
planned by an earlier test for 9 Nov 2026 became due and was emailed too.
Pass a fixed clock to sweep() in both tests so only the reminder under test
is due, whatever today's date is. Assertions are unchanged.
@ToukirOfficial
ToukirOfficial merged commit f36cac8 into main Nov 10, 2026
2 checks passed
@ToukirOfficial
ToukirOfficial deleted the fix/reminder-test-clock branch November 10, 2026 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant