Files
fxhnt/tests
jgrusewski ad5b9dcc28 fix(ingest): date-resume all bybit per-symbol ingests so funding/oi/long_ratio/worst_basis advance nightly
The spot fix introduced `last_day_by_symbol` date-resume, but the sibling bybit ingests still used the
OLD symbol-skip resume ("resuming: N already done, M to go"): once a symbol carried ANY row of a feature
it was never fetched again, so the feature froze at the last ingest. funding stuck at 2026-06-23 froze
`xvenue_carry_nav` (it reads bybit_features funding) at 0d; open_interest/long_ratio/worst_basis lagged.

Extract a shared `resume_floor_ms(last_day, symbol, default_start_ms)` primitive (bybit_concurrency) and
apply it to `ingest_bybit_funding`, `ingest_bybit_oi`, `ingest_bybit_long_short`, and
`ingest_bybit_worst_basis`: each symbol now resumes from its last persisted day for ITS feature (the
adapter's backward-pagination floor), so done symbols are re-fetched only from their last day forward
(advancing them; the idempotent upsert overwrites the boundary day in place) and fresh symbols back-fill
from the caller's start_ms. Nothing is symbol-skipped → every feature advances each run. Refactored
`ingest_bybit_spot` onto the same shared primitive. deribit_funding already re-fetches all (no skip) — left
as-is. The perp `close`/`turnover` leg of `ingest_bybit_klines` keeps its symbol-skip resume (out of scope).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 11:29:35 +02:00
..