Files
fxhnt/tests
jgrusewski 882dd0e7eb feat(bybit): loud close cross-section freshness guard (no more silent freeze)
Add bybit_close_cross_section_staleness() + wire it into
refresh_bybit_warehouse: after the nightly ingests, compute the newest
'close' day whose cross-section covers >= min_fraction of the universe and,
if it lags today by more than max_lag_days (~2), emit a loud context.log.error
(the data-layer analog of the tracker re-inception guard). Does NOT hard-crash
— the run completes and the staleness numbers are returned in the summary for
monitoring. The Dagster bybit_warehouse_refresh asset passes context.log.error.

Requiring a HEALTHY symbol count (not just any row on the newest day) means a
single brand-new symbol landing today cannot mask an otherwise-frozen book —
the exact silent freeze the perp symbol-skip caused (close had 2 symbols on
06-30 vs 296 for spot_close).

Also adds the forward-track perp-leg date-resume advance test (mirrors the
spot-leg test) and the two freshness-guard tests.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 11:06:43 +02:00
..