Files
worldmonitor/api
Elie Habib c37bba279e fix(health): calendar keys are OK when empty (between seasons) (#2266)
* fix(health): add earningsCalendar, econCalendar, cotPositioning to EMPTY_DATA_OK_KEYS

Calendar data is legitimately empty between seasons (no earnings scheduled,
no econ events, COT release pending). Treating 0-record state as CRIT causes
503s when seeds run but publish nothing due to non-empty validateFn.

With EMPTY_DATA_OK_KEYS: empty key → OK (seed fresh) or STALE_SEED (warn).
Stops the 3-CRIT → DEGRADED → 503 flap when calendars have no upcoming events.

* fix(health): extend EMPTY_DATA_OK_KEYS check to bootstrap loop

Greptile correctly identified the fix was a no-op: EMPTY_DATA_OK_KEYS was
only consulted in the STANDALONE_KEYS loop, not BOOTSTRAP_KEYS. All three
calendar keys are bootstrap keys, so critCount was still incremented.

Mirror the same seedStale branching already present in the standalone loop
into the bootstrap loop so EMPTY_DATA_OK members get OK/STALE_SEED instead
of EMPTY/EMPTY_DATA/critCount++.
2026-03-26 08:41:55 +04:00
..
2026-03-20 12:37:24 +04:00