git bisect. It does a binary search through the 25 commits for you: about 5 checks instead of 25.
First you need a quick way to check "does it work", e.g. a script that runs the reminder query for tomorrow and prints the count:
git bisect start
git bisect bad # current version: 0 reminders
git bisect good <sha-before-refactor>
# git checks out a commit in the middle. Run your check:
npx tsx scripts/count-reminders.ts
git bisect good # or: git bisect bad
# repeat ~5 times, then git prints "<sha> is the first bad commit"
git bisect resetIf your check exits non-zero on failure, git bisect run npx tsx scripts/count-reminders.ts does all of it automatically.
Then you read ONE commit instead of 25.
>= tomorrow 00:00 to a toISOString() call, which is UTC. We're UTC+2, so the window was off and missed everything before 02:00. Wait, that doesn't explain all of them... dental_dave · edited