Files
worldmonitor/api
Elie Habib 84eec7f09f fix(health): align breadthHistory maxStaleMin with actual Tue-Sat cron schedule (#3219)
Production alarm: `breadthHistory` went STALE_SEED every Monday morning
despite the seeder running correctly. Root cause was a threshold /
schedule mismatch:

- Schedule (Railway): 02:00 UTC, Tuesday through Saturday. Five ticks
  per week, capturing Mon-Fri market close → following-day 02:00 UTC.
- Threshold: maxStaleMin=2880 (48h), assuming daily cadence.
- Max real gap: Sat 02:00 UTC → Tue 02:00 UTC = 72h. The existing 48h
  alarm fired every Monday at ~02:00 UTC when the Sun/Mon cron ticks
  are intentionally absent, until the Tue 02:00 UTC run restored
  fetchedAt.

Fix: bump maxStaleMin to 5760 (96h). 72h covers the weekend gap;
extra 24h tolerates one missed Tue run without alarming. Comment now
records the actual schedule + reasoning.

No seeder change needed — logs confirm the service fires and completes
correctly on its schedule (Apr 16/17/18 02:00 UTC runs all "Done" with
3/3 readings, `Stopping Container` is normal Railway cron teardown).

Diagnostic memo: this is the class of bug where the schedule comment
lies. Original comment said "daily cron at 21:00 ET". True start time
is 22:00 EDT / 21:00 EST Mon-Fri (02:00 UTC next day) AND only Mon-Fri,
so "daily" is wrong by two days every week.
2026-04-20 07:56:54 +04:00
..
2026-03-20 12:37:24 +04:00