From 94b5b552e59e5ef3fb3f22921c029db50a76a809 Mon Sep 17 00:00:00 2001 From: Codex Date: Fri, 12 Jun 2026 20:28:18 +0200 Subject: [PATCH] VIOLET fix: connect the divergence driver's data feed (dark + observe paths) The driver owned a freshly built HazelcastDataFeed that nothing ever connected; every 1s poll hit features_map=None ('NoneType' .get) at ERROR level and no scans reached the divergence monitor. Connect with retry before sampling. Verified live: WS bookTicker up for 50 symbols, divergence rows landing in real time. Co-Authored-By: Claude Fable 5 --- prod/launch_dolphin_violet.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/prod/launch_dolphin_violet.py b/prod/launch_dolphin_violet.py index 753cc64..467ed8c 100644 --- a/prod/launch_dolphin_violet.py +++ b/prod/launch_dolphin_violet.py @@ -223,6 +223,19 @@ def _build_divergence(sink=None): async def _divergence_driver(divergence, data_feed, poll_s: float) -> None: """Shared scan-sampling loop for both DARK and observe modes.""" + # The driver owns this feed instance and is its only connector; an + # unconnected HazelcastDataFeed has features_map=None and every poll + # raises 'NoneType' has no attribute 'get' at ERROR level (1 Hz). + while True: + ok = False + try: + ok = await data_feed.connect() + except Exception as exc: # noqa: BLE001 — sampling must never die + LOGGER.warning("divergence data feed connect error: %s", exc) + if ok: + break + LOGGER.warning("divergence data feed not connected; retrying in 5s") + await asyncio.sleep(5.0) started = False symbol = os.environ.get("DOLPHIN_VIOLET_SNAPSHOT_SYMBOL", "BTCUSDT") mode = os.environ.get("DOLPHIN_VIOLET_VENUE_MID_MODE", "ws").lower()