Relationships
#4666 Schedule catch-up counts slots before the watermark across a DST fall-back in the host timezone
Opened by zack · 11/11/2026
Summary
evaluateMissedFires in src/domain/workflows/schedule_catch_up.ts reports missed slots that are older than the watermark when the window spans the end of daylight saving time in the host's local timezone. Under UTC the same call is correct, so the result depends on the machine's TZ.
Reproduction
With the host timezone set to America/Chicago, call:
- expression
*/15 * * * * - watermark
2026-11-01T07:00:00.000Z(01:00 CST, just after clocks fall back from 02:00 CDT) - now = watermark + 1 ms
- catchUp
policy: latest,maxDelay: 1m
Actual
missedCount 3, oldestMissed 2026-11-01T06:15:00.000Z, latestMissed 2026-11-01T06:45:00.000Z: all three are before the watermark.
Expected
missedCount 0, as returned under TZ=UTC and TZ=America/Los_Angeles. No slot at or before the watermark is ever missed.
How it was found
src/domain/workflows/schedule_catch_up_property_test.ts (the latest-missed-slot property, the oldestMissed after watermark assertion) failed in verify-build on a US Central host with fast-check seed 891476150, counterexample ["*/15 * * * *",{"watermarkMs":1793516400000,"gapMs":1},{"policy":"latest","maxDelay":"1m"}]. The property test draws dates across 2026, so it fails intermittently, only on hosts whose timezone has DST, and only when a draw lands near the fall-back hour. CI on UTC never sees it.
Impact
serve's catch-up pass could report or fire a catch-up for a slot that ran before the watermark, once a year, on a host in a DST timezone.
Open
No activity in this phase yet.
Sign in to post a ripple.