Files
fxhnt/tests/unit
jgrusewski 810ebdc105 feat(0b): migrate xsfunding to a Bybit single-sleeve forward track (venue-consistent ref)
Adds a generic build_bybit_sleeve_forward_nav(repo, store, sleeve, ...) builder in
assets.py, refactors build_positioning_forward_nav to delegate to it, and moves
xsfunding_nav off the standalone Binance XsFundingForward(BinanceXsFundingLive())
construction onto its own Bybit single-sleeve forward track (mirrors positioning
exactly). xsfunding still runs unchanged as a sleeve inside the bybit_4edge deploy
book (_DEFAULT_BYBIT_SLEEVES untouched).

- bybit_forward_track.py: bybit_report_sid_kwargs() gains an xsfunding case.
- cli.py: _BYBIT_BOOK_SIDS += "xsfunding" (routing only, series already computed).
- registry.py: xsfunding -> venue bybit-perp, backtest.kind sleeve->report, params
  mirror positioning's shape, record_mode observed->recompute (required for the
  deterministic-engine recompute path; confirmed by the exhaustive observed-mode
  pin in test_forward_definition.py, updated accordingly).
- migration_builders.py: replaced the xsfunding lambda:None stub (valid only under
  the old observed record_mode) with a real single-sleeve Bybit builder, mirroring
  positioning's, to avoid a latent crash if the one-time forward migration is ever
  re-run.

Tests: new tests/unit/test_bybit_sleeve_forward_builder.py (TDD, brief-verbatim);
full tests/unit + tests/integration sweep: 2056 passed, 0 failed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-13 20:25:03 +02:00
..