diff --git a/src/cerbero_bite/core/entry_validator.py b/src/cerbero_bite/core/entry_validator.py index f2d5e6f..4ab5e5c 100644 --- a/src/cerbero_bite/core/entry_validator.py +++ b/src/cerbero_bite/core/entry_validator.py @@ -50,6 +50,19 @@ class EntryContext(BaseModel): # invalida l'entry). iv_minus_rv: Decimal | None = None + # Storia recente di IV-RV (un valore per ogni tick di + # market_snapshots, ASC, NULL e fetch_ok=0 esclusi). Caricata dal + # repository in `entry_cycle` quando `iv_minus_rv_adaptive_enabled` + # è True. Tuple per coerenza con frozen=True. Vuoto = warmup hard + # (gate disabilitato). + iv_rv_history: tuple[Decimal, ...] = () + + # DVOL al tick più vicino a now - vol_of_vol_lookback_hours. + # ``None`` = gap nel dato (es. cron mancante 24h fa) → VoV guard + # skip. Caricato dal repository in `entry_cycle` quando + # `vol_of_vol_guard_enabled` è True. + dvol_24h_ago: Decimal | None = None + class EntryDecision(BaseModel): """Result of :func:`validate_entry`. ``reasons`` holds *all* blocking reasons."""