"""Dagster Definitions for the B0 lifecycle graph — the combined-book assets + a daily schedule that
materializes the track (replaces the fxhnt-forward cron, same 23:30 UTC slot).

(Phase 0b venue consolidation: the legacy-venue crypto_bars/crypto_funding/crypto_spot ingest assets were
retired here — crypto is 100% Bybit now (`bybit_warehouse_refresh` + the Bybit tracks below).
`paper_book_snapshot` — the dead legacy-venue-era combined-crypto `/paper` book (redundant with the
`bybit_4edge` deploy book below) — was RETIRED (Phase 0b Task 7d); sixtyforty_nav/multistrat_nav
are their OWN independent live assets below, unaffected by that retirement.)

(VRP removed entirely 2026-07-20 — see project_fxhnt_diversifier_hunt_2026_07_15 for the
falsification that led to the removal.)

NOTE: no `from __future__ import annotations` — Dagster 1.12 runtime type-hint inspection."""
from dagster import DefaultScheduleStatus, Definitions, ScheduleDefinition, define_asset_job

from fxhnt.adapters.orchestration.assets import (
    bybit_4edge_levered_nav,
    bybit_4edge_nav,
    bybit_book_precompute,
    bybit_paper_book,
    bybit_warehouse_refresh,
    cockpit_forward,
    deribit_funding_bars,
    futures_bars,
    multistrat_levered_nav,
    multistrat_nav,
    positioning_nav,
    sixtyforty_nav,
    unlock_nav,
    xsfunding_nav,
)

combined_book_job = define_asset_job(
    name="combined_book_forward_job",
    selection=[
        futures_bars, sixtyforty_nav,
        xsfunding_nav, unlock_nav, multistrat_nav, multistrat_levered_nav,
        deribit_funding_bars, bybit_warehouse_refresh, bybit_book_precompute,
        bybit_4edge_nav, bybit_4edge_levered_nav,
        positioning_nav, bybit_paper_book, cockpit_forward,
    ],
)

daily_combined_book_schedule = ScheduleDefinition(
    name="combined_book_daily",
    job=combined_book_job,
    cron_schedule="30 23 * * *",
    execution_timezone="UTC",
    # auto-arm on a fresh deploy (else the nightly track silently stalls)
    default_status=DefaultScheduleStatus.RUNNING,
)

defs = Definitions(
    assets=[
        futures_bars, sixtyforty_nav,
        xsfunding_nav, unlock_nav, multistrat_nav, multistrat_levered_nav,
        deribit_funding_bars, bybit_warehouse_refresh, bybit_book_precompute,
        bybit_4edge_nav, bybit_4edge_levered_nav,
        positioning_nav, bybit_paper_book, cockpit_forward,
    ],
    jobs=[combined_book_job],
    schedules=[daily_combined_book_schedule],
)
