From ccb627ac946dbb6e457171eb634816b7c0176b2b Mon Sep 17 00:00:00 2001 From: homelab-runtime-publisher Date: Tue, 8 Sep 2026 05:28:16 +0000 Subject: [PATCH] runtime: publish SIGNALBOT-260908-COLLECTOR-STATE-RCA-036 --- ...NALBOT-260908-COLLECTOR-STATE-RCA-036.json | 38 +++++++++++++++ ...GNALBOT-260908-COLLECTOR-STATE-RCA-036.txt | 46 +++++++++++++++++++ runtime/latest.json | 16 +++---- runtime/latest.txt | 26 +++++++---- 4 files changed, 108 insertions(+), 18 deletions(-) create mode 100644 runtime/history/SIGNALBOT-260908-COLLECTOR-STATE-RCA-036.json create mode 100644 runtime/history/SIGNALBOT-260908-COLLECTOR-STATE-RCA-036.txt diff --git a/runtime/history/SIGNALBOT-260908-COLLECTOR-STATE-RCA-036.json b/runtime/history/SIGNALBOT-260908-COLLECTOR-STATE-RCA-036.json new file mode 100644 index 00000000..5e608ecb --- /dev/null +++ b/runtime/history/SIGNALBOT-260908-COLLECTOR-STATE-RCA-036.json @@ -0,0 +1,38 @@ +{ + "schema_version": 1, + "channel": "homelab-runtime", + "command_id": "SIGNALBOT-260908-COLLECTOR-STATE-RCA-036", + "status": "OK", + "rc": 0, + "host": "pve01", + "mode": "read-only", + "component": "signalbot-cr0116-collector-state-rca", + "started_at_utc": "2026-09-08T05:28:13Z", + "finished_at_utc": "2026-09-08T05:28:16Z", + "reference_register_checked": true, + "reference_sha256": "5a3d8e5154c41cb582a4e0aca68090be1f0138918bf82131a948df326f9d8d66", + "error_register_checked": true, + "error_register_sha256": "3b09a553ec0f527ed3afeed4753f52a74ee3036045bbfb3c685e9f8af4ba7ba0", + "command_sha256": "4f64bf454248fc9933a450c0d2b2dab2bc2ab3e6e845ad1fc3b59375681f3cb1", + "duplicate_failed_command_blocked": false, + "block_reason": null, + "execution_started": true, + "change_declared": false, + "result_contract_valid": true, + "result_contract_status": null, + "result_contract_error": null, + "command_rc": 0, + "changes_made": false, + "rollback_started": false, + "rollback_restored": null, + "mutation_outcome": "NO_MUTATION", + "sanitized": true, + "secrets_included": false, + "private_addresses_included": false, + "raw_evidence_retained_locally": true, + "raw_evidence_sha256": "a54caab9741da51e043d39e424b15094dc452e3f24f196cf589272a8c0668097", + "sanitized_output_sha256": "a54caab9741da51e043d39e424b15094dc452e3f24f196cf589272a8c0668097", + "output_truncated_in_json": false, + "full_sanitized_output_url": "https://git.gram1.ru/.well-known/homelab-runtime/latest.txt", + "output": "ERROR_REGISTER_CHECK=OK\nREFERENCE_CHECK=OK\nAUTHORITY_CHECK_SCOPE=READABILITY_ONLY_INCIDENTS_NOT_CLOSED\nSB036_COLLECTOR={\"cmd\":[\"python\",\"-m\",\"demonov_forward_map.bitfinex_trade_collector\"],\"entrypoint\":null,\"id\":\"a546a70c3e8c\",\"image\":\"8020-demonov-shadow:e32760c69a4311728db9066ee8bf2bf66b1e5a70\",\"name\":\"demonov-shadow-8020-collector-1\",\"ok\":true,\"pid\":210213,\"restart_count\":13,\"running\":true,\"started_at\":\"2026-09-08T05:01:08.70385245Z\",\"status\":\"running\"}\nSB036_COLLECTOR_STATUS={\"age_sec\":0.4,\"exists\":true,\"values\":{\"fail_closed_reason\":\"source reconnect detected\",\"gap_detected\":false,\"post_finality_revision\":false,\"prospective_fail_closed_reason\":\"\",\"prospective_gap_detected\":false,\"prospective_reconnect_detected\":false,\"reconnect_detected\":true}}\nSB036_DB={\"d1_revisions_count\":0,\"event_kinds\":[[\"SEQUENCE\",180107],[\"RECONNECT\",10],[\"SESSION_START\",1]],\"exists\":true,\"finalized_d1_count\":0,\"latest_events\":[{\"event_kind\":\"SEQUENCE\",\"event_seq\":180118,\"received_at\":\"2026-09-08T05:28:14.303996+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2888},{\"event_kind\":\"SEQUENCE\",\"event_seq\":180117,\"received_at\":\"2026-09-08T05:28:14.290899+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2887},{\"event_kind\":\"SEQUENCE\",\"event_seq\":180116,\"received_at\":\"2026-09-08T05:28:14.127754+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2886},{\"event_kind\":\"SEQUENCE\",\"event_seq\":180115,\"received_at\":\"2026-09-08T05:28:13.967892+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2885},{\"event_kind\":\"SEQUENCE\",\"event_seq\":180114,\"received_at\":\"2026-09-08T05:28:13.801186+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2884},{\"event_kind\":\"SEQUENCE\",\"event_seq\":180113,\"received_at\":\"2026-09-08T05:28:13.628877+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2883},{\"event_kind\":\"SEQUENCE\",\"event_seq\":180112,\"received_at\":\"2026-09-08T05:28:13.621853+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2882},{\"event_kind\":\"SEQUENCE\",\"event_seq\":180111,\"received_at\":\"2026-09-08T05:28:13.614839+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2881},{\"event_kind\":\"SEQUENCE\",\"event_seq\":180110,\"received_at\":\"2026-09-08T05:28:13.607920+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2880},{\"event_kind\":\"SEQUENCE\",\"event_seq\":180109,\"received_at\":\"2026-09-08T05:28:13.594856+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2879},{\"event_kind\":\"SEQUENCE\",\"event_seq\":180108,\"received_at\":\"2026-09-08T05:28:13.425038+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2878},{\"event_kind\":\"SEQUENCE\",\"event_seq\":180107,\"received_at\":\"2026-09-08T05:28:13.271502+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2877},{\"event_kind\":\"SEQUENCE\",\"event_seq\":180106,\"received_at\":\"2026-09-08T05:28:13.112568+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2876},{\"event_kind\":\"SEQUENCE\",\"event_seq\":180105,\"received_at\":\"2026-09-08T05:28:13.101767+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2875},{\"event_kind\":\"SEQUENCE\",\"event_seq\":180104,\"received_at\":\"2026-09-08T05:28:13.094931+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2874},{\"event_kind\":\"SEQUENCE\",\"event_seq\":180103,\"received_at\":\"2026-09-08T05:28:13.086320+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2873},{\"event_kind\":\"SEQUENCE\",\"event_seq\":180102,\"received_at\":\"2026-09-08T05:28:13.055479+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2872},{\"event_kind\":\"SEQUENCE\",\"event_seq\":180101,\"received_at\":\"2026-09-08T05:28:10.388362+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2871},{\"event_kind\":\"SEQUENCE\",\"event_seq\":180100,\"received_at\":\"2026-09-08T05:28:10.352706+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2870},{\"event_kind\":\"SEQUENCE\",\"event_seq\":180099,\"received_at\":\"2026-09-08T05:28:07.280059+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2869}],\"latest_sessions\":[{\"events\":2888,\"first_at\":\"2026-09-08T05:01:09.298101+00:00\",\"last_at\":\"2026-09-08T05:28:14.303996+00:00\",\"max_seq\":2888,\"min_seq\":1,\"session_hash\":\"253ffe9a26a5\"},{\"events\":2475,\"first_at\":\"2026-09-08T04:54:28.087186+00:00\",\"last_at\":\"2026-09-08T05:01:08.350487+00:00\",\"max_seq\":2475,\"min_seq\":1,\"session_hash\":\"2b3998047f77\"},{\"events\":988,\"first_at\":\"2026-09-08T04:43:46.442548+00:00\",\"last_at\":\"2026-09-08T04:54:27.005150+00:00\",\"max_seq\":988,\"min_seq\":1,\"session_hash\":\"b501ae120c1f\"},{\"events\":589,\"first_at\":\"2026-09-08T04:42:44.434580+00:00\",\"last_at\":\"2026-09-08T04:43:45.521859+00:00\",\"max_seq\":589,\"min_seq\":1,\"session_hash\":\"10709eb54a7b\"},{\"events\":3620,\"first_at\":\"2026-09-08T03:52:02.239825+00:00\",\"last_at\":\"2026-09-08T04:42:43.449781+00:00\",\"max_seq\":3620,\"min_seq\":1,\"session_hash\":\"210de3583c8e\"},{\"events\":72124,\"first_at\":\"2026-09-07T15:04:59.188298+00:00\",\"last_at\":\"2026-09-08T03:52:00.952767+00:00\",\"max_seq\":72124,\"min_seq\":1,\"session_hash\":\"69bb22240441\"},{\"events\":1688,\"first_at\":\"2026-09-07T14:46:51.906734+00:00\",\"last_at\":\"2026-09-07T15:04:47.491753+00:00\",\"max_seq\":1688,\"min_seq\":1,\"session_hash\":\"d1d81c259d86\"},{\"events\":10295,\"first_at\":\"2026-09-07T13:30:08.973280+00:00\",\"last_at\":\"2026-09-07T14:46:39.866418+00:00\",\"max_seq\":10295,\"min_seq\":1,\"session_hash\":\"a2db9de2102e\"},{\"events\":14430,\"first_at\":\"2026-09-07T09:50:41.075840+00:00\",\"last_at\":\"2026-09-07T13:30:03.165612+00:00\",\"max_seq\":14430,\"min_seq\":1,\"session_hash\":\"8da25a454977\"},{\"events\":71006,\"first_at\":\"2026-09-06T18:48:31.906387+00:00\",\"last_at\":\"2026-09-07T09:50:13.818640+00:00\",\"max_seq\":71006,\"min_seq\":1,\"session_hash\":\"184e0e63b1c9\"},{\"events\":15,\"first_at\":\"2026-09-06T18:33:12.938622+00:00\",\"last_at\":\"2026-09-06T18:33:38.425961+00:00\",\"max_seq\":15,\"min_seq\":1,\"session_hash\":\"90adb5ba598b\"}],\"quick_check\":\"ok\",\"sequence_events\":{\"count\":180118,\"max_event_seq\":180118,\"max_received_at\":\"2026-09-08T05:28:14.303996+00:00\",\"max_source_sequence\":72124}}\nSB036_PROC={\"established_total\":1,\"fd_count\":7,\"pid\":210213,\"remote_port_counts\":{\"443\":1},\"tcp_states\":{\"01\":1,\"0A\":1},\"wchan\":\"futex_wait_queue\"}\nSB036_ENDPOINT={\"body\":\"[1]\",\"rc\":0,\"stderr\":\"\"}\nSB036_LOGS={\"keyword_counts\":{\"CLOSED\":5,\"CONNECTED\":0,\"DISCONNECT\":0,\"ERROR\":5,\"EXCEPTION\":5,\"FAIL_CLOSED\":0,\"FINAL\":0,\"GAP\":0,\"HEARTBEAT\":0,\"RECEIVED\":5,\"RECONNECT\":0,\"SOURCE_FINALITY\":0,\"TIMEOUT\":5,\"TRACEBACK\":5,\"WEBSOCKET\":15},\"last_lines\":[\"raise SystemExit(main())\",\"~~~~^^\",\"File \\\"/app/demonov_forward_map/bitfinex_trade_collector.py\\\", line 1175, in main\",\"for raw in ws:\",\"^^\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 242, in __iter__\",\"yield self.recv()\",\"~~~~~~~~~^^\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 336, in recv\",\"raise self.protocol.close_exc from self.recv_exc\",\"websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received\",\":130: RuntimeWarning: 'demonov_forward_map.bitfinex_trade_collector' found in sys.modules after import of package 'demonov_forward_map', but prior to execution of 'demonov_forward_map.bitfinex_trade_collector'; this may result in unpredictable behaviour\",\"Traceback (most recent call last):\",\"File \\\"\\\", line 203, in _run_module_as_main\",\"File \\\"\\\", line 88, in _run_code\",\"File \\\"/app/demonov_forward_map/bitfinex_trade_collector.py\\\", line 1246, in \",\"raise SystemExit(main())\",\"~~~~^^\",\"File \\\"/app/demonov_forward_map/bitfinex_trade_collector.py\\\", line 1175, in main\",\"for raw in ws:\",\"^^\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 242, in __iter__\",\"yield self.recv()\",\"~~~~~~~~~^^\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 336, in recv\",\"raise self.protocol.close_exc from self.recv_exc\",\"websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received\",\":130: RuntimeWarning: 'demonov_forward_map.bitfinex_trade_collector' found in sys.modules after import of package 'demonov_forward_map', but prior to execution of 'demonov_forward_map.bitfinex_trade_collector'; this may result in unpredictable behaviour\",\"Traceback (most recent call last):\",\"File \\\"\\\", line 203, in _run_module_as_main\",\"File \\\"\\\", line 88, in _run_code\",\"File \\\"/app/demonov_forward_map/bitfinex_trade_collector.py\\\", line 1246, in \",\"raise SystemExit(main())\",\"~~~~^^\",\"File \\\"/app/demonov_forward_map/bitfinex_trade_collector.py\\\", line 1175, in main\",\"for raw in ws:\",\"^^\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 242, in __iter__\",\"yield self.recv()\",\"~~~~~~~~~^^\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 336, in recv\",\"raise self.protocol.close_exc from self.recv_exc\",\"websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received\",\":130: RuntimeWarning: 'demonov_forward_map.bitfinex_trade_collector' found in sys.modules after import of package 'demonov_forward_map', but prior to execution of 'demonov_forward_map.bitfinex_trade_collector'; this may result in unpredictable behaviour\",\"Traceback (most recent call last):\",\"File \\\"\\\", line 203, in _run_module_as_main\",\"File \\\"\\\", line 88, in _run_code\",\"File \\\"/app/demonov_forward_map/bitfinex_trade_collector.py\\\", line 1246, in \",\"raise SystemExit(main())\",\"~~~~^^\",\"File \\\"/app/demonov_forward_map/bitfinex_trade_collector.py\\\", line 1175, in main\",\"for raw in ws:\",\"^^\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 242, in __iter__\",\"yield self.recv()\",\"~~~~~~~~~^^\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 336, in recv\",\"raise self.protocol.close_exc from self.recv_exc\",\"websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received\",\":130: RuntimeWarning: 'demonov_forward_map.bitfinex_trade_collector' found in sys.modules after import of package 'demonov_forward_map', but prior to execution of 'demonov_forward_map.bitfinex_trade_collector'; this may result in unpredictable behaviour\"],\"last_relevant\":[\"Traceback (most recent call last):\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 242, in __iter__\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 336, in recv\",\"websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received\",\"Traceback (most recent call last):\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 242, in __iter__\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 336, in recv\",\"websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received\",\"Traceback (most recent call last):\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 242, in __iter__\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 336, in recv\",\"websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received\",\"Traceback (most recent call last):\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 242, in __iter__\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 336, in recv\",\"websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received\",\"Traceback (most recent call last):\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 242, in __iter__\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 336, in recv\",\"websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received\"],\"line_count\":81,\"rc\":0}\nSB036_SOURCE_WINDOWS=[{\"bytes\":42028,\"matches\":[{\"match\":\"gap_detected: bool\",\"match_line\":62,\"window\":[{\"line\":60,\"text\":\"@dataclass(frozen=True)\"},{\"line\":61,\"text\":\"class BitfinexCollectorStatus:\"},{\"line\":62,\"text\":\"gap_detected: bool\"},{\"line\":63,\"text\":\"reconnect_detected: bool\"},{\"line\":64,\"text\":\"post_finality_revision: bool\"}]},{\"match\":\"reconnect_detected: bool\",\"match_line\":63,\"window\":[{\"line\":61,\"text\":\"class BitfinexCollectorStatus:\"},{\"line\":62,\"text\":\"gap_detected: bool\"},{\"line\":63,\"text\":\"reconnect_detected: bool\"},{\"line\":64,\"text\":\"post_finality_revision: bool\"},{\"line\":65,\"text\":\"fail_closed_reason: str\"}]},{\"match\":\"post_finality_revision: bool\",\"match_line\":64,\"window\":[{\"line\":62,\"text\":\"gap_detected: bool\"},{\"line\":63,\"text\":\"reconnect_detected: bool\"},{\"line\":64,\"text\":\"post_finality_revision: bool\"},{\"line\":65,\"text\":\"fail_closed_reason: str\"},{\"line\":66,\"text\":\"\"}]},{\"match\":\"fail_closed_reason: str\",\"match_line\":65,\"window\":[{\"line\":63,\"text\":\"reconnect_detected: bool\"},{\"line\":64,\"text\":\"post_finality_revision: bool\"},{\"line\":65,\"text\":\"fail_closed_reason: str\"},{\"line\":66,\"text\":\"\"},{\"line\":67,\"text\":\"\"}]},{\"match\":\"self._db = sqlite3.connect(\",\"match_line\":124,\"window\":[{\"line\":122,\"text\":\")\"},{\"line\":123,\"text\":\"self.path.parent.mkdir(parents=True, exist_ok=True)\"},{\"line\":124,\"text\":\"self._db = sqlite3.connect(\"},{\"line\":125,\"text\":\"str(self.path),\"},{\"line\":126,\"text\":\"timeout=5,\"}]},{\"match\":\"timeout=5,\",\"match_line\":126,\"window\":[{\"line\":124,\"text\":\"self._db = sqlite3.connect(\"},{\"line\":125,\"text\":\"str(self.path),\"},{\"line\":126,\"text\":\"timeout=5,\"},{\"line\":127,\"text\":\"isolation_level=None,\"},{\"line\":128,\"text\":\")\"}]},{\"match\":\"received_at TEXT NOT NULL,\",\"match_line\":166,\"window\":[{\"line\":164,\"text\":\"venue_id TEXT NOT NULL,\"},{\"line\":165,\"text\":\"source_kind TEXT NOT NULL,\"},{\"line\":166,\"text\":\"received_at TEXT NOT NULL,\"},{\"line\":167,\"text\":\"source_sequence INTEGER NOT NULL,\"},{\"line\":168,\"text\":\"raw_payload_hash TEXT NOT NULL,\"}]},{\"match\":\"received_at TEXT NOT NULL,\",\"match_line\":176,\"window\":[{\"line\":174,\"text\":\"session_id TEXT NOT NULL,\"},{\"line\":175,\"text\":\"source_sequence INTEGER NOT NULL,\"},{\"line\":176,\"text\":\"received_at TEXT NOT NULL,\"},{\"line\":177,\"text\":\"event_kind TEXT NOT NULL\"},{\"line\":178,\"text\":\");\"}]},{\"match\":\"gap_detected=self._meta_get(\\\"gap_detected\\\") == \\\"1\\\",\",\"match_line\":246,\"window\":[{\"line\":244,\"text\":\"def _status(self) -> BitfinexCollectorStatus:\"},{\"line\":245,\"text\":\"return BitfinexCollectorStatus(\"},{\"line\":246,\"text\":\"gap_detected=self._meta_get(\\\"gap_detected\\\") == \\\"1\\\",\"},{\"line\":247,\"text\":\"reconnect_detected=self._meta_get(\\\"reconnect_detected\\\") == \\\"1\\\",\"},{\"line\":248,\"text\":\"post_finality_revision=(\"}]},{\"match\":\"reconnect_detected=self._meta_get(\\\"reconnect_detected\\\") == \\\"1\\\",\",\"match_line\":247,\"window\":[{\"line\":245,\"text\":\"return BitfinexCollectorStatus(\"},{\"line\":246,\"text\":\"gap_detected=self._meta_get(\\\"gap_detected\\\") == \\\"1\\\",\"},{\"line\":247,\"text\":\"reconnect_detected=self._meta_get(\\\"reconnect_detected\\\") == \\\"1\\\",\"},{\"line\":248,\"text\":\"post_finality_revision=(\"},{\"line\":249,\"text\":\"self._meta_get(\\\"post_finality_revision\\\") == \\\"1\\\"\"}]},{\"match\":\"post_finality_revision=(\",\"match_line\":248,\"window\":[{\"line\":246,\"text\":\"gap_detected=self._meta_get(\\\"gap_detected\\\") == \\\"1\\\",\"},{\"line\":247,\"text\":\"reconnect_detected=self._meta_get(\\\"reconnect_detected\\\") == \\\"1\\\",\"},{\"line\":248,\"text\":\"post_finality_revision=(\"},{\"line\":249,\"text\":\"self._meta_get(\\\"post_finality_revision\\\") == \\\"1\\\"\"},{\"line\":250,\"text\":\"),\"}]},{\"match\":\"self._meta_get(\\\"post_finality_revision\\\") == \\\"1\\\"\",\"match_line\":249,\"window\":[{\"line\":247,\"text\":\"reconnect_detected=self._meta_get(\\\"reconnect_detected\\\") == \\\"1\\\",\"},{\"line\":248,\"text\":\"post_finality_revision=(\"},{\"line\":249,\"text\":\"self._meta_get(\\\"post_finality_revision\\\") == \\\"1\\\"\"},{\"line\":250,\"text\":\"),\"},{\"line\":251,\"text\":\"fail_closed_reason=self._meta_get(\\\"fail_closed_reason\\\") or \\\"\\\",\"}]},{\"match\":\"fail_closed_reason=self._meta_get(\\\"fail_closed_reason\\\") or \\\"\\\",\",\"match_line\":251,\"window\":[{\"line\":249,\"text\":\"self._meta_get(\\\"post_finality_revision\\\") == \\\"1\\\"\"},{\"line\":250,\"text\":\"),\"},{\"line\":251,\"text\":\"fail_closed_reason=self._meta_get(\\\"fail_closed_reason\\\") or \\\"\\\",\"},{\"line\":252,\"text\":\")\"},{\"line\":253,\"text\":\"\"}]},{\"match\":\"prospective = self.current_prospective_source_state()\",\"match_line\":256,\"window\":[{\"line\":254,\"text\":\"def _persist_status_file(self) -> None:\"},{\"line\":255,\"text\":\"status = self._status()\"},{\"line\":256,\"text\":\"prospective = self.current_prospective_source_state()\"},{\"line\":257,\"text\":\"payload = {\"},{\"line\":258,\"text\":\"\\\"gap_detected\\\": status.gap_detected,\"}]},{\"match\":\"\\\"gap_detected\\\": status.gap_detected,\",\"match_line\":258,\"window\":[{\"line\":256,\"text\":\"prospective = self.current_prospective_source_state()\"},{\"line\":257,\"text\":\"payload = {\"},{\"line\":258,\"text\":\"\\\"gap_detected\\\": status.gap_detected,\"},{\"line\":259,\"text\":\"\\\"reconnect_detected\\\": status.reconnect_detected,\"},{\"line\":260,\"text\":\"\\\"post_finality_revision\\\": status.post_finality_revision,\"}]},{\"match\":\"\\\"reconnect_detected\\\": status.reconnect_detected,\",\"match_line\":259,\"window\":[{\"line\":257,\"text\":\"payload = {\"},{\"line\":258,\"text\":\"\\\"gap_detected\\\": status.gap_detected,\"},{\"line\":259,\"text\":\"\\\"reconnect_detected\\\": status.reconnect_detected,\"},{\"line\":260,\"text\":\"\\\"post_finality_revision\\\": status.post_finality_revision,\"},{\"line\":261,\"text\":\"\\\"fail_closed_reason\\\": status.fail_closed_reason,\"}]},{\"match\":\"\\\"post_finality_revision\\\": status.post_finality_revision,\",\"match_line\":260,\"window\":[{\"line\":258,\"text\":\"\\\"gap_detected\\\": status.gap_detected,\"},{\"line\":259,\"text\":\"\\\"reconnect_detected\\\": status.reconnect_detected,\"},{\"line\":260,\"text\":\"\\\"post_finality_revision\\\": status.post_finality_revision,\"},{\"line\":261,\"text\":\"\\\"fail_closed_reason\\\": status.fail_closed_reason,\"},{\"line\":262,\"text\":\"\\\"prospective_gap_detected\\\": prospective.gap_detected,\"}]},{\"match\":\"\\\"fail_closed_reason\\\": status.fail_closed_reason,\",\"match_line\":261,\"window\":[{\"line\":259,\"text\":\"\\\"reconnect_detected\\\": status.reconnect_detected,\"},{\"line\":260,\"text\":\"\\\"post_finality_revision\\\": status.post_finality_revision,\"},{\"line\":261,\"text\":\"\\\"fail_closed_reason\\\": status.fail_closed_reason,\"},{\"line\":262,\"text\":\"\\\"prospective_gap_detected\\\": prospective.gap_detected,\"},{\"line\":263,\"text\":\"\\\"prospective_reconnect_detected\\\": prospective.reconnect_detected,\"}]},{\"match\":\"\\\"prospective_gap_detected\\\": prospective.gap_detected,\",\"match_line\":262,\"window\":[{\"line\":260,\"text\":\"\\\"post_finality_revision\\\": status.post_finality_revision,\"},{\"line\":261,\"text\":\"\\\"fail_closed_reason\\\": status.fail_closed_reason,\"},{\"line\":262,\"text\":\"\\\"prospective_gap_detected\\\": prospective.gap_detected,\"},{\"line\":263,\"text\":\"\\\"prospective_reconnect_detected\\\": prospective.reconnect_detected,\"},{\"line\":264,\"text\":\"\\\"prospective_fail_closed_reason\\\": prospective.fail_closed_reason,\"}]},{\"match\":\"\\\"prospective_reconnect_detected\\\": prospective.reconnect_detected,\",\"match_line\":263,\"window\":[{\"line\":261,\"text\":\"\\\"fail_closed_reason\\\": status.fail_closed_reason,\"},{\"line\":262,\"text\":\"\\\"prospective_gap_detected\\\": prospective.gap_detected,\"},{\"line\":263,\"text\":\"\\\"prospective_reconnect_detected\\\": prospective.reconnect_detected,\"},{\"line\":264,\"text\":\"\\\"prospective_fail_closed_reason\\\": prospective.fail_closed_reason,\"},{\"line\":265,\"text\":\"\\\"updated_at\\\": datetime.now(timezone.utc).isoformat(),\"}]},{\"match\":\"\\\"prospective_fail_closed_reason\\\": prospective.fail_closed_reason,\",\"match_line\":264,\"window\":[{\"line\":262,\"text\":\"\\\"prospective_gap_detected\\\": prospective.gap_detected,\"},{\"line\":263,\"text\":\"\\\"prospective_reconnect_detected\\\": prospective.reconnect_detected,\"},{\"line\":264,\"text\":\"\\\"prospective_fail_closed_reason\\\": prospective.fail_closed_reason,\"},{\"line\":265,\"text\":\"\\\"updated_at\\\": datetime.now(timezone.utc).isoformat(),\"},{\"line\":266,\"text\":\"}\"}]},{\"match\":\"def _set_fail_closed(self, key: str, reason: str) -> None:\",\"match_line\":280,\"window\":[{\"line\":278,\"text\":\"os.replace(tmp, target)\"},{\"line\":279,\"text\":\"\"},{\"line\":280,\"text\":\"def _set_fail_closed(self, key: str, reason: str) -> None:\"},{\"line\":281,\"text\":\"self._meta_set(key, \\\"1\\\")\"},{\"line\":282,\"text\":\"if not self._meta_get(\\\"fail_closed_reason\\\"):\"}]},{\"match\":\"if not self._meta_get(\\\"fail_closed_reason\\\"):\",\"match_line\":282,\"window\":[{\"line\":280,\"text\":\"def _set_fail_closed(self, key: str, reason: str) -> None:\"},{\"line\":281,\"text\":\"self._meta_set(key, \\\"1\\\")\"},{\"line\":282,\"text\":\"if not self._meta_get(\\\"fail_closed_reason\\\"):\"},{\"line\":283,\"text\":\"self._meta_set(\\\"fail_closed_reason\\\", reason)\"},{\"line\":284,\"text\":\"self._persist_status_file()\"}]},{\"match\":\"self._meta_set(\\\"fail_closed_reason\\\", reason)\",\"match_line\":283,\"window\":[{\"line\":281,\"text\":\"self._meta_set(key, \\\"1\\\")\"},{\"line\":282,\"text\":\"if not self._meta_get(\\\"fail_closed_reason\\\"):\"},{\"line\":283,\"text\":\"self._meta_set(\\\"fail_closed_reason\\\", reason)\"},{\"line\":284,\"text\":\"self._persist_status_file()\"},{\"line\":285,\"text\":\"\"}]},{\"match\":\"receipt_id, venue_id, source_kind, received_at,\",\"match_line\":292,\"window\":[{\"line\":290,\"text\":\"\\\"\\\"\\\"\"},{\"line\":291,\"text\":\"INSERT OR IGNORE INTO source_receipts(\"},{\"line\":292,\"text\":\"receipt_id, venue_id, source_kind, received_at,\"},{\"line\":293,\"text\":\"source_sequence, raw_payload_hash, collector_session_id,\"},{\"line\":294,\"text\":\"receipt_json\"}]},{\"match\":\"receipt.received_at.isoformat(),\",\"match_line\":301,\"window\":[{\"line\":299,\"text\":\"receipt.venue_id,\"},{\"line\":300,\"text\":\"receipt.source_kind,\"},{\"line\":301,\"text\":\"receipt.received_at.isoformat(),\"},{\"line\":302,\"text\":\"receipt.source_sequence,\"},{\"line\":303,\"text\":\"receipt.raw_payload_hash,\"}]},{\"match\":\"received_at: datetime,\",\"match_line\":315,\"window\":[{\"line\":313,\"text\":\"session_id: str,\"},{\"line\":314,\"text\":\"sequence: int,\"},{\"line\":315,\"text\":\"received_at: datetime,\"},{\"line\":316,\"text\":\") -> None:\"},{\"line\":317,\"text\":\"if not isinstance(session_id, str) or not session_id:\"}]},{\"match\":\"received_at = _utc(received_at, \\\"received_at\\\")\",\"match_line\":327,\"window\":[{\"line\":325,\"text\":\"\\\"source sequence must be a nonnegative integer\\\"\"},{\"line\":326,\"text\":\")\"},{\"line\":327,\"text\":\"received_at = _utc(received_at, \\\"received_at\\\")\"},{\"line\":328,\"text\":\"active = self._meta_get(\\\"active_session_id\\\")\"},{\"line\":329,\"text\":\"if active is None:\"}]},{\"match\":\"session_id,source_sequence,received_at,event_kind\",\"match_line\":335,\"window\":[{\"line\":333,\"text\":\"\\\"\\\"\\\"\"},{\"line\":334,\"text\":\"INSERT INTO sequence_events(\"},{\"line\":335,\"text\":\"session_id,source_sequence,received_at,event_kind\"},{\"line\":336,\"text\":\") VALUES(?,?,?,?)\"},{\"line\":337,\"text\":\"\\\"\\\"\\\",\"}]},{\"match\":\"received_at.isoformat(),\",\"match_line\":341,\"window\":[{\"line\":339,\"text\":\"session_id,\"},{\"line\":340,\"text\":\"sequence,\"},{\"line\":341,\"text\":\"received_at.isoformat(),\"},{\"line\":342,\"text\":\"\\\"SESSION_START\\\",\"},{\"line\":343,\"text\":\"),\"}]},{\"match\":\"self._meta_set(\\\"reconnect_detected\\\", \\\"1\\\")\",\"match_line\":348,\"window\":[{\"line\":346,\"text\":\"return\"},{\"line\":347,\"text\":\"if active != session_id:\"},{\"line\":348,\"text\":\"self._meta_set(\\\"reconnect_detected\\\", \\\"1\\\")\"},{\"line\":349,\"text\":\"if not self._meta_get(\\\"fail_closed_reason\\\"):\"},{\"line\":350,\"text\":\"self._meta_set(\"}]},{\"match\":\"if not self._meta_get(\\\"fail_closed_reason\\\"):\",\"match_line\":349,\"window\":[{\"line\":347,\"text\":\"if active != session_id:\"},{\"line\":348,\"text\":\"self._meta_set(\\\"reconnect_detected\\\", \\\"1\\\")\"},{\"line\":349,\"text\":\"if not self._meta_get(\\\"fail_closed_reason\\\"):\"},{\"line\":350,\"text\":\"self._meta_set(\"},{\"line\":351,\"text\":\"\\\"fail_closed_reason\\\",\"}]},{\"match\":\"\\\"fail_closed_reason\\\",\",\"match_line\":351,\"window\":[{\"line\":349,\"text\":\"if not self._meta_get(\\\"fail_closed_reason\\\"):\"},{\"line\":350,\"text\":\"self._meta_set(\"},{\"line\":351,\"text\":\"\\\"fail_closed_reason\\\",\"},{\"line\":352,\"text\":\"\\\"source reconnect detected\\\",\"},{\"line\":353,\"text\":\")\"}]},{\"match\":\"\\\"source reconnect detected\\\",\",\"match_line\":352,\"window\":[{\"line\":350,\"text\":\"self._meta_set(\"},{\"line\":351,\"text\":\"\\\"fail_closed_reason\\\",\"},{\"line\":352,\"text\":\"\\\"source reconnect detected\\\",\"},{\"line\":353,\"text\":\")\"},{\"line\":354,\"text\":\"self._meta_set(\\\"active_session_id\\\", session_id)\"}]},{\"match\":\"session_id,source_sequence,received_at,event_kind\",\"match_line\":359,\"window\":[{\"line\":357,\"text\":\"\\\"\\\"\\\"\"},{\"line\":358,\"text\":\"INSERT INTO sequence_events(\"},{\"line\":359,\"text\":\"session_id,source_sequence,received_at,event_kind\"},{\"line\":360,\"text\":\") VALUES(?,?,?,?)\"},{\"line\":361,\"text\":\"\\\"\\\"\\\",\"}]},{\"match\":\"received_at.isoformat(),\",\"match_line\":365,\"window\":[{\"line\":363,\"text\":\"session_id,\"},{\"line\":364,\"text\":\"sequence,\"},{\"line\":365,\"text\":\"received_at.isoformat(),\"},{\"line\":366,\"text\":\"\\\"RECONNECT\\\",\"},{\"line\":367,\"text\":\"),\"}]},{\"match\":\"\\\"RECONNECT\\\",\",\"match_line\":366,\"window\":[{\"line\":364,\"text\":\"sequence,\"},{\"line\":365,\"text\":\"received_at.isoformat(),\"},{\"line\":366,\"text\":\"\\\"RECONNECT\\\",\"},{\"line\":367,\"text\":\"),\"},{\"line\":368,\"text\":\")\"}]},{\"match\":\"session_id,source_sequence,received_at,event_kind\",\"match_line\":378,\"window\":[{\"line\":376,\"text\":\"\\\"\\\"\\\"\"},{\"line\":377,\"text\":\"INSERT INTO sequence_events(\"},{\"line\":378,\"text\":\"session_id,source_sequence,received_at,event_kind\"},{\"line\":379,\"text\":\") VALUES(?,?,?,?)\"},{\"line\":380,\"text\":\"\\\"\\\"\\\",\"}]},{\"match\":\"received_at.isoformat(),\",\"match_line\":384,\"window\":[{\"line\":382,\"text\":\"session_id,\"},{\"line\":383,\"text\":\"sequence,\"},{\"line\":384,\"text\":\"received_at.isoformat(),\"},{\"line\":385,\"text\":\"\\\"GAP\\\",\"},{\"line\":386,\"text\":\"),\"}]},{\"match\":\"self._set_fail_closed(\",\"match_line\":388,\"window\":[{\"line\":386,\"text\":\"),\"},{\"line\":387,\"text\":\")\"},{\"line\":388,\"text\":\"self._set_fail_closed(\"},{\"line\":389,\"text\":\"\\\"gap_detected\\\",\"},{\"line\":390,\"text\":\"f\\\"sequence gap expected {expected} got {sequence}\\\",\"}]},{\"match\":\"\\\"gap_detected\\\",\",\"match_line\":389,\"window\":[{\"line\":387,\"text\":\")\"},{\"line\":388,\"text\":\"self._set_fail_closed(\"},{\"line\":389,\"text\":\"\\\"gap_detected\\\",\"},{\"line\":390,\"text\":\"f\\\"sequence gap expected {expected} got {sequence}\\\",\"},{\"line\":391,\"text\":\")\"}]},{\"match\":\"session_id,source_sequence,received_at,event_kind\",\"match_line\":400,\"window\":[{\"line\":398,\"text\":\"\\\"\\\"\\\"\"},{\"line\":399,\"text\":\"INSERT INTO sequence_events(\"},{\"line\":400,\"text\":\"session_id,source_sequence,received_at,event_kind\"},{\"line\":401,\"text\":\") VALUES(?,?,?,?)\"},{\"line\":402,\"text\":\"\\\"\\\"\\\",\"}]},{\"match\":\"received_at.isoformat(),\",\"match_line\":406,\"window\":[{\"line\":404,\"text\":\"session_id,\"},{\"line\":405,\"text\":\"sequence,\"},{\"line\":406,\"text\":\"received_at.isoformat(),\"},{\"line\":407,\"text\":\"\\\"SEQUENCE\\\",\"},{\"line\":408,\"text\":\"),\"}]},{\"match\":\"def current_prospective_source_state(self) -> BitfinexCollectorStatus:\",\"match_line\":412,\"window\":[{\"line\":410,\"text\":\"self._persist_status_file()\"},{\"line\":411,\"text\":\"\"},{\"line\":412,\"text\":\"def current_prospective_source_state(self) -> BitfinexCollectorStatus:\"},{\"line\":413,\"text\":\"# GAP/RECONNECT are enforced per logical D1 by finalize_ready_d1().\"},{\"line\":414,\"text\":\"# Historical events must not poison later uncontaminated D1 bars.\"}]},{\"match\":\"# GAP/RECONNECT are enforced per logical D1 by finalize_ready_d1().\",\"match_line\":413,\"window\":[{\"line\":411,\"text\":\"\"},{\"line\":412,\"text\":\"def current_prospective_source_state(self) -> BitfinexCollectorStatus:\"},{\"line\":413,\"text\":\"# GAP/RECONNECT are enforced per logical D1 by finalize_ready_d1().\"},{\"line\":414,\"text\":\"# Historical events must not poison later uncontaminated D1 bars.\"},{\"line\":415,\"text\":\"post_finality_revision = (\"}]},{\"match\":\"post_finality_revision = (\",\"match_line\":415,\"window\":[{\"line\":413,\"text\":\"# GAP/RECONNECT are enforced per logical D1 by finalize_ready_d1().\"},{\"line\":414,\"text\":\"# Historical events must not poison later uncontaminated D1 bars.\"},{\"line\":415,\"text\":\"post_finality_revision = (\"},{\"line\":416,\"text\":\"self._meta_get(\\\"post_finality_revision\\\") == \\\"1\\\"\"},{\"line\":417,\"text\":\")\"}]},{\"match\":\"self._meta_get(\\\"post_finality_revision\\\") == \\\"1\\\"\",\"match_line\":416,\"window\":[{\"line\":414,\"text\":\"# Historical events must not poison later uncontaminated D1 bars.\"},{\"line\":415,\"text\":\"post_finality_revision = (\"},{\"line\":416,\"text\":\"self._meta_get(\\\"post_finality_revision\\\") == \\\"1\\\"\"},{\"line\":417,\"text\":\")\"},{\"line\":418,\"text\":\"reason = (\"}]},{\"match\":\"if post_finality_revision\",\"match_line\":420,\"window\":[{\"line\":418,\"text\":\"reason = (\"},{\"line\":419,\"text\":\"\\\"post-finality source revision detected\\\"\"},{\"line\":420,\"text\":\"if post_finality_revision\"},{\"line\":421,\"text\":\"else \\\"\\\"\"},{\"line\":422,\"text\":\")\"}]},{\"match\":\"gap_detected=False,\",\"match_line\":424,\"window\":[{\"line\":422,\"text\":\")\"},{\"line\":423,\"text\":\"return BitfinexCollectorStatus(\"},{\"line\":424,\"text\":\"gap_detected=False,\"},{\"line\":425,\"text\":\"reconnect_detected=False,\"},{\"line\":426,\"text\":\"post_finality_revision=post_finality_revision,\"}]},{\"match\":\"reconnect_detected=False,\",\"match_line\":425,\"window\":[{\"line\":423,\"text\":\"return BitfinexCollectorStatus(\"},{\"line\":424,\"text\":\"gap_detected=False,\"},{\"line\":425,\"text\":\"reconnect_detected=False,\"},{\"line\":426,\"text\":\"post_finality_revision=post_finality_revision,\"},{\"line\":427,\"text\":\"fail_closed_reason=reason,\"}]},{\"match\":\"post_finality_revision=post_finality_revision,\",\"match_line\":426,\"window\":[{\"line\":424,\"text\":\"gap_detected=False,\"},{\"line\":425,\"text\":\"reconnect_detected=False,\"},{\"line\":426,\"text\":\"post_finality_revision=post_finality_revision,\"},{\"line\":427,\"text\":\"fail_closed_reason=reason,\"},{\"line\":428,\"text\":\")\"}]},{\"match\":\"fail_closed_reason=reason,\",\"match_line\":427,\"window\":[{\"line\":425,\"text\":\"reconnect_detected=False,\"},{\"line\":426,\"text\":\"post_finality_revision=post_finality_revision,\"},{\"line\":427,\"text\":\"fail_closed_reason=reason,\"},{\"line\":428,\"text\":\")\"},{\"line\":429,\"text\":\"\"}]},{\"match\":\"\\\"SELECT received_at FROM source_receipts WHERE receipt_id=?\\\",\",\"match_line\":442,\"window\":[{\"line\":440,\"text\":\"raise DemonovError(\\\"BitfinexCanonicalTradeV1 required\\\")\"},{\"line\":441,\"text\":\"receipt = self._db.execute(\"},{\"line\":442,\"text\":\"\\\"SELECT received_at FROM source_receipts WHERE receipt_id=?\\\",\"},{\"line\":443,\"text\":\"(receipt_id,),\"},{\"line\":444,\"text\":\").fetchone()\"}]},{\"match\":\"D1FinalityState.POST_FINALITY_SOURCE_REVISION,\",\"match_line\":529,\"window\":[{\"line\":527,\"text\":\"validate_d1_finality_transition(\"},{\"line\":528,\"text\":\"current,\"},{\"line\":529,\"text\":\"D1FinalityState.POST_FINALITY_SOURCE_REVISION,\"},{\"line\":530,\"text\":\")\"},{\"line\":531,\"text\":\"self._db.execute(\"}]},{\"match\":\".POST_FINALITY_SOURCE_REVISION.value,\",\"match_line\":539,\"window\":[{\"line\":537,\"text\":\"(\"},{\"line\":538,\"text\":\"D1FinalityState\"},{\"line\":539,\"text\":\".POST_FINALITY_SOURCE_REVISION.value,\"},{\"line\":540,\"text\":\"logical_id,\"},{\"line\":541,\"text\":\"),\"}]},{\"match\":\"self._meta_set(\\\"post_finality_revision\\\", \\\"1\\\")\",\"match_line\":543,\"window\":[{\"line\":541,\"text\":\"),\"},{\"line\":542,\"text\":\")\"},{\"line\":543,\"text\":\"self._meta_set(\\\"post_finality_revision\\\", \\\"1\\\")\"},{\"line\":544,\"text\":\"self._meta_set(\"},{\"line\":545,\"text\":\"\\\"fail_closed_reason\\\",\"}]},{\"match\":\"\\\"fail_closed_reason\\\",\",\"match_line\":545,\"window\":[{\"line\":543,\"text\":\"self._meta_set(\\\"post_finality_revision\\\", \\\"1\\\")\"},{\"line\":544,\"text\":\"self._meta_set(\"},{\"line\":545,\"text\":\"\\\"fail_closed_reason\\\",\"},{\"line\":546,\"text\":\"\\\"post-finality source revision detected\\\",\"},{\"line\":547,\"text\":\")\"}]},{\"match\":\"result = \\\"POST_FINALITY_REVISION\\\"\",\"match_line\":548,\"window\":[{\"line\":546,\"text\":\"\\\"post-finality source revision detected\\\",\"},{\"line\":547,\"text\":\")\"},{\"line\":548,\"text\":\"result = \\\"POST_FINALITY_REVISION\\\"\"},{\"line\":549,\"text\":\"self._db.execute(\\\"COMMIT\\\")\"},{\"line\":550,\"text\":\"except Exception:\"}]},{\"match\":\"if result == \\\"POST_FINALITY_REVISION\\\":\",\"match_line\":553,\"window\":[{\"line\":551,\"text\":\"self._db.execute(\\\"ROLLBACK\\\")\"},{\"line\":552,\"text\":\"raise\"},{\"line\":553,\"text\":\"if result == \\\"POST_FINALITY_REVISION\\\":\"},{\"line\":554,\"text\":\"self._persist_status_file()\"},{\"line\":555,\"text\":\"return result\"}]},{\"match\":\"def finalize_ready_d1(\",\"match_line\":605,\"window\":[{\"line\":603,\"text\":\")\"},{\"line\":604,\"text\":\"\"},{\"line\":605,\"text\":\"def finalize_ready_d1(\"},{\"line\":606,\"text\":\"self,\"},{\"line\":607,\"text\":\"logical_d1: LogicalD1V1,\"}]},{\"match\":\"SELECT MIN(received_at) AS first_received\",\"match_line\":626,\"window\":[{\"line\":624,\"text\":\"first_sequence = self._db.execute(\"},{\"line\":625,\"text\":\"\\\"\\\"\\\"\"},{\"line\":626,\"text\":\"SELECT MIN(received_at) AS first_received\"},{\"line\":627,\"text\":\"FROM sequence_events\"},{\"line\":628,\"text\":\"\\\"\\\"\\\"\"}]},{\"match\":\").fetchone()[\\\"first_received\\\"]\",\"match_line\":629,\"window\":[{\"line\":627,\"text\":\"FROM sequence_events\"},{\"line\":628,\"text\":\"\\\"\\\"\\\"\"},{\"line\":629,\"text\":\").fetchone()[\\\"first_received\\\"]\"},{\"line\":630,\"text\":\"if (\"},{\"line\":631,\"text\":\"first_sequence is None\"}]},{\"match\":\"boundary_received_at = _dt(boundary[\\\"received_at\\\"])\",\"match_line\":641,\"window\":[{\"line\":639,\"text\":\"if boundary is None:\"},{\"line\":640,\"text\":\"return None\"},{\"line\":641,\"text\":\"boundary_received_at = _dt(boundary[\\\"received_at\\\"])\"},{\"line\":642,\"text\":\"if finalized_at < boundary_received_at:\"},{\"line\":643,\"text\":\"raise DemonovError(\"}]},{\"match\":\"if finalized_at < boundary_received_at:\",\"match_line\":642,\"window\":[{\"line\":640,\"text\":\"return None\"},{\"line\":641,\"text\":\"boundary_received_at = _dt(boundary[\\\"received_at\\\"])\"},{\"line\":642,\"text\":\"if finalized_at < boundary_received_at:\"},{\"line\":643,\"text\":\"raise DemonovError(\"},{\"line\":644,\"text\":\"\\\"finalized_at precedes source boundary proof\\\"\"}]},{\"match\":\"AND received_at>=?\",\"match_line\":652,\"window\":[{\"line\":650,\"text\":\"FROM sequence_events\"},{\"line\":651,\"text\":\"WHERE event_kind='GAP'\"},{\"line\":652,\"text\":\"AND received_at>=?\"},{\"line\":653,\"text\":\"AND received_at<=?\"},{\"line\":654,\"text\":\"LIMIT 1\"}]},{\"match\":\"AND received_at<=?\",\"match_line\":653,\"window\":[{\"line\":651,\"text\":\"WHERE event_kind='GAP'\"},{\"line\":652,\"text\":\"AND received_at>=?\"},{\"line\":653,\"text\":\"AND received_at<=?\"},{\"line\":654,\"text\":\"LIMIT 1\"},{\"line\":655,\"text\":\"\\\"\\\"\\\",\"}]},{\"match\":\"boundary_received_at.isoformat(),\",\"match_line\":658,\"window\":[{\"line\":656,\"text\":\"(\"},{\"line\":657,\"text\":\"logical_d1.open_at.isoformat(),\"},{\"line\":658,\"text\":\"boundary_received_at.isoformat(),\"},{\"line\":659,\"text\":\"),\"},{\"line\":660,\"text\":\").fetchone()\"}]},{\"match\":\"reconnect = self._db.execute(\",\"match_line\":666,\"window\":[{\"line\":664,\"text\":\")\"},{\"line\":665,\"text\":\"\"},{\"line\":666,\"text\":\"reconnect = self._db.execute(\"},{\"line\":667,\"text\":\"\\\"\\\"\\\"\"},{\"line\":668,\"text\":\"SELECT 1\"}]},{\"match\":\"WHERE event_kind='RECONNECT'\",\"match_line\":670,\"window\":[{\"line\":668,\"text\":\"SELECT 1\"},{\"line\":669,\"text\":\"FROM sequence_events\"},{\"line\":670,\"text\":\"WHERE event_kind='RECONNECT'\"},{\"line\":671,\"text\":\"AND received_at>=?\"},{\"line\":672,\"text\":\"AND received_at<=?\"}]},{\"match\":\"AND received_at>=?\",\"match_line\":671,\"window\":[{\"line\":669,\"text\":\"FROM sequence_events\"},{\"line\":670,\"text\":\"WHERE event_kind='RECONNECT'\"},{\"line\":671,\"text\":\"AND received_at>=?\"},{\"line\":672,\"text\":\"AND received_at<=?\"},{\"line\":673,\"text\":\"LIMIT 1\"}]},{\"match\":\"AND received_at<=?\",\"match_line\":672,\"window\":[{\"line\":670,\"text\":\"WHERE event_kind='RECONNECT'\"},{\"line\":671,\"text\":\"AND received_at>=?\"},{\"line\":672,\"text\":\"AND received_at<=?\"},{\"line\":673,\"text\":\"LIMIT 1\"},{\"line\":674,\"text\":\"\\\"\\\"\\\",\"}]},{\"match\":\"boundary_received_at.isoformat(),\",\"match_line\":677,\"window\":[{\"line\":675,\"text\":\"(\"},{\"line\":676,\"text\":\"logical_d1.open_at.isoformat(),\"},{\"line\":677,\"text\":\"boundary_received_at.isoformat(),\"},{\"line\":678,\"text\":\"),\"},{\"line\":679,\"text\":\").fetchone()\"}]},{\"match\":\"if reconnect is not None:\",\"match_line\":680,\"window\":[{\"line\":678,\"text\":\"),\"},{\"line\":679,\"text\":\").fetchone()\"},{\"line\":680,\"text\":\"if reconnect is not None:\"},{\"line\":681,\"text\":\"raise DemonovError(\"},{\"line\":682,\"text\":\"\\\"reconnect prevents D1 finalization\\\"\"}]},{\"match\":\"\\\"reconnect prevents D1 finalization\\\"\",\"match_line\":682,\"window\":[{\"line\":680,\"text\":\"if reconnect is not None:\"},{\"line\":681,\"text\":\"raise DemonovError(\"},{\"line\":682,\"text\":\"\\\"reconnect prevents D1 finalization\\\"\"},{\"line\":683,\"text\":\")\"},{\"line\":684,\"text\":\"\"}]},{\"match\":\"sr.received_at,\",\"match_line\":901,\"window\":[{\"line\":899,\"text\":\"SELECT\"},{\"line\":900,\"text\":\"tr.mts,\"},{\"line\":901,\"text\":\"sr.received_at,\"},{\"line\":902,\"text\":\"sr.collector_session_id,\"},{\"line\":903,\"text\":\"sr.source_sequence\"}]},{\"match\":\"\\\"received_at\\\": receipt.received_at.isoformat(),\",\"match_line\":962,\"window\":[{\"line\":960,\"text\":\"\\\"venue_id\\\": receipt.venue_id,\"},{\"line\":961,\"text\":\"\\\"source_kind\\\": receipt.source_kind,\"},{\"line\":962,\"text\":\"\\\"received_at\\\": receipt.received_at.isoformat(),\"},{\"line\":963,\"text\":\"\\\"source_sequence\\\": receipt.source_sequence,\"},{\"line\":964,\"text\":\"\\\"raw_payload_hash\\\": receipt.raw_payload_hash,\"}]},{\"match\":\"def finalize_ready_d1_without_stopping_collection(\",\"match_line\":1102,\"window\":[{\"line\":1100,\"text\":\"\"},{\"line\":1101,\"text\":\"\"},{\"line\":1102,\"text\":\"def finalize_ready_d1_without_stopping_collection(\"},{\"line\":1103,\"text\":\"journal: SQLiteBitfinexSourceJournal,\"},{\"line\":1104,\"text\":\"logical_d1: LogicalD1V1,\"}]},{\"match\":\"return journal.finalize_ready_d1(\",\"match_line\":1110,\"window\":[{\"line\":1108,\"text\":\"\\\"\\\"\\\"Keep collection alive when one logical D1 is non-finalizable.\\\"\\\"\\\"\"},{\"line\":1109,\"text\":\"try:\"},{\"line\":1110,\"text\":\"return journal.finalize_ready_d1(\"},{\"line\":1111,\"text\":\"logical_d1,\"},{\"line\":1112,\"text\":\"finalized_at=finalized_at,\"}]},{\"match\":\"\\\"reconnect prevents D1 finalization\\\",\",\"match_line\":1116,\"window\":[{\"line\":1114,\"text\":\"except DemonovError as exc:\"},{\"line\":1115,\"text\":\"if str(exc) in {\"},{\"line\":1116,\"text\":\"\\\"reconnect prevents D1 finalization\\\",\"},{\"line\":1117,\"text\":\"\\\"sequence gap prevents D1 finalization\\\",\"},{\"line\":1118,\"text\":\"}:\"}]},{\"match\":\"return \\\"WS_HEARTBEAT\\\"\",\"match_line\":1129,\"window\":[{\"line\":1127,\"text\":\"and message[1] == \\\"hb\\\"\"},{\"line\":1128,\"text\":\"):\"},{\"line\":1129,\"text\":\"return \\\"WS_HEARTBEAT\\\"\"},{\"line\":1130,\"text\":\"return \\\"WS_TRADES\\\"\"},{\"line\":1131,\"text\":\"\"}]}],\"path\":\"/opt/stacks/8020-demonov-shadow/.deploy/SIGNALBOT-260906-DEPLOY-022/demonov_forward_map/bitfinex_trade_collector.py\",\"sha256\":\"d21cf0c3a0d4fcaf9210a57da04fd560dba4952ac1dd5a085abcc4e76ccf2eb0\"},{\"bytes\":15930,\"matches\":[{\"match\":\"POST_FINALITY_SOURCE_REVISION = \\\"POST_FINALITY_SOURCE_REVISION\\\"\",\"match_line\":69,\"window\":[{\"line\":67,\"text\":\"RECONCILING = \\\"RECONCILING\\\"\"},{\"line\":68,\"text\":\"FINALIZED = \\\"FINALIZED\\\"\"},{\"line\":69,\"text\":\"POST_FINALITY_SOURCE_REVISION = \\\"POST_FINALITY_SOURCE_REVISION\\\"\"},{\"line\":70,\"text\":\"\"},{\"line\":71,\"text\":\"\"}]},{\"match\":\"received_at: datetime\",\"match_line\":77,\"window\":[{\"line\":75,\"text\":\"venue_id: str\"},{\"line\":76,\"text\":\"source_kind: str\"},{\"line\":77,\"text\":\"received_at: datetime\"},{\"line\":78,\"text\":\"source_sequence: int\"},{\"line\":79,\"text\":\"raw_payload_hash: str\"}]},{\"match\":\"_utc(self.received_at, \\\"received_at\\\")\",\"match_line\":86,\"window\":[{\"line\":84,\"text\":\"_required_text(self.source_kind, \\\"source_kind\\\")\"},{\"line\":85,\"text\":\"_required_text(self.collector_session_id, \\\"collector_session_id\\\")\"},{\"line\":86,\"text\":\"_utc(self.received_at, \\\"received_at\\\")\"},{\"line\":87,\"text\":\"if not isinstance(self.source_sequence, int) or isinstance(self.source_sequence, bool) or self.source_sequence < 0:\"},{\"line\":88,\"text\":\"raise DemonovError(\\\"source_sequence must be a nonnegative integer\\\")\"}]},{\"match\":\"\\\"received_at\\\": self.received_at,\",\"match_line\":99,\"window\":[{\"line\":97,\"text\":\"\\\"venue_id\\\": self.venue_id,\"},{\"line\":98,\"text\":\"\\\"source_kind\\\": self.source_kind,\"},{\"line\":99,\"text\":\"\\\"received_at\\\": self.received_at,\"},{\"line\":100,\"text\":\"\\\"source_sequence\\\": self.source_sequence,\"},{\"line\":101,\"text\":\"\\\"raw_payload_hash\\\": self.raw_payload_hash,\"}]},{\"match\":\"\\\"received_at\\\": kwargs[\\\"received_at\\\"],\",\"match_line\":111,\"window\":[{\"line\":109,\"text\":\"\\\"venue_id\\\": kwargs[\\\"venue_id\\\"],\"},{\"line\":110,\"text\":\"\\\"source_kind\\\": kwargs[\\\"source_kind\\\"],\"},{\"line\":111,\"text\":\"\\\"received_at\\\": kwargs[\\\"received_at\\\"],\"},{\"line\":112,\"text\":\"\\\"source_sequence\\\": kwargs[\\\"source_sequence\\\"],\"},{\"line\":113,\"text\":\"\\\"raw_payload_hash\\\": kwargs[\\\"raw_payload_hash\\\"],\"}]},{\"match\":\"(D1FinalityState.FINALIZED, D1FinalityState.POST_FINALITY_SOURCE_REVISION),\",\"match_line\":394,\"window\":[{\"line\":392,\"text\":\"(D1FinalityState.BOUNDARY_CROSSED, D1FinalityState.RECONCILING),\"},{\"line\":393,\"text\":\"(D1FinalityState.RECONCILING, D1FinalityState.FINALIZED),\"},{\"line\":394,\"text\":\"(D1FinalityState.FINALIZED, D1FinalityState.POST_FINALITY_SOURCE_REVISION),\"},{\"line\":395,\"text\":\"}\"},{\"line\":396,\"text\":\"\"}]},{\"match\":\"received_at=record.finalized.finalized_at,\",\"match_line\":429,\"window\":[{\"line\":427,\"text\":\"close_at=record.logical_d1.close_at,\"},{\"line\":428,\"text\":\"known_at=record.finalized.finalized_at,\"},{\"line\":429,\"text\":\"received_at=record.finalized.finalized_at,\"},{\"line\":430,\"text\":\"open=record.revision.open,\"},{\"line\":431,\"text\":\"high=record.revision.high,\"}]}],\"path\":\"/opt/stacks/8020-demonov-shadow/.deploy/SIGNALBOT-260906-DEPLOY-022/demonov_forward_map/live_d1_finality.py\",\"sha256\":\"89873a9f2d026416c6c19533fa7d1ea404a8854c19fedb986395f4aabc0fe662\"},{\"bytes\":17506,\"matches\":[{\"match\":\"\\\"received_at\\\": bar.received_at.isoformat(),\",\"match_line\":98,\"window\":[{\"line\":96,\"text\":\"\\\"close_at\\\": bar.close_at.isoformat(),\"},{\"line\":97,\"text\":\"\\\"known_at\\\": bar.known_at.isoformat(),\"},{\"line\":98,\"text\":\"\\\"received_at\\\": bar.received_at.isoformat(),\"},{\"line\":99,\"text\":\"\\\"open\\\": str(bar.open), \\\"high\\\": str(bar.high), \\\"low\\\": str(bar.low),\"},{\"line\":100,\"text\":\"\\\"close\\\": str(bar.close), \\\"volume\\\": str(bar.volume),\"}]},{\"match\":\"self.db = sqlite3.connect(str(self.path), timeout=10, isolation_level=None)\",\"match_line\":151,\"window\":[{\"line\":149,\"text\":\"def __init__(self, path: str | Path, provenance: ExperimentProvenance):\"},{\"line\":150,\"text\":\"self.path = Path(path)\"},{\"line\":151,\"text\":\"self.db = sqlite3.connect(str(self.path), timeout=10, isolation_level=None)\"},{\"line\":152,\"text\":\"self.db.row_factory = sqlite3.Row\"},{\"line\":153,\"text\":\"self.db.execute(\\\"PRAGMA journal_mode=WAL\\\")\"}]},{\"match\":\"known_at=datetime.fromisoformat(x[\\\"known_at\\\"]), received_at=datetime.fromisoformat(x[\\\"received_at\\\"]),\",\"match_line\":217,\"window\":[{\"line\":215,\"text\":\"bar_id=x[\\\"bar_id\\\"], market_key=x[\\\"market_key\\\"],\"},{\"line\":216,\"text\":\"open_at=datetime.fromisoformat(x[\\\"open_at\\\"]), close_at=datetime.fromisoformat(x[\\\"close_at\\\"]),\"},{\"line\":217,\"text\":\"known_at=datetime.fromisoformat(x[\\\"known_at\\\"]), received_at=datetime.fromisoformat(x[\\\"received_at\\\"]),\"},{\"line\":218,\"text\":\"open=Decimal(x[\\\"open\\\"]), high=Decimal(x[\\\"high\\\"]), low=Decimal(x[\\\"low\\\"]),\"},{\"line\":219,\"text\":\"close=Decimal(x[\\\"close\\\"]), volume=Decimal(x[\\\"volume\\\"]),\"}]}],\"path\":\"/opt/stacks/8020-demonov-shadow/src/demonov_forward_map/live_prospective.py\",\"sha256\":\"2ba6be15613146223118af3d46b68b331ad0a53a154a692e4e17e13bbd793e1b\"},{\"bytes\":17506,\"matches\":[{\"match\":\"\\\"received_at\\\": bar.received_at.isoformat(),\",\"match_line\":98,\"window\":[{\"line\":96,\"text\":\"\\\"close_at\\\": bar.close_at.isoformat(),\"},{\"line\":97,\"text\":\"\\\"known_at\\\": bar.known_at.isoformat(),\"},{\"line\":98,\"text\":\"\\\"received_at\\\": bar.received_at.isoformat(),\"},{\"line\":99,\"text\":\"\\\"open\\\": str(bar.open), \\\"high\\\": str(bar.high), \\\"low\\\": str(bar.low),\"},{\"line\":100,\"text\":\"\\\"close\\\": str(bar.close), \\\"volume\\\": str(bar.volume),\"}]},{\"match\":\"self.db = sqlite3.connect(str(self.path), timeout=10, isolation_level=None)\",\"match_line\":151,\"window\":[{\"line\":149,\"text\":\"def __init__(self, path: str | Path, provenance: ExperimentProvenance):\"},{\"line\":150,\"text\":\"self.path = Path(path)\"},{\"line\":151,\"text\":\"self.db = sqlite3.connect(str(self.path), timeout=10, isolation_level=None)\"},{\"line\":152,\"text\":\"self.db.row_factory = sqlite3.Row\"},{\"line\":153,\"text\":\"self.db.execute(\\\"PRAGMA journal_mode=WAL\\\")\"}]},{\"match\":\"known_at=datetime.fromisoformat(x[\\\"known_at\\\"]), received_at=datetime.fromisoformat(x[\\\"received_at\\\"]),\",\"match_line\":217,\"window\":[{\"line\":215,\"text\":\"bar_id=x[\\\"bar_id\\\"], market_key=x[\\\"market_key\\\"],\"},{\"line\":216,\"text\":\"open_at=datetime.fromisoformat(x[\\\"open_at\\\"]), close_at=datetime.fromisoformat(x[\\\"close_at\\\"]),\"},{\"line\":217,\"text\":\"known_at=datetime.fromisoformat(x[\\\"known_at\\\"]), received_at=datetime.fromisoformat(x[\\\"received_at\\\"]),\"},{\"line\":218,\"text\":\"open=Decimal(x[\\\"open\\\"]), high=Decimal(x[\\\"high\\\"]), low=Decimal(x[\\\"low\\\"]),\"},{\"line\":219,\"text\":\"close=Decimal(x[\\\"close\\\"]), volume=Decimal(x[\\\"volume\\\"]),\"}]}],\"path\":\"/opt/stacks/8020-demonov-shadow/.weekly/SIGNALBOT-260906-WEEKLY-LEGACY-030/src/demonov_forward_map/live_prospective.py\",\"sha256\":\"2ba6be15613146223118af3d46b68b331ad0a53a154a692e4e17e13bbd793e1b\"},{\"bytes\":37380,\"matches\":[{\"match\":\"\\\"received_at\\\": bar.received_at.isoformat(),\",\"match_line\":184,\"window\":[{\"line\":182,\"text\":\"\\\"close_at\\\": bar.close_at.isoformat(),\"},{\"line\":183,\"text\":\"\\\"known_at\\\": bar.known_at.isoformat(),\"},{\"line\":184,\"text\":\"\\\"received_at\\\": bar.received_at.isoformat(),\"},{\"line\":185,\"text\":\"\\\"open\\\": str(bar.open), \\\"high\\\": str(bar.high), \\\"low\\\": str(bar.low),\"},{\"line\":186,\"text\":\"\\\"close\\\": str(bar.close), \\\"volume\\\": str(bar.volume),\"}]},{\"match\":\"self.db = sqlite3.connect(str(self.path), timeout=10, isolation_level=None)\",\"match_line\":237,\"window\":[{\"line\":235,\"text\":\"def __init__(self, path: str | Path, provenance: ExperimentProvenance):\"},{\"line\":236,\"text\":\"self.path = Path(path)\"},{\"line\":237,\"text\":\"self.db = sqlite3.connect(str(self.path), timeout=10, isolation_level=None)\"},{\"line\":238,\"text\":\"self.db.row_factory = sqlite3.Row\"},{\"line\":239,\"text\":\"self.db.execute(\\\"PRAGMA journal_mode=WAL\\\")\"}]},{\"match\":\"known_at=datetime.fromisoformat(x[\\\"known_at\\\"]), received_at=datetime.fromisoformat(x[\\\"received_at\\\"]),\",\"match_line\":324,\"window\":[{\"line\":322,\"text\":\"bar_id=x[\\\"bar_id\\\"], market_key=x[\\\"market_key\\\"],\"},{\"line\":323,\"text\":\"open_at=datetime.fromisoformat(x[\\\"open_at\\\"]), close_at=datetime.fromisoformat(x[\\\"close_at\\\"]),\"},{\"line\":324,\"text\":\"known_at=datetime.fromisoformat(x[\\\"known_at\\\"]), received_at=datetime.fromisoformat(x[\\\"received_at\\\"]),\"},{\"line\":325,\"text\":\"open=Decimal(x[\\\"open\\\"]), high=Decimal(x[\\\"high\\\"]), low=Decimal(x[\\\"low\\\"]),\"},{\"line\":326,\"text\":\"close=Decimal(x[\\\"close\\\"]), volume=Decimal(x[\\\"volume\\\"]),\"}]}],\"path\":\"/opt/stacks/8020-demonov-shadow/.deploy/SIGNALBOT-260906-DEPLOY-022/demonov_forward_map/live_prospective.py\",\"sha256\":\"f83f48dfeb4dc1382ebf3c77b7ec27deaeac6eec4a5dc097f90600963f0e4e98\"},{\"bytes\":12681,\"matches\":[{\"match\":\"FAIL_CLOSED = \\\"FAIL_CLOSED\\\"\",\"match_line\":16,\"window\":[{\"line\":14,\"text\":\"AWAITING_PRIMARY_FINALITY = \\\"AWAITING_PRIMARY_FINALITY\\\"\"},{\"line\":15,\"text\":\"DEGRADED = \\\"DEGRADED\\\"\"},{\"line\":16,\"text\":\"FAIL_CLOSED = \\\"FAIL_CLOSED\\\"\"},{\"line\":17,\"text\":\"\"},{\"line\":18,\"text\":\"\"}]},{\"match\":\"return sqlite3.connect(uri, uri=True, timeout=5)\",\"match_line\":62,\"window\":[{\"line\":60,\"text\":\"def _open_ro(path: Path):\"},{\"line\":61,\"text\":\"uri = path.resolve().as_uri() + \\\"?mode=ro\\\"\"},{\"line\":62,\"text\":\"return sqlite3.connect(uri, uri=True, timeout=5)\"},{\"line\":63,\"text\":\"\"},{\"line\":64,\"text\":\"\"}]},{\"match\":\"\\\"collector_heartbeat_slo_seconds\\\": _slo(\",\"match_line\":195,\"window\":[{\"line\":193,\"text\":\"\"},{\"line\":194,\"text\":\"slo = {\"},{\"line\":195,\"text\":\"\\\"collector_heartbeat_slo_seconds\\\": _slo(\"},{\"line\":196,\"text\":\"\\\"COLLECTOR_HEARTBEAT_SLO_SECONDS\\\"\"},{\"line\":197,\"text\":\"),\"}]},{\"match\":\"\\\"COLLECTOR_HEARTBEAT_SLO_SECONDS\\\"\",\"match_line\":196,\"window\":[{\"line\":194,\"text\":\"slo = {\"},{\"line\":195,\"text\":\"\\\"collector_heartbeat_slo_seconds\\\": _slo(\"},{\"line\":196,\"text\":\"\\\"COLLECTOR_HEARTBEAT_SLO_SECONDS\\\"\"},{\"line\":197,\"text\":\"),\"},{\"line\":198,\"text\":\"\\\"worker_heartbeat_slo_seconds\\\": _slo(\"}]},{\"match\":\"\\\"worker_heartbeat_slo_seconds\\\": _slo(\",\"match_line\":198,\"window\":[{\"line\":196,\"text\":\"\\\"COLLECTOR_HEARTBEAT_SLO_SECONDS\\\"\"},{\"line\":197,\"text\":\"),\"},{\"line\":198,\"text\":\"\\\"worker_heartbeat_slo_seconds\\\": _slo(\"},{\"line\":199,\"text\":\"\\\"WORKER_HEARTBEAT_SLO_SECONDS\\\"\"},{\"line\":200,\"text\":\"),\"}]},{\"match\":\"\\\"WORKER_HEARTBEAT_SLO_SECONDS\\\"\",\"match_line\":199,\"window\":[{\"line\":197,\"text\":\"),\"},{\"line\":198,\"text\":\"\\\"worker_heartbeat_slo_seconds\\\": _slo(\"},{\"line\":199,\"text\":\"\\\"WORKER_HEARTBEAT_SLO_SECONDS\\\"\"},{\"line\":200,\"text\":\"),\"},{\"line\":201,\"text\":\"\\\"relay_heartbeat_slo_seconds\\\": _slo(\"}]},{\"match\":\"\\\"relay_heartbeat_slo_seconds\\\": _slo(\",\"match_line\":201,\"window\":[{\"line\":199,\"text\":\"\\\"WORKER_HEARTBEAT_SLO_SECONDS\\\"\"},{\"line\":200,\"text\":\"),\"},{\"line\":201,\"text\":\"\\\"relay_heartbeat_slo_seconds\\\": _slo(\"},{\"line\":202,\"text\":\"\\\"RELAY_HEARTBEAT_SLO_SECONDS\\\"\"},{\"line\":203,\"text\":\"),\"}]},{\"match\":\"\\\"RELAY_HEARTBEAT_SLO_SECONDS\\\"\",\"match_line\":202,\"window\":[{\"line\":200,\"text\":\"),\"},{\"line\":201,\"text\":\"\\\"relay_heartbeat_slo_seconds\\\": _slo(\"},{\"line\":202,\"text\":\"\\\"RELAY_HEARTBEAT_SLO_SECONDS\\\"\"},{\"line\":203,\"text\":\"),\"},{\"line\":204,\"text\":\"\\\"primary_finality_slo_seconds\\\": _slo(\"}]},{\"match\":\"worker_age = _age_seconds(current, worker.get(\\\"heartbeat_at\\\"))\",\"match_line\":213,\"window\":[{\"line\":211,\"text\":\"\"},{\"line\":212,\"text\":\"collector_age = _age_seconds(current, collector.get(\\\"updated_at\\\"))\"},{\"line\":213,\"text\":\"worker_age = _age_seconds(current, worker.get(\\\"heartbeat_at\\\"))\"},{\"line\":214,\"text\":\"relay_age = _age_seconds(current, relay.get(\\\"heartbeat_at\\\"))\"},{\"line\":215,\"text\":\"\"}]},{\"match\":\"relay_age = _age_seconds(current, relay.get(\\\"heartbeat_at\\\"))\",\"match_line\":214,\"window\":[{\"line\":212,\"text\":\"collector_age = _age_seconds(current, collector.get(\\\"updated_at\\\"))\"},{\"line\":213,\"text\":\"worker_age = _age_seconds(current, worker.get(\\\"heartbeat_at\\\"))\"},{\"line\":214,\"text\":\"relay_age = _age_seconds(current, relay.get(\\\"heartbeat_at\\\"))\"},{\"line\":215,\"text\":\"\"},{\"line\":216,\"text\":\"source_db = data / \\\"bitfinex_source.db\\\"\"}]},{\"match\":\"prospective_gap = collector.get(\\\"prospective_gap_detected\\\", collector.get(\\\"gap_detected\\\")) is True\",\"match_line\":245,\"window\":[{\"line\":243,\"text\":\"scientific_fail = True\"},{\"line\":244,\"text\":\"\"},{\"line\":245,\"text\":\"prospective_gap = collector.get(\\\"prospective_gap_detected\\\", collector.get(\\\"gap_detected\\\")) is True\"},{\"line\":246,\"text\":\"prospective_reconnect = collector.get(\\\"prospective_reconnect_detected\\\", collector.get(\\\"reconnect_detected\\\")) is True\"},{\"line\":247,\"text\":\"if prospective_gap:\"}]},{\"match\":\"prospective_reconnect = collector.get(\\\"prospective_reconnect_detected\\\", collector.get(\\\"reconnect_detected\\\")) is True\",\"match_line\":246,\"window\":[{\"line\":244,\"text\":\"\"},{\"line\":245,\"text\":\"prospective_gap = collector.get(\\\"prospective_gap_detected\\\", collector.get(\\\"gap_detected\\\")) is True\"},{\"line\":246,\"text\":\"prospective_reconnect = collector.get(\\\"prospective_reconnect_detected\\\", collector.get(\\\"reconnect_detected\\\")) is True\"},{\"line\":247,\"text\":\"if prospective_gap:\"},{\"line\":248,\"text\":\"_append_reason(reasons, \\\"SOURCE_SEQUENCE_GAP\\\")\"}]},{\"match\":\"if prospective_reconnect:\",\"match_line\":250,\"window\":[{\"line\":248,\"text\":\"_append_reason(reasons, \\\"SOURCE_SEQUENCE_GAP\\\")\"},{\"line\":249,\"text\":\"scientific_fail = True\"},{\"line\":250,\"text\":\"if prospective_reconnect:\"},{\"line\":251,\"text\":\"_append_reason(reasons, \\\"SOURCE_RECONNECT\\\")\"},{\"line\":252,\"text\":\"scientific_fail = True\"}]},{\"match\":\"_append_reason(reasons, \\\"SOURCE_RECONNECT\\\")\",\"match_line\":251,\"window\":[{\"line\":249,\"text\":\"scientific_fail = True\"},{\"line\":250,\"text\":\"if prospective_reconnect:\"},{\"line\":251,\"text\":\"_append_reason(reasons, \\\"SOURCE_RECONNECT\\\")\"},{\"line\":252,\"text\":\"scientific_fail = True\"},{\"line\":253,\"text\":\"if collector.get(\\\"post_finality_revision\\\") is True:\"}]},{\"match\":\"if collector.get(\\\"post_finality_revision\\\") is True:\",\"match_line\":253,\"window\":[{\"line\":251,\"text\":\"_append_reason(reasons, \\\"SOURCE_RECONNECT\\\")\"},{\"line\":252,\"text\":\"scientific_fail = True\"},{\"line\":253,\"text\":\"if collector.get(\\\"post_finality_revision\\\") is True:\"},{\"line\":254,\"text\":\"_append_reason(reasons, \\\"POST_FINALITY_SOURCE_REVISION\\\")\"},{\"line\":255,\"text\":\"scientific_fail = True\"}]},{\"match\":\"_append_reason(reasons, \\\"POST_FINALITY_SOURCE_REVISION\\\")\",\"match_line\":254,\"window\":[{\"line\":252,\"text\":\"scientific_fail = True\"},{\"line\":253,\"text\":\"if collector.get(\\\"post_finality_revision\\\") is True:\"},{\"line\":254,\"text\":\"_append_reason(reasons, \\\"POST_FINALITY_SOURCE_REVISION\\\")\"},{\"line\":255,\"text\":\"scientific_fail = True\"},{\"line\":256,\"text\":\"\"}]},{\"match\":\"collector_slo = slo[\\\"collector_heartbeat_slo_seconds\\\"]\",\"match_line\":257,\"window\":[{\"line\":255,\"text\":\"scientific_fail = True\"},{\"line\":256,\"text\":\"\"},{\"line\":257,\"text\":\"collector_slo = slo[\\\"collector_heartbeat_slo_seconds\\\"]\"},{\"line\":258,\"text\":\"if (\"},{\"line\":259,\"text\":\"collector_slo is not None\"}]},{\"match\":\"_append_reason(reasons, \\\"STALE_COLLECTOR_HEARTBEAT\\\")\",\"match_line\":265,\"window\":[{\"line\":263,\"text\":\")\"},{\"line\":264,\"text\":\"):\"},{\"line\":265,\"text\":\"_append_reason(reasons, \\\"STALE_COLLECTOR_HEARTBEAT\\\")\"},{\"line\":266,\"text\":\"scientific_fail = True\"},{\"line\":267,\"text\":\"\"}]},{\"match\":\"worker_slo = slo[\\\"worker_heartbeat_slo_seconds\\\"]\",\"match_line\":268,\"window\":[{\"line\":266,\"text\":\"scientific_fail = True\"},{\"line\":267,\"text\":\"\"},{\"line\":268,\"text\":\"worker_slo = slo[\\\"worker_heartbeat_slo_seconds\\\"]\"},{\"line\":269,\"text\":\"if (\"},{\"line\":270,\"text\":\"worker_slo is not None\"}]},{\"match\":\"_append_reason(reasons, \\\"STALE_WORKER_HEARTBEAT\\\")\",\"match_line\":273,\"window\":[{\"line\":271,\"text\":\"and (worker_age is None or worker_age > worker_slo)\"},{\"line\":272,\"text\":\"):\"},{\"line\":273,\"text\":\"_append_reason(reasons, \\\"STALE_WORKER_HEARTBEAT\\\")\"},{\"line\":274,\"text\":\"scientific_fail = True\"},{\"line\":275,\"text\":\"\"}]},{\"match\":\"relay_slo = slo[\\\"relay_heartbeat_slo_seconds\\\"]\",\"match_line\":276,\"window\":[{\"line\":274,\"text\":\"scientific_fail = True\"},{\"line\":275,\"text\":\"\"},{\"line\":276,\"text\":\"relay_slo = slo[\\\"relay_heartbeat_slo_seconds\\\"]\"},{\"line\":277,\"text\":\"if (\"},{\"line\":278,\"text\":\"relay_slo is not None\"}]},{\"match\":\"_append_reason(reasons, \\\"STALE_RELAY_HEARTBEAT\\\")\",\"match_line\":281,\"window\":[{\"line\":279,\"text\":\"and (relay_age is None or relay_age > relay_slo)\"},{\"line\":280,\"text\":\"):\"},{\"line\":281,\"text\":\"_append_reason(reasons, \\\"STALE_RELAY_HEARTBEAT\\\")\"},{\"line\":282,\"text\":\"degraded = True\"},{\"line\":283,\"text\":\"\"}]},{\"match\":\"elif worker and worker.get(\\\"status\\\") == \\\"FAIL_CLOSED\\\":\",\"match_line\":286,\"window\":[{\"line\":284,\"text\":\"if worker.get(\\\"status\\\") == \\\"AWAITING_PRIMARY_FINALITY\\\":\"},{\"line\":285,\"text\":\"_append_reason(reasons, \\\"AWAITING_PRIMARY_FINALITY\\\")\"},{\"line\":286,\"text\":\"elif worker and worker.get(\\\"status\\\") == \\\"FAIL_CLOSED\\\":\"},{\"line\":287,\"text\":\"_append_reason(reasons, \\\"WORKER_FAIL_CLOSED\\\")\"},{\"line\":288,\"text\":\"scientific_fail = True\"}]},{\"match\":\"_append_reason(reasons, \\\"WORKER_FAIL_CLOSED\\\")\",\"match_line\":287,\"window\":[{\"line\":285,\"text\":\"_append_reason(reasons, \\\"AWAITING_PRIMARY_FINALITY\\\")\"},{\"line\":286,\"text\":\"elif worker and worker.get(\\\"status\\\") == \\\"FAIL_CLOSED\\\":\"},{\"line\":287,\"text\":\"_append_reason(reasons, \\\"WORKER_FAIL_CLOSED\\\")\"},{\"line\":288,\"text\":\"scientific_fail = True\"},{\"line\":289,\"text\":\"\"}]},{\"match\":\"elif relay and relay.get(\\\"status\\\") == \\\"FAIL_CLOSED\\\":\",\"match_line\":312,\"window\":[{\"line\":310,\"text\":\"_append_reason(reasons, \\\"INDETERMINATE_DELIVERY\\\")\"},{\"line\":311,\"text\":\"degraded = True\"},{\"line\":312,\"text\":\"elif relay and relay.get(\\\"status\\\") == \\\"FAIL_CLOSED\\\":\"},{\"line\":313,\"text\":\"_append_reason(reasons, \\\"RELAY_FAIL_CLOSED\\\")\"},{\"line\":314,\"text\":\"degraded = True\"}]},{\"match\":\"_append_reason(reasons, \\\"RELAY_FAIL_CLOSED\\\")\",\"match_line\":313,\"window\":[{\"line\":311,\"text\":\"degraded = True\"},{\"line\":312,\"text\":\"elif relay and relay.get(\\\"status\\\") == \\\"FAIL_CLOSED\\\":\"},{\"line\":313,\"text\":\"_append_reason(reasons, \\\"RELAY_FAIL_CLOSED\\\")\"},{\"line\":314,\"text\":\"degraded = True\"},{\"line\":315,\"text\":\"\"}]},{\"match\":\"state = LiveHealthState.FAIL_CLOSED\",\"match_line\":339,\"window\":[{\"line\":337,\"text\":\"\"},{\"line\":338,\"text\":\"if scientific_fail:\"},{\"line\":339,\"text\":\"state = LiveHealthState.FAIL_CLOSED\"},{\"line\":340,\"text\":\"elif degraded:\"},{\"line\":341,\"text\":\"state = LiveHealthState.DEGRADED\"}]},{\"match\":\"state != LiveHealthState.FAIL_CLOSED\",\"match_line\":351,\"window\":[{\"line\":349,\"text\":\"\\\"reason_codes\\\": reasons,\"},{\"line\":350,\"text\":\"\\\"prospective_research_collection_allowed\\\": (\"},{\"line\":351,\"text\":\"state != LiveHealthState.FAIL_CLOSED\"},{\"line\":352,\"text\":\"),\"},{\"line\":353,\"text\":\"\\\"production_launch_allowed\\\": False,\"}]},{\"match\":\"\\\"collector_heartbeat_fresh\\\": (\",\"match_line\":359,\"window\":[{\"line\":357,\"text\":\"\\\"runtime_manifest_id\\\": runtime_manifest_id,\"},{\"line\":358,\"text\":\"\\\"experiment_id\\\": worker.get(\\\"experiment_id\\\"),\"},{\"line\":359,\"text\":\"\\\"collector_heartbeat_fresh\\\": (\"},{\"line\":360,\"text\":\"collector_age is not None\"},{\"line\":361,\"text\":\"and slo[\\\"collector_heartbeat_slo_seconds\\\"] is not None\"}]},{\"match\":\"and slo[\\\"collector_heartbeat_slo_seconds\\\"] is not None\",\"match_line\":361,\"window\":[{\"line\":359,\"text\":\"\\\"collector_heartbeat_fresh\\\": (\"},{\"line\":360,\"text\":\"collector_age is not None\"},{\"line\":361,\"text\":\"and slo[\\\"collector_heartbeat_slo_seconds\\\"] is not None\"},{\"line\":362,\"text\":\"and collector_age <= slo[\\\"collector_heartbeat_slo_seconds\\\"]\"},{\"line\":363,\"text\":\"),\"}]},{\"match\":\"and collector_age <= slo[\\\"collector_heartbeat_slo_seconds\\\"]\",\"match_line\":362,\"window\":[{\"line\":360,\"text\":\"collector_age is not None\"},{\"line\":361,\"text\":\"and slo[\\\"collector_heartbeat_slo_seconds\\\"] is not None\"},{\"line\":362,\"text\":\"and collector_age <= slo[\\\"collector_heartbeat_slo_seconds\\\"]\"},{\"line\":363,\"text\":\"),\"},{\"line\":364,\"text\":\"\\\"worker_heartbeat_fresh\\\": (\"}]},{\"match\":\"\\\"worker_heartbeat_fresh\\\": (\",\"match_line\":364,\"window\":[{\"line\":362,\"text\":\"and collector_age <= slo[\\\"collector_heartbeat_slo_seconds\\\"]\"},{\"line\":363,\"text\":\"),\"},{\"line\":364,\"text\":\"\\\"worker_heartbeat_fresh\\\": (\"},{\"line\":365,\"text\":\"worker_age is not None\"},{\"line\":366,\"text\":\"and slo[\\\"worker_heartbeat_slo_seconds\\\"] is not None\"}]},{\"match\":\"and slo[\\\"worker_heartbeat_slo_seconds\\\"] is not None\",\"match_line\":366,\"window\":[{\"line\":364,\"text\":\"\\\"worker_heartbeat_fresh\\\": (\"},{\"line\":365,\"text\":\"worker_age is not None\"},{\"line\":366,\"text\":\"and slo[\\\"worker_heartbeat_slo_seconds\\\"] is not None\"},{\"line\":367,\"text\":\"and worker_age <= slo[\\\"worker_heartbeat_slo_seconds\\\"]\"},{\"line\":368,\"text\":\"),\"}]},{\"match\":\"and worker_age <= slo[\\\"worker_heartbeat_slo_seconds\\\"]\",\"match_line\":367,\"window\":[{\"line\":365,\"text\":\"worker_age is not None\"},{\"line\":366,\"text\":\"and slo[\\\"worker_heartbeat_slo_seconds\\\"] is not None\"},{\"line\":367,\"text\":\"and worker_age <= slo[\\\"worker_heartbeat_slo_seconds\\\"]\"},{\"line\":368,\"text\":\"),\"},{\"line\":369,\"text\":\"\\\"relay_heartbeat_fresh\\\": (\"}]},{\"match\":\"\\\"relay_heartbeat_fresh\\\": (\",\"match_line\":369,\"window\":[{\"line\":367,\"text\":\"and worker_age <= slo[\\\"worker_heartbeat_slo_seconds\\\"]\"},{\"line\":368,\"text\":\"),\"},{\"line\":369,\"text\":\"\\\"relay_heartbeat_fresh\\\": (\"},{\"line\":370,\"text\":\"relay_age is not None\"},{\"line\":371,\"text\":\"and slo[\\\"relay_heartbeat_slo_seconds\\\"] is not None\"}]},{\"match\":\"and slo[\\\"relay_heartbeat_slo_seconds\\\"] is not None\",\"match_line\":371,\"window\":[{\"line\":369,\"text\":\"\\\"relay_heartbeat_fresh\\\": (\"},{\"line\":370,\"text\":\"relay_age is not None\"},{\"line\":371,\"text\":\"and slo[\\\"relay_heartbeat_slo_seconds\\\"] is not None\"},{\"line\":372,\"text\":\"and relay_age <= slo[\\\"relay_heartbeat_slo_seconds\\\"]\"},{\"line\":373,\"text\":\"),\"}]},{\"match\":\"and relay_age <= slo[\\\"relay_heartbeat_slo_seconds\\\"]\",\"match_line\":372,\"window\":[{\"line\":370,\"text\":\"relay_age is not None\"},{\"line\":371,\"text\":\"and slo[\\\"relay_heartbeat_slo_seconds\\\"] is not None\"},{\"line\":372,\"text\":\"and relay_age <= slo[\\\"relay_heartbeat_slo_seconds\\\"]\"},{\"line\":373,\"text\":\"),\"},{\"line\":374,\"text\":\"\\\"collector_heartbeat_age_seconds\\\": collector_age,\"}]},{\"match\":\"\\\"collector_heartbeat_age_seconds\\\": collector_age,\",\"match_line\":374,\"window\":[{\"line\":372,\"text\":\"and relay_age <= slo[\\\"relay_heartbeat_slo_seconds\\\"]\"},{\"line\":373,\"text\":\"),\"},{\"line\":374,\"text\":\"\\\"collector_heartbeat_age_seconds\\\": collector_age,\"},{\"line\":375,\"text\":\"\\\"worker_heartbeat_age_seconds\\\": worker_age,\"},{\"line\":376,\"text\":\"\\\"relay_heartbeat_age_seconds\\\": relay_age,\"}]},{\"match\":\"\\\"worker_heartbeat_age_seconds\\\": worker_age,\",\"match_line\":375,\"window\":[{\"line\":373,\"text\":\"),\"},{\"line\":374,\"text\":\"\\\"collector_heartbeat_age_seconds\\\": collector_age,\"},{\"line\":375,\"text\":\"\\\"worker_heartbeat_age_seconds\\\": worker_age,\"},{\"line\":376,\"text\":\"\\\"relay_heartbeat_age_seconds\\\": relay_age,\"},{\"line\":377,\"text\":\"\\\"last_finalized_primary_d1_close\\\": last_finalized,\"}]},{\"match\":\"\\\"relay_heartbeat_age_seconds\\\": relay_age,\",\"match_line\":376,\"window\":[{\"line\":374,\"text\":\"\\\"collector_heartbeat_age_seconds\\\": collector_age,\"},{\"line\":375,\"text\":\"\\\"worker_heartbeat_age_seconds\\\": worker_age,\"},{\"line\":376,\"text\":\"\\\"relay_heartbeat_age_seconds\\\": relay_age,\"},{\"line\":377,\"text\":\"\\\"last_finalized_primary_d1_close\\\": last_finalized,\"},{\"line\":378,\"text\":\"\\\"last_finalized_primary_d1_age_seconds\\\": last_finalized_age,\"}]},{\"match\":\"\\\"source_gap_detected\\\": collector.get(\\\"gap_detected\\\") is True,\",\"match_line\":380,\"window\":[{\"line\":378,\"text\":\"\\\"last_finalized_primary_d1_age_seconds\\\": last_finalized_age,\"},{\"line\":379,\"text\":\"\\\"current_logical_d1_finality_state\\\": current_finality_state,\"},{\"line\":380,\"text\":\"\\\"source_gap_detected\\\": collector.get(\\\"gap_detected\\\") is True,\"},{\"line\":381,\"text\":\"\\\"source_reconnect_detected\\\": (\"},{\"line\":382,\"text\":\"collector.get(\\\"reconnect_detected\\\") is True\"}]},{\"match\":\"\\\"source_reconnect_detected\\\": (\",\"match_line\":381,\"window\":[{\"line\":379,\"text\":\"\\\"current_logical_d1_finality_state\\\": current_finality_state,\"},{\"line\":380,\"text\":\"\\\"source_gap_detected\\\": collector.get(\\\"gap_detected\\\") is True,\"},{\"line\":381,\"text\":\"\\\"source_reconnect_detected\\\": (\"},{\"line\":382,\"text\":\"collector.get(\\\"reconnect_detected\\\") is True\"},{\"line\":383,\"text\":\"),\"}]},{\"match\":\"collector.get(\\\"reconnect_detected\\\") is True\",\"match_line\":382,\"window\":[{\"line\":380,\"text\":\"\\\"source_gap_detected\\\": collector.get(\\\"gap_detected\\\") is True,\"},{\"line\":381,\"text\":\"\\\"source_reconnect_detected\\\": (\"},{\"line\":382,\"text\":\"collector.get(\\\"reconnect_detected\\\") is True\"},{\"line\":383,\"text\":\"),\"},{\"line\":384,\"text\":\"\\\"source_post_finality_revision\\\": (\"}]},{\"match\":\"\\\"source_post_finality_revision\\\": (\",\"match_line\":384,\"window\":[{\"line\":382,\"text\":\"collector.get(\\\"reconnect_detected\\\") is True\"},{\"line\":383,\"text\":\"),\"},{\"line\":384,\"text\":\"\\\"source_post_finality_revision\\\": (\"},{\"line\":385,\"text\":\"collector.get(\\\"post_finality_revision\\\") is True\"},{\"line\":386,\"text\":\"),\"}]},{\"match\":\"collector.get(\\\"post_finality_revision\\\") is True\",\"match_line\":385,\"window\":[{\"line\":383,\"text\":\"),\"},{\"line\":384,\"text\":\"\\\"source_post_finality_revision\\\": (\"},{\"line\":385,\"text\":\"collector.get(\\\"post_finality_revision\\\") is True\"},{\"line\":386,\"text\":\"),\"},{\"line\":387,\"text\":\"\\\"source_fail_closed_reason\\\": collector.get(\"}]},{\"match\":\"\\\"source_fail_closed_reason\\\": collector.get(\",\"match_line\":387,\"window\":[{\"line\":385,\"text\":\"collector.get(\\\"post_finality_revision\\\") is True\"},{\"line\":386,\"text\":\"),\"},{\"line\":387,\"text\":\"\\\"source_fail_closed_reason\\\": collector.get(\"},{\"line\":388,\"text\":\"\\\"fail_closed_reason\\\",\"},{\"line\":389,\"text\":\"\\\"\\\",\"}]},{\"match\":\"\\\"fail_closed_reason\\\",\",\"match_line\":388,\"window\":[{\"line\":386,\"text\":\"),\"},{\"line\":387,\"text\":\"\\\"source_fail_closed_reason\\\": collector.get(\"},{\"line\":388,\"text\":\"\\\"fail_closed_reason\\\",\"},{\"line\":389,\"text\":\"\\\"\\\",\"},{\"line\":390,\"text\":\"),\"}]}],\"path\":\"/opt/stacks/8020-demonov-shadow/.deploy/SIGNALBOT-260906-DEPLOY-022/demonov_forward_map/live_health.py\",\"sha256\":\"cf3e5b9c8303d25524a03bf30534f1277a63068e8b01a32537dbb6be0a3420e2\"}]\nSB036_DECISION=COLLECTOR_STATE_SOURCE_EVIDENCE_READY\nSB036_MUTATION_SCOPE=NONE_READ_ONLY\nSIGNALBOT036_DECISION=COLLECTOR_STATE_SOURCE_EVIDENCE_READY\nSIGNALBOT036_MUTATION_SCOPE=NO_RUNTIME_NO_GIT_NO_EXCHANGE_MUTATION\n" +} diff --git a/runtime/history/SIGNALBOT-260908-COLLECTOR-STATE-RCA-036.txt b/runtime/history/SIGNALBOT-260908-COLLECTOR-STATE-RCA-036.txt new file mode 100644 index 00000000..1dbf1adf --- /dev/null +++ b/runtime/history/SIGNALBOT-260908-COLLECTOR-STATE-RCA-036.txt @@ -0,0 +1,46 @@ +CHAT_OUTPUT_BEGIN +COMMAND_ID=SIGNALBOT-260908-COLLECTOR-STATE-RCA-036 +STATUS=OK +RC=0 +HOST=pve01 +MODE=read-only +COMPONENT=signalbot-cr0116-collector-state-rca +REFERENCE_REGISTER_CHECK=OK +REFERENCE_SHA256=5a3d8e5154c41cb582a4e0aca68090be1f0138918bf82131a948df326f9d8d66 +ERROR_REGISTER_CHECK=OK +ERROR_REGISTER_SHA256=3b09a553ec0f527ed3afeed4753f52a74ee3036045bbfb3c685e9f8af4ba7ba0 +COMMAND_SHA256=4f64bf454248fc9933a450c0d2b2dab2bc2ab3e6e845ad1fc3b59375681f3cb1 +DUPLICATE_FAILED_COMMAND_BLOCKED=false +EXECUTION_STARTED=true +CHANGE_DECLARED=false +RESULT_CONTRACT_VALID=true +RESULT_CONTRACT_STATUS=NOT_APPLICABLE +RESULT_CONTRACT_ERROR=NONE +COMMAND_RC=0 +CHANGES_MADE=false +ROLLBACK_STARTED=false +ROLLBACK_RESTORED=null +MUTATION_OUTCOME=NO_MUTATION +SANITIZED=yes +SECRETS_INCLUDED=no +PRIVATE_ADDRESSES_INCLUDED=no +RAW_EVIDENCE_SHA256=a54caab9741da51e043d39e424b15094dc452e3f24f196cf589272a8c0668097 +SANITIZED_OUTPUT_SHA256=a54caab9741da51e043d39e424b15094dc452e3f24f196cf589272a8c0668097 +OUTPUT_BEGIN +ERROR_REGISTER_CHECK=OK +REFERENCE_CHECK=OK +AUTHORITY_CHECK_SCOPE=READABILITY_ONLY_INCIDENTS_NOT_CLOSED +SB036_COLLECTOR={"cmd":["python","-m","demonov_forward_map.bitfinex_trade_collector"],"entrypoint":null,"id":"a546a70c3e8c","image":"8020-demonov-shadow:e32760c69a4311728db9066ee8bf2bf66b1e5a70","name":"demonov-shadow-8020-collector-1","ok":true,"pid":210213,"restart_count":13,"running":true,"started_at":"2026-09-08T05:01:08.70385245Z","status":"running"} +SB036_COLLECTOR_STATUS={"age_sec":0.4,"exists":true,"values":{"fail_closed_reason":"source reconnect detected","gap_detected":false,"post_finality_revision":false,"prospective_fail_closed_reason":"","prospective_gap_detected":false,"prospective_reconnect_detected":false,"reconnect_detected":true}} +SB036_DB={"d1_revisions_count":0,"event_kinds":[["SEQUENCE",180107],["RECONNECT",10],["SESSION_START",1]],"exists":true,"finalized_d1_count":0,"latest_events":[{"event_kind":"SEQUENCE","event_seq":180118,"received_at":"2026-09-08T05:28:14.303996+00:00","session_hash":"253ffe9a26a5","source_sequence":2888},{"event_kind":"SEQUENCE","event_seq":180117,"received_at":"2026-09-08T05:28:14.290899+00:00","session_hash":"253ffe9a26a5","source_sequence":2887},{"event_kind":"SEQUENCE","event_seq":180116,"received_at":"2026-09-08T05:28:14.127754+00:00","session_hash":"253ffe9a26a5","source_sequence":2886},{"event_kind":"SEQUENCE","event_seq":180115,"received_at":"2026-09-08T05:28:13.967892+00:00","session_hash":"253ffe9a26a5","source_sequence":2885},{"event_kind":"SEQUENCE","event_seq":180114,"received_at":"2026-09-08T05:28:13.801186+00:00","session_hash":"253ffe9a26a5","source_sequence":2884},{"event_kind":"SEQUENCE","event_seq":180113,"received_at":"2026-09-08T05:28:13.628877+00:00","session_hash":"253ffe9a26a5","source_sequence":2883},{"event_kind":"SEQUENCE","event_seq":180112,"received_at":"2026-09-08T05:28:13.621853+00:00","session_hash":"253ffe9a26a5","source_sequence":2882},{"event_kind":"SEQUENCE","event_seq":180111,"received_at":"2026-09-08T05:28:13.614839+00:00","session_hash":"253ffe9a26a5","source_sequence":2881},{"event_kind":"SEQUENCE","event_seq":180110,"received_at":"2026-09-08T05:28:13.607920+00:00","session_hash":"253ffe9a26a5","source_sequence":2880},{"event_kind":"SEQUENCE","event_seq":180109,"received_at":"2026-09-08T05:28:13.594856+00:00","session_hash":"253ffe9a26a5","source_sequence":2879},{"event_kind":"SEQUENCE","event_seq":180108,"received_at":"2026-09-08T05:28:13.425038+00:00","session_hash":"253ffe9a26a5","source_sequence":2878},{"event_kind":"SEQUENCE","event_seq":180107,"received_at":"2026-09-08T05:28:13.271502+00:00","session_hash":"253ffe9a26a5","source_sequence":2877},{"event_kind":"SEQUENCE","event_seq":180106,"received_at":"2026-09-08T05:28:13.112568+00:00","session_hash":"253ffe9a26a5","source_sequence":2876},{"event_kind":"SEQUENCE","event_seq":180105,"received_at":"2026-09-08T05:28:13.101767+00:00","session_hash":"253ffe9a26a5","source_sequence":2875},{"event_kind":"SEQUENCE","event_seq":180104,"received_at":"2026-09-08T05:28:13.094931+00:00","session_hash":"253ffe9a26a5","source_sequence":2874},{"event_kind":"SEQUENCE","event_seq":180103,"received_at":"2026-09-08T05:28:13.086320+00:00","session_hash":"253ffe9a26a5","source_sequence":2873},{"event_kind":"SEQUENCE","event_seq":180102,"received_at":"2026-09-08T05:28:13.055479+00:00","session_hash":"253ffe9a26a5","source_sequence":2872},{"event_kind":"SEQUENCE","event_seq":180101,"received_at":"2026-09-08T05:28:10.388362+00:00","session_hash":"253ffe9a26a5","source_sequence":2871},{"event_kind":"SEQUENCE","event_seq":180100,"received_at":"2026-09-08T05:28:10.352706+00:00","session_hash":"253ffe9a26a5","source_sequence":2870},{"event_kind":"SEQUENCE","event_seq":180099,"received_at":"2026-09-08T05:28:07.280059+00:00","session_hash":"253ffe9a26a5","source_sequence":2869}],"latest_sessions":[{"events":2888,"first_at":"2026-09-08T05:01:09.298101+00:00","last_at":"2026-09-08T05:28:14.303996+00:00","max_seq":2888,"min_seq":1,"session_hash":"253ffe9a26a5"},{"events":2475,"first_at":"2026-09-08T04:54:28.087186+00:00","last_at":"2026-09-08T05:01:08.350487+00:00","max_seq":2475,"min_seq":1,"session_hash":"2b3998047f77"},{"events":988,"first_at":"2026-09-08T04:43:46.442548+00:00","last_at":"2026-09-08T04:54:27.005150+00:00","max_seq":988,"min_seq":1,"session_hash":"b501ae120c1f"},{"events":589,"first_at":"2026-09-08T04:42:44.434580+00:00","last_at":"2026-09-08T04:43:45.521859+00:00","max_seq":589,"min_seq":1,"session_hash":"10709eb54a7b"},{"events":3620,"first_at":"2026-09-08T03:52:02.239825+00:00","last_at":"2026-09-08T04:42:43.449781+00:00","max_seq":3620,"min_seq":1,"session_hash":"210de3583c8e"},{"events":72124,"first_at":"2026-09-07T15:04:59.188298+00:00","last_at":"2026-09-08T03:52:00.952767+00:00","max_seq":72124,"min_seq":1,"session_hash":"69bb22240441"},{"events":1688,"first_at":"2026-09-07T14:46:51.906734+00:00","last_at":"2026-09-07T15:04:47.491753+00:00","max_seq":1688,"min_seq":1,"session_hash":"d1d81c259d86"},{"events":10295,"first_at":"2026-09-07T13:30:08.973280+00:00","last_at":"2026-09-07T14:46:39.866418+00:00","max_seq":10295,"min_seq":1,"session_hash":"a2db9de2102e"},{"events":14430,"first_at":"2026-09-07T09:50:41.075840+00:00","last_at":"2026-09-07T13:30:03.165612+00:00","max_seq":14430,"min_seq":1,"session_hash":"8da25a454977"},{"events":71006,"first_at":"2026-09-06T18:48:31.906387+00:00","last_at":"2026-09-07T09:50:13.818640+00:00","max_seq":71006,"min_seq":1,"session_hash":"184e0e63b1c9"},{"events":15,"first_at":"2026-09-06T18:33:12.938622+00:00","last_at":"2026-09-06T18:33:38.425961+00:00","max_seq":15,"min_seq":1,"session_hash":"90adb5ba598b"}],"quick_check":"ok","sequence_events":{"count":180118,"max_event_seq":180118,"max_received_at":"2026-09-08T05:28:14.303996+00:00","max_source_sequence":72124}} +SB036_PROC={"established_total":1,"fd_count":7,"pid":210213,"remote_port_counts":{"443":1},"tcp_states":{"01":1,"0A":1},"wchan":"futex_wait_queue"} +SB036_ENDPOINT={"body":"[1]","rc":0,"stderr":""} +SB036_LOGS={"keyword_counts":{"CLOSED":5,"CONNECTED":0,"DISCONNECT":0,"ERROR":5,"EXCEPTION":5,"FAIL_CLOSED":0,"FINAL":0,"GAP":0,"HEARTBEAT":0,"RECEIVED":5,"RECONNECT":0,"SOURCE_FINALITY":0,"TIMEOUT":5,"TRACEBACK":5,"WEBSOCKET":15},"last_lines":["raise SystemExit(main())","~~~~^^","File \"/app/demonov_forward_map/bitfinex_trade_collector.py\", line 1175, in main","for raw in ws:","^^","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 242, in __iter__","yield self.recv()","~~~~~~~~~^^","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 336, in recv","raise self.protocol.close_exc from self.recv_exc","websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received",":130: RuntimeWarning: 'demonov_forward_map.bitfinex_trade_collector' found in sys.modules after import of package 'demonov_forward_map', but prior to execution of 'demonov_forward_map.bitfinex_trade_collector'; this may result in unpredictable behaviour","Traceback (most recent call last):","File \"\", line 203, in _run_module_as_main","File \"\", line 88, in _run_code","File \"/app/demonov_forward_map/bitfinex_trade_collector.py\", line 1246, in ","raise SystemExit(main())","~~~~^^","File \"/app/demonov_forward_map/bitfinex_trade_collector.py\", line 1175, in main","for raw in ws:","^^","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 242, in __iter__","yield self.recv()","~~~~~~~~~^^","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 336, in recv","raise self.protocol.close_exc from self.recv_exc","websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received",":130: RuntimeWarning: 'demonov_forward_map.bitfinex_trade_collector' found in sys.modules after import of package 'demonov_forward_map', but prior to execution of 'demonov_forward_map.bitfinex_trade_collector'; this may result in unpredictable behaviour","Traceback (most recent call last):","File \"\", line 203, in _run_module_as_main","File \"\", line 88, in _run_code","File \"/app/demonov_forward_map/bitfinex_trade_collector.py\", line 1246, in ","raise SystemExit(main())","~~~~^^","File \"/app/demonov_forward_map/bitfinex_trade_collector.py\", line 1175, in main","for raw in ws:","^^","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 242, in __iter__","yield self.recv()","~~~~~~~~~^^","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 336, in recv","raise self.protocol.close_exc from self.recv_exc","websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received",":130: RuntimeWarning: 'demonov_forward_map.bitfinex_trade_collector' found in sys.modules after import of package 'demonov_forward_map', but prior to execution of 'demonov_forward_map.bitfinex_trade_collector'; this may result in unpredictable behaviour","Traceback (most recent call last):","File \"\", line 203, in _run_module_as_main","File \"\", line 88, in _run_code","File \"/app/demonov_forward_map/bitfinex_trade_collector.py\", line 1246, in ","raise SystemExit(main())","~~~~^^","File \"/app/demonov_forward_map/bitfinex_trade_collector.py\", line 1175, in main","for raw in ws:","^^","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 242, in __iter__","yield self.recv()","~~~~~~~~~^^","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 336, in recv","raise self.protocol.close_exc from self.recv_exc","websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received",":130: RuntimeWarning: 'demonov_forward_map.bitfinex_trade_collector' found in sys.modules after import of package 'demonov_forward_map', but prior to execution of 'demonov_forward_map.bitfinex_trade_collector'; this may result in unpredictable behaviour"],"last_relevant":["Traceback (most recent call last):","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 242, in __iter__","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 336, in recv","websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received","Traceback (most recent call last):","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 242, in __iter__","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 336, in recv","websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received","Traceback (most recent call last):","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 242, in __iter__","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 336, in recv","websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received","Traceback (most recent call last):","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 242, in __iter__","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 336, in recv","websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received","Traceback (most recent call last):","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 242, in __iter__","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 336, in recv","websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received"],"line_count":81,"rc":0} +SB036_SOURCE_WINDOWS=[{"bytes":42028,"matches":[{"match":"gap_detected: bool","match_line":62,"window":[{"line":60,"text":"@dataclass(frozen=True)"},{"line":61,"text":"class BitfinexCollectorStatus:"},{"line":62,"text":"gap_detected: bool"},{"line":63,"text":"reconnect_detected: bool"},{"line":64,"text":"post_finality_revision: bool"}]},{"match":"reconnect_detected: bool","match_line":63,"window":[{"line":61,"text":"class BitfinexCollectorStatus:"},{"line":62,"text":"gap_detected: bool"},{"line":63,"text":"reconnect_detected: bool"},{"line":64,"text":"post_finality_revision: bool"},{"line":65,"text":"fail_closed_reason: str"}]},{"match":"post_finality_revision: bool","match_line":64,"window":[{"line":62,"text":"gap_detected: bool"},{"line":63,"text":"reconnect_detected: bool"},{"line":64,"text":"post_finality_revision: bool"},{"line":65,"text":"fail_closed_reason: str"},{"line":66,"text":""}]},{"match":"fail_closed_reason: str","match_line":65,"window":[{"line":63,"text":"reconnect_detected: bool"},{"line":64,"text":"post_finality_revision: bool"},{"line":65,"text":"fail_closed_reason: str"},{"line":66,"text":""},{"line":67,"text":""}]},{"match":"self._db = sqlite3.connect(","match_line":124,"window":[{"line":122,"text":")"},{"line":123,"text":"self.path.parent.mkdir(parents=True, exist_ok=True)"},{"line":124,"text":"self._db = sqlite3.connect("},{"line":125,"text":"str(self.path),"},{"line":126,"text":"timeout=5,"}]},{"match":"timeout=5,","match_line":126,"window":[{"line":124,"text":"self._db = sqlite3.connect("},{"line":125,"text":"str(self.path),"},{"line":126,"text":"timeout=5,"},{"line":127,"text":"isolation_level=None,"},{"line":128,"text":")"}]},{"match":"received_at TEXT NOT NULL,","match_line":166,"window":[{"line":164,"text":"venue_id TEXT NOT NULL,"},{"line":165,"text":"source_kind TEXT NOT NULL,"},{"line":166,"text":"received_at TEXT NOT NULL,"},{"line":167,"text":"source_sequence INTEGER NOT NULL,"},{"line":168,"text":"raw_payload_hash TEXT NOT NULL,"}]},{"match":"received_at TEXT NOT NULL,","match_line":176,"window":[{"line":174,"text":"session_id TEXT NOT NULL,"},{"line":175,"text":"source_sequence INTEGER NOT NULL,"},{"line":176,"text":"received_at TEXT NOT NULL,"},{"line":177,"text":"event_kind TEXT NOT NULL"},{"line":178,"text":");"}]},{"match":"gap_detected=self._meta_get(\"gap_detected\") == \"1\",","match_line":246,"window":[{"line":244,"text":"def _status(self) -> BitfinexCollectorStatus:"},{"line":245,"text":"return BitfinexCollectorStatus("},{"line":246,"text":"gap_detected=self._meta_get(\"gap_detected\") == \"1\","},{"line":247,"text":"reconnect_detected=self._meta_get(\"reconnect_detected\") == \"1\","},{"line":248,"text":"post_finality_revision=("}]},{"match":"reconnect_detected=self._meta_get(\"reconnect_detected\") == \"1\",","match_line":247,"window":[{"line":245,"text":"return BitfinexCollectorStatus("},{"line":246,"text":"gap_detected=self._meta_get(\"gap_detected\") == \"1\","},{"line":247,"text":"reconnect_detected=self._meta_get(\"reconnect_detected\") == \"1\","},{"line":248,"text":"post_finality_revision=("},{"line":249,"text":"self._meta_get(\"post_finality_revision\") == \"1\""}]},{"match":"post_finality_revision=(","match_line":248,"window":[{"line":246,"text":"gap_detected=self._meta_get(\"gap_detected\") == \"1\","},{"line":247,"text":"reconnect_detected=self._meta_get(\"reconnect_detected\") == \"1\","},{"line":248,"text":"post_finality_revision=("},{"line":249,"text":"self._meta_get(\"post_finality_revision\") == \"1\""},{"line":250,"text":"),"}]},{"match":"self._meta_get(\"post_finality_revision\") == \"1\"","match_line":249,"window":[{"line":247,"text":"reconnect_detected=self._meta_get(\"reconnect_detected\") == \"1\","},{"line":248,"text":"post_finality_revision=("},{"line":249,"text":"self._meta_get(\"post_finality_revision\") == \"1\""},{"line":250,"text":"),"},{"line":251,"text":"fail_closed_reason=self._meta_get(\"fail_closed_reason\") or \"\","}]},{"match":"fail_closed_reason=self._meta_get(\"fail_closed_reason\") or \"\",","match_line":251,"window":[{"line":249,"text":"self._meta_get(\"post_finality_revision\") == \"1\""},{"line":250,"text":"),"},{"line":251,"text":"fail_closed_reason=self._meta_get(\"fail_closed_reason\") or \"\","},{"line":252,"text":")"},{"line":253,"text":""}]},{"match":"prospective = self.current_prospective_source_state()","match_line":256,"window":[{"line":254,"text":"def _persist_status_file(self) -> None:"},{"line":255,"text":"status = self._status()"},{"line":256,"text":"prospective = self.current_prospective_source_state()"},{"line":257,"text":"payload = {"},{"line":258,"text":"\"gap_detected\": status.gap_detected,"}]},{"match":"\"gap_detected\": status.gap_detected,","match_line":258,"window":[{"line":256,"text":"prospective = self.current_prospective_source_state()"},{"line":257,"text":"payload = {"},{"line":258,"text":"\"gap_detected\": status.gap_detected,"},{"line":259,"text":"\"reconnect_detected\": status.reconnect_detected,"},{"line":260,"text":"\"post_finality_revision\": status.post_finality_revision,"}]},{"match":"\"reconnect_detected\": status.reconnect_detected,","match_line":259,"window":[{"line":257,"text":"payload = {"},{"line":258,"text":"\"gap_detected\": status.gap_detected,"},{"line":259,"text":"\"reconnect_detected\": status.reconnect_detected,"},{"line":260,"text":"\"post_finality_revision\": status.post_finality_revision,"},{"line":261,"text":"\"fail_closed_reason\": status.fail_closed_reason,"}]},{"match":"\"post_finality_revision\": status.post_finality_revision,","match_line":260,"window":[{"line":258,"text":"\"gap_detected\": status.gap_detected,"},{"line":259,"text":"\"reconnect_detected\": status.reconnect_detected,"},{"line":260,"text":"\"post_finality_revision\": status.post_finality_revision,"},{"line":261,"text":"\"fail_closed_reason\": status.fail_closed_reason,"},{"line":262,"text":"\"prospective_gap_detected\": prospective.gap_detected,"}]},{"match":"\"fail_closed_reason\": status.fail_closed_reason,","match_line":261,"window":[{"line":259,"text":"\"reconnect_detected\": status.reconnect_detected,"},{"line":260,"text":"\"post_finality_revision\": status.post_finality_revision,"},{"line":261,"text":"\"fail_closed_reason\": status.fail_closed_reason,"},{"line":262,"text":"\"prospective_gap_detected\": prospective.gap_detected,"},{"line":263,"text":"\"prospective_reconnect_detected\": prospective.reconnect_detected,"}]},{"match":"\"prospective_gap_detected\": prospective.gap_detected,","match_line":262,"window":[{"line":260,"text":"\"post_finality_revision\": status.post_finality_revision,"},{"line":261,"text":"\"fail_closed_reason\": status.fail_closed_reason,"},{"line":262,"text":"\"prospective_gap_detected\": prospective.gap_detected,"},{"line":263,"text":"\"prospective_reconnect_detected\": prospective.reconnect_detected,"},{"line":264,"text":"\"prospective_fail_closed_reason\": prospective.fail_closed_reason,"}]},{"match":"\"prospective_reconnect_detected\": prospective.reconnect_detected,","match_line":263,"window":[{"line":261,"text":"\"fail_closed_reason\": status.fail_closed_reason,"},{"line":262,"text":"\"prospective_gap_detected\": prospective.gap_detected,"},{"line":263,"text":"\"prospective_reconnect_detected\": prospective.reconnect_detected,"},{"line":264,"text":"\"prospective_fail_closed_reason\": prospective.fail_closed_reason,"},{"line":265,"text":"\"updated_at\": datetime.now(timezone.utc).isoformat(),"}]},{"match":"\"prospective_fail_closed_reason\": prospective.fail_closed_reason,","match_line":264,"window":[{"line":262,"text":"\"prospective_gap_detected\": prospective.gap_detected,"},{"line":263,"text":"\"prospective_reconnect_detected\": prospective.reconnect_detected,"},{"line":264,"text":"\"prospective_fail_closed_reason\": prospective.fail_closed_reason,"},{"line":265,"text":"\"updated_at\": datetime.now(timezone.utc).isoformat(),"},{"line":266,"text":"}"}]},{"match":"def _set_fail_closed(self, key: str, reason: str) -> None:","match_line":280,"window":[{"line":278,"text":"os.replace(tmp, target)"},{"line":279,"text":""},{"line":280,"text":"def _set_fail_closed(self, key: str, reason: str) -> None:"},{"line":281,"text":"self._meta_set(key, \"1\")"},{"line":282,"text":"if not self._meta_get(\"fail_closed_reason\"):"}]},{"match":"if not self._meta_get(\"fail_closed_reason\"):","match_line":282,"window":[{"line":280,"text":"def _set_fail_closed(self, key: str, reason: str) -> None:"},{"line":281,"text":"self._meta_set(key, \"1\")"},{"line":282,"text":"if not self._meta_get(\"fail_closed_reason\"):"},{"line":283,"text":"self._meta_set(\"fail_closed_reason\", reason)"},{"line":284,"text":"self._persist_status_file()"}]},{"match":"self._meta_set(\"fail_closed_reason\", reason)","match_line":283,"window":[{"line":281,"text":"self._meta_set(key, \"1\")"},{"line":282,"text":"if not self._meta_get(\"fail_closed_reason\"):"},{"line":283,"text":"self._meta_set(\"fail_closed_reason\", reason)"},{"line":284,"text":"self._persist_status_file()"},{"line":285,"text":""}]},{"match":"receipt_id, venue_id, source_kind, received_at,","match_line":292,"window":[{"line":290,"text":"\"\"\""},{"line":291,"text":"INSERT OR IGNORE INTO source_receipts("},{"line":292,"text":"receipt_id, venue_id, source_kind, received_at,"},{"line":293,"text":"source_sequence, raw_payload_hash, collector_session_id,"},{"line":294,"text":"receipt_json"}]},{"match":"receipt.received_at.isoformat(),","match_line":301,"window":[{"line":299,"text":"receipt.venue_id,"},{"line":300,"text":"receipt.source_kind,"},{"line":301,"text":"receipt.received_at.isoformat(),"},{"line":302,"text":"receipt.source_sequence,"},{"line":303,"text":"receipt.raw_payload_hash,"}]},{"match":"received_at: datetime,","match_line":315,"window":[{"line":313,"text":"session_id: str,"},{"line":314,"text":"sequence: int,"},{"line":315,"text":"received_at: datetime,"},{"line":316,"text":") -> None:"},{"line":317,"text":"if not isinstance(session_id, str) or not session_id:"}]},{"match":"received_at = _utc(received_at, \"received_at\")","match_line":327,"window":[{"line":325,"text":"\"source sequence must be a nonnegative integer\""},{"line":326,"text":")"},{"line":327,"text":"received_at = _utc(received_at, \"received_at\")"},{"line":328,"text":"active = self._meta_get(\"active_session_id\")"},{"line":329,"text":"if active is None:"}]},{"match":"session_id,source_sequence,received_at,event_kind","match_line":335,"window":[{"line":333,"text":"\"\"\""},{"line":334,"text":"INSERT INTO sequence_events("},{"line":335,"text":"session_id,source_sequence,received_at,event_kind"},{"line":336,"text":") VALUES(?,?,?,?)"},{"line":337,"text":"\"\"\","}]},{"match":"received_at.isoformat(),","match_line":341,"window":[{"line":339,"text":"session_id,"},{"line":340,"text":"sequence,"},{"line":341,"text":"received_at.isoformat(),"},{"line":342,"text":"\"SESSION_START\","},{"line":343,"text":"),"}]},{"match":"self._meta_set(\"reconnect_detected\", \"1\")","match_line":348,"window":[{"line":346,"text":"return"},{"line":347,"text":"if active != session_id:"},{"line":348,"text":"self._meta_set(\"reconnect_detected\", \"1\")"},{"line":349,"text":"if not self._meta_get(\"fail_closed_reason\"):"},{"line":350,"text":"self._meta_set("}]},{"match":"if not self._meta_get(\"fail_closed_reason\"):","match_line":349,"window":[{"line":347,"text":"if active != session_id:"},{"line":348,"text":"self._meta_set(\"reconnect_detected\", \"1\")"},{"line":349,"text":"if not self._meta_get(\"fail_closed_reason\"):"},{"line":350,"text":"self._meta_set("},{"line":351,"text":"\"fail_closed_reason\","}]},{"match":"\"fail_closed_reason\",","match_line":351,"window":[{"line":349,"text":"if not self._meta_get(\"fail_closed_reason\"):"},{"line":350,"text":"self._meta_set("},{"line":351,"text":"\"fail_closed_reason\","},{"line":352,"text":"\"source reconnect detected\","},{"line":353,"text":")"}]},{"match":"\"source reconnect detected\",","match_line":352,"window":[{"line":350,"text":"self._meta_set("},{"line":351,"text":"\"fail_closed_reason\","},{"line":352,"text":"\"source reconnect detected\","},{"line":353,"text":")"},{"line":354,"text":"self._meta_set(\"active_session_id\", session_id)"}]},{"match":"session_id,source_sequence,received_at,event_kind","match_line":359,"window":[{"line":357,"text":"\"\"\""},{"line":358,"text":"INSERT INTO sequence_events("},{"line":359,"text":"session_id,source_sequence,received_at,event_kind"},{"line":360,"text":") VALUES(?,?,?,?)"},{"line":361,"text":"\"\"\","}]},{"match":"received_at.isoformat(),","match_line":365,"window":[{"line":363,"text":"session_id,"},{"line":364,"text":"sequence,"},{"line":365,"text":"received_at.isoformat(),"},{"line":366,"text":"\"RECONNECT\","},{"line":367,"text":"),"}]},{"match":"\"RECONNECT\",","match_line":366,"window":[{"line":364,"text":"sequence,"},{"line":365,"text":"received_at.isoformat(),"},{"line":366,"text":"\"RECONNECT\","},{"line":367,"text":"),"},{"line":368,"text":")"}]},{"match":"session_id,source_sequence,received_at,event_kind","match_line":378,"window":[{"line":376,"text":"\"\"\""},{"line":377,"text":"INSERT INTO sequence_events("},{"line":378,"text":"session_id,source_sequence,received_at,event_kind"},{"line":379,"text":") VALUES(?,?,?,?)"},{"line":380,"text":"\"\"\","}]},{"match":"received_at.isoformat(),","match_line":384,"window":[{"line":382,"text":"session_id,"},{"line":383,"text":"sequence,"},{"line":384,"text":"received_at.isoformat(),"},{"line":385,"text":"\"GAP\","},{"line":386,"text":"),"}]},{"match":"self._set_fail_closed(","match_line":388,"window":[{"line":386,"text":"),"},{"line":387,"text":")"},{"line":388,"text":"self._set_fail_closed("},{"line":389,"text":"\"gap_detected\","},{"line":390,"text":"f\"sequence gap expected {expected} got {sequence}\","}]},{"match":"\"gap_detected\",","match_line":389,"window":[{"line":387,"text":")"},{"line":388,"text":"self._set_fail_closed("},{"line":389,"text":"\"gap_detected\","},{"line":390,"text":"f\"sequence gap expected {expected} got {sequence}\","},{"line":391,"text":")"}]},{"match":"session_id,source_sequence,received_at,event_kind","match_line":400,"window":[{"line":398,"text":"\"\"\""},{"line":399,"text":"INSERT INTO sequence_events("},{"line":400,"text":"session_id,source_sequence,received_at,event_kind"},{"line":401,"text":") VALUES(?,?,?,?)"},{"line":402,"text":"\"\"\","}]},{"match":"received_at.isoformat(),","match_line":406,"window":[{"line":404,"text":"session_id,"},{"line":405,"text":"sequence,"},{"line":406,"text":"received_at.isoformat(),"},{"line":407,"text":"\"SEQUENCE\","},{"line":408,"text":"),"}]},{"match":"def current_prospective_source_state(self) -> BitfinexCollectorStatus:","match_line":412,"window":[{"line":410,"text":"self._persist_status_file()"},{"line":411,"text":""},{"line":412,"text":"def current_prospective_source_state(self) -> BitfinexCollectorStatus:"},{"line":413,"text":"# GAP/RECONNECT are enforced per logical D1 by finalize_ready_d1()."},{"line":414,"text":"# Historical events must not poison later uncontaminated D1 bars."}]},{"match":"# GAP/RECONNECT are enforced per logical D1 by finalize_ready_d1().","match_line":413,"window":[{"line":411,"text":""},{"line":412,"text":"def current_prospective_source_state(self) -> BitfinexCollectorStatus:"},{"line":413,"text":"# GAP/RECONNECT are enforced per logical D1 by finalize_ready_d1()."},{"line":414,"text":"# Historical events must not poison later uncontaminated D1 bars."},{"line":415,"text":"post_finality_revision = ("}]},{"match":"post_finality_revision = (","match_line":415,"window":[{"line":413,"text":"# GAP/RECONNECT are enforced per logical D1 by finalize_ready_d1()."},{"line":414,"text":"# Historical events must not poison later uncontaminated D1 bars."},{"line":415,"text":"post_finality_revision = ("},{"line":416,"text":"self._meta_get(\"post_finality_revision\") == \"1\""},{"line":417,"text":")"}]},{"match":"self._meta_get(\"post_finality_revision\") == \"1\"","match_line":416,"window":[{"line":414,"text":"# Historical events must not poison later uncontaminated D1 bars."},{"line":415,"text":"post_finality_revision = ("},{"line":416,"text":"self._meta_get(\"post_finality_revision\") == \"1\""},{"line":417,"text":")"},{"line":418,"text":"reason = ("}]},{"match":"if post_finality_revision","match_line":420,"window":[{"line":418,"text":"reason = ("},{"line":419,"text":"\"post-finality source revision detected\""},{"line":420,"text":"if post_finality_revision"},{"line":421,"text":"else \"\""},{"line":422,"text":")"}]},{"match":"gap_detected=False,","match_line":424,"window":[{"line":422,"text":")"},{"line":423,"text":"return BitfinexCollectorStatus("},{"line":424,"text":"gap_detected=False,"},{"line":425,"text":"reconnect_detected=False,"},{"line":426,"text":"post_finality_revision=post_finality_revision,"}]},{"match":"reconnect_detected=False,","match_line":425,"window":[{"line":423,"text":"return BitfinexCollectorStatus("},{"line":424,"text":"gap_detected=False,"},{"line":425,"text":"reconnect_detected=False,"},{"line":426,"text":"post_finality_revision=post_finality_revision,"},{"line":427,"text":"fail_closed_reason=reason,"}]},{"match":"post_finality_revision=post_finality_revision,","match_line":426,"window":[{"line":424,"text":"gap_detected=False,"},{"line":425,"text":"reconnect_detected=False,"},{"line":426,"text":"post_finality_revision=post_finality_revision,"},{"line":427,"text":"fail_closed_reason=reason,"},{"line":428,"text":")"}]},{"match":"fail_closed_reason=reason,","match_line":427,"window":[{"line":425,"text":"reconnect_detected=False,"},{"line":426,"text":"post_finality_revision=post_finality_revision,"},{"line":427,"text":"fail_closed_reason=reason,"},{"line":428,"text":")"},{"line":429,"text":""}]},{"match":"\"SELECT received_at FROM source_receipts WHERE receipt_id=?\",","match_line":442,"window":[{"line":440,"text":"raise DemonovError(\"BitfinexCanonicalTradeV1 required\")"},{"line":441,"text":"receipt = self._db.execute("},{"line":442,"text":"\"SELECT received_at FROM source_receipts WHERE receipt_id=?\","},{"line":443,"text":"(receipt_id,),"},{"line":444,"text":").fetchone()"}]},{"match":"D1FinalityState.POST_FINALITY_SOURCE_REVISION,","match_line":529,"window":[{"line":527,"text":"validate_d1_finality_transition("},{"line":528,"text":"current,"},{"line":529,"text":"D1FinalityState.POST_FINALITY_SOURCE_REVISION,"},{"line":530,"text":")"},{"line":531,"text":"self._db.execute("}]},{"match":".POST_FINALITY_SOURCE_REVISION.value,","match_line":539,"window":[{"line":537,"text":"("},{"line":538,"text":"D1FinalityState"},{"line":539,"text":".POST_FINALITY_SOURCE_REVISION.value,"},{"line":540,"text":"logical_id,"},{"line":541,"text":"),"}]},{"match":"self._meta_set(\"post_finality_revision\", \"1\")","match_line":543,"window":[{"line":541,"text":"),"},{"line":542,"text":")"},{"line":543,"text":"self._meta_set(\"post_finality_revision\", \"1\")"},{"line":544,"text":"self._meta_set("},{"line":545,"text":"\"fail_closed_reason\","}]},{"match":"\"fail_closed_reason\",","match_line":545,"window":[{"line":543,"text":"self._meta_set(\"post_finality_revision\", \"1\")"},{"line":544,"text":"self._meta_set("},{"line":545,"text":"\"fail_closed_reason\","},{"line":546,"text":"\"post-finality source revision detected\","},{"line":547,"text":")"}]},{"match":"result = \"POST_FINALITY_REVISION\"","match_line":548,"window":[{"line":546,"text":"\"post-finality source revision detected\","},{"line":547,"text":")"},{"line":548,"text":"result = \"POST_FINALITY_REVISION\""},{"line":549,"text":"self._db.execute(\"COMMIT\")"},{"line":550,"text":"except Exception:"}]},{"match":"if result == \"POST_FINALITY_REVISION\":","match_line":553,"window":[{"line":551,"text":"self._db.execute(\"ROLLBACK\")"},{"line":552,"text":"raise"},{"line":553,"text":"if result == \"POST_FINALITY_REVISION\":"},{"line":554,"text":"self._persist_status_file()"},{"line":555,"text":"return result"}]},{"match":"def finalize_ready_d1(","match_line":605,"window":[{"line":603,"text":")"},{"line":604,"text":""},{"line":605,"text":"def finalize_ready_d1("},{"line":606,"text":"self,"},{"line":607,"text":"logical_d1: LogicalD1V1,"}]},{"match":"SELECT MIN(received_at) AS first_received","match_line":626,"window":[{"line":624,"text":"first_sequence = self._db.execute("},{"line":625,"text":"\"\"\""},{"line":626,"text":"SELECT MIN(received_at) AS first_received"},{"line":627,"text":"FROM sequence_events"},{"line":628,"text":"\"\"\""}]},{"match":").fetchone()[\"first_received\"]","match_line":629,"window":[{"line":627,"text":"FROM sequence_events"},{"line":628,"text":"\"\"\""},{"line":629,"text":").fetchone()[\"first_received\"]"},{"line":630,"text":"if ("},{"line":631,"text":"first_sequence is None"}]},{"match":"boundary_received_at = _dt(boundary[\"received_at\"])","match_line":641,"window":[{"line":639,"text":"if boundary is None:"},{"line":640,"text":"return None"},{"line":641,"text":"boundary_received_at = _dt(boundary[\"received_at\"])"},{"line":642,"text":"if finalized_at < boundary_received_at:"},{"line":643,"text":"raise DemonovError("}]},{"match":"if finalized_at < boundary_received_at:","match_line":642,"window":[{"line":640,"text":"return None"},{"line":641,"text":"boundary_received_at = _dt(boundary[\"received_at\"])"},{"line":642,"text":"if finalized_at < boundary_received_at:"},{"line":643,"text":"raise DemonovError("},{"line":644,"text":"\"finalized_at precedes source boundary proof\""}]},{"match":"AND received_at>=?","match_line":652,"window":[{"line":650,"text":"FROM sequence_events"},{"line":651,"text":"WHERE event_kind='GAP'"},{"line":652,"text":"AND received_at>=?"},{"line":653,"text":"AND received_at<=?"},{"line":654,"text":"LIMIT 1"}]},{"match":"AND received_at<=?","match_line":653,"window":[{"line":651,"text":"WHERE event_kind='GAP'"},{"line":652,"text":"AND received_at>=?"},{"line":653,"text":"AND received_at<=?"},{"line":654,"text":"LIMIT 1"},{"line":655,"text":"\"\"\","}]},{"match":"boundary_received_at.isoformat(),","match_line":658,"window":[{"line":656,"text":"("},{"line":657,"text":"logical_d1.open_at.isoformat(),"},{"line":658,"text":"boundary_received_at.isoformat(),"},{"line":659,"text":"),"},{"line":660,"text":").fetchone()"}]},{"match":"reconnect = self._db.execute(","match_line":666,"window":[{"line":664,"text":")"},{"line":665,"text":""},{"line":666,"text":"reconnect = self._db.execute("},{"line":667,"text":"\"\"\""},{"line":668,"text":"SELECT 1"}]},{"match":"WHERE event_kind='RECONNECT'","match_line":670,"window":[{"line":668,"text":"SELECT 1"},{"line":669,"text":"FROM sequence_events"},{"line":670,"text":"WHERE event_kind='RECONNECT'"},{"line":671,"text":"AND received_at>=?"},{"line":672,"text":"AND received_at<=?"}]},{"match":"AND received_at>=?","match_line":671,"window":[{"line":669,"text":"FROM sequence_events"},{"line":670,"text":"WHERE event_kind='RECONNECT'"},{"line":671,"text":"AND received_at>=?"},{"line":672,"text":"AND received_at<=?"},{"line":673,"text":"LIMIT 1"}]},{"match":"AND received_at<=?","match_line":672,"window":[{"line":670,"text":"WHERE event_kind='RECONNECT'"},{"line":671,"text":"AND received_at>=?"},{"line":672,"text":"AND received_at<=?"},{"line":673,"text":"LIMIT 1"},{"line":674,"text":"\"\"\","}]},{"match":"boundary_received_at.isoformat(),","match_line":677,"window":[{"line":675,"text":"("},{"line":676,"text":"logical_d1.open_at.isoformat(),"},{"line":677,"text":"boundary_received_at.isoformat(),"},{"line":678,"text":"),"},{"line":679,"text":").fetchone()"}]},{"match":"if reconnect is not None:","match_line":680,"window":[{"line":678,"text":"),"},{"line":679,"text":").fetchone()"},{"line":680,"text":"if reconnect is not None:"},{"line":681,"text":"raise DemonovError("},{"line":682,"text":"\"reconnect prevents D1 finalization\""}]},{"match":"\"reconnect prevents D1 finalization\"","match_line":682,"window":[{"line":680,"text":"if reconnect is not None:"},{"line":681,"text":"raise DemonovError("},{"line":682,"text":"\"reconnect prevents D1 finalization\""},{"line":683,"text":")"},{"line":684,"text":""}]},{"match":"sr.received_at,","match_line":901,"window":[{"line":899,"text":"SELECT"},{"line":900,"text":"tr.mts,"},{"line":901,"text":"sr.received_at,"},{"line":902,"text":"sr.collector_session_id,"},{"line":903,"text":"sr.source_sequence"}]},{"match":"\"received_at\": receipt.received_at.isoformat(),","match_line":962,"window":[{"line":960,"text":"\"venue_id\": receipt.venue_id,"},{"line":961,"text":"\"source_kind\": receipt.source_kind,"},{"line":962,"text":"\"received_at\": receipt.received_at.isoformat(),"},{"line":963,"text":"\"source_sequence\": receipt.source_sequence,"},{"line":964,"text":"\"raw_payload_hash\": receipt.raw_payload_hash,"}]},{"match":"def finalize_ready_d1_without_stopping_collection(","match_line":1102,"window":[{"line":1100,"text":""},{"line":1101,"text":""},{"line":1102,"text":"def finalize_ready_d1_without_stopping_collection("},{"line":1103,"text":"journal: SQLiteBitfinexSourceJournal,"},{"line":1104,"text":"logical_d1: LogicalD1V1,"}]},{"match":"return journal.finalize_ready_d1(","match_line":1110,"window":[{"line":1108,"text":"\"\"\"Keep collection alive when one logical D1 is non-finalizable.\"\"\""},{"line":1109,"text":"try:"},{"line":1110,"text":"return journal.finalize_ready_d1("},{"line":1111,"text":"logical_d1,"},{"line":1112,"text":"finalized_at=finalized_at,"}]},{"match":"\"reconnect prevents D1 finalization\",","match_line":1116,"window":[{"line":1114,"text":"except DemonovError as exc:"},{"line":1115,"text":"if str(exc) in {"},{"line":1116,"text":"\"reconnect prevents D1 finalization\","},{"line":1117,"text":"\"sequence gap prevents D1 finalization\","},{"line":1118,"text":"}:"}]},{"match":"return \"WS_HEARTBEAT\"","match_line":1129,"window":[{"line":1127,"text":"and message[1] == \"hb\""},{"line":1128,"text":"):"},{"line":1129,"text":"return \"WS_HEARTBEAT\""},{"line":1130,"text":"return \"WS_TRADES\""},{"line":1131,"text":""}]}],"path":"/opt/stacks/8020-demonov-shadow/.deploy/SIGNALBOT-260906-DEPLOY-022/demonov_forward_map/bitfinex_trade_collector.py","sha256":"d21cf0c3a0d4fcaf9210a57da04fd560dba4952ac1dd5a085abcc4e76ccf2eb0"},{"bytes":15930,"matches":[{"match":"POST_FINALITY_SOURCE_REVISION = \"POST_FINALITY_SOURCE_REVISION\"","match_line":69,"window":[{"line":67,"text":"RECONCILING = \"RECONCILING\""},{"line":68,"text":"FINALIZED = \"FINALIZED\""},{"line":69,"text":"POST_FINALITY_SOURCE_REVISION = \"POST_FINALITY_SOURCE_REVISION\""},{"line":70,"text":""},{"line":71,"text":""}]},{"match":"received_at: datetime","match_line":77,"window":[{"line":75,"text":"venue_id: str"},{"line":76,"text":"source_kind: str"},{"line":77,"text":"received_at: datetime"},{"line":78,"text":"source_sequence: int"},{"line":79,"text":"raw_payload_hash: str"}]},{"match":"_utc(self.received_at, \"received_at\")","match_line":86,"window":[{"line":84,"text":"_required_text(self.source_kind, \"source_kind\")"},{"line":85,"text":"_required_text(self.collector_session_id, \"collector_session_id\")"},{"line":86,"text":"_utc(self.received_at, \"received_at\")"},{"line":87,"text":"if not isinstance(self.source_sequence, int) or isinstance(self.source_sequence, bool) or self.source_sequence < 0:"},{"line":88,"text":"raise DemonovError(\"source_sequence must be a nonnegative integer\")"}]},{"match":"\"received_at\": self.received_at,","match_line":99,"window":[{"line":97,"text":"\"venue_id\": self.venue_id,"},{"line":98,"text":"\"source_kind\": self.source_kind,"},{"line":99,"text":"\"received_at\": self.received_at,"},{"line":100,"text":"\"source_sequence\": self.source_sequence,"},{"line":101,"text":"\"raw_payload_hash\": self.raw_payload_hash,"}]},{"match":"\"received_at\": kwargs[\"received_at\"],","match_line":111,"window":[{"line":109,"text":"\"venue_id\": kwargs[\"venue_id\"],"},{"line":110,"text":"\"source_kind\": kwargs[\"source_kind\"],"},{"line":111,"text":"\"received_at\": kwargs[\"received_at\"],"},{"line":112,"text":"\"source_sequence\": kwargs[\"source_sequence\"],"},{"line":113,"text":"\"raw_payload_hash\": kwargs[\"raw_payload_hash\"],"}]},{"match":"(D1FinalityState.FINALIZED, D1FinalityState.POST_FINALITY_SOURCE_REVISION),","match_line":394,"window":[{"line":392,"text":"(D1FinalityState.BOUNDARY_CROSSED, D1FinalityState.RECONCILING),"},{"line":393,"text":"(D1FinalityState.RECONCILING, D1FinalityState.FINALIZED),"},{"line":394,"text":"(D1FinalityState.FINALIZED, D1FinalityState.POST_FINALITY_SOURCE_REVISION),"},{"line":395,"text":"}"},{"line":396,"text":""}]},{"match":"received_at=record.finalized.finalized_at,","match_line":429,"window":[{"line":427,"text":"close_at=record.logical_d1.close_at,"},{"line":428,"text":"known_at=record.finalized.finalized_at,"},{"line":429,"text":"received_at=record.finalized.finalized_at,"},{"line":430,"text":"open=record.revision.open,"},{"line":431,"text":"high=record.revision.high,"}]}],"path":"/opt/stacks/8020-demonov-shadow/.deploy/SIGNALBOT-260906-DEPLOY-022/demonov_forward_map/live_d1_finality.py","sha256":"89873a9f2d026416c6c19533fa7d1ea404a8854c19fedb986395f4aabc0fe662"},{"bytes":17506,"matches":[{"match":"\"received_at\": bar.received_at.isoformat(),","match_line":98,"window":[{"line":96,"text":"\"close_at\": bar.close_at.isoformat(),"},{"line":97,"text":"\"known_at\": bar.known_at.isoformat(),"},{"line":98,"text":"\"received_at\": bar.received_at.isoformat(),"},{"line":99,"text":"\"open\": str(bar.open), \"high\": str(bar.high), \"low\": str(bar.low),"},{"line":100,"text":"\"close\": str(bar.close), \"volume\": str(bar.volume),"}]},{"match":"self.db = sqlite3.connect(str(self.path), timeout=10, isolation_level=None)","match_line":151,"window":[{"line":149,"text":"def __init__(self, path: str | Path, provenance: ExperimentProvenance):"},{"line":150,"text":"self.path = Path(path)"},{"line":151,"text":"self.db = sqlite3.connect(str(self.path), timeout=10, isolation_level=None)"},{"line":152,"text":"self.db.row_factory = sqlite3.Row"},{"line":153,"text":"self.db.execute(\"PRAGMA journal_mode=WAL\")"}]},{"match":"known_at=datetime.fromisoformat(x[\"known_at\"]), received_at=datetime.fromisoformat(x[\"received_at\"]),","match_line":217,"window":[{"line":215,"text":"bar_id=x[\"bar_id\"], market_key=x[\"market_key\"],"},{"line":216,"text":"open_at=datetime.fromisoformat(x[\"open_at\"]), close_at=datetime.fromisoformat(x[\"close_at\"]),"},{"line":217,"text":"known_at=datetime.fromisoformat(x[\"known_at\"]), received_at=datetime.fromisoformat(x[\"received_at\"]),"},{"line":218,"text":"open=Decimal(x[\"open\"]), high=Decimal(x[\"high\"]), low=Decimal(x[\"low\"]),"},{"line":219,"text":"close=Decimal(x[\"close\"]), volume=Decimal(x[\"volume\"]),"}]}],"path":"/opt/stacks/8020-demonov-shadow/src/demonov_forward_map/live_prospective.py","sha256":"2ba6be15613146223118af3d46b68b331ad0a53a154a692e4e17e13bbd793e1b"},{"bytes":17506,"matches":[{"match":"\"received_at\": bar.received_at.isoformat(),","match_line":98,"window":[{"line":96,"text":"\"close_at\": bar.close_at.isoformat(),"},{"line":97,"text":"\"known_at\": bar.known_at.isoformat(),"},{"line":98,"text":"\"received_at\": bar.received_at.isoformat(),"},{"line":99,"text":"\"open\": str(bar.open), \"high\": str(bar.high), \"low\": str(bar.low),"},{"line":100,"text":"\"close\": str(bar.close), \"volume\": str(bar.volume),"}]},{"match":"self.db = sqlite3.connect(str(self.path), timeout=10, isolation_level=None)","match_line":151,"window":[{"line":149,"text":"def __init__(self, path: str | Path, provenance: ExperimentProvenance):"},{"line":150,"text":"self.path = Path(path)"},{"line":151,"text":"self.db = sqlite3.connect(str(self.path), timeout=10, isolation_level=None)"},{"line":152,"text":"self.db.row_factory = sqlite3.Row"},{"line":153,"text":"self.db.execute(\"PRAGMA journal_mode=WAL\")"}]},{"match":"known_at=datetime.fromisoformat(x[\"known_at\"]), received_at=datetime.fromisoformat(x[\"received_at\"]),","match_line":217,"window":[{"line":215,"text":"bar_id=x[\"bar_id\"], market_key=x[\"market_key\"],"},{"line":216,"text":"open_at=datetime.fromisoformat(x[\"open_at\"]), close_at=datetime.fromisoformat(x[\"close_at\"]),"},{"line":217,"text":"known_at=datetime.fromisoformat(x[\"known_at\"]), received_at=datetime.fromisoformat(x[\"received_at\"]),"},{"line":218,"text":"open=Decimal(x[\"open\"]), high=Decimal(x[\"high\"]), low=Decimal(x[\"low\"]),"},{"line":219,"text":"close=Decimal(x[\"close\"]), volume=Decimal(x[\"volume\"]),"}]}],"path":"/opt/stacks/8020-demonov-shadow/.weekly/SIGNALBOT-260906-WEEKLY-LEGACY-030/src/demonov_forward_map/live_prospective.py","sha256":"2ba6be15613146223118af3d46b68b331ad0a53a154a692e4e17e13bbd793e1b"},{"bytes":37380,"matches":[{"match":"\"received_at\": bar.received_at.isoformat(),","match_line":184,"window":[{"line":182,"text":"\"close_at\": bar.close_at.isoformat(),"},{"line":183,"text":"\"known_at\": bar.known_at.isoformat(),"},{"line":184,"text":"\"received_at\": bar.received_at.isoformat(),"},{"line":185,"text":"\"open\": str(bar.open), \"high\": str(bar.high), \"low\": str(bar.low),"},{"line":186,"text":"\"close\": str(bar.close), \"volume\": str(bar.volume),"}]},{"match":"self.db = sqlite3.connect(str(self.path), timeout=10, isolation_level=None)","match_line":237,"window":[{"line":235,"text":"def __init__(self, path: str | Path, provenance: ExperimentProvenance):"},{"line":236,"text":"self.path = Path(path)"},{"line":237,"text":"self.db = sqlite3.connect(str(self.path), timeout=10, isolation_level=None)"},{"line":238,"text":"self.db.row_factory = sqlite3.Row"},{"line":239,"text":"self.db.execute(\"PRAGMA journal_mode=WAL\")"}]},{"match":"known_at=datetime.fromisoformat(x[\"known_at\"]), received_at=datetime.fromisoformat(x[\"received_at\"]),","match_line":324,"window":[{"line":322,"text":"bar_id=x[\"bar_id\"], market_key=x[\"market_key\"],"},{"line":323,"text":"open_at=datetime.fromisoformat(x[\"open_at\"]), close_at=datetime.fromisoformat(x[\"close_at\"]),"},{"line":324,"text":"known_at=datetime.fromisoformat(x[\"known_at\"]), received_at=datetime.fromisoformat(x[\"received_at\"]),"},{"line":325,"text":"open=Decimal(x[\"open\"]), high=Decimal(x[\"high\"]), low=Decimal(x[\"low\"]),"},{"line":326,"text":"close=Decimal(x[\"close\"]), volume=Decimal(x[\"volume\"]),"}]}],"path":"/opt/stacks/8020-demonov-shadow/.deploy/SIGNALBOT-260906-DEPLOY-022/demonov_forward_map/live_prospective.py","sha256":"f83f48dfeb4dc1382ebf3c77b7ec27deaeac6eec4a5dc097f90600963f0e4e98"},{"bytes":12681,"matches":[{"match":"FAIL_CLOSED = \"FAIL_CLOSED\"","match_line":16,"window":[{"line":14,"text":"AWAITING_PRIMARY_FINALITY = \"AWAITING_PRIMARY_FINALITY\""},{"line":15,"text":"DEGRADED = \"DEGRADED\""},{"line":16,"text":"FAIL_CLOSED = \"FAIL_CLOSED\""},{"line":17,"text":""},{"line":18,"text":""}]},{"match":"return sqlite3.connect(uri, uri=True, timeout=5)","match_line":62,"window":[{"line":60,"text":"def _open_ro(path: Path):"},{"line":61,"text":"uri = path.resolve().as_uri() + \"?mode=ro\""},{"line":62,"text":"return sqlite3.connect(uri, uri=True, timeout=5)"},{"line":63,"text":""},{"line":64,"text":""}]},{"match":"\"collector_heartbeat_slo_seconds\": _slo(","match_line":195,"window":[{"line":193,"text":""},{"line":194,"text":"slo = {"},{"line":195,"text":"\"collector_heartbeat_slo_seconds\": _slo("},{"line":196,"text":"\"COLLECTOR_HEARTBEAT_SLO_SECONDS\""},{"line":197,"text":"),"}]},{"match":"\"COLLECTOR_HEARTBEAT_SLO_SECONDS\"","match_line":196,"window":[{"line":194,"text":"slo = {"},{"line":195,"text":"\"collector_heartbeat_slo_seconds\": _slo("},{"line":196,"text":"\"COLLECTOR_HEARTBEAT_SLO_SECONDS\""},{"line":197,"text":"),"},{"line":198,"text":"\"worker_heartbeat_slo_seconds\": _slo("}]},{"match":"\"worker_heartbeat_slo_seconds\": _slo(","match_line":198,"window":[{"line":196,"text":"\"COLLECTOR_HEARTBEAT_SLO_SECONDS\""},{"line":197,"text":"),"},{"line":198,"text":"\"worker_heartbeat_slo_seconds\": _slo("},{"line":199,"text":"\"WORKER_HEARTBEAT_SLO_SECONDS\""},{"line":200,"text":"),"}]},{"match":"\"WORKER_HEARTBEAT_SLO_SECONDS\"","match_line":199,"window":[{"line":197,"text":"),"},{"line":198,"text":"\"worker_heartbeat_slo_seconds\": _slo("},{"line":199,"text":"\"WORKER_HEARTBEAT_SLO_SECONDS\""},{"line":200,"text":"),"},{"line":201,"text":"\"relay_heartbeat_slo_seconds\": _slo("}]},{"match":"\"relay_heartbeat_slo_seconds\": _slo(","match_line":201,"window":[{"line":199,"text":"\"WORKER_HEARTBEAT_SLO_SECONDS\""},{"line":200,"text":"),"},{"line":201,"text":"\"relay_heartbeat_slo_seconds\": _slo("},{"line":202,"text":"\"RELAY_HEARTBEAT_SLO_SECONDS\""},{"line":203,"text":"),"}]},{"match":"\"RELAY_HEARTBEAT_SLO_SECONDS\"","match_line":202,"window":[{"line":200,"text":"),"},{"line":201,"text":"\"relay_heartbeat_slo_seconds\": _slo("},{"line":202,"text":"\"RELAY_HEARTBEAT_SLO_SECONDS\""},{"line":203,"text":"),"},{"line":204,"text":"\"primary_finality_slo_seconds\": _slo("}]},{"match":"worker_age = _age_seconds(current, worker.get(\"heartbeat_at\"))","match_line":213,"window":[{"line":211,"text":""},{"line":212,"text":"collector_age = _age_seconds(current, collector.get(\"updated_at\"))"},{"line":213,"text":"worker_age = _age_seconds(current, worker.get(\"heartbeat_at\"))"},{"line":214,"text":"relay_age = _age_seconds(current, relay.get(\"heartbeat_at\"))"},{"line":215,"text":""}]},{"match":"relay_age = _age_seconds(current, relay.get(\"heartbeat_at\"))","match_line":214,"window":[{"line":212,"text":"collector_age = _age_seconds(current, collector.get(\"updated_at\"))"},{"line":213,"text":"worker_age = _age_seconds(current, worker.get(\"heartbeat_at\"))"},{"line":214,"text":"relay_age = _age_seconds(current, relay.get(\"heartbeat_at\"))"},{"line":215,"text":""},{"line":216,"text":"source_db = data / \"bitfinex_source.db\""}]},{"match":"prospective_gap = collector.get(\"prospective_gap_detected\", collector.get(\"gap_detected\")) is True","match_line":245,"window":[{"line":243,"text":"scientific_fail = True"},{"line":244,"text":""},{"line":245,"text":"prospective_gap = collector.get(\"prospective_gap_detected\", collector.get(\"gap_detected\")) is True"},{"line":246,"text":"prospective_reconnect = collector.get(\"prospective_reconnect_detected\", collector.get(\"reconnect_detected\")) is True"},{"line":247,"text":"if prospective_gap:"}]},{"match":"prospective_reconnect = collector.get(\"prospective_reconnect_detected\", collector.get(\"reconnect_detected\")) is True","match_line":246,"window":[{"line":244,"text":""},{"line":245,"text":"prospective_gap = collector.get(\"prospective_gap_detected\", collector.get(\"gap_detected\")) is True"},{"line":246,"text":"prospective_reconnect = collector.get(\"prospective_reconnect_detected\", collector.get(\"reconnect_detected\")) is True"},{"line":247,"text":"if prospective_gap:"},{"line":248,"text":"_append_reason(reasons, \"SOURCE_SEQUENCE_GAP\")"}]},{"match":"if prospective_reconnect:","match_line":250,"window":[{"line":248,"text":"_append_reason(reasons, \"SOURCE_SEQUENCE_GAP\")"},{"line":249,"text":"scientific_fail = True"},{"line":250,"text":"if prospective_reconnect:"},{"line":251,"text":"_append_reason(reasons, \"SOURCE_RECONNECT\")"},{"line":252,"text":"scientific_fail = True"}]},{"match":"_append_reason(reasons, \"SOURCE_RECONNECT\")","match_line":251,"window":[{"line":249,"text":"scientific_fail = True"},{"line":250,"text":"if prospective_reconnect:"},{"line":251,"text":"_append_reason(reasons, \"SOURCE_RECONNECT\")"},{"line":252,"text":"scientific_fail = True"},{"line":253,"text":"if collector.get(\"post_finality_revision\") is True:"}]},{"match":"if collector.get(\"post_finality_revision\") is True:","match_line":253,"window":[{"line":251,"text":"_append_reason(reasons, \"SOURCE_RECONNECT\")"},{"line":252,"text":"scientific_fail = True"},{"line":253,"text":"if collector.get(\"post_finality_revision\") is True:"},{"line":254,"text":"_append_reason(reasons, \"POST_FINALITY_SOURCE_REVISION\")"},{"line":255,"text":"scientific_fail = True"}]},{"match":"_append_reason(reasons, \"POST_FINALITY_SOURCE_REVISION\")","match_line":254,"window":[{"line":252,"text":"scientific_fail = True"},{"line":253,"text":"if collector.get(\"post_finality_revision\") is True:"},{"line":254,"text":"_append_reason(reasons, \"POST_FINALITY_SOURCE_REVISION\")"},{"line":255,"text":"scientific_fail = True"},{"line":256,"text":""}]},{"match":"collector_slo = slo[\"collector_heartbeat_slo_seconds\"]","match_line":257,"window":[{"line":255,"text":"scientific_fail = True"},{"line":256,"text":""},{"line":257,"text":"collector_slo = slo[\"collector_heartbeat_slo_seconds\"]"},{"line":258,"text":"if ("},{"line":259,"text":"collector_slo is not None"}]},{"match":"_append_reason(reasons, \"STALE_COLLECTOR_HEARTBEAT\")","match_line":265,"window":[{"line":263,"text":")"},{"line":264,"text":"):"},{"line":265,"text":"_append_reason(reasons, \"STALE_COLLECTOR_HEARTBEAT\")"},{"line":266,"text":"scientific_fail = True"},{"line":267,"text":""}]},{"match":"worker_slo = slo[\"worker_heartbeat_slo_seconds\"]","match_line":268,"window":[{"line":266,"text":"scientific_fail = True"},{"line":267,"text":""},{"line":268,"text":"worker_slo = slo[\"worker_heartbeat_slo_seconds\"]"},{"line":269,"text":"if ("},{"line":270,"text":"worker_slo is not None"}]},{"match":"_append_reason(reasons, \"STALE_WORKER_HEARTBEAT\")","match_line":273,"window":[{"line":271,"text":"and (worker_age is None or worker_age > worker_slo)"},{"line":272,"text":"):"},{"line":273,"text":"_append_reason(reasons, \"STALE_WORKER_HEARTBEAT\")"},{"line":274,"text":"scientific_fail = True"},{"line":275,"text":""}]},{"match":"relay_slo = slo[\"relay_heartbeat_slo_seconds\"]","match_line":276,"window":[{"line":274,"text":"scientific_fail = True"},{"line":275,"text":""},{"line":276,"text":"relay_slo = slo[\"relay_heartbeat_slo_seconds\"]"},{"line":277,"text":"if ("},{"line":278,"text":"relay_slo is not None"}]},{"match":"_append_reason(reasons, \"STALE_RELAY_HEARTBEAT\")","match_line":281,"window":[{"line":279,"text":"and (relay_age is None or relay_age > relay_slo)"},{"line":280,"text":"):"},{"line":281,"text":"_append_reason(reasons, \"STALE_RELAY_HEARTBEAT\")"},{"line":282,"text":"degraded = True"},{"line":283,"text":""}]},{"match":"elif worker and worker.get(\"status\") == \"FAIL_CLOSED\":","match_line":286,"window":[{"line":284,"text":"if worker.get(\"status\") == \"AWAITING_PRIMARY_FINALITY\":"},{"line":285,"text":"_append_reason(reasons, \"AWAITING_PRIMARY_FINALITY\")"},{"line":286,"text":"elif worker and worker.get(\"status\") == \"FAIL_CLOSED\":"},{"line":287,"text":"_append_reason(reasons, \"WORKER_FAIL_CLOSED\")"},{"line":288,"text":"scientific_fail = True"}]},{"match":"_append_reason(reasons, \"WORKER_FAIL_CLOSED\")","match_line":287,"window":[{"line":285,"text":"_append_reason(reasons, \"AWAITING_PRIMARY_FINALITY\")"},{"line":286,"text":"elif worker and worker.get(\"status\") == \"FAIL_CLOSED\":"},{"line":287,"text":"_append_reason(reasons, \"WORKER_FAIL_CLOSED\")"},{"line":288,"text":"scientific_fail = True"},{"line":289,"text":""}]},{"match":"elif relay and relay.get(\"status\") == \"FAIL_CLOSED\":","match_line":312,"window":[{"line":310,"text":"_append_reason(reasons, \"INDETERMINATE_DELIVERY\")"},{"line":311,"text":"degraded = True"},{"line":312,"text":"elif relay and relay.get(\"status\") == \"FAIL_CLOSED\":"},{"line":313,"text":"_append_reason(reasons, \"RELAY_FAIL_CLOSED\")"},{"line":314,"text":"degraded = True"}]},{"match":"_append_reason(reasons, \"RELAY_FAIL_CLOSED\")","match_line":313,"window":[{"line":311,"text":"degraded = True"},{"line":312,"text":"elif relay and relay.get(\"status\") == \"FAIL_CLOSED\":"},{"line":313,"text":"_append_reason(reasons, \"RELAY_FAIL_CLOSED\")"},{"line":314,"text":"degraded = True"},{"line":315,"text":""}]},{"match":"state = LiveHealthState.FAIL_CLOSED","match_line":339,"window":[{"line":337,"text":""},{"line":338,"text":"if scientific_fail:"},{"line":339,"text":"state = LiveHealthState.FAIL_CLOSED"},{"line":340,"text":"elif degraded:"},{"line":341,"text":"state = LiveHealthState.DEGRADED"}]},{"match":"state != LiveHealthState.FAIL_CLOSED","match_line":351,"window":[{"line":349,"text":"\"reason_codes\": reasons,"},{"line":350,"text":"\"prospective_research_collection_allowed\": ("},{"line":351,"text":"state != LiveHealthState.FAIL_CLOSED"},{"line":352,"text":"),"},{"line":353,"text":"\"production_launch_allowed\": False,"}]},{"match":"\"collector_heartbeat_fresh\": (","match_line":359,"window":[{"line":357,"text":"\"runtime_manifest_id\": runtime_manifest_id,"},{"line":358,"text":"\"experiment_id\": worker.get(\"experiment_id\"),"},{"line":359,"text":"\"collector_heartbeat_fresh\": ("},{"line":360,"text":"collector_age is not None"},{"line":361,"text":"and slo[\"collector_heartbeat_slo_seconds\"] is not None"}]},{"match":"and slo[\"collector_heartbeat_slo_seconds\"] is not None","match_line":361,"window":[{"line":359,"text":"\"collector_heartbeat_fresh\": ("},{"line":360,"text":"collector_age is not None"},{"line":361,"text":"and slo[\"collector_heartbeat_slo_seconds\"] is not None"},{"line":362,"text":"and collector_age <= slo[\"collector_heartbeat_slo_seconds\"]"},{"line":363,"text":"),"}]},{"match":"and collector_age <= slo[\"collector_heartbeat_slo_seconds\"]","match_line":362,"window":[{"line":360,"text":"collector_age is not None"},{"line":361,"text":"and slo[\"collector_heartbeat_slo_seconds\"] is not None"},{"line":362,"text":"and collector_age <= slo[\"collector_heartbeat_slo_seconds\"]"},{"line":363,"text":"),"},{"line":364,"text":"\"worker_heartbeat_fresh\": ("}]},{"match":"\"worker_heartbeat_fresh\": (","match_line":364,"window":[{"line":362,"text":"and collector_age <= slo[\"collector_heartbeat_slo_seconds\"]"},{"line":363,"text":"),"},{"line":364,"text":"\"worker_heartbeat_fresh\": ("},{"line":365,"text":"worker_age is not None"},{"line":366,"text":"and slo[\"worker_heartbeat_slo_seconds\"] is not None"}]},{"match":"and slo[\"worker_heartbeat_slo_seconds\"] is not None","match_line":366,"window":[{"line":364,"text":"\"worker_heartbeat_fresh\": ("},{"line":365,"text":"worker_age is not None"},{"line":366,"text":"and slo[\"worker_heartbeat_slo_seconds\"] is not None"},{"line":367,"text":"and worker_age <= slo[\"worker_heartbeat_slo_seconds\"]"},{"line":368,"text":"),"}]},{"match":"and worker_age <= slo[\"worker_heartbeat_slo_seconds\"]","match_line":367,"window":[{"line":365,"text":"worker_age is not None"},{"line":366,"text":"and slo[\"worker_heartbeat_slo_seconds\"] is not None"},{"line":367,"text":"and worker_age <= slo[\"worker_heartbeat_slo_seconds\"]"},{"line":368,"text":"),"},{"line":369,"text":"\"relay_heartbeat_fresh\": ("}]},{"match":"\"relay_heartbeat_fresh\": (","match_line":369,"window":[{"line":367,"text":"and worker_age <= slo[\"worker_heartbeat_slo_seconds\"]"},{"line":368,"text":"),"},{"line":369,"text":"\"relay_heartbeat_fresh\": ("},{"line":370,"text":"relay_age is not None"},{"line":371,"text":"and slo[\"relay_heartbeat_slo_seconds\"] is not None"}]},{"match":"and slo[\"relay_heartbeat_slo_seconds\"] is not None","match_line":371,"window":[{"line":369,"text":"\"relay_heartbeat_fresh\": ("},{"line":370,"text":"relay_age is not None"},{"line":371,"text":"and slo[\"relay_heartbeat_slo_seconds\"] is not None"},{"line":372,"text":"and relay_age <= slo[\"relay_heartbeat_slo_seconds\"]"},{"line":373,"text":"),"}]},{"match":"and relay_age <= slo[\"relay_heartbeat_slo_seconds\"]","match_line":372,"window":[{"line":370,"text":"relay_age is not None"},{"line":371,"text":"and slo[\"relay_heartbeat_slo_seconds\"] is not None"},{"line":372,"text":"and relay_age <= slo[\"relay_heartbeat_slo_seconds\"]"},{"line":373,"text":"),"},{"line":374,"text":"\"collector_heartbeat_age_seconds\": collector_age,"}]},{"match":"\"collector_heartbeat_age_seconds\": collector_age,","match_line":374,"window":[{"line":372,"text":"and relay_age <= slo[\"relay_heartbeat_slo_seconds\"]"},{"line":373,"text":"),"},{"line":374,"text":"\"collector_heartbeat_age_seconds\": collector_age,"},{"line":375,"text":"\"worker_heartbeat_age_seconds\": worker_age,"},{"line":376,"text":"\"relay_heartbeat_age_seconds\": relay_age,"}]},{"match":"\"worker_heartbeat_age_seconds\": worker_age,","match_line":375,"window":[{"line":373,"text":"),"},{"line":374,"text":"\"collector_heartbeat_age_seconds\": collector_age,"},{"line":375,"text":"\"worker_heartbeat_age_seconds\": worker_age,"},{"line":376,"text":"\"relay_heartbeat_age_seconds\": relay_age,"},{"line":377,"text":"\"last_finalized_primary_d1_close\": last_finalized,"}]},{"match":"\"relay_heartbeat_age_seconds\": relay_age,","match_line":376,"window":[{"line":374,"text":"\"collector_heartbeat_age_seconds\": collector_age,"},{"line":375,"text":"\"worker_heartbeat_age_seconds\": worker_age,"},{"line":376,"text":"\"relay_heartbeat_age_seconds\": relay_age,"},{"line":377,"text":"\"last_finalized_primary_d1_close\": last_finalized,"},{"line":378,"text":"\"last_finalized_primary_d1_age_seconds\": last_finalized_age,"}]},{"match":"\"source_gap_detected\": collector.get(\"gap_detected\") is True,","match_line":380,"window":[{"line":378,"text":"\"last_finalized_primary_d1_age_seconds\": last_finalized_age,"},{"line":379,"text":"\"current_logical_d1_finality_state\": current_finality_state,"},{"line":380,"text":"\"source_gap_detected\": collector.get(\"gap_detected\") is True,"},{"line":381,"text":"\"source_reconnect_detected\": ("},{"line":382,"text":"collector.get(\"reconnect_detected\") is True"}]},{"match":"\"source_reconnect_detected\": (","match_line":381,"window":[{"line":379,"text":"\"current_logical_d1_finality_state\": current_finality_state,"},{"line":380,"text":"\"source_gap_detected\": collector.get(\"gap_detected\") is True,"},{"line":381,"text":"\"source_reconnect_detected\": ("},{"line":382,"text":"collector.get(\"reconnect_detected\") is True"},{"line":383,"text":"),"}]},{"match":"collector.get(\"reconnect_detected\") is True","match_line":382,"window":[{"line":380,"text":"\"source_gap_detected\": collector.get(\"gap_detected\") is True,"},{"line":381,"text":"\"source_reconnect_detected\": ("},{"line":382,"text":"collector.get(\"reconnect_detected\") is True"},{"line":383,"text":"),"},{"line":384,"text":"\"source_post_finality_revision\": ("}]},{"match":"\"source_post_finality_revision\": (","match_line":384,"window":[{"line":382,"text":"collector.get(\"reconnect_detected\") is True"},{"line":383,"text":"),"},{"line":384,"text":"\"source_post_finality_revision\": ("},{"line":385,"text":"collector.get(\"post_finality_revision\") is True"},{"line":386,"text":"),"}]},{"match":"collector.get(\"post_finality_revision\") is True","match_line":385,"window":[{"line":383,"text":"),"},{"line":384,"text":"\"source_post_finality_revision\": ("},{"line":385,"text":"collector.get(\"post_finality_revision\") is True"},{"line":386,"text":"),"},{"line":387,"text":"\"source_fail_closed_reason\": collector.get("}]},{"match":"\"source_fail_closed_reason\": collector.get(","match_line":387,"window":[{"line":385,"text":"collector.get(\"post_finality_revision\") is True"},{"line":386,"text":"),"},{"line":387,"text":"\"source_fail_closed_reason\": collector.get("},{"line":388,"text":"\"fail_closed_reason\","},{"line":389,"text":"\"\","}]},{"match":"\"fail_closed_reason\",","match_line":388,"window":[{"line":386,"text":"),"},{"line":387,"text":"\"source_fail_closed_reason\": collector.get("},{"line":388,"text":"\"fail_closed_reason\","},{"line":389,"text":"\"\","},{"line":390,"text":"),"}]}],"path":"/opt/stacks/8020-demonov-shadow/.deploy/SIGNALBOT-260906-DEPLOY-022/demonov_forward_map/live_health.py","sha256":"cf3e5b9c8303d25524a03bf30534f1277a63068e8b01a32537dbb6be0a3420e2"}] +SB036_DECISION=COLLECTOR_STATE_SOURCE_EVIDENCE_READY +SB036_MUTATION_SCOPE=NONE_READ_ONLY +SIGNALBOT036_DECISION=COLLECTOR_STATE_SOURCE_EVIDENCE_READY +SIGNALBOT036_MUTATION_SCOPE=NO_RUNTIME_NO_GIT_NO_EXCHANGE_MUTATION + +OUTPUT_END +CHAT_OUTPUT_END diff --git a/runtime/latest.json b/runtime/latest.json index 065036db..5e608ecb 100644 --- a/runtime/latest.json +++ b/runtime/latest.json @@ -1,19 +1,19 @@ { "schema_version": 1, "channel": "homelab-runtime", - "command_id": "SIGNALBOT-260908-INTAKE-RCA-035", + "command_id": "SIGNALBOT-260908-COLLECTOR-STATE-RCA-036", "status": "OK", "rc": 0, "host": "pve01", "mode": "read-only", - "component": "signalbot-cr0116-intake-rca", - "started_at_utc": "2026-09-08T05:23:21Z", - "finished_at_utc": "2026-09-08T05:23:55Z", + "component": "signalbot-cr0116-collector-state-rca", + "started_at_utc": "2026-09-08T05:28:13Z", + "finished_at_utc": "2026-09-08T05:28:16Z", "reference_register_checked": true, "reference_sha256": "5a3d8e5154c41cb582a4e0aca68090be1f0138918bf82131a948df326f9d8d66", "error_register_checked": true, "error_register_sha256": "3b09a553ec0f527ed3afeed4753f52a74ee3036045bbfb3c685e9f8af4ba7ba0", - "command_sha256": "01c43885d0820853cc620910f562146315ad34c12ff24ffceefe7ef0181b8778", + "command_sha256": "4f64bf454248fc9933a450c0d2b2dab2bc2ab3e6e845ad1fc3b59375681f3cb1", "duplicate_failed_command_blocked": false, "block_reason": null, "execution_started": true, @@ -30,9 +30,9 @@ "secrets_included": false, "private_addresses_included": false, "raw_evidence_retained_locally": true, - "raw_evidence_sha256": "9bc13c343cdda506b9e7bbb4a38191d9f1ee1e4d31beb0916fa1cda673e1e097", - "sanitized_output_sha256": "9bc13c343cdda506b9e7bbb4a38191d9f1ee1e4d31beb0916fa1cda673e1e097", + "raw_evidence_sha256": "a54caab9741da51e043d39e424b15094dc452e3f24f196cf589272a8c0668097", + "sanitized_output_sha256": "a54caab9741da51e043d39e424b15094dc452e3f24f196cf589272a8c0668097", "output_truncated_in_json": false, "full_sanitized_output_url": "https://git.gram1.ru/.well-known/homelab-runtime/latest.txt", - "output": "ERROR_REGISTER_CHECK=OK\nREFERENCE_CHECK=OK\nAUTHORITY_CHECK_SCOPE=READABILITY_ONLY_INCIDENTS_NOT_CLOSED\nSIGNALBOT035_VM170={\"name\":\"core-apps\",\"node\":\"pve01\",\"status\":\"running\",\"type\":\"qemu\"}\nSIGNALBOT035_VM170_SNAPSHOT={\"report\":{\"collector\":{\"cmd\":[\"python\",\"-m\",\"demonov_forward_map.bitfinex_trade_collector\"],\"entrypoint\":null,\"health\":null,\"id_short\":\"a546a70c3e8c\",\"image\":\"8020-demonov-shadow:e32760c69a4311728db9066ee8bf2bf66b1e5a70\",\"name\":\"demonov-shadow-8020-collector-1\",\"pid\":210213,\"restart_count\":13,\"running\":true,\"started_at\":\"2026-09-08T05:01:08.70385245Z\",\"status\":\"running\"},\"collector_status\":{\"age_sec\":8.9,\"exists\":true,\"mtime_epoch\":1788845024.0247085,\"path\":\"/opt/stacks/8020-demonov-shadow/data/epochs/ec477ea41ecbd5cfdef5afc259595aab20674a7d933f41a389329ff05098b338/collector_status.json\",\"values\":{\"fail_closed_reason\":\"source reconnect detected\",\"gap_detected\":false,\"post_finality_revision\":false,\"prospective_fail_closed_reason\":\"\",\"prospective_gap_detected\":false,\"prospective_reconnect_detected\":false,\"reconnect_detected\":true,\"updated_at\":\"2026-09-08T05:23:44.028140+00:00\"}},\"db_a\":{\"d1_revisions_count\":0,\"event_kind_counts\":[[\"SEQUENCE\",179729],[\"RECONNECT\",10],[\"SESSION_START\",1]],\"exists\":true,\"finalized_d1_count\":0,\"latest_sequence_events\":[{\"event_kind\":\"SEQUENCE\",\"event_seq\":179740,\"received_at\":\"2026-09-08T05:23:20.918750+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2510},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179739,\"received_at\":\"2026-09-08T05:23:20.891856+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2509},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179738,\"received_at\":\"2026-09-08T05:23:20.552139+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2508},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179737,\"received_at\":\"2026-09-08T05:23:20.534792+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2507},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179736,\"received_at\":\"2026-09-08T05:23:20.329909+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2506},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179735,\"received_at\":\"2026-09-08T05:23:20.177708+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2505},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179734,\"received_at\":\"2026-09-08T05:23:20.170743+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2504},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179733,\"received_at\":\"2026-09-08T05:23:20.163522+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2503},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179732,\"received_at\":\"2026-09-08T05:23:20.004001+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2502},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179731,\"received_at\":\"2026-09-08T05:23:19.850034+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2501},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179730,\"received_at\":\"2026-09-08T05:23:19.841410+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2500},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179729,\"received_at\":\"2026-09-08T05:23:19.827700+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2499},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179728,\"received_at\":\"2026-09-08T05:23:19.671403+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2498},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179727,\"received_at\":\"2026-09-08T05:23:19.518174+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2497},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179726,\"received_at\":\"2026-09-08T05:23:19.357283+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2496},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179725,\"received_at\":\"2026-09-08T05:23:19.200903+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2495},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179724,\"received_at\":\"2026-09-08T05:23:19.193716+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2494},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179723,\"received_at\":\"2026-09-08T05:23:19.185835+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2493},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179722,\"received_at\":\"2026-09-08T05:23:19.177983+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2492},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179721,\"received_at\":\"2026-09-08T05:23:19.164437+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2491},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179720,\"received_at\":\"2026-09-08T05:23:19.006208+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2490},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179719,\"received_at\":\"2026-09-08T05:23:18.848474+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2489},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179718,\"received_at\":\"2026-09-08T05:23:18.697530+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2488},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179717,\"received_at\":\"2026-09-08T05:23:18.541070+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2487},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179716,\"received_at\":\"2026-09-08T05:23:18.532005+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2486},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179715,\"received_at\":\"2026-09-08T05:23:18.522984+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2485},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179714,\"received_at\":\"2026-09-08T05:23:18.515020+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2484},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179713,\"received_at\":\"2026-09-08T05:23:18.504619+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2483},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179712,\"received_at\":\"2026-09-08T05:23:18.349318+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2482},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179711,\"received_at\":\"2026-09-08T05:23:18.189830+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2481}],\"latest_sessions\":[{\"events\":2510,\"first_received_at\":\"2026-09-08T05:01:09.298101+00:00\",\"last_received_at\":\"2026-09-08T05:23:20.918750+00:00\",\"max_source_sequence\":2510,\"min_source_sequence\":1,\"session_hash\":\"253ffe9a26a5\"},{\"events\":2475,\"first_received_at\":\"2026-09-08T04:54:28.087186+00:00\",\"last_received_at\":\"2026-09-08T05:01:08.350487+00:00\",\"max_source_sequence\":2475,\"min_source_sequence\":1,\"session_hash\":\"2b3998047f77\"},{\"events\":988,\"first_received_at\":\"2026-09-08T04:43:46.442548+00:00\",\"last_received_at\":\"2026-09-08T04:54:27.005150+00:00\",\"max_source_sequence\":988,\"min_source_sequence\":1,\"session_hash\":\"b501ae120c1f\"},{\"events\":589,\"first_received_at\":\"2026-09-08T04:42:44.434580+00:00\",\"last_received_at\":\"2026-09-08T04:43:45.521859+00:00\",\"max_source_sequence\":589,\"min_source_sequence\":1,\"session_hash\":\"10709eb54a7b\"},{\"events\":3620,\"first_received_at\":\"2026-09-08T03:52:02.239825+00:00\",\"last_received_at\":\"2026-09-08T04:42:43.449781+00:00\",\"max_source_sequence\":3620,\"min_source_sequence\":1,\"session_hash\":\"210de3583c8e\"},{\"events\":72124,\"first_received_at\":\"2026-09-07T15:04:59.188298+00:00\",\"last_received_at\":\"2026-09-08T03:52:00.952767+00:00\",\"max_source_sequence\":72124,\"min_source_sequence\":1,\"session_hash\":\"69bb22240441\"},{\"events\":1688,\"first_received_at\":\"2026-09-07T14:46:51.906734+00:00\",\"last_received_at\":\"2026-09-07T15:04:47.491753+00:00\",\"max_source_sequence\":1688,\"min_source_sequence\":1,\"session_hash\":\"d1d81c259d86\"},{\"events\":10295,\"first_received_at\":\"2026-09-07T13:30:08.973280+00:00\",\"last_received_at\":\"2026-09-07T14:46:39.866418+00:00\",\"max_source_sequence\":10295,\"min_source_sequence\":1,\"session_hash\":\"a2db9de2102e\"},{\"events\":14430,\"first_received_at\":\"2026-09-07T09:50:41.075840+00:00\",\"last_received_at\":\"2026-09-07T13:30:03.165612+00:00\",\"max_source_sequence\":14430,\"min_source_sequence\":1,\"session_hash\":\"8da25a454977\"},{\"events\":71006,\"first_received_at\":\"2026-09-06T18:48:31.906387+00:00\",\"last_received_at\":\"2026-09-07T09:50:13.818640+00:00\",\"max_source_sequence\":71006,\"min_source_sequence\":1,\"session_hash\":\"184e0e63b1c9\"}],\"latest_source_receipts\":[{\"receipt_id\":\"02e5367b2692cde4f9bff73096271e6cc0598bf27413d651026f6318c8338d72\",\"received_at\":\"2026-09-08T03:52:00.952767+00:00\",\"source_sequence\":72124},{\"receipt_id\":\"568fff4620581353cea781b3cef61de359e02f12475ac54c7460e85c4baa8625\",\"received_at\":\"2026-09-08T03:52:00.943741+00:00\",\"source_sequence\":72123},{\"receipt_id\":\"3631962ca9ee6b49c4870d42ec814ad6c1c3f0ff65f78a445abecc54bcbe8567\",\"received_at\":\"2026-09-08T03:52:00.931321+00:00\",\"source_sequence\":72122},{\"receipt_id\":\"e9e23d4774b5bdc4801a3334511f50fbb5b25e117b01f8e913a98be3d98badc0\",\"received_at\":\"2026-09-08T03:52:00.790541+00:00\",\"source_sequence\":72121},{\"receipt_id\":\"59ad6dd601a0d1605e6ea3962d9bfb348cdbc67cc8666b473eb8d58b1b8c077c\",\"received_at\":\"2026-09-08T03:52:00.656138+00:00\",\"source_sequence\":72120},{\"receipt_id\":\"634a7fdd47cddc7c664450d7921d4b83093d20a6f95f72f31f6dc004b219ff0f\",\"received_at\":\"2026-09-08T03:52:00.642417+00:00\",\"source_sequence\":72119},{\"receipt_id\":\"6943e44a184672570beaf3ac076e8051162086f16c4f836d78b040c6fdb811ce\",\"received_at\":\"2026-09-08T03:52:00.504076+00:00\",\"source_sequence\":72118},{\"receipt_id\":\"063b4e0abd1065a59d6b9fe62b9e4583f4caacbbb1e83414875386170b8ba7fe\",\"received_at\":\"2026-09-08T03:52:00.494856+00:00\",\"source_sequence\":72117},{\"receipt_id\":\"0f018a85552ad881ab665baa7ddc7a0e956b6d0d66ec43ecfeee44b60e766f4c\",\"received_at\":\"2026-09-08T03:52:00.481147+00:00\",\"source_sequence\":72116},{\"receipt_id\":\"6b23823a92031d3850483879578a8528a45b5f6002b26381659904d813f5b8d2\",\"received_at\":\"2026-09-08T03:52:00.333870+00:00\",\"source_sequence\":72115},{\"receipt_id\":\"1985ce2996de079095414ce9a48bfa3fcfffe7ddcbcdcff1857e03aa0c770d7d\",\"received_at\":\"2026-09-08T03:52:00.194864+00:00\",\"source_sequence\":72114},{\"receipt_id\":\"a4ed84172daff21758b2402a6cc03ab51ddc9474ba23d7a4036f7c6c4a3af152\",\"received_at\":\"2026-09-08T03:52:00.180891+00:00\",\"source_sequence\":72113},{\"receipt_id\":\"8646a6eea56850890817a5ff2056f9639f830a876e460c3898cfebbbd881a670\",\"received_at\":\"2026-09-08T03:52:00.041606+00:00\",\"source_sequence\":72112},{\"receipt_id\":\"70ebbdab1c237840ea3cb6b543fab899e49db3b3a0ab65455e5dcb85b7844923\",\"received_at\":\"2026-09-08T03:52:00.023714+00:00\",\"source_sequence\":72111},{\"receipt_id\":\"7cb2c79c0940deed850deb26500cb3c04331baa4eee8e302a1ca9a3e1cd3023c\",\"received_at\":\"2026-09-08T03:51:59.882828+00:00\",\"source_sequence\":72110}],\"path\":\"/opt/stacks/8020-demonov-shadow/data/epochs/ec477ea41ecbd5cfdef5afc259595aab20674a7d933f41a389329ff05098b338/bitfinex_source.db\",\"quick_check\":\"ok\",\"sequence_events\":{\"count\":179740,\"max_event_seq\":179740,\"max_received_at\":\"2026-09-08T05:23:20.918750+00:00\",\"max_source_sequence\":72124},\"source_receipts_columns\":[\"receipt_id\",\"venue_id\",\"source_kind\",\"received_at\",\"source_sequence\",\"raw_payload_hash\",\"collector_session_id\",\"receipt_json\"]},\"db_b\":{\"d1_revisions_count\":0,\"event_kind_counts\":[[\"SEQUENCE\",179781],[\"RECONNECT\",10],[\"SESSION_START\",1]],\"exists\":true,\"finalized_d1_count\":0,\"latest_sequence_events\":[{\"event_kind\":\"SEQUENCE\",\"event_seq\":179792,\"received_at\":\"2026-09-08T05:23:44.017776+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2562},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179791,\"received_at\":\"2026-09-08T05:23:43.862198+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2561},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179790,\"received_at\":\"2026-09-08T05:23:43.702914+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2560},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179789,\"received_at\":\"2026-09-08T05:23:43.541151+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2559},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179788,\"received_at\":\"2026-09-08T05:23:43.382833+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2558},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179787,\"received_at\":\"2026-09-08T05:23:43.374827+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2557},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179786,\"received_at\":\"2026-09-08T05:23:43.365183+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2556},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179785,\"received_at\":\"2026-09-08T05:23:43.356202+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2555},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179784,\"received_at\":\"2026-09-08T05:23:43.337857+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2554},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179783,\"received_at\":\"2026-09-08T05:23:43.179159+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2553},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179782,\"received_at\":\"2026-09-08T05:23:43.025806+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2552},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179781,\"received_at\":\"2026-09-08T05:23:42.863932+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2551},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179780,\"received_at\":\"2026-09-08T05:23:42.715680+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2550},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179779,\"received_at\":\"2026-09-08T05:23:42.709841+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2549},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179778,\"received_at\":\"2026-09-08T05:23:42.702802+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2548},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179777,\"received_at\":\"2026-09-08T05:23:42.695983+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2547},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179776,\"received_at\":\"2026-09-08T05:23:42.682500+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2546},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179775,\"received_at\":\"2026-09-08T05:23:33.495587+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2545},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179774,\"received_at\":\"2026-09-08T05:23:33.324435+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2544},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179773,\"received_at\":\"2026-09-08T05:23:33.170904+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2543},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179772,\"received_at\":\"2026-09-08T05:23:33.161405+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2542},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179771,\"received_at\":\"2026-09-08T05:23:33.148039+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2541},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179770,\"received_at\":\"2026-09-08T05:23:33.102924+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2540},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179769,\"received_at\":\"2026-09-08T05:23:32.054424+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2539},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179768,\"received_at\":\"2026-09-08T05:23:32.019933+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2538},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179767,\"received_at\":\"2026-09-08T05:23:30.952907+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2537},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179766,\"received_at\":\"2026-09-08T05:23:30.911940+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2536},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179765,\"received_at\":\"2026-09-08T05:23:28.052780+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2535},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179764,\"received_at\":\"2026-09-08T05:23:25.504960+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2534},{\"event_kind\":\"SEQUENCE\",\"event_seq\":179763,\"received_at\":\"2026-09-08T05:23:25.491855+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2533}],\"latest_sessions\":[{\"events\":2562,\"first_received_at\":\"2026-09-08T05:01:09.298101+00:00\",\"last_received_at\":\"2026-09-08T05:23:44.017776+00:00\",\"max_source_sequence\":2562,\"min_source_sequence\":1,\"session_hash\":\"253ffe9a26a5\"},{\"events\":2475,\"first_received_at\":\"2026-09-08T04:54:28.087186+00:00\",\"last_received_at\":\"2026-09-08T05:01:08.350487+00:00\",\"max_source_sequence\":2475,\"min_source_sequence\":1,\"session_hash\":\"2b3998047f77\"},{\"events\":988,\"first_received_at\":\"2026-09-08T04:43:46.442548+00:00\",\"last_received_at\":\"2026-09-08T04:54:27.005150+00:00\",\"max_source_sequence\":988,\"min_source_sequence\":1,\"session_hash\":\"b501ae120c1f\"},{\"events\":589,\"first_received_at\":\"2026-09-08T04:42:44.434580+00:00\",\"last_received_at\":\"2026-09-08T04:43:45.521859+00:00\",\"max_source_sequence\":589,\"min_source_sequence\":1,\"session_hash\":\"10709eb54a7b\"},{\"events\":3620,\"first_received_at\":\"2026-09-08T03:52:02.239825+00:00\",\"last_received_at\":\"2026-09-08T04:42:43.449781+00:00\",\"max_source_sequence\":3620,\"min_source_sequence\":1,\"session_hash\":\"210de3583c8e\"},{\"events\":72124,\"first_received_at\":\"2026-09-07T15:04:59.188298+00:00\",\"last_received_at\":\"2026-09-08T03:52:00.952767+00:00\",\"max_source_sequence\":72124,\"min_source_sequence\":1,\"session_hash\":\"69bb22240441\"},{\"events\":1688,\"first_received_at\":\"2026-09-07T14:46:51.906734+00:00\",\"last_received_at\":\"2026-09-07T15:04:47.491753+00:00\",\"max_source_sequence\":1688,\"min_source_sequence\":1,\"session_hash\":\"d1d81c259d86\"},{\"events\":10295,\"first_received_at\":\"2026-09-07T13:30:08.973280+00:00\",\"last_received_at\":\"2026-09-07T14:46:39.866418+00:00\",\"max_source_sequence\":10295,\"min_source_sequence\":1,\"session_hash\":\"a2db9de2102e\"},{\"events\":14430,\"first_received_at\":\"2026-09-07T09:50:41.075840+00:00\",\"last_received_at\":\"2026-09-07T13:30:03.165612+00:00\",\"max_source_sequence\":14430,\"min_source_sequence\":1,\"session_hash\":\"8da25a454977\"},{\"events\":71006,\"first_received_at\":\"2026-09-06T18:48:31.906387+00:00\",\"last_received_at\":\"2026-09-07T09:50:13.818640+00:00\",\"max_source_sequence\":71006,\"min_source_sequence\":1,\"session_hash\":\"184e0e63b1c9\"}],\"latest_source_receipts\":[{\"receipt_id\":\"02e5367b2692cde4f9bff73096271e6cc0598bf27413d651026f6318c8338d72\",\"received_at\":\"2026-09-08T03:52:00.952767+00:00\",\"source_sequence\":72124},{\"receipt_id\":\"568fff4620581353cea781b3cef61de359e02f12475ac54c7460e85c4baa8625\",\"received_at\":\"2026-09-08T03:52:00.943741+00:00\",\"source_sequence\":72123},{\"receipt_id\":\"3631962ca9ee6b49c4870d42ec814ad6c1c3f0ff65f78a445abecc54bcbe8567\",\"received_at\":\"2026-09-08T03:52:00.931321+00:00\",\"source_sequence\":72122},{\"receipt_id\":\"e9e23d4774b5bdc4801a3334511f50fbb5b25e117b01f8e913a98be3d98badc0\",\"received_at\":\"2026-09-08T03:52:00.790541+00:00\",\"source_sequence\":72121},{\"receipt_id\":\"59ad6dd601a0d1605e6ea3962d9bfb348cdbc67cc8666b473eb8d58b1b8c077c\",\"received_at\":\"2026-09-08T03:52:00.656138+00:00\",\"source_sequence\":72120},{\"receipt_id\":\"634a7fdd47cddc7c664450d7921d4b83093d20a6f95f72f31f6dc004b219ff0f\",\"received_at\":\"2026-09-08T03:52:00.642417+00:00\",\"source_sequence\":72119},{\"receipt_id\":\"6943e44a184672570beaf3ac076e8051162086f16c4f836d78b040c6fdb811ce\",\"received_at\":\"2026-09-08T03:52:00.504076+00:00\",\"source_sequence\":72118},{\"receipt_id\":\"063b4e0abd1065a59d6b9fe62b9e4583f4caacbbb1e83414875386170b8ba7fe\",\"received_at\":\"2026-09-08T03:52:00.494856+00:00\",\"source_sequence\":72117},{\"receipt_id\":\"0f018a85552ad881ab665baa7ddc7a0e956b6d0d66ec43ecfeee44b60e766f4c\",\"received_at\":\"2026-09-08T03:52:00.481147+00:00\",\"source_sequence\":72116},{\"receipt_id\":\"6b23823a92031d3850483879578a8528a45b5f6002b26381659904d813f5b8d2\",\"received_at\":\"2026-09-08T03:52:00.333870+00:00\",\"source_sequence\":72115},{\"receipt_id\":\"1985ce2996de079095414ce9a48bfa3fcfffe7ddcbcdcff1857e03aa0c770d7d\",\"received_at\":\"2026-09-08T03:52:00.194864+00:00\",\"source_sequence\":72114},{\"receipt_id\":\"a4ed84172daff21758b2402a6cc03ab51ddc9474ba23d7a4036f7c6c4a3af152\",\"received_at\":\"2026-09-08T03:52:00.180891+00:00\",\"source_sequence\":72113},{\"receipt_id\":\"8646a6eea56850890817a5ff2056f9639f830a876e460c3898cfebbbd881a670\",\"received_at\":\"2026-09-08T03:52:00.041606+00:00\",\"source_sequence\":72112},{\"receipt_id\":\"70ebbdab1c237840ea3cb6b543fab899e49db3b3a0ab65455e5dcb85b7844923\",\"received_at\":\"2026-09-08T03:52:00.023714+00:00\",\"source_sequence\":72111},{\"receipt_id\":\"7cb2c79c0940deed850deb26500cb3c04331baa4eee8e302a1ca9a3e1cd3023c\",\"received_at\":\"2026-09-08T03:51:59.882828+00:00\",\"source_sequence\":72110}],\"path\":\"/opt/stacks/8020-demonov-shadow/data/epochs/ec477ea41ecbd5cfdef5afc259595aab20674a7d933f41a389329ff05098b338/bitfinex_source.db\",\"quick_check\":\"ok\",\"sequence_events\":{\"count\":179792,\"max_event_seq\":179792,\"max_received_at\":\"2026-09-08T05:23:44.017776+00:00\",\"max_source_sequence\":72124},\"source_receipts_columns\":[\"receipt_id\",\"venue_id\",\"source_kind\",\"received_at\",\"source_sequence\",\"raw_payload_hash\",\"collector_session_id\",\"receipt_json\"]},\"decision\":\"HOLD_COLLECTOR_INTAKE_STALLED_WITH_PROCESS_AND_TCP_ALIVE\",\"endpoint_probe\":{\"api-pub.bitfinex.com\":{\"dns_rc\":0,\"resolved\":true},\"api.bitfinex.com\":{\"dns_rc\":0,\"resolved\":true},\"platform_status\":{\"body\":\"[1]\",\"rc\":0,\"stderr\":\"\"}},\"epoch_exists\":true,\"holds\":[\"COLLECTOR_INTAKE_STILL_STALLED\"],\"hostname\":\"core-apps\",\"last_event_age_sec\":10.6,\"logs\":{\"keyword_counts\":{\"CLOSED\":5,\"CONNECTED\":0,\"DISCONNECT\":0,\"ERROR\":5,\"EXCEPTION\":5,\"FINAL\":0,\"GAP\":0,\"HEARTBEAT\":0,\"RECEIVED\":5,\"RECONNECT\":0,\"SOURCE\":0,\"TRACEBACK\":5,\"WEBSOCKET\":15},\"last_lines\":[\"websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received\",\":130: RuntimeWarning: 'demonov_forward_map.bitfinex_trade_collector' found in sys.modules after import of package 'demonov_forward_map', but prior to execution of 'demonov_forward_map.bitfinex_trade_collector'; this may result in unpredictable behaviour\",\"Traceback (most recent call last):\",\"File \\\"\\\", line 203, in _run_module_as_main\",\"File \\\"\\\", line 88, in _run_code\",\"File \\\"/app/demonov_forward_map/bitfinex_trade_collector.py\\\", line 1246, in \",\"raise SystemExit(main())\",\"~~~~^^\",\"File \\\"/app/demonov_forward_map/bitfinex_trade_collector.py\\\", line 1175, in main\",\"for raw in ws:\",\"^^\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 242, in __iter__\",\"yield self.recv()\",\"~~~~~~~~~^^\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 336, in recv\",\"raise self.protocol.close_exc from self.recv_exc\",\"websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received\",\":130: RuntimeWarning: 'demonov_forward_map.bitfinex_trade_collector' found in sys.modules after import of package 'demonov_forward_map', but prior to execution of 'demonov_forward_map.bitfinex_trade_collector'; this may result in unpredictable behaviour\",\"Traceback (most recent call last):\",\"File \\\"\\\", line 203, in _run_module_as_main\",\"File \\\"\\\", line 88, in _run_code\",\"File \\\"/app/demonov_forward_map/bitfinex_trade_collector.py\\\", line 1246, in \",\"raise SystemExit(main())\",\"~~~~^^\",\"File \\\"/app/demonov_forward_map/bitfinex_trade_collector.py\\\", line 1175, in main\",\"for raw in ws:\",\"^^\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 242, in __iter__\",\"yield self.recv()\",\"~~~~~~~~~^^\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 336, in recv\",\"raise self.protocol.close_exc from self.recv_exc\",\"websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received\",\":130: RuntimeWarning: 'demonov_forward_map.bitfinex_trade_collector' found in sys.modules after import of package 'demonov_forward_map', but prior to execution of 'demonov_forward_map.bitfinex_trade_collector'; this may result in unpredictable behaviour\",\"Traceback (most recent call last):\",\"File \\\"\\\", line 203, in _run_module_as_main\",\"File \\\"\\\", line 88, in _run_code\",\"File \\\"/app/demonov_forward_map/bitfinex_trade_collector.py\\\", line 1246, in \",\"raise SystemExit(main())\",\"~~~~^^\",\"File \\\"/app/demonov_forward_map/bitfinex_trade_collector.py\\\", line 1175, in main\",\"for raw in ws:\",\"^^\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 242, in __iter__\",\"yield self.recv()\",\"~~~~~~~~~^^\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 336, in recv\",\"raise self.protocol.close_exc from self.recv_exc\",\"websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received\",\":130: RuntimeWarning: 'demonov_forward_map.bitfinex_trade_collector' found in sys.modules after import of package 'demonov_forward_map', but prior to execution of 'demonov_forward_map.bitfinex_trade_collector'; this may result in unpredictable behaviour\"],\"last_relevant\":[\"Traceback (most recent call last):\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 242, in __iter__\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 336, in recv\",\"websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received\",\"Traceback (most recent call last):\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 242, in __iter__\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 336, in recv\",\"websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received\",\"Traceback (most recent call last):\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 242, in __iter__\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 336, in recv\",\"websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received\",\"Traceback (most recent call last):\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 242, in __iter__\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 336, in recv\",\"websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received\",\"Traceback (most recent call last):\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 242, in __iter__\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 336, in recv\",\"websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received\"],\"line_count\":81,\"rc\":0},\"mutation_scope\":\"NONE_READ_ONLY\",\"sequence_window\":{\"a\":72124,\"advanced_from_034\":false,\"b\":72124,\"baseline_034\":72124,\"grew\":false,\"vs_034\":72124},\"socket\":{\"established_total\":1,\"pid\":210213,\"remote_port_counts\":{\"443\":1},\"states\":{\"01\":1,\"0A\":1}},\"stack_exists\":true,\"stats\":{\"line\":\"demonov-shadow-8020-collector-1 43.29% 26.51MiB / 9.719GiB 315kB / 126kB\",\"rc\":0,\"stderr\":\"\"},\"top\":{\"lines\":[\"PID PPID COMMAND\",\"210213 210191 python\"],\"rc\":0,\"stderr\":\"\"}},\"state\":\"COMPLETE\"}\nSIGNALBOT035_HOLDS=[\"COLLECTOR_INTAKE_STILL_STALLED\"]\nSIGNALBOT035_DECISION=HOLD_COLLECTOR_INTAKE_STALLED_WITH_PROCESS_AND_TCP_ALIVE\nSIGNALBOT035_MUTATION_SCOPE=NO_RUNTIME_NO_GIT_NO_EXCHANGE_MUTATION\n" + "output": "ERROR_REGISTER_CHECK=OK\nREFERENCE_CHECK=OK\nAUTHORITY_CHECK_SCOPE=READABILITY_ONLY_INCIDENTS_NOT_CLOSED\nSB036_COLLECTOR={\"cmd\":[\"python\",\"-m\",\"demonov_forward_map.bitfinex_trade_collector\"],\"entrypoint\":null,\"id\":\"a546a70c3e8c\",\"image\":\"8020-demonov-shadow:e32760c69a4311728db9066ee8bf2bf66b1e5a70\",\"name\":\"demonov-shadow-8020-collector-1\",\"ok\":true,\"pid\":210213,\"restart_count\":13,\"running\":true,\"started_at\":\"2026-09-08T05:01:08.70385245Z\",\"status\":\"running\"}\nSB036_COLLECTOR_STATUS={\"age_sec\":0.4,\"exists\":true,\"values\":{\"fail_closed_reason\":\"source reconnect detected\",\"gap_detected\":false,\"post_finality_revision\":false,\"prospective_fail_closed_reason\":\"\",\"prospective_gap_detected\":false,\"prospective_reconnect_detected\":false,\"reconnect_detected\":true}}\nSB036_DB={\"d1_revisions_count\":0,\"event_kinds\":[[\"SEQUENCE\",180107],[\"RECONNECT\",10],[\"SESSION_START\",1]],\"exists\":true,\"finalized_d1_count\":0,\"latest_events\":[{\"event_kind\":\"SEQUENCE\",\"event_seq\":180118,\"received_at\":\"2026-09-08T05:28:14.303996+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2888},{\"event_kind\":\"SEQUENCE\",\"event_seq\":180117,\"received_at\":\"2026-09-08T05:28:14.290899+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2887},{\"event_kind\":\"SEQUENCE\",\"event_seq\":180116,\"received_at\":\"2026-09-08T05:28:14.127754+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2886},{\"event_kind\":\"SEQUENCE\",\"event_seq\":180115,\"received_at\":\"2026-09-08T05:28:13.967892+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2885},{\"event_kind\":\"SEQUENCE\",\"event_seq\":180114,\"received_at\":\"2026-09-08T05:28:13.801186+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2884},{\"event_kind\":\"SEQUENCE\",\"event_seq\":180113,\"received_at\":\"2026-09-08T05:28:13.628877+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2883},{\"event_kind\":\"SEQUENCE\",\"event_seq\":180112,\"received_at\":\"2026-09-08T05:28:13.621853+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2882},{\"event_kind\":\"SEQUENCE\",\"event_seq\":180111,\"received_at\":\"2026-09-08T05:28:13.614839+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2881},{\"event_kind\":\"SEQUENCE\",\"event_seq\":180110,\"received_at\":\"2026-09-08T05:28:13.607920+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2880},{\"event_kind\":\"SEQUENCE\",\"event_seq\":180109,\"received_at\":\"2026-09-08T05:28:13.594856+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2879},{\"event_kind\":\"SEQUENCE\",\"event_seq\":180108,\"received_at\":\"2026-09-08T05:28:13.425038+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2878},{\"event_kind\":\"SEQUENCE\",\"event_seq\":180107,\"received_at\":\"2026-09-08T05:28:13.271502+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2877},{\"event_kind\":\"SEQUENCE\",\"event_seq\":180106,\"received_at\":\"2026-09-08T05:28:13.112568+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2876},{\"event_kind\":\"SEQUENCE\",\"event_seq\":180105,\"received_at\":\"2026-09-08T05:28:13.101767+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2875},{\"event_kind\":\"SEQUENCE\",\"event_seq\":180104,\"received_at\":\"2026-09-08T05:28:13.094931+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2874},{\"event_kind\":\"SEQUENCE\",\"event_seq\":180103,\"received_at\":\"2026-09-08T05:28:13.086320+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2873},{\"event_kind\":\"SEQUENCE\",\"event_seq\":180102,\"received_at\":\"2026-09-08T05:28:13.055479+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2872},{\"event_kind\":\"SEQUENCE\",\"event_seq\":180101,\"received_at\":\"2026-09-08T05:28:10.388362+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2871},{\"event_kind\":\"SEQUENCE\",\"event_seq\":180100,\"received_at\":\"2026-09-08T05:28:10.352706+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2870},{\"event_kind\":\"SEQUENCE\",\"event_seq\":180099,\"received_at\":\"2026-09-08T05:28:07.280059+00:00\",\"session_hash\":\"253ffe9a26a5\",\"source_sequence\":2869}],\"latest_sessions\":[{\"events\":2888,\"first_at\":\"2026-09-08T05:01:09.298101+00:00\",\"last_at\":\"2026-09-08T05:28:14.303996+00:00\",\"max_seq\":2888,\"min_seq\":1,\"session_hash\":\"253ffe9a26a5\"},{\"events\":2475,\"first_at\":\"2026-09-08T04:54:28.087186+00:00\",\"last_at\":\"2026-09-08T05:01:08.350487+00:00\",\"max_seq\":2475,\"min_seq\":1,\"session_hash\":\"2b3998047f77\"},{\"events\":988,\"first_at\":\"2026-09-08T04:43:46.442548+00:00\",\"last_at\":\"2026-09-08T04:54:27.005150+00:00\",\"max_seq\":988,\"min_seq\":1,\"session_hash\":\"b501ae120c1f\"},{\"events\":589,\"first_at\":\"2026-09-08T04:42:44.434580+00:00\",\"last_at\":\"2026-09-08T04:43:45.521859+00:00\",\"max_seq\":589,\"min_seq\":1,\"session_hash\":\"10709eb54a7b\"},{\"events\":3620,\"first_at\":\"2026-09-08T03:52:02.239825+00:00\",\"last_at\":\"2026-09-08T04:42:43.449781+00:00\",\"max_seq\":3620,\"min_seq\":1,\"session_hash\":\"210de3583c8e\"},{\"events\":72124,\"first_at\":\"2026-09-07T15:04:59.188298+00:00\",\"last_at\":\"2026-09-08T03:52:00.952767+00:00\",\"max_seq\":72124,\"min_seq\":1,\"session_hash\":\"69bb22240441\"},{\"events\":1688,\"first_at\":\"2026-09-07T14:46:51.906734+00:00\",\"last_at\":\"2026-09-07T15:04:47.491753+00:00\",\"max_seq\":1688,\"min_seq\":1,\"session_hash\":\"d1d81c259d86\"},{\"events\":10295,\"first_at\":\"2026-09-07T13:30:08.973280+00:00\",\"last_at\":\"2026-09-07T14:46:39.866418+00:00\",\"max_seq\":10295,\"min_seq\":1,\"session_hash\":\"a2db9de2102e\"},{\"events\":14430,\"first_at\":\"2026-09-07T09:50:41.075840+00:00\",\"last_at\":\"2026-09-07T13:30:03.165612+00:00\",\"max_seq\":14430,\"min_seq\":1,\"session_hash\":\"8da25a454977\"},{\"events\":71006,\"first_at\":\"2026-09-06T18:48:31.906387+00:00\",\"last_at\":\"2026-09-07T09:50:13.818640+00:00\",\"max_seq\":71006,\"min_seq\":1,\"session_hash\":\"184e0e63b1c9\"},{\"events\":15,\"first_at\":\"2026-09-06T18:33:12.938622+00:00\",\"last_at\":\"2026-09-06T18:33:38.425961+00:00\",\"max_seq\":15,\"min_seq\":1,\"session_hash\":\"90adb5ba598b\"}],\"quick_check\":\"ok\",\"sequence_events\":{\"count\":180118,\"max_event_seq\":180118,\"max_received_at\":\"2026-09-08T05:28:14.303996+00:00\",\"max_source_sequence\":72124}}\nSB036_PROC={\"established_total\":1,\"fd_count\":7,\"pid\":210213,\"remote_port_counts\":{\"443\":1},\"tcp_states\":{\"01\":1,\"0A\":1},\"wchan\":\"futex_wait_queue\"}\nSB036_ENDPOINT={\"body\":\"[1]\",\"rc\":0,\"stderr\":\"\"}\nSB036_LOGS={\"keyword_counts\":{\"CLOSED\":5,\"CONNECTED\":0,\"DISCONNECT\":0,\"ERROR\":5,\"EXCEPTION\":5,\"FAIL_CLOSED\":0,\"FINAL\":0,\"GAP\":0,\"HEARTBEAT\":0,\"RECEIVED\":5,\"RECONNECT\":0,\"SOURCE_FINALITY\":0,\"TIMEOUT\":5,\"TRACEBACK\":5,\"WEBSOCKET\":15},\"last_lines\":[\"raise SystemExit(main())\",\"~~~~^^\",\"File \\\"/app/demonov_forward_map/bitfinex_trade_collector.py\\\", line 1175, in main\",\"for raw in ws:\",\"^^\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 242, in __iter__\",\"yield self.recv()\",\"~~~~~~~~~^^\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 336, in recv\",\"raise self.protocol.close_exc from self.recv_exc\",\"websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received\",\":130: RuntimeWarning: 'demonov_forward_map.bitfinex_trade_collector' found in sys.modules after import of package 'demonov_forward_map', but prior to execution of 'demonov_forward_map.bitfinex_trade_collector'; this may result in unpredictable behaviour\",\"Traceback (most recent call last):\",\"File \\\"\\\", line 203, in _run_module_as_main\",\"File \\\"\\\", line 88, in _run_code\",\"File \\\"/app/demonov_forward_map/bitfinex_trade_collector.py\\\", line 1246, in \",\"raise SystemExit(main())\",\"~~~~^^\",\"File \\\"/app/demonov_forward_map/bitfinex_trade_collector.py\\\", line 1175, in main\",\"for raw in ws:\",\"^^\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 242, in __iter__\",\"yield self.recv()\",\"~~~~~~~~~^^\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 336, in recv\",\"raise self.protocol.close_exc from self.recv_exc\",\"websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received\",\":130: RuntimeWarning: 'demonov_forward_map.bitfinex_trade_collector' found in sys.modules after import of package 'demonov_forward_map', but prior to execution of 'demonov_forward_map.bitfinex_trade_collector'; this may result in unpredictable behaviour\",\"Traceback (most recent call last):\",\"File \\\"\\\", line 203, in _run_module_as_main\",\"File \\\"\\\", line 88, in _run_code\",\"File \\\"/app/demonov_forward_map/bitfinex_trade_collector.py\\\", line 1246, in \",\"raise SystemExit(main())\",\"~~~~^^\",\"File \\\"/app/demonov_forward_map/bitfinex_trade_collector.py\\\", line 1175, in main\",\"for raw in ws:\",\"^^\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 242, in __iter__\",\"yield self.recv()\",\"~~~~~~~~~^^\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 336, in recv\",\"raise self.protocol.close_exc from self.recv_exc\",\"websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received\",\":130: RuntimeWarning: 'demonov_forward_map.bitfinex_trade_collector' found in sys.modules after import of package 'demonov_forward_map', but prior to execution of 'demonov_forward_map.bitfinex_trade_collector'; this may result in unpredictable behaviour\",\"Traceback (most recent call last):\",\"File \\\"\\\", line 203, in _run_module_as_main\",\"File \\\"\\\", line 88, in _run_code\",\"File \\\"/app/demonov_forward_map/bitfinex_trade_collector.py\\\", line 1246, in \",\"raise SystemExit(main())\",\"~~~~^^\",\"File \\\"/app/demonov_forward_map/bitfinex_trade_collector.py\\\", line 1175, in main\",\"for raw in ws:\",\"^^\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 242, in __iter__\",\"yield self.recv()\",\"~~~~~~~~~^^\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 336, in recv\",\"raise self.protocol.close_exc from self.recv_exc\",\"websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received\",\":130: RuntimeWarning: 'demonov_forward_map.bitfinex_trade_collector' found in sys.modules after import of package 'demonov_forward_map', but prior to execution of 'demonov_forward_map.bitfinex_trade_collector'; this may result in unpredictable behaviour\"],\"last_relevant\":[\"Traceback (most recent call last):\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 242, in __iter__\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 336, in recv\",\"websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received\",\"Traceback (most recent call last):\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 242, in __iter__\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 336, in recv\",\"websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received\",\"Traceback (most recent call last):\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 242, in __iter__\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 336, in recv\",\"websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received\",\"Traceback (most recent call last):\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 242, in __iter__\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 336, in recv\",\"websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received\",\"Traceback (most recent call last):\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 242, in __iter__\",\"File \\\"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\\\", line 336, in recv\",\"websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received\"],\"line_count\":81,\"rc\":0}\nSB036_SOURCE_WINDOWS=[{\"bytes\":42028,\"matches\":[{\"match\":\"gap_detected: bool\",\"match_line\":62,\"window\":[{\"line\":60,\"text\":\"@dataclass(frozen=True)\"},{\"line\":61,\"text\":\"class BitfinexCollectorStatus:\"},{\"line\":62,\"text\":\"gap_detected: bool\"},{\"line\":63,\"text\":\"reconnect_detected: bool\"},{\"line\":64,\"text\":\"post_finality_revision: bool\"}]},{\"match\":\"reconnect_detected: bool\",\"match_line\":63,\"window\":[{\"line\":61,\"text\":\"class BitfinexCollectorStatus:\"},{\"line\":62,\"text\":\"gap_detected: bool\"},{\"line\":63,\"text\":\"reconnect_detected: bool\"},{\"line\":64,\"text\":\"post_finality_revision: bool\"},{\"line\":65,\"text\":\"fail_closed_reason: str\"}]},{\"match\":\"post_finality_revision: bool\",\"match_line\":64,\"window\":[{\"line\":62,\"text\":\"gap_detected: bool\"},{\"line\":63,\"text\":\"reconnect_detected: bool\"},{\"line\":64,\"text\":\"post_finality_revision: bool\"},{\"line\":65,\"text\":\"fail_closed_reason: str\"},{\"line\":66,\"text\":\"\"}]},{\"match\":\"fail_closed_reason: str\",\"match_line\":65,\"window\":[{\"line\":63,\"text\":\"reconnect_detected: bool\"},{\"line\":64,\"text\":\"post_finality_revision: bool\"},{\"line\":65,\"text\":\"fail_closed_reason: str\"},{\"line\":66,\"text\":\"\"},{\"line\":67,\"text\":\"\"}]},{\"match\":\"self._db = sqlite3.connect(\",\"match_line\":124,\"window\":[{\"line\":122,\"text\":\")\"},{\"line\":123,\"text\":\"self.path.parent.mkdir(parents=True, exist_ok=True)\"},{\"line\":124,\"text\":\"self._db = sqlite3.connect(\"},{\"line\":125,\"text\":\"str(self.path),\"},{\"line\":126,\"text\":\"timeout=5,\"}]},{\"match\":\"timeout=5,\",\"match_line\":126,\"window\":[{\"line\":124,\"text\":\"self._db = sqlite3.connect(\"},{\"line\":125,\"text\":\"str(self.path),\"},{\"line\":126,\"text\":\"timeout=5,\"},{\"line\":127,\"text\":\"isolation_level=None,\"},{\"line\":128,\"text\":\")\"}]},{\"match\":\"received_at TEXT NOT NULL,\",\"match_line\":166,\"window\":[{\"line\":164,\"text\":\"venue_id TEXT NOT NULL,\"},{\"line\":165,\"text\":\"source_kind TEXT NOT NULL,\"},{\"line\":166,\"text\":\"received_at TEXT NOT NULL,\"},{\"line\":167,\"text\":\"source_sequence INTEGER NOT NULL,\"},{\"line\":168,\"text\":\"raw_payload_hash TEXT NOT NULL,\"}]},{\"match\":\"received_at TEXT NOT NULL,\",\"match_line\":176,\"window\":[{\"line\":174,\"text\":\"session_id TEXT NOT NULL,\"},{\"line\":175,\"text\":\"source_sequence INTEGER NOT NULL,\"},{\"line\":176,\"text\":\"received_at TEXT NOT NULL,\"},{\"line\":177,\"text\":\"event_kind TEXT NOT NULL\"},{\"line\":178,\"text\":\");\"}]},{\"match\":\"gap_detected=self._meta_get(\\\"gap_detected\\\") == \\\"1\\\",\",\"match_line\":246,\"window\":[{\"line\":244,\"text\":\"def _status(self) -> BitfinexCollectorStatus:\"},{\"line\":245,\"text\":\"return BitfinexCollectorStatus(\"},{\"line\":246,\"text\":\"gap_detected=self._meta_get(\\\"gap_detected\\\") == \\\"1\\\",\"},{\"line\":247,\"text\":\"reconnect_detected=self._meta_get(\\\"reconnect_detected\\\") == \\\"1\\\",\"},{\"line\":248,\"text\":\"post_finality_revision=(\"}]},{\"match\":\"reconnect_detected=self._meta_get(\\\"reconnect_detected\\\") == \\\"1\\\",\",\"match_line\":247,\"window\":[{\"line\":245,\"text\":\"return BitfinexCollectorStatus(\"},{\"line\":246,\"text\":\"gap_detected=self._meta_get(\\\"gap_detected\\\") == \\\"1\\\",\"},{\"line\":247,\"text\":\"reconnect_detected=self._meta_get(\\\"reconnect_detected\\\") == \\\"1\\\",\"},{\"line\":248,\"text\":\"post_finality_revision=(\"},{\"line\":249,\"text\":\"self._meta_get(\\\"post_finality_revision\\\") == \\\"1\\\"\"}]},{\"match\":\"post_finality_revision=(\",\"match_line\":248,\"window\":[{\"line\":246,\"text\":\"gap_detected=self._meta_get(\\\"gap_detected\\\") == \\\"1\\\",\"},{\"line\":247,\"text\":\"reconnect_detected=self._meta_get(\\\"reconnect_detected\\\") == \\\"1\\\",\"},{\"line\":248,\"text\":\"post_finality_revision=(\"},{\"line\":249,\"text\":\"self._meta_get(\\\"post_finality_revision\\\") == \\\"1\\\"\"},{\"line\":250,\"text\":\"),\"}]},{\"match\":\"self._meta_get(\\\"post_finality_revision\\\") == \\\"1\\\"\",\"match_line\":249,\"window\":[{\"line\":247,\"text\":\"reconnect_detected=self._meta_get(\\\"reconnect_detected\\\") == \\\"1\\\",\"},{\"line\":248,\"text\":\"post_finality_revision=(\"},{\"line\":249,\"text\":\"self._meta_get(\\\"post_finality_revision\\\") == \\\"1\\\"\"},{\"line\":250,\"text\":\"),\"},{\"line\":251,\"text\":\"fail_closed_reason=self._meta_get(\\\"fail_closed_reason\\\") or \\\"\\\",\"}]},{\"match\":\"fail_closed_reason=self._meta_get(\\\"fail_closed_reason\\\") or \\\"\\\",\",\"match_line\":251,\"window\":[{\"line\":249,\"text\":\"self._meta_get(\\\"post_finality_revision\\\") == \\\"1\\\"\"},{\"line\":250,\"text\":\"),\"},{\"line\":251,\"text\":\"fail_closed_reason=self._meta_get(\\\"fail_closed_reason\\\") or \\\"\\\",\"},{\"line\":252,\"text\":\")\"},{\"line\":253,\"text\":\"\"}]},{\"match\":\"prospective = self.current_prospective_source_state()\",\"match_line\":256,\"window\":[{\"line\":254,\"text\":\"def _persist_status_file(self) -> None:\"},{\"line\":255,\"text\":\"status = self._status()\"},{\"line\":256,\"text\":\"prospective = self.current_prospective_source_state()\"},{\"line\":257,\"text\":\"payload = {\"},{\"line\":258,\"text\":\"\\\"gap_detected\\\": status.gap_detected,\"}]},{\"match\":\"\\\"gap_detected\\\": status.gap_detected,\",\"match_line\":258,\"window\":[{\"line\":256,\"text\":\"prospective = self.current_prospective_source_state()\"},{\"line\":257,\"text\":\"payload = {\"},{\"line\":258,\"text\":\"\\\"gap_detected\\\": status.gap_detected,\"},{\"line\":259,\"text\":\"\\\"reconnect_detected\\\": status.reconnect_detected,\"},{\"line\":260,\"text\":\"\\\"post_finality_revision\\\": status.post_finality_revision,\"}]},{\"match\":\"\\\"reconnect_detected\\\": status.reconnect_detected,\",\"match_line\":259,\"window\":[{\"line\":257,\"text\":\"payload = {\"},{\"line\":258,\"text\":\"\\\"gap_detected\\\": status.gap_detected,\"},{\"line\":259,\"text\":\"\\\"reconnect_detected\\\": status.reconnect_detected,\"},{\"line\":260,\"text\":\"\\\"post_finality_revision\\\": status.post_finality_revision,\"},{\"line\":261,\"text\":\"\\\"fail_closed_reason\\\": status.fail_closed_reason,\"}]},{\"match\":\"\\\"post_finality_revision\\\": status.post_finality_revision,\",\"match_line\":260,\"window\":[{\"line\":258,\"text\":\"\\\"gap_detected\\\": status.gap_detected,\"},{\"line\":259,\"text\":\"\\\"reconnect_detected\\\": status.reconnect_detected,\"},{\"line\":260,\"text\":\"\\\"post_finality_revision\\\": status.post_finality_revision,\"},{\"line\":261,\"text\":\"\\\"fail_closed_reason\\\": status.fail_closed_reason,\"},{\"line\":262,\"text\":\"\\\"prospective_gap_detected\\\": prospective.gap_detected,\"}]},{\"match\":\"\\\"fail_closed_reason\\\": status.fail_closed_reason,\",\"match_line\":261,\"window\":[{\"line\":259,\"text\":\"\\\"reconnect_detected\\\": status.reconnect_detected,\"},{\"line\":260,\"text\":\"\\\"post_finality_revision\\\": status.post_finality_revision,\"},{\"line\":261,\"text\":\"\\\"fail_closed_reason\\\": status.fail_closed_reason,\"},{\"line\":262,\"text\":\"\\\"prospective_gap_detected\\\": prospective.gap_detected,\"},{\"line\":263,\"text\":\"\\\"prospective_reconnect_detected\\\": prospective.reconnect_detected,\"}]},{\"match\":\"\\\"prospective_gap_detected\\\": prospective.gap_detected,\",\"match_line\":262,\"window\":[{\"line\":260,\"text\":\"\\\"post_finality_revision\\\": status.post_finality_revision,\"},{\"line\":261,\"text\":\"\\\"fail_closed_reason\\\": status.fail_closed_reason,\"},{\"line\":262,\"text\":\"\\\"prospective_gap_detected\\\": prospective.gap_detected,\"},{\"line\":263,\"text\":\"\\\"prospective_reconnect_detected\\\": prospective.reconnect_detected,\"},{\"line\":264,\"text\":\"\\\"prospective_fail_closed_reason\\\": prospective.fail_closed_reason,\"}]},{\"match\":\"\\\"prospective_reconnect_detected\\\": prospective.reconnect_detected,\",\"match_line\":263,\"window\":[{\"line\":261,\"text\":\"\\\"fail_closed_reason\\\": status.fail_closed_reason,\"},{\"line\":262,\"text\":\"\\\"prospective_gap_detected\\\": prospective.gap_detected,\"},{\"line\":263,\"text\":\"\\\"prospective_reconnect_detected\\\": prospective.reconnect_detected,\"},{\"line\":264,\"text\":\"\\\"prospective_fail_closed_reason\\\": prospective.fail_closed_reason,\"},{\"line\":265,\"text\":\"\\\"updated_at\\\": datetime.now(timezone.utc).isoformat(),\"}]},{\"match\":\"\\\"prospective_fail_closed_reason\\\": prospective.fail_closed_reason,\",\"match_line\":264,\"window\":[{\"line\":262,\"text\":\"\\\"prospective_gap_detected\\\": prospective.gap_detected,\"},{\"line\":263,\"text\":\"\\\"prospective_reconnect_detected\\\": prospective.reconnect_detected,\"},{\"line\":264,\"text\":\"\\\"prospective_fail_closed_reason\\\": prospective.fail_closed_reason,\"},{\"line\":265,\"text\":\"\\\"updated_at\\\": datetime.now(timezone.utc).isoformat(),\"},{\"line\":266,\"text\":\"}\"}]},{\"match\":\"def _set_fail_closed(self, key: str, reason: str) -> None:\",\"match_line\":280,\"window\":[{\"line\":278,\"text\":\"os.replace(tmp, target)\"},{\"line\":279,\"text\":\"\"},{\"line\":280,\"text\":\"def _set_fail_closed(self, key: str, reason: str) -> None:\"},{\"line\":281,\"text\":\"self._meta_set(key, \\\"1\\\")\"},{\"line\":282,\"text\":\"if not self._meta_get(\\\"fail_closed_reason\\\"):\"}]},{\"match\":\"if not self._meta_get(\\\"fail_closed_reason\\\"):\",\"match_line\":282,\"window\":[{\"line\":280,\"text\":\"def _set_fail_closed(self, key: str, reason: str) -> None:\"},{\"line\":281,\"text\":\"self._meta_set(key, \\\"1\\\")\"},{\"line\":282,\"text\":\"if not self._meta_get(\\\"fail_closed_reason\\\"):\"},{\"line\":283,\"text\":\"self._meta_set(\\\"fail_closed_reason\\\", reason)\"},{\"line\":284,\"text\":\"self._persist_status_file()\"}]},{\"match\":\"self._meta_set(\\\"fail_closed_reason\\\", reason)\",\"match_line\":283,\"window\":[{\"line\":281,\"text\":\"self._meta_set(key, \\\"1\\\")\"},{\"line\":282,\"text\":\"if not self._meta_get(\\\"fail_closed_reason\\\"):\"},{\"line\":283,\"text\":\"self._meta_set(\\\"fail_closed_reason\\\", reason)\"},{\"line\":284,\"text\":\"self._persist_status_file()\"},{\"line\":285,\"text\":\"\"}]},{\"match\":\"receipt_id, venue_id, source_kind, received_at,\",\"match_line\":292,\"window\":[{\"line\":290,\"text\":\"\\\"\\\"\\\"\"},{\"line\":291,\"text\":\"INSERT OR IGNORE INTO source_receipts(\"},{\"line\":292,\"text\":\"receipt_id, venue_id, source_kind, received_at,\"},{\"line\":293,\"text\":\"source_sequence, raw_payload_hash, collector_session_id,\"},{\"line\":294,\"text\":\"receipt_json\"}]},{\"match\":\"receipt.received_at.isoformat(),\",\"match_line\":301,\"window\":[{\"line\":299,\"text\":\"receipt.venue_id,\"},{\"line\":300,\"text\":\"receipt.source_kind,\"},{\"line\":301,\"text\":\"receipt.received_at.isoformat(),\"},{\"line\":302,\"text\":\"receipt.source_sequence,\"},{\"line\":303,\"text\":\"receipt.raw_payload_hash,\"}]},{\"match\":\"received_at: datetime,\",\"match_line\":315,\"window\":[{\"line\":313,\"text\":\"session_id: str,\"},{\"line\":314,\"text\":\"sequence: int,\"},{\"line\":315,\"text\":\"received_at: datetime,\"},{\"line\":316,\"text\":\") -> None:\"},{\"line\":317,\"text\":\"if not isinstance(session_id, str) or not session_id:\"}]},{\"match\":\"received_at = _utc(received_at, \\\"received_at\\\")\",\"match_line\":327,\"window\":[{\"line\":325,\"text\":\"\\\"source sequence must be a nonnegative integer\\\"\"},{\"line\":326,\"text\":\")\"},{\"line\":327,\"text\":\"received_at = _utc(received_at, \\\"received_at\\\")\"},{\"line\":328,\"text\":\"active = self._meta_get(\\\"active_session_id\\\")\"},{\"line\":329,\"text\":\"if active is None:\"}]},{\"match\":\"session_id,source_sequence,received_at,event_kind\",\"match_line\":335,\"window\":[{\"line\":333,\"text\":\"\\\"\\\"\\\"\"},{\"line\":334,\"text\":\"INSERT INTO sequence_events(\"},{\"line\":335,\"text\":\"session_id,source_sequence,received_at,event_kind\"},{\"line\":336,\"text\":\") VALUES(?,?,?,?)\"},{\"line\":337,\"text\":\"\\\"\\\"\\\",\"}]},{\"match\":\"received_at.isoformat(),\",\"match_line\":341,\"window\":[{\"line\":339,\"text\":\"session_id,\"},{\"line\":340,\"text\":\"sequence,\"},{\"line\":341,\"text\":\"received_at.isoformat(),\"},{\"line\":342,\"text\":\"\\\"SESSION_START\\\",\"},{\"line\":343,\"text\":\"),\"}]},{\"match\":\"self._meta_set(\\\"reconnect_detected\\\", \\\"1\\\")\",\"match_line\":348,\"window\":[{\"line\":346,\"text\":\"return\"},{\"line\":347,\"text\":\"if active != session_id:\"},{\"line\":348,\"text\":\"self._meta_set(\\\"reconnect_detected\\\", \\\"1\\\")\"},{\"line\":349,\"text\":\"if not self._meta_get(\\\"fail_closed_reason\\\"):\"},{\"line\":350,\"text\":\"self._meta_set(\"}]},{\"match\":\"if not self._meta_get(\\\"fail_closed_reason\\\"):\",\"match_line\":349,\"window\":[{\"line\":347,\"text\":\"if active != session_id:\"},{\"line\":348,\"text\":\"self._meta_set(\\\"reconnect_detected\\\", \\\"1\\\")\"},{\"line\":349,\"text\":\"if not self._meta_get(\\\"fail_closed_reason\\\"):\"},{\"line\":350,\"text\":\"self._meta_set(\"},{\"line\":351,\"text\":\"\\\"fail_closed_reason\\\",\"}]},{\"match\":\"\\\"fail_closed_reason\\\",\",\"match_line\":351,\"window\":[{\"line\":349,\"text\":\"if not self._meta_get(\\\"fail_closed_reason\\\"):\"},{\"line\":350,\"text\":\"self._meta_set(\"},{\"line\":351,\"text\":\"\\\"fail_closed_reason\\\",\"},{\"line\":352,\"text\":\"\\\"source reconnect detected\\\",\"},{\"line\":353,\"text\":\")\"}]},{\"match\":\"\\\"source reconnect detected\\\",\",\"match_line\":352,\"window\":[{\"line\":350,\"text\":\"self._meta_set(\"},{\"line\":351,\"text\":\"\\\"fail_closed_reason\\\",\"},{\"line\":352,\"text\":\"\\\"source reconnect detected\\\",\"},{\"line\":353,\"text\":\")\"},{\"line\":354,\"text\":\"self._meta_set(\\\"active_session_id\\\", session_id)\"}]},{\"match\":\"session_id,source_sequence,received_at,event_kind\",\"match_line\":359,\"window\":[{\"line\":357,\"text\":\"\\\"\\\"\\\"\"},{\"line\":358,\"text\":\"INSERT INTO sequence_events(\"},{\"line\":359,\"text\":\"session_id,source_sequence,received_at,event_kind\"},{\"line\":360,\"text\":\") VALUES(?,?,?,?)\"},{\"line\":361,\"text\":\"\\\"\\\"\\\",\"}]},{\"match\":\"received_at.isoformat(),\",\"match_line\":365,\"window\":[{\"line\":363,\"text\":\"session_id,\"},{\"line\":364,\"text\":\"sequence,\"},{\"line\":365,\"text\":\"received_at.isoformat(),\"},{\"line\":366,\"text\":\"\\\"RECONNECT\\\",\"},{\"line\":367,\"text\":\"),\"}]},{\"match\":\"\\\"RECONNECT\\\",\",\"match_line\":366,\"window\":[{\"line\":364,\"text\":\"sequence,\"},{\"line\":365,\"text\":\"received_at.isoformat(),\"},{\"line\":366,\"text\":\"\\\"RECONNECT\\\",\"},{\"line\":367,\"text\":\"),\"},{\"line\":368,\"text\":\")\"}]},{\"match\":\"session_id,source_sequence,received_at,event_kind\",\"match_line\":378,\"window\":[{\"line\":376,\"text\":\"\\\"\\\"\\\"\"},{\"line\":377,\"text\":\"INSERT INTO sequence_events(\"},{\"line\":378,\"text\":\"session_id,source_sequence,received_at,event_kind\"},{\"line\":379,\"text\":\") VALUES(?,?,?,?)\"},{\"line\":380,\"text\":\"\\\"\\\"\\\",\"}]},{\"match\":\"received_at.isoformat(),\",\"match_line\":384,\"window\":[{\"line\":382,\"text\":\"session_id,\"},{\"line\":383,\"text\":\"sequence,\"},{\"line\":384,\"text\":\"received_at.isoformat(),\"},{\"line\":385,\"text\":\"\\\"GAP\\\",\"},{\"line\":386,\"text\":\"),\"}]},{\"match\":\"self._set_fail_closed(\",\"match_line\":388,\"window\":[{\"line\":386,\"text\":\"),\"},{\"line\":387,\"text\":\")\"},{\"line\":388,\"text\":\"self._set_fail_closed(\"},{\"line\":389,\"text\":\"\\\"gap_detected\\\",\"},{\"line\":390,\"text\":\"f\\\"sequence gap expected {expected} got {sequence}\\\",\"}]},{\"match\":\"\\\"gap_detected\\\",\",\"match_line\":389,\"window\":[{\"line\":387,\"text\":\")\"},{\"line\":388,\"text\":\"self._set_fail_closed(\"},{\"line\":389,\"text\":\"\\\"gap_detected\\\",\"},{\"line\":390,\"text\":\"f\\\"sequence gap expected {expected} got {sequence}\\\",\"},{\"line\":391,\"text\":\")\"}]},{\"match\":\"session_id,source_sequence,received_at,event_kind\",\"match_line\":400,\"window\":[{\"line\":398,\"text\":\"\\\"\\\"\\\"\"},{\"line\":399,\"text\":\"INSERT INTO sequence_events(\"},{\"line\":400,\"text\":\"session_id,source_sequence,received_at,event_kind\"},{\"line\":401,\"text\":\") VALUES(?,?,?,?)\"},{\"line\":402,\"text\":\"\\\"\\\"\\\",\"}]},{\"match\":\"received_at.isoformat(),\",\"match_line\":406,\"window\":[{\"line\":404,\"text\":\"session_id,\"},{\"line\":405,\"text\":\"sequence,\"},{\"line\":406,\"text\":\"received_at.isoformat(),\"},{\"line\":407,\"text\":\"\\\"SEQUENCE\\\",\"},{\"line\":408,\"text\":\"),\"}]},{\"match\":\"def current_prospective_source_state(self) -> BitfinexCollectorStatus:\",\"match_line\":412,\"window\":[{\"line\":410,\"text\":\"self._persist_status_file()\"},{\"line\":411,\"text\":\"\"},{\"line\":412,\"text\":\"def current_prospective_source_state(self) -> BitfinexCollectorStatus:\"},{\"line\":413,\"text\":\"# GAP/RECONNECT are enforced per logical D1 by finalize_ready_d1().\"},{\"line\":414,\"text\":\"# Historical events must not poison later uncontaminated D1 bars.\"}]},{\"match\":\"# GAP/RECONNECT are enforced per logical D1 by finalize_ready_d1().\",\"match_line\":413,\"window\":[{\"line\":411,\"text\":\"\"},{\"line\":412,\"text\":\"def current_prospective_source_state(self) -> BitfinexCollectorStatus:\"},{\"line\":413,\"text\":\"# GAP/RECONNECT are enforced per logical D1 by finalize_ready_d1().\"},{\"line\":414,\"text\":\"# Historical events must not poison later uncontaminated D1 bars.\"},{\"line\":415,\"text\":\"post_finality_revision = (\"}]},{\"match\":\"post_finality_revision = (\",\"match_line\":415,\"window\":[{\"line\":413,\"text\":\"# GAP/RECONNECT are enforced per logical D1 by finalize_ready_d1().\"},{\"line\":414,\"text\":\"# Historical events must not poison later uncontaminated D1 bars.\"},{\"line\":415,\"text\":\"post_finality_revision = (\"},{\"line\":416,\"text\":\"self._meta_get(\\\"post_finality_revision\\\") == \\\"1\\\"\"},{\"line\":417,\"text\":\")\"}]},{\"match\":\"self._meta_get(\\\"post_finality_revision\\\") == \\\"1\\\"\",\"match_line\":416,\"window\":[{\"line\":414,\"text\":\"# Historical events must not poison later uncontaminated D1 bars.\"},{\"line\":415,\"text\":\"post_finality_revision = (\"},{\"line\":416,\"text\":\"self._meta_get(\\\"post_finality_revision\\\") == \\\"1\\\"\"},{\"line\":417,\"text\":\")\"},{\"line\":418,\"text\":\"reason = (\"}]},{\"match\":\"if post_finality_revision\",\"match_line\":420,\"window\":[{\"line\":418,\"text\":\"reason = (\"},{\"line\":419,\"text\":\"\\\"post-finality source revision detected\\\"\"},{\"line\":420,\"text\":\"if post_finality_revision\"},{\"line\":421,\"text\":\"else \\\"\\\"\"},{\"line\":422,\"text\":\")\"}]},{\"match\":\"gap_detected=False,\",\"match_line\":424,\"window\":[{\"line\":422,\"text\":\")\"},{\"line\":423,\"text\":\"return BitfinexCollectorStatus(\"},{\"line\":424,\"text\":\"gap_detected=False,\"},{\"line\":425,\"text\":\"reconnect_detected=False,\"},{\"line\":426,\"text\":\"post_finality_revision=post_finality_revision,\"}]},{\"match\":\"reconnect_detected=False,\",\"match_line\":425,\"window\":[{\"line\":423,\"text\":\"return BitfinexCollectorStatus(\"},{\"line\":424,\"text\":\"gap_detected=False,\"},{\"line\":425,\"text\":\"reconnect_detected=False,\"},{\"line\":426,\"text\":\"post_finality_revision=post_finality_revision,\"},{\"line\":427,\"text\":\"fail_closed_reason=reason,\"}]},{\"match\":\"post_finality_revision=post_finality_revision,\",\"match_line\":426,\"window\":[{\"line\":424,\"text\":\"gap_detected=False,\"},{\"line\":425,\"text\":\"reconnect_detected=False,\"},{\"line\":426,\"text\":\"post_finality_revision=post_finality_revision,\"},{\"line\":427,\"text\":\"fail_closed_reason=reason,\"},{\"line\":428,\"text\":\")\"}]},{\"match\":\"fail_closed_reason=reason,\",\"match_line\":427,\"window\":[{\"line\":425,\"text\":\"reconnect_detected=False,\"},{\"line\":426,\"text\":\"post_finality_revision=post_finality_revision,\"},{\"line\":427,\"text\":\"fail_closed_reason=reason,\"},{\"line\":428,\"text\":\")\"},{\"line\":429,\"text\":\"\"}]},{\"match\":\"\\\"SELECT received_at FROM source_receipts WHERE receipt_id=?\\\",\",\"match_line\":442,\"window\":[{\"line\":440,\"text\":\"raise DemonovError(\\\"BitfinexCanonicalTradeV1 required\\\")\"},{\"line\":441,\"text\":\"receipt = self._db.execute(\"},{\"line\":442,\"text\":\"\\\"SELECT received_at FROM source_receipts WHERE receipt_id=?\\\",\"},{\"line\":443,\"text\":\"(receipt_id,),\"},{\"line\":444,\"text\":\").fetchone()\"}]},{\"match\":\"D1FinalityState.POST_FINALITY_SOURCE_REVISION,\",\"match_line\":529,\"window\":[{\"line\":527,\"text\":\"validate_d1_finality_transition(\"},{\"line\":528,\"text\":\"current,\"},{\"line\":529,\"text\":\"D1FinalityState.POST_FINALITY_SOURCE_REVISION,\"},{\"line\":530,\"text\":\")\"},{\"line\":531,\"text\":\"self._db.execute(\"}]},{\"match\":\".POST_FINALITY_SOURCE_REVISION.value,\",\"match_line\":539,\"window\":[{\"line\":537,\"text\":\"(\"},{\"line\":538,\"text\":\"D1FinalityState\"},{\"line\":539,\"text\":\".POST_FINALITY_SOURCE_REVISION.value,\"},{\"line\":540,\"text\":\"logical_id,\"},{\"line\":541,\"text\":\"),\"}]},{\"match\":\"self._meta_set(\\\"post_finality_revision\\\", \\\"1\\\")\",\"match_line\":543,\"window\":[{\"line\":541,\"text\":\"),\"},{\"line\":542,\"text\":\")\"},{\"line\":543,\"text\":\"self._meta_set(\\\"post_finality_revision\\\", \\\"1\\\")\"},{\"line\":544,\"text\":\"self._meta_set(\"},{\"line\":545,\"text\":\"\\\"fail_closed_reason\\\",\"}]},{\"match\":\"\\\"fail_closed_reason\\\",\",\"match_line\":545,\"window\":[{\"line\":543,\"text\":\"self._meta_set(\\\"post_finality_revision\\\", \\\"1\\\")\"},{\"line\":544,\"text\":\"self._meta_set(\"},{\"line\":545,\"text\":\"\\\"fail_closed_reason\\\",\"},{\"line\":546,\"text\":\"\\\"post-finality source revision detected\\\",\"},{\"line\":547,\"text\":\")\"}]},{\"match\":\"result = \\\"POST_FINALITY_REVISION\\\"\",\"match_line\":548,\"window\":[{\"line\":546,\"text\":\"\\\"post-finality source revision detected\\\",\"},{\"line\":547,\"text\":\")\"},{\"line\":548,\"text\":\"result = \\\"POST_FINALITY_REVISION\\\"\"},{\"line\":549,\"text\":\"self._db.execute(\\\"COMMIT\\\")\"},{\"line\":550,\"text\":\"except Exception:\"}]},{\"match\":\"if result == \\\"POST_FINALITY_REVISION\\\":\",\"match_line\":553,\"window\":[{\"line\":551,\"text\":\"self._db.execute(\\\"ROLLBACK\\\")\"},{\"line\":552,\"text\":\"raise\"},{\"line\":553,\"text\":\"if result == \\\"POST_FINALITY_REVISION\\\":\"},{\"line\":554,\"text\":\"self._persist_status_file()\"},{\"line\":555,\"text\":\"return result\"}]},{\"match\":\"def finalize_ready_d1(\",\"match_line\":605,\"window\":[{\"line\":603,\"text\":\")\"},{\"line\":604,\"text\":\"\"},{\"line\":605,\"text\":\"def finalize_ready_d1(\"},{\"line\":606,\"text\":\"self,\"},{\"line\":607,\"text\":\"logical_d1: LogicalD1V1,\"}]},{\"match\":\"SELECT MIN(received_at) AS first_received\",\"match_line\":626,\"window\":[{\"line\":624,\"text\":\"first_sequence = self._db.execute(\"},{\"line\":625,\"text\":\"\\\"\\\"\\\"\"},{\"line\":626,\"text\":\"SELECT MIN(received_at) AS first_received\"},{\"line\":627,\"text\":\"FROM sequence_events\"},{\"line\":628,\"text\":\"\\\"\\\"\\\"\"}]},{\"match\":\").fetchone()[\\\"first_received\\\"]\",\"match_line\":629,\"window\":[{\"line\":627,\"text\":\"FROM sequence_events\"},{\"line\":628,\"text\":\"\\\"\\\"\\\"\"},{\"line\":629,\"text\":\").fetchone()[\\\"first_received\\\"]\"},{\"line\":630,\"text\":\"if (\"},{\"line\":631,\"text\":\"first_sequence is None\"}]},{\"match\":\"boundary_received_at = _dt(boundary[\\\"received_at\\\"])\",\"match_line\":641,\"window\":[{\"line\":639,\"text\":\"if boundary is None:\"},{\"line\":640,\"text\":\"return None\"},{\"line\":641,\"text\":\"boundary_received_at = _dt(boundary[\\\"received_at\\\"])\"},{\"line\":642,\"text\":\"if finalized_at < boundary_received_at:\"},{\"line\":643,\"text\":\"raise DemonovError(\"}]},{\"match\":\"if finalized_at < boundary_received_at:\",\"match_line\":642,\"window\":[{\"line\":640,\"text\":\"return None\"},{\"line\":641,\"text\":\"boundary_received_at = _dt(boundary[\\\"received_at\\\"])\"},{\"line\":642,\"text\":\"if finalized_at < boundary_received_at:\"},{\"line\":643,\"text\":\"raise DemonovError(\"},{\"line\":644,\"text\":\"\\\"finalized_at precedes source boundary proof\\\"\"}]},{\"match\":\"AND received_at>=?\",\"match_line\":652,\"window\":[{\"line\":650,\"text\":\"FROM sequence_events\"},{\"line\":651,\"text\":\"WHERE event_kind='GAP'\"},{\"line\":652,\"text\":\"AND received_at>=?\"},{\"line\":653,\"text\":\"AND received_at<=?\"},{\"line\":654,\"text\":\"LIMIT 1\"}]},{\"match\":\"AND received_at<=?\",\"match_line\":653,\"window\":[{\"line\":651,\"text\":\"WHERE event_kind='GAP'\"},{\"line\":652,\"text\":\"AND received_at>=?\"},{\"line\":653,\"text\":\"AND received_at<=?\"},{\"line\":654,\"text\":\"LIMIT 1\"},{\"line\":655,\"text\":\"\\\"\\\"\\\",\"}]},{\"match\":\"boundary_received_at.isoformat(),\",\"match_line\":658,\"window\":[{\"line\":656,\"text\":\"(\"},{\"line\":657,\"text\":\"logical_d1.open_at.isoformat(),\"},{\"line\":658,\"text\":\"boundary_received_at.isoformat(),\"},{\"line\":659,\"text\":\"),\"},{\"line\":660,\"text\":\").fetchone()\"}]},{\"match\":\"reconnect = self._db.execute(\",\"match_line\":666,\"window\":[{\"line\":664,\"text\":\")\"},{\"line\":665,\"text\":\"\"},{\"line\":666,\"text\":\"reconnect = self._db.execute(\"},{\"line\":667,\"text\":\"\\\"\\\"\\\"\"},{\"line\":668,\"text\":\"SELECT 1\"}]},{\"match\":\"WHERE event_kind='RECONNECT'\",\"match_line\":670,\"window\":[{\"line\":668,\"text\":\"SELECT 1\"},{\"line\":669,\"text\":\"FROM sequence_events\"},{\"line\":670,\"text\":\"WHERE event_kind='RECONNECT'\"},{\"line\":671,\"text\":\"AND received_at>=?\"},{\"line\":672,\"text\":\"AND received_at<=?\"}]},{\"match\":\"AND received_at>=?\",\"match_line\":671,\"window\":[{\"line\":669,\"text\":\"FROM sequence_events\"},{\"line\":670,\"text\":\"WHERE event_kind='RECONNECT'\"},{\"line\":671,\"text\":\"AND received_at>=?\"},{\"line\":672,\"text\":\"AND received_at<=?\"},{\"line\":673,\"text\":\"LIMIT 1\"}]},{\"match\":\"AND received_at<=?\",\"match_line\":672,\"window\":[{\"line\":670,\"text\":\"WHERE event_kind='RECONNECT'\"},{\"line\":671,\"text\":\"AND received_at>=?\"},{\"line\":672,\"text\":\"AND received_at<=?\"},{\"line\":673,\"text\":\"LIMIT 1\"},{\"line\":674,\"text\":\"\\\"\\\"\\\",\"}]},{\"match\":\"boundary_received_at.isoformat(),\",\"match_line\":677,\"window\":[{\"line\":675,\"text\":\"(\"},{\"line\":676,\"text\":\"logical_d1.open_at.isoformat(),\"},{\"line\":677,\"text\":\"boundary_received_at.isoformat(),\"},{\"line\":678,\"text\":\"),\"},{\"line\":679,\"text\":\").fetchone()\"}]},{\"match\":\"if reconnect is not None:\",\"match_line\":680,\"window\":[{\"line\":678,\"text\":\"),\"},{\"line\":679,\"text\":\").fetchone()\"},{\"line\":680,\"text\":\"if reconnect is not None:\"},{\"line\":681,\"text\":\"raise DemonovError(\"},{\"line\":682,\"text\":\"\\\"reconnect prevents D1 finalization\\\"\"}]},{\"match\":\"\\\"reconnect prevents D1 finalization\\\"\",\"match_line\":682,\"window\":[{\"line\":680,\"text\":\"if reconnect is not None:\"},{\"line\":681,\"text\":\"raise DemonovError(\"},{\"line\":682,\"text\":\"\\\"reconnect prevents D1 finalization\\\"\"},{\"line\":683,\"text\":\")\"},{\"line\":684,\"text\":\"\"}]},{\"match\":\"sr.received_at,\",\"match_line\":901,\"window\":[{\"line\":899,\"text\":\"SELECT\"},{\"line\":900,\"text\":\"tr.mts,\"},{\"line\":901,\"text\":\"sr.received_at,\"},{\"line\":902,\"text\":\"sr.collector_session_id,\"},{\"line\":903,\"text\":\"sr.source_sequence\"}]},{\"match\":\"\\\"received_at\\\": receipt.received_at.isoformat(),\",\"match_line\":962,\"window\":[{\"line\":960,\"text\":\"\\\"venue_id\\\": receipt.venue_id,\"},{\"line\":961,\"text\":\"\\\"source_kind\\\": receipt.source_kind,\"},{\"line\":962,\"text\":\"\\\"received_at\\\": receipt.received_at.isoformat(),\"},{\"line\":963,\"text\":\"\\\"source_sequence\\\": receipt.source_sequence,\"},{\"line\":964,\"text\":\"\\\"raw_payload_hash\\\": receipt.raw_payload_hash,\"}]},{\"match\":\"def finalize_ready_d1_without_stopping_collection(\",\"match_line\":1102,\"window\":[{\"line\":1100,\"text\":\"\"},{\"line\":1101,\"text\":\"\"},{\"line\":1102,\"text\":\"def finalize_ready_d1_without_stopping_collection(\"},{\"line\":1103,\"text\":\"journal: SQLiteBitfinexSourceJournal,\"},{\"line\":1104,\"text\":\"logical_d1: LogicalD1V1,\"}]},{\"match\":\"return journal.finalize_ready_d1(\",\"match_line\":1110,\"window\":[{\"line\":1108,\"text\":\"\\\"\\\"\\\"Keep collection alive when one logical D1 is non-finalizable.\\\"\\\"\\\"\"},{\"line\":1109,\"text\":\"try:\"},{\"line\":1110,\"text\":\"return journal.finalize_ready_d1(\"},{\"line\":1111,\"text\":\"logical_d1,\"},{\"line\":1112,\"text\":\"finalized_at=finalized_at,\"}]},{\"match\":\"\\\"reconnect prevents D1 finalization\\\",\",\"match_line\":1116,\"window\":[{\"line\":1114,\"text\":\"except DemonovError as exc:\"},{\"line\":1115,\"text\":\"if str(exc) in {\"},{\"line\":1116,\"text\":\"\\\"reconnect prevents D1 finalization\\\",\"},{\"line\":1117,\"text\":\"\\\"sequence gap prevents D1 finalization\\\",\"},{\"line\":1118,\"text\":\"}:\"}]},{\"match\":\"return \\\"WS_HEARTBEAT\\\"\",\"match_line\":1129,\"window\":[{\"line\":1127,\"text\":\"and message[1] == \\\"hb\\\"\"},{\"line\":1128,\"text\":\"):\"},{\"line\":1129,\"text\":\"return \\\"WS_HEARTBEAT\\\"\"},{\"line\":1130,\"text\":\"return \\\"WS_TRADES\\\"\"},{\"line\":1131,\"text\":\"\"}]}],\"path\":\"/opt/stacks/8020-demonov-shadow/.deploy/SIGNALBOT-260906-DEPLOY-022/demonov_forward_map/bitfinex_trade_collector.py\",\"sha256\":\"d21cf0c3a0d4fcaf9210a57da04fd560dba4952ac1dd5a085abcc4e76ccf2eb0\"},{\"bytes\":15930,\"matches\":[{\"match\":\"POST_FINALITY_SOURCE_REVISION = \\\"POST_FINALITY_SOURCE_REVISION\\\"\",\"match_line\":69,\"window\":[{\"line\":67,\"text\":\"RECONCILING = \\\"RECONCILING\\\"\"},{\"line\":68,\"text\":\"FINALIZED = \\\"FINALIZED\\\"\"},{\"line\":69,\"text\":\"POST_FINALITY_SOURCE_REVISION = \\\"POST_FINALITY_SOURCE_REVISION\\\"\"},{\"line\":70,\"text\":\"\"},{\"line\":71,\"text\":\"\"}]},{\"match\":\"received_at: datetime\",\"match_line\":77,\"window\":[{\"line\":75,\"text\":\"venue_id: str\"},{\"line\":76,\"text\":\"source_kind: str\"},{\"line\":77,\"text\":\"received_at: datetime\"},{\"line\":78,\"text\":\"source_sequence: int\"},{\"line\":79,\"text\":\"raw_payload_hash: str\"}]},{\"match\":\"_utc(self.received_at, \\\"received_at\\\")\",\"match_line\":86,\"window\":[{\"line\":84,\"text\":\"_required_text(self.source_kind, \\\"source_kind\\\")\"},{\"line\":85,\"text\":\"_required_text(self.collector_session_id, \\\"collector_session_id\\\")\"},{\"line\":86,\"text\":\"_utc(self.received_at, \\\"received_at\\\")\"},{\"line\":87,\"text\":\"if not isinstance(self.source_sequence, int) or isinstance(self.source_sequence, bool) or self.source_sequence < 0:\"},{\"line\":88,\"text\":\"raise DemonovError(\\\"source_sequence must be a nonnegative integer\\\")\"}]},{\"match\":\"\\\"received_at\\\": self.received_at,\",\"match_line\":99,\"window\":[{\"line\":97,\"text\":\"\\\"venue_id\\\": self.venue_id,\"},{\"line\":98,\"text\":\"\\\"source_kind\\\": self.source_kind,\"},{\"line\":99,\"text\":\"\\\"received_at\\\": self.received_at,\"},{\"line\":100,\"text\":\"\\\"source_sequence\\\": self.source_sequence,\"},{\"line\":101,\"text\":\"\\\"raw_payload_hash\\\": self.raw_payload_hash,\"}]},{\"match\":\"\\\"received_at\\\": kwargs[\\\"received_at\\\"],\",\"match_line\":111,\"window\":[{\"line\":109,\"text\":\"\\\"venue_id\\\": kwargs[\\\"venue_id\\\"],\"},{\"line\":110,\"text\":\"\\\"source_kind\\\": kwargs[\\\"source_kind\\\"],\"},{\"line\":111,\"text\":\"\\\"received_at\\\": kwargs[\\\"received_at\\\"],\"},{\"line\":112,\"text\":\"\\\"source_sequence\\\": kwargs[\\\"source_sequence\\\"],\"},{\"line\":113,\"text\":\"\\\"raw_payload_hash\\\": kwargs[\\\"raw_payload_hash\\\"],\"}]},{\"match\":\"(D1FinalityState.FINALIZED, D1FinalityState.POST_FINALITY_SOURCE_REVISION),\",\"match_line\":394,\"window\":[{\"line\":392,\"text\":\"(D1FinalityState.BOUNDARY_CROSSED, D1FinalityState.RECONCILING),\"},{\"line\":393,\"text\":\"(D1FinalityState.RECONCILING, D1FinalityState.FINALIZED),\"},{\"line\":394,\"text\":\"(D1FinalityState.FINALIZED, D1FinalityState.POST_FINALITY_SOURCE_REVISION),\"},{\"line\":395,\"text\":\"}\"},{\"line\":396,\"text\":\"\"}]},{\"match\":\"received_at=record.finalized.finalized_at,\",\"match_line\":429,\"window\":[{\"line\":427,\"text\":\"close_at=record.logical_d1.close_at,\"},{\"line\":428,\"text\":\"known_at=record.finalized.finalized_at,\"},{\"line\":429,\"text\":\"received_at=record.finalized.finalized_at,\"},{\"line\":430,\"text\":\"open=record.revision.open,\"},{\"line\":431,\"text\":\"high=record.revision.high,\"}]}],\"path\":\"/opt/stacks/8020-demonov-shadow/.deploy/SIGNALBOT-260906-DEPLOY-022/demonov_forward_map/live_d1_finality.py\",\"sha256\":\"89873a9f2d026416c6c19533fa7d1ea404a8854c19fedb986395f4aabc0fe662\"},{\"bytes\":17506,\"matches\":[{\"match\":\"\\\"received_at\\\": bar.received_at.isoformat(),\",\"match_line\":98,\"window\":[{\"line\":96,\"text\":\"\\\"close_at\\\": bar.close_at.isoformat(),\"},{\"line\":97,\"text\":\"\\\"known_at\\\": bar.known_at.isoformat(),\"},{\"line\":98,\"text\":\"\\\"received_at\\\": bar.received_at.isoformat(),\"},{\"line\":99,\"text\":\"\\\"open\\\": str(bar.open), \\\"high\\\": str(bar.high), \\\"low\\\": str(bar.low),\"},{\"line\":100,\"text\":\"\\\"close\\\": str(bar.close), \\\"volume\\\": str(bar.volume),\"}]},{\"match\":\"self.db = sqlite3.connect(str(self.path), timeout=10, isolation_level=None)\",\"match_line\":151,\"window\":[{\"line\":149,\"text\":\"def __init__(self, path: str | Path, provenance: ExperimentProvenance):\"},{\"line\":150,\"text\":\"self.path = Path(path)\"},{\"line\":151,\"text\":\"self.db = sqlite3.connect(str(self.path), timeout=10, isolation_level=None)\"},{\"line\":152,\"text\":\"self.db.row_factory = sqlite3.Row\"},{\"line\":153,\"text\":\"self.db.execute(\\\"PRAGMA journal_mode=WAL\\\")\"}]},{\"match\":\"known_at=datetime.fromisoformat(x[\\\"known_at\\\"]), received_at=datetime.fromisoformat(x[\\\"received_at\\\"]),\",\"match_line\":217,\"window\":[{\"line\":215,\"text\":\"bar_id=x[\\\"bar_id\\\"], market_key=x[\\\"market_key\\\"],\"},{\"line\":216,\"text\":\"open_at=datetime.fromisoformat(x[\\\"open_at\\\"]), close_at=datetime.fromisoformat(x[\\\"close_at\\\"]),\"},{\"line\":217,\"text\":\"known_at=datetime.fromisoformat(x[\\\"known_at\\\"]), received_at=datetime.fromisoformat(x[\\\"received_at\\\"]),\"},{\"line\":218,\"text\":\"open=Decimal(x[\\\"open\\\"]), high=Decimal(x[\\\"high\\\"]), low=Decimal(x[\\\"low\\\"]),\"},{\"line\":219,\"text\":\"close=Decimal(x[\\\"close\\\"]), volume=Decimal(x[\\\"volume\\\"]),\"}]}],\"path\":\"/opt/stacks/8020-demonov-shadow/src/demonov_forward_map/live_prospective.py\",\"sha256\":\"2ba6be15613146223118af3d46b68b331ad0a53a154a692e4e17e13bbd793e1b\"},{\"bytes\":17506,\"matches\":[{\"match\":\"\\\"received_at\\\": bar.received_at.isoformat(),\",\"match_line\":98,\"window\":[{\"line\":96,\"text\":\"\\\"close_at\\\": bar.close_at.isoformat(),\"},{\"line\":97,\"text\":\"\\\"known_at\\\": bar.known_at.isoformat(),\"},{\"line\":98,\"text\":\"\\\"received_at\\\": bar.received_at.isoformat(),\"},{\"line\":99,\"text\":\"\\\"open\\\": str(bar.open), \\\"high\\\": str(bar.high), \\\"low\\\": str(bar.low),\"},{\"line\":100,\"text\":\"\\\"close\\\": str(bar.close), \\\"volume\\\": str(bar.volume),\"}]},{\"match\":\"self.db = sqlite3.connect(str(self.path), timeout=10, isolation_level=None)\",\"match_line\":151,\"window\":[{\"line\":149,\"text\":\"def __init__(self, path: str | Path, provenance: ExperimentProvenance):\"},{\"line\":150,\"text\":\"self.path = Path(path)\"},{\"line\":151,\"text\":\"self.db = sqlite3.connect(str(self.path), timeout=10, isolation_level=None)\"},{\"line\":152,\"text\":\"self.db.row_factory = sqlite3.Row\"},{\"line\":153,\"text\":\"self.db.execute(\\\"PRAGMA journal_mode=WAL\\\")\"}]},{\"match\":\"known_at=datetime.fromisoformat(x[\\\"known_at\\\"]), received_at=datetime.fromisoformat(x[\\\"received_at\\\"]),\",\"match_line\":217,\"window\":[{\"line\":215,\"text\":\"bar_id=x[\\\"bar_id\\\"], market_key=x[\\\"market_key\\\"],\"},{\"line\":216,\"text\":\"open_at=datetime.fromisoformat(x[\\\"open_at\\\"]), close_at=datetime.fromisoformat(x[\\\"close_at\\\"]),\"},{\"line\":217,\"text\":\"known_at=datetime.fromisoformat(x[\\\"known_at\\\"]), received_at=datetime.fromisoformat(x[\\\"received_at\\\"]),\"},{\"line\":218,\"text\":\"open=Decimal(x[\\\"open\\\"]), high=Decimal(x[\\\"high\\\"]), low=Decimal(x[\\\"low\\\"]),\"},{\"line\":219,\"text\":\"close=Decimal(x[\\\"close\\\"]), volume=Decimal(x[\\\"volume\\\"]),\"}]}],\"path\":\"/opt/stacks/8020-demonov-shadow/.weekly/SIGNALBOT-260906-WEEKLY-LEGACY-030/src/demonov_forward_map/live_prospective.py\",\"sha256\":\"2ba6be15613146223118af3d46b68b331ad0a53a154a692e4e17e13bbd793e1b\"},{\"bytes\":37380,\"matches\":[{\"match\":\"\\\"received_at\\\": bar.received_at.isoformat(),\",\"match_line\":184,\"window\":[{\"line\":182,\"text\":\"\\\"close_at\\\": bar.close_at.isoformat(),\"},{\"line\":183,\"text\":\"\\\"known_at\\\": bar.known_at.isoformat(),\"},{\"line\":184,\"text\":\"\\\"received_at\\\": bar.received_at.isoformat(),\"},{\"line\":185,\"text\":\"\\\"open\\\": str(bar.open), \\\"high\\\": str(bar.high), \\\"low\\\": str(bar.low),\"},{\"line\":186,\"text\":\"\\\"close\\\": str(bar.close), \\\"volume\\\": str(bar.volume),\"}]},{\"match\":\"self.db = sqlite3.connect(str(self.path), timeout=10, isolation_level=None)\",\"match_line\":237,\"window\":[{\"line\":235,\"text\":\"def __init__(self, path: str | Path, provenance: ExperimentProvenance):\"},{\"line\":236,\"text\":\"self.path = Path(path)\"},{\"line\":237,\"text\":\"self.db = sqlite3.connect(str(self.path), timeout=10, isolation_level=None)\"},{\"line\":238,\"text\":\"self.db.row_factory = sqlite3.Row\"},{\"line\":239,\"text\":\"self.db.execute(\\\"PRAGMA journal_mode=WAL\\\")\"}]},{\"match\":\"known_at=datetime.fromisoformat(x[\\\"known_at\\\"]), received_at=datetime.fromisoformat(x[\\\"received_at\\\"]),\",\"match_line\":324,\"window\":[{\"line\":322,\"text\":\"bar_id=x[\\\"bar_id\\\"], market_key=x[\\\"market_key\\\"],\"},{\"line\":323,\"text\":\"open_at=datetime.fromisoformat(x[\\\"open_at\\\"]), close_at=datetime.fromisoformat(x[\\\"close_at\\\"]),\"},{\"line\":324,\"text\":\"known_at=datetime.fromisoformat(x[\\\"known_at\\\"]), received_at=datetime.fromisoformat(x[\\\"received_at\\\"]),\"},{\"line\":325,\"text\":\"open=Decimal(x[\\\"open\\\"]), high=Decimal(x[\\\"high\\\"]), low=Decimal(x[\\\"low\\\"]),\"},{\"line\":326,\"text\":\"close=Decimal(x[\\\"close\\\"]), volume=Decimal(x[\\\"volume\\\"]),\"}]}],\"path\":\"/opt/stacks/8020-demonov-shadow/.deploy/SIGNALBOT-260906-DEPLOY-022/demonov_forward_map/live_prospective.py\",\"sha256\":\"f83f48dfeb4dc1382ebf3c77b7ec27deaeac6eec4a5dc097f90600963f0e4e98\"},{\"bytes\":12681,\"matches\":[{\"match\":\"FAIL_CLOSED = \\\"FAIL_CLOSED\\\"\",\"match_line\":16,\"window\":[{\"line\":14,\"text\":\"AWAITING_PRIMARY_FINALITY = \\\"AWAITING_PRIMARY_FINALITY\\\"\"},{\"line\":15,\"text\":\"DEGRADED = \\\"DEGRADED\\\"\"},{\"line\":16,\"text\":\"FAIL_CLOSED = \\\"FAIL_CLOSED\\\"\"},{\"line\":17,\"text\":\"\"},{\"line\":18,\"text\":\"\"}]},{\"match\":\"return sqlite3.connect(uri, uri=True, timeout=5)\",\"match_line\":62,\"window\":[{\"line\":60,\"text\":\"def _open_ro(path: Path):\"},{\"line\":61,\"text\":\"uri = path.resolve().as_uri() + \\\"?mode=ro\\\"\"},{\"line\":62,\"text\":\"return sqlite3.connect(uri, uri=True, timeout=5)\"},{\"line\":63,\"text\":\"\"},{\"line\":64,\"text\":\"\"}]},{\"match\":\"\\\"collector_heartbeat_slo_seconds\\\": _slo(\",\"match_line\":195,\"window\":[{\"line\":193,\"text\":\"\"},{\"line\":194,\"text\":\"slo = {\"},{\"line\":195,\"text\":\"\\\"collector_heartbeat_slo_seconds\\\": _slo(\"},{\"line\":196,\"text\":\"\\\"COLLECTOR_HEARTBEAT_SLO_SECONDS\\\"\"},{\"line\":197,\"text\":\"),\"}]},{\"match\":\"\\\"COLLECTOR_HEARTBEAT_SLO_SECONDS\\\"\",\"match_line\":196,\"window\":[{\"line\":194,\"text\":\"slo = {\"},{\"line\":195,\"text\":\"\\\"collector_heartbeat_slo_seconds\\\": _slo(\"},{\"line\":196,\"text\":\"\\\"COLLECTOR_HEARTBEAT_SLO_SECONDS\\\"\"},{\"line\":197,\"text\":\"),\"},{\"line\":198,\"text\":\"\\\"worker_heartbeat_slo_seconds\\\": _slo(\"}]},{\"match\":\"\\\"worker_heartbeat_slo_seconds\\\": _slo(\",\"match_line\":198,\"window\":[{\"line\":196,\"text\":\"\\\"COLLECTOR_HEARTBEAT_SLO_SECONDS\\\"\"},{\"line\":197,\"text\":\"),\"},{\"line\":198,\"text\":\"\\\"worker_heartbeat_slo_seconds\\\": _slo(\"},{\"line\":199,\"text\":\"\\\"WORKER_HEARTBEAT_SLO_SECONDS\\\"\"},{\"line\":200,\"text\":\"),\"}]},{\"match\":\"\\\"WORKER_HEARTBEAT_SLO_SECONDS\\\"\",\"match_line\":199,\"window\":[{\"line\":197,\"text\":\"),\"},{\"line\":198,\"text\":\"\\\"worker_heartbeat_slo_seconds\\\": _slo(\"},{\"line\":199,\"text\":\"\\\"WORKER_HEARTBEAT_SLO_SECONDS\\\"\"},{\"line\":200,\"text\":\"),\"},{\"line\":201,\"text\":\"\\\"relay_heartbeat_slo_seconds\\\": _slo(\"}]},{\"match\":\"\\\"relay_heartbeat_slo_seconds\\\": _slo(\",\"match_line\":201,\"window\":[{\"line\":199,\"text\":\"\\\"WORKER_HEARTBEAT_SLO_SECONDS\\\"\"},{\"line\":200,\"text\":\"),\"},{\"line\":201,\"text\":\"\\\"relay_heartbeat_slo_seconds\\\": _slo(\"},{\"line\":202,\"text\":\"\\\"RELAY_HEARTBEAT_SLO_SECONDS\\\"\"},{\"line\":203,\"text\":\"),\"}]},{\"match\":\"\\\"RELAY_HEARTBEAT_SLO_SECONDS\\\"\",\"match_line\":202,\"window\":[{\"line\":200,\"text\":\"),\"},{\"line\":201,\"text\":\"\\\"relay_heartbeat_slo_seconds\\\": _slo(\"},{\"line\":202,\"text\":\"\\\"RELAY_HEARTBEAT_SLO_SECONDS\\\"\"},{\"line\":203,\"text\":\"),\"},{\"line\":204,\"text\":\"\\\"primary_finality_slo_seconds\\\": _slo(\"}]},{\"match\":\"worker_age = _age_seconds(current, worker.get(\\\"heartbeat_at\\\"))\",\"match_line\":213,\"window\":[{\"line\":211,\"text\":\"\"},{\"line\":212,\"text\":\"collector_age = _age_seconds(current, collector.get(\\\"updated_at\\\"))\"},{\"line\":213,\"text\":\"worker_age = _age_seconds(current, worker.get(\\\"heartbeat_at\\\"))\"},{\"line\":214,\"text\":\"relay_age = _age_seconds(current, relay.get(\\\"heartbeat_at\\\"))\"},{\"line\":215,\"text\":\"\"}]},{\"match\":\"relay_age = _age_seconds(current, relay.get(\\\"heartbeat_at\\\"))\",\"match_line\":214,\"window\":[{\"line\":212,\"text\":\"collector_age = _age_seconds(current, collector.get(\\\"updated_at\\\"))\"},{\"line\":213,\"text\":\"worker_age = _age_seconds(current, worker.get(\\\"heartbeat_at\\\"))\"},{\"line\":214,\"text\":\"relay_age = _age_seconds(current, relay.get(\\\"heartbeat_at\\\"))\"},{\"line\":215,\"text\":\"\"},{\"line\":216,\"text\":\"source_db = data / \\\"bitfinex_source.db\\\"\"}]},{\"match\":\"prospective_gap = collector.get(\\\"prospective_gap_detected\\\", collector.get(\\\"gap_detected\\\")) is True\",\"match_line\":245,\"window\":[{\"line\":243,\"text\":\"scientific_fail = True\"},{\"line\":244,\"text\":\"\"},{\"line\":245,\"text\":\"prospective_gap = collector.get(\\\"prospective_gap_detected\\\", collector.get(\\\"gap_detected\\\")) is True\"},{\"line\":246,\"text\":\"prospective_reconnect = collector.get(\\\"prospective_reconnect_detected\\\", collector.get(\\\"reconnect_detected\\\")) is True\"},{\"line\":247,\"text\":\"if prospective_gap:\"}]},{\"match\":\"prospective_reconnect = collector.get(\\\"prospective_reconnect_detected\\\", collector.get(\\\"reconnect_detected\\\")) is True\",\"match_line\":246,\"window\":[{\"line\":244,\"text\":\"\"},{\"line\":245,\"text\":\"prospective_gap = collector.get(\\\"prospective_gap_detected\\\", collector.get(\\\"gap_detected\\\")) is True\"},{\"line\":246,\"text\":\"prospective_reconnect = collector.get(\\\"prospective_reconnect_detected\\\", collector.get(\\\"reconnect_detected\\\")) is True\"},{\"line\":247,\"text\":\"if prospective_gap:\"},{\"line\":248,\"text\":\"_append_reason(reasons, \\\"SOURCE_SEQUENCE_GAP\\\")\"}]},{\"match\":\"if prospective_reconnect:\",\"match_line\":250,\"window\":[{\"line\":248,\"text\":\"_append_reason(reasons, \\\"SOURCE_SEQUENCE_GAP\\\")\"},{\"line\":249,\"text\":\"scientific_fail = True\"},{\"line\":250,\"text\":\"if prospective_reconnect:\"},{\"line\":251,\"text\":\"_append_reason(reasons, \\\"SOURCE_RECONNECT\\\")\"},{\"line\":252,\"text\":\"scientific_fail = True\"}]},{\"match\":\"_append_reason(reasons, \\\"SOURCE_RECONNECT\\\")\",\"match_line\":251,\"window\":[{\"line\":249,\"text\":\"scientific_fail = True\"},{\"line\":250,\"text\":\"if prospective_reconnect:\"},{\"line\":251,\"text\":\"_append_reason(reasons, \\\"SOURCE_RECONNECT\\\")\"},{\"line\":252,\"text\":\"scientific_fail = True\"},{\"line\":253,\"text\":\"if collector.get(\\\"post_finality_revision\\\") is True:\"}]},{\"match\":\"if collector.get(\\\"post_finality_revision\\\") is True:\",\"match_line\":253,\"window\":[{\"line\":251,\"text\":\"_append_reason(reasons, \\\"SOURCE_RECONNECT\\\")\"},{\"line\":252,\"text\":\"scientific_fail = True\"},{\"line\":253,\"text\":\"if collector.get(\\\"post_finality_revision\\\") is True:\"},{\"line\":254,\"text\":\"_append_reason(reasons, \\\"POST_FINALITY_SOURCE_REVISION\\\")\"},{\"line\":255,\"text\":\"scientific_fail = True\"}]},{\"match\":\"_append_reason(reasons, \\\"POST_FINALITY_SOURCE_REVISION\\\")\",\"match_line\":254,\"window\":[{\"line\":252,\"text\":\"scientific_fail = True\"},{\"line\":253,\"text\":\"if collector.get(\\\"post_finality_revision\\\") is True:\"},{\"line\":254,\"text\":\"_append_reason(reasons, \\\"POST_FINALITY_SOURCE_REVISION\\\")\"},{\"line\":255,\"text\":\"scientific_fail = True\"},{\"line\":256,\"text\":\"\"}]},{\"match\":\"collector_slo = slo[\\\"collector_heartbeat_slo_seconds\\\"]\",\"match_line\":257,\"window\":[{\"line\":255,\"text\":\"scientific_fail = True\"},{\"line\":256,\"text\":\"\"},{\"line\":257,\"text\":\"collector_slo = slo[\\\"collector_heartbeat_slo_seconds\\\"]\"},{\"line\":258,\"text\":\"if (\"},{\"line\":259,\"text\":\"collector_slo is not None\"}]},{\"match\":\"_append_reason(reasons, \\\"STALE_COLLECTOR_HEARTBEAT\\\")\",\"match_line\":265,\"window\":[{\"line\":263,\"text\":\")\"},{\"line\":264,\"text\":\"):\"},{\"line\":265,\"text\":\"_append_reason(reasons, \\\"STALE_COLLECTOR_HEARTBEAT\\\")\"},{\"line\":266,\"text\":\"scientific_fail = True\"},{\"line\":267,\"text\":\"\"}]},{\"match\":\"worker_slo = slo[\\\"worker_heartbeat_slo_seconds\\\"]\",\"match_line\":268,\"window\":[{\"line\":266,\"text\":\"scientific_fail = True\"},{\"line\":267,\"text\":\"\"},{\"line\":268,\"text\":\"worker_slo = slo[\\\"worker_heartbeat_slo_seconds\\\"]\"},{\"line\":269,\"text\":\"if (\"},{\"line\":270,\"text\":\"worker_slo is not None\"}]},{\"match\":\"_append_reason(reasons, \\\"STALE_WORKER_HEARTBEAT\\\")\",\"match_line\":273,\"window\":[{\"line\":271,\"text\":\"and (worker_age is None or worker_age > worker_slo)\"},{\"line\":272,\"text\":\"):\"},{\"line\":273,\"text\":\"_append_reason(reasons, \\\"STALE_WORKER_HEARTBEAT\\\")\"},{\"line\":274,\"text\":\"scientific_fail = True\"},{\"line\":275,\"text\":\"\"}]},{\"match\":\"relay_slo = slo[\\\"relay_heartbeat_slo_seconds\\\"]\",\"match_line\":276,\"window\":[{\"line\":274,\"text\":\"scientific_fail = True\"},{\"line\":275,\"text\":\"\"},{\"line\":276,\"text\":\"relay_slo = slo[\\\"relay_heartbeat_slo_seconds\\\"]\"},{\"line\":277,\"text\":\"if (\"},{\"line\":278,\"text\":\"relay_slo is not None\"}]},{\"match\":\"_append_reason(reasons, \\\"STALE_RELAY_HEARTBEAT\\\")\",\"match_line\":281,\"window\":[{\"line\":279,\"text\":\"and (relay_age is None or relay_age > relay_slo)\"},{\"line\":280,\"text\":\"):\"},{\"line\":281,\"text\":\"_append_reason(reasons, \\\"STALE_RELAY_HEARTBEAT\\\")\"},{\"line\":282,\"text\":\"degraded = True\"},{\"line\":283,\"text\":\"\"}]},{\"match\":\"elif worker and worker.get(\\\"status\\\") == \\\"FAIL_CLOSED\\\":\",\"match_line\":286,\"window\":[{\"line\":284,\"text\":\"if worker.get(\\\"status\\\") == \\\"AWAITING_PRIMARY_FINALITY\\\":\"},{\"line\":285,\"text\":\"_append_reason(reasons, \\\"AWAITING_PRIMARY_FINALITY\\\")\"},{\"line\":286,\"text\":\"elif worker and worker.get(\\\"status\\\") == \\\"FAIL_CLOSED\\\":\"},{\"line\":287,\"text\":\"_append_reason(reasons, \\\"WORKER_FAIL_CLOSED\\\")\"},{\"line\":288,\"text\":\"scientific_fail = True\"}]},{\"match\":\"_append_reason(reasons, \\\"WORKER_FAIL_CLOSED\\\")\",\"match_line\":287,\"window\":[{\"line\":285,\"text\":\"_append_reason(reasons, \\\"AWAITING_PRIMARY_FINALITY\\\")\"},{\"line\":286,\"text\":\"elif worker and worker.get(\\\"status\\\") == \\\"FAIL_CLOSED\\\":\"},{\"line\":287,\"text\":\"_append_reason(reasons, \\\"WORKER_FAIL_CLOSED\\\")\"},{\"line\":288,\"text\":\"scientific_fail = True\"},{\"line\":289,\"text\":\"\"}]},{\"match\":\"elif relay and relay.get(\\\"status\\\") == \\\"FAIL_CLOSED\\\":\",\"match_line\":312,\"window\":[{\"line\":310,\"text\":\"_append_reason(reasons, \\\"INDETERMINATE_DELIVERY\\\")\"},{\"line\":311,\"text\":\"degraded = True\"},{\"line\":312,\"text\":\"elif relay and relay.get(\\\"status\\\") == \\\"FAIL_CLOSED\\\":\"},{\"line\":313,\"text\":\"_append_reason(reasons, \\\"RELAY_FAIL_CLOSED\\\")\"},{\"line\":314,\"text\":\"degraded = True\"}]},{\"match\":\"_append_reason(reasons, \\\"RELAY_FAIL_CLOSED\\\")\",\"match_line\":313,\"window\":[{\"line\":311,\"text\":\"degraded = True\"},{\"line\":312,\"text\":\"elif relay and relay.get(\\\"status\\\") == \\\"FAIL_CLOSED\\\":\"},{\"line\":313,\"text\":\"_append_reason(reasons, \\\"RELAY_FAIL_CLOSED\\\")\"},{\"line\":314,\"text\":\"degraded = True\"},{\"line\":315,\"text\":\"\"}]},{\"match\":\"state = LiveHealthState.FAIL_CLOSED\",\"match_line\":339,\"window\":[{\"line\":337,\"text\":\"\"},{\"line\":338,\"text\":\"if scientific_fail:\"},{\"line\":339,\"text\":\"state = LiveHealthState.FAIL_CLOSED\"},{\"line\":340,\"text\":\"elif degraded:\"},{\"line\":341,\"text\":\"state = LiveHealthState.DEGRADED\"}]},{\"match\":\"state != LiveHealthState.FAIL_CLOSED\",\"match_line\":351,\"window\":[{\"line\":349,\"text\":\"\\\"reason_codes\\\": reasons,\"},{\"line\":350,\"text\":\"\\\"prospective_research_collection_allowed\\\": (\"},{\"line\":351,\"text\":\"state != LiveHealthState.FAIL_CLOSED\"},{\"line\":352,\"text\":\"),\"},{\"line\":353,\"text\":\"\\\"production_launch_allowed\\\": False,\"}]},{\"match\":\"\\\"collector_heartbeat_fresh\\\": (\",\"match_line\":359,\"window\":[{\"line\":357,\"text\":\"\\\"runtime_manifest_id\\\": runtime_manifest_id,\"},{\"line\":358,\"text\":\"\\\"experiment_id\\\": worker.get(\\\"experiment_id\\\"),\"},{\"line\":359,\"text\":\"\\\"collector_heartbeat_fresh\\\": (\"},{\"line\":360,\"text\":\"collector_age is not None\"},{\"line\":361,\"text\":\"and slo[\\\"collector_heartbeat_slo_seconds\\\"] is not None\"}]},{\"match\":\"and slo[\\\"collector_heartbeat_slo_seconds\\\"] is not None\",\"match_line\":361,\"window\":[{\"line\":359,\"text\":\"\\\"collector_heartbeat_fresh\\\": (\"},{\"line\":360,\"text\":\"collector_age is not None\"},{\"line\":361,\"text\":\"and slo[\\\"collector_heartbeat_slo_seconds\\\"] is not None\"},{\"line\":362,\"text\":\"and collector_age <= slo[\\\"collector_heartbeat_slo_seconds\\\"]\"},{\"line\":363,\"text\":\"),\"}]},{\"match\":\"and collector_age <= slo[\\\"collector_heartbeat_slo_seconds\\\"]\",\"match_line\":362,\"window\":[{\"line\":360,\"text\":\"collector_age is not None\"},{\"line\":361,\"text\":\"and slo[\\\"collector_heartbeat_slo_seconds\\\"] is not None\"},{\"line\":362,\"text\":\"and collector_age <= slo[\\\"collector_heartbeat_slo_seconds\\\"]\"},{\"line\":363,\"text\":\"),\"},{\"line\":364,\"text\":\"\\\"worker_heartbeat_fresh\\\": (\"}]},{\"match\":\"\\\"worker_heartbeat_fresh\\\": (\",\"match_line\":364,\"window\":[{\"line\":362,\"text\":\"and collector_age <= slo[\\\"collector_heartbeat_slo_seconds\\\"]\"},{\"line\":363,\"text\":\"),\"},{\"line\":364,\"text\":\"\\\"worker_heartbeat_fresh\\\": (\"},{\"line\":365,\"text\":\"worker_age is not None\"},{\"line\":366,\"text\":\"and slo[\\\"worker_heartbeat_slo_seconds\\\"] is not None\"}]},{\"match\":\"and slo[\\\"worker_heartbeat_slo_seconds\\\"] is not None\",\"match_line\":366,\"window\":[{\"line\":364,\"text\":\"\\\"worker_heartbeat_fresh\\\": (\"},{\"line\":365,\"text\":\"worker_age is not None\"},{\"line\":366,\"text\":\"and slo[\\\"worker_heartbeat_slo_seconds\\\"] is not None\"},{\"line\":367,\"text\":\"and worker_age <= slo[\\\"worker_heartbeat_slo_seconds\\\"]\"},{\"line\":368,\"text\":\"),\"}]},{\"match\":\"and worker_age <= slo[\\\"worker_heartbeat_slo_seconds\\\"]\",\"match_line\":367,\"window\":[{\"line\":365,\"text\":\"worker_age is not None\"},{\"line\":366,\"text\":\"and slo[\\\"worker_heartbeat_slo_seconds\\\"] is not None\"},{\"line\":367,\"text\":\"and worker_age <= slo[\\\"worker_heartbeat_slo_seconds\\\"]\"},{\"line\":368,\"text\":\"),\"},{\"line\":369,\"text\":\"\\\"relay_heartbeat_fresh\\\": (\"}]},{\"match\":\"\\\"relay_heartbeat_fresh\\\": (\",\"match_line\":369,\"window\":[{\"line\":367,\"text\":\"and worker_age <= slo[\\\"worker_heartbeat_slo_seconds\\\"]\"},{\"line\":368,\"text\":\"),\"},{\"line\":369,\"text\":\"\\\"relay_heartbeat_fresh\\\": (\"},{\"line\":370,\"text\":\"relay_age is not None\"},{\"line\":371,\"text\":\"and slo[\\\"relay_heartbeat_slo_seconds\\\"] is not None\"}]},{\"match\":\"and slo[\\\"relay_heartbeat_slo_seconds\\\"] is not None\",\"match_line\":371,\"window\":[{\"line\":369,\"text\":\"\\\"relay_heartbeat_fresh\\\": (\"},{\"line\":370,\"text\":\"relay_age is not None\"},{\"line\":371,\"text\":\"and slo[\\\"relay_heartbeat_slo_seconds\\\"] is not None\"},{\"line\":372,\"text\":\"and relay_age <= slo[\\\"relay_heartbeat_slo_seconds\\\"]\"},{\"line\":373,\"text\":\"),\"}]},{\"match\":\"and relay_age <= slo[\\\"relay_heartbeat_slo_seconds\\\"]\",\"match_line\":372,\"window\":[{\"line\":370,\"text\":\"relay_age is not None\"},{\"line\":371,\"text\":\"and slo[\\\"relay_heartbeat_slo_seconds\\\"] is not None\"},{\"line\":372,\"text\":\"and relay_age <= slo[\\\"relay_heartbeat_slo_seconds\\\"]\"},{\"line\":373,\"text\":\"),\"},{\"line\":374,\"text\":\"\\\"collector_heartbeat_age_seconds\\\": collector_age,\"}]},{\"match\":\"\\\"collector_heartbeat_age_seconds\\\": collector_age,\",\"match_line\":374,\"window\":[{\"line\":372,\"text\":\"and relay_age <= slo[\\\"relay_heartbeat_slo_seconds\\\"]\"},{\"line\":373,\"text\":\"),\"},{\"line\":374,\"text\":\"\\\"collector_heartbeat_age_seconds\\\": collector_age,\"},{\"line\":375,\"text\":\"\\\"worker_heartbeat_age_seconds\\\": worker_age,\"},{\"line\":376,\"text\":\"\\\"relay_heartbeat_age_seconds\\\": relay_age,\"}]},{\"match\":\"\\\"worker_heartbeat_age_seconds\\\": worker_age,\",\"match_line\":375,\"window\":[{\"line\":373,\"text\":\"),\"},{\"line\":374,\"text\":\"\\\"collector_heartbeat_age_seconds\\\": collector_age,\"},{\"line\":375,\"text\":\"\\\"worker_heartbeat_age_seconds\\\": worker_age,\"},{\"line\":376,\"text\":\"\\\"relay_heartbeat_age_seconds\\\": relay_age,\"},{\"line\":377,\"text\":\"\\\"last_finalized_primary_d1_close\\\": last_finalized,\"}]},{\"match\":\"\\\"relay_heartbeat_age_seconds\\\": relay_age,\",\"match_line\":376,\"window\":[{\"line\":374,\"text\":\"\\\"collector_heartbeat_age_seconds\\\": collector_age,\"},{\"line\":375,\"text\":\"\\\"worker_heartbeat_age_seconds\\\": worker_age,\"},{\"line\":376,\"text\":\"\\\"relay_heartbeat_age_seconds\\\": relay_age,\"},{\"line\":377,\"text\":\"\\\"last_finalized_primary_d1_close\\\": last_finalized,\"},{\"line\":378,\"text\":\"\\\"last_finalized_primary_d1_age_seconds\\\": last_finalized_age,\"}]},{\"match\":\"\\\"source_gap_detected\\\": collector.get(\\\"gap_detected\\\") is True,\",\"match_line\":380,\"window\":[{\"line\":378,\"text\":\"\\\"last_finalized_primary_d1_age_seconds\\\": last_finalized_age,\"},{\"line\":379,\"text\":\"\\\"current_logical_d1_finality_state\\\": current_finality_state,\"},{\"line\":380,\"text\":\"\\\"source_gap_detected\\\": collector.get(\\\"gap_detected\\\") is True,\"},{\"line\":381,\"text\":\"\\\"source_reconnect_detected\\\": (\"},{\"line\":382,\"text\":\"collector.get(\\\"reconnect_detected\\\") is True\"}]},{\"match\":\"\\\"source_reconnect_detected\\\": (\",\"match_line\":381,\"window\":[{\"line\":379,\"text\":\"\\\"current_logical_d1_finality_state\\\": current_finality_state,\"},{\"line\":380,\"text\":\"\\\"source_gap_detected\\\": collector.get(\\\"gap_detected\\\") is True,\"},{\"line\":381,\"text\":\"\\\"source_reconnect_detected\\\": (\"},{\"line\":382,\"text\":\"collector.get(\\\"reconnect_detected\\\") is True\"},{\"line\":383,\"text\":\"),\"}]},{\"match\":\"collector.get(\\\"reconnect_detected\\\") is True\",\"match_line\":382,\"window\":[{\"line\":380,\"text\":\"\\\"source_gap_detected\\\": collector.get(\\\"gap_detected\\\") is True,\"},{\"line\":381,\"text\":\"\\\"source_reconnect_detected\\\": (\"},{\"line\":382,\"text\":\"collector.get(\\\"reconnect_detected\\\") is True\"},{\"line\":383,\"text\":\"),\"},{\"line\":384,\"text\":\"\\\"source_post_finality_revision\\\": (\"}]},{\"match\":\"\\\"source_post_finality_revision\\\": (\",\"match_line\":384,\"window\":[{\"line\":382,\"text\":\"collector.get(\\\"reconnect_detected\\\") is True\"},{\"line\":383,\"text\":\"),\"},{\"line\":384,\"text\":\"\\\"source_post_finality_revision\\\": (\"},{\"line\":385,\"text\":\"collector.get(\\\"post_finality_revision\\\") is True\"},{\"line\":386,\"text\":\"),\"}]},{\"match\":\"collector.get(\\\"post_finality_revision\\\") is True\",\"match_line\":385,\"window\":[{\"line\":383,\"text\":\"),\"},{\"line\":384,\"text\":\"\\\"source_post_finality_revision\\\": (\"},{\"line\":385,\"text\":\"collector.get(\\\"post_finality_revision\\\") is True\"},{\"line\":386,\"text\":\"),\"},{\"line\":387,\"text\":\"\\\"source_fail_closed_reason\\\": collector.get(\"}]},{\"match\":\"\\\"source_fail_closed_reason\\\": collector.get(\",\"match_line\":387,\"window\":[{\"line\":385,\"text\":\"collector.get(\\\"post_finality_revision\\\") is True\"},{\"line\":386,\"text\":\"),\"},{\"line\":387,\"text\":\"\\\"source_fail_closed_reason\\\": collector.get(\"},{\"line\":388,\"text\":\"\\\"fail_closed_reason\\\",\"},{\"line\":389,\"text\":\"\\\"\\\",\"}]},{\"match\":\"\\\"fail_closed_reason\\\",\",\"match_line\":388,\"window\":[{\"line\":386,\"text\":\"),\"},{\"line\":387,\"text\":\"\\\"source_fail_closed_reason\\\": collector.get(\"},{\"line\":388,\"text\":\"\\\"fail_closed_reason\\\",\"},{\"line\":389,\"text\":\"\\\"\\\",\"},{\"line\":390,\"text\":\"),\"}]}],\"path\":\"/opt/stacks/8020-demonov-shadow/.deploy/SIGNALBOT-260906-DEPLOY-022/demonov_forward_map/live_health.py\",\"sha256\":\"cf3e5b9c8303d25524a03bf30534f1277a63068e8b01a32537dbb6be0a3420e2\"}]\nSB036_DECISION=COLLECTOR_STATE_SOURCE_EVIDENCE_READY\nSB036_MUTATION_SCOPE=NONE_READ_ONLY\nSIGNALBOT036_DECISION=COLLECTOR_STATE_SOURCE_EVIDENCE_READY\nSIGNALBOT036_MUTATION_SCOPE=NO_RUNTIME_NO_GIT_NO_EXCHANGE_MUTATION\n" } diff --git a/runtime/latest.txt b/runtime/latest.txt index 6eff3b04..1dbf1adf 100644 --- a/runtime/latest.txt +++ b/runtime/latest.txt @@ -1,15 +1,15 @@ CHAT_OUTPUT_BEGIN -COMMAND_ID=SIGNALBOT-260908-INTAKE-RCA-035 +COMMAND_ID=SIGNALBOT-260908-COLLECTOR-STATE-RCA-036 STATUS=OK RC=0 HOST=pve01 MODE=read-only -COMPONENT=signalbot-cr0116-intake-rca +COMPONENT=signalbot-cr0116-collector-state-rca REFERENCE_REGISTER_CHECK=OK REFERENCE_SHA256=5a3d8e5154c41cb582a4e0aca68090be1f0138918bf82131a948df326f9d8d66 ERROR_REGISTER_CHECK=OK ERROR_REGISTER_SHA256=3b09a553ec0f527ed3afeed4753f52a74ee3036045bbfb3c685e9f8af4ba7ba0 -COMMAND_SHA256=01c43885d0820853cc620910f562146315ad34c12ff24ffceefe7ef0181b8778 +COMMAND_SHA256=4f64bf454248fc9933a450c0d2b2dab2bc2ab3e6e845ad1fc3b59375681f3cb1 DUPLICATE_FAILED_COMMAND_BLOCKED=false EXECUTION_STARTED=true CHANGE_DECLARED=false @@ -24,17 +24,23 @@ MUTATION_OUTCOME=NO_MUTATION SANITIZED=yes SECRETS_INCLUDED=no PRIVATE_ADDRESSES_INCLUDED=no -RAW_EVIDENCE_SHA256=9bc13c343cdda506b9e7bbb4a38191d9f1ee1e4d31beb0916fa1cda673e1e097 -SANITIZED_OUTPUT_SHA256=9bc13c343cdda506b9e7bbb4a38191d9f1ee1e4d31beb0916fa1cda673e1e097 +RAW_EVIDENCE_SHA256=a54caab9741da51e043d39e424b15094dc452e3f24f196cf589272a8c0668097 +SANITIZED_OUTPUT_SHA256=a54caab9741da51e043d39e424b15094dc452e3f24f196cf589272a8c0668097 OUTPUT_BEGIN ERROR_REGISTER_CHECK=OK REFERENCE_CHECK=OK AUTHORITY_CHECK_SCOPE=READABILITY_ONLY_INCIDENTS_NOT_CLOSED -SIGNALBOT035_VM170={"name":"core-apps","node":"pve01","status":"running","type":"qemu"} -SIGNALBOT035_VM170_SNAPSHOT={"report":{"collector":{"cmd":["python","-m","demonov_forward_map.bitfinex_trade_collector"],"entrypoint":null,"health":null,"id_short":"a546a70c3e8c","image":"8020-demonov-shadow:e32760c69a4311728db9066ee8bf2bf66b1e5a70","name":"demonov-shadow-8020-collector-1","pid":210213,"restart_count":13,"running":true,"started_at":"2026-09-08T05:01:08.70385245Z","status":"running"},"collector_status":{"age_sec":8.9,"exists":true,"mtime_epoch":1788845024.0247085,"path":"/opt/stacks/8020-demonov-shadow/data/epochs/ec477ea41ecbd5cfdef5afc259595aab20674a7d933f41a389329ff05098b338/collector_status.json","values":{"fail_closed_reason":"source reconnect detected","gap_detected":false,"post_finality_revision":false,"prospective_fail_closed_reason":"","prospective_gap_detected":false,"prospective_reconnect_detected":false,"reconnect_detected":true,"updated_at":"2026-09-08T05:23:44.028140+00:00"}},"db_a":{"d1_revisions_count":0,"event_kind_counts":[["SEQUENCE",179729],["RECONNECT",10],["SESSION_START",1]],"exists":true,"finalized_d1_count":0,"latest_sequence_events":[{"event_kind":"SEQUENCE","event_seq":179740,"received_at":"2026-09-08T05:23:20.918750+00:00","session_hash":"253ffe9a26a5","source_sequence":2510},{"event_kind":"SEQUENCE","event_seq":179739,"received_at":"2026-09-08T05:23:20.891856+00:00","session_hash":"253ffe9a26a5","source_sequence":2509},{"event_kind":"SEQUENCE","event_seq":179738,"received_at":"2026-09-08T05:23:20.552139+00:00","session_hash":"253ffe9a26a5","source_sequence":2508},{"event_kind":"SEQUENCE","event_seq":179737,"received_at":"2026-09-08T05:23:20.534792+00:00","session_hash":"253ffe9a26a5","source_sequence":2507},{"event_kind":"SEQUENCE","event_seq":179736,"received_at":"2026-09-08T05:23:20.329909+00:00","session_hash":"253ffe9a26a5","source_sequence":2506},{"event_kind":"SEQUENCE","event_seq":179735,"received_at":"2026-09-08T05:23:20.177708+00:00","session_hash":"253ffe9a26a5","source_sequence":2505},{"event_kind":"SEQUENCE","event_seq":179734,"received_at":"2026-09-08T05:23:20.170743+00:00","session_hash":"253ffe9a26a5","source_sequence":2504},{"event_kind":"SEQUENCE","event_seq":179733,"received_at":"2026-09-08T05:23:20.163522+00:00","session_hash":"253ffe9a26a5","source_sequence":2503},{"event_kind":"SEQUENCE","event_seq":179732,"received_at":"2026-09-08T05:23:20.004001+00:00","session_hash":"253ffe9a26a5","source_sequence":2502},{"event_kind":"SEQUENCE","event_seq":179731,"received_at":"2026-09-08T05:23:19.850034+00:00","session_hash":"253ffe9a26a5","source_sequence":2501},{"event_kind":"SEQUENCE","event_seq":179730,"received_at":"2026-09-08T05:23:19.841410+00:00","session_hash":"253ffe9a26a5","source_sequence":2500},{"event_kind":"SEQUENCE","event_seq":179729,"received_at":"2026-09-08T05:23:19.827700+00:00","session_hash":"253ffe9a26a5","source_sequence":2499},{"event_kind":"SEQUENCE","event_seq":179728,"received_at":"2026-09-08T05:23:19.671403+00:00","session_hash":"253ffe9a26a5","source_sequence":2498},{"event_kind":"SEQUENCE","event_seq":179727,"received_at":"2026-09-08T05:23:19.518174+00:00","session_hash":"253ffe9a26a5","source_sequence":2497},{"event_kind":"SEQUENCE","event_seq":179726,"received_at":"2026-09-08T05:23:19.357283+00:00","session_hash":"253ffe9a26a5","source_sequence":2496},{"event_kind":"SEQUENCE","event_seq":179725,"received_at":"2026-09-08T05:23:19.200903+00:00","session_hash":"253ffe9a26a5","source_sequence":2495},{"event_kind":"SEQUENCE","event_seq":179724,"received_at":"2026-09-08T05:23:19.193716+00:00","session_hash":"253ffe9a26a5","source_sequence":2494},{"event_kind":"SEQUENCE","event_seq":179723,"received_at":"2026-09-08T05:23:19.185835+00:00","session_hash":"253ffe9a26a5","source_sequence":2493},{"event_kind":"SEQUENCE","event_seq":179722,"received_at":"2026-09-08T05:23:19.177983+00:00","session_hash":"253ffe9a26a5","source_sequence":2492},{"event_kind":"SEQUENCE","event_seq":179721,"received_at":"2026-09-08T05:23:19.164437+00:00","session_hash":"253ffe9a26a5","source_sequence":2491},{"event_kind":"SEQUENCE","event_seq":179720,"received_at":"2026-09-08T05:23:19.006208+00:00","session_hash":"253ffe9a26a5","source_sequence":2490},{"event_kind":"SEQUENCE","event_seq":179719,"received_at":"2026-09-08T05:23:18.848474+00:00","session_hash":"253ffe9a26a5","source_sequence":2489},{"event_kind":"SEQUENCE","event_seq":179718,"received_at":"2026-09-08T05:23:18.697530+00:00","session_hash":"253ffe9a26a5","source_sequence":2488},{"event_kind":"SEQUENCE","event_seq":179717,"received_at":"2026-09-08T05:23:18.541070+00:00","session_hash":"253ffe9a26a5","source_sequence":2487},{"event_kind":"SEQUENCE","event_seq":179716,"received_at":"2026-09-08T05:23:18.532005+00:00","session_hash":"253ffe9a26a5","source_sequence":2486},{"event_kind":"SEQUENCE","event_seq":179715,"received_at":"2026-09-08T05:23:18.522984+00:00","session_hash":"253ffe9a26a5","source_sequence":2485},{"event_kind":"SEQUENCE","event_seq":179714,"received_at":"2026-09-08T05:23:18.515020+00:00","session_hash":"253ffe9a26a5","source_sequence":2484},{"event_kind":"SEQUENCE","event_seq":179713,"received_at":"2026-09-08T05:23:18.504619+00:00","session_hash":"253ffe9a26a5","source_sequence":2483},{"event_kind":"SEQUENCE","event_seq":179712,"received_at":"2026-09-08T05:23:18.349318+00:00","session_hash":"253ffe9a26a5","source_sequence":2482},{"event_kind":"SEQUENCE","event_seq":179711,"received_at":"2026-09-08T05:23:18.189830+00:00","session_hash":"253ffe9a26a5","source_sequence":2481}],"latest_sessions":[{"events":2510,"first_received_at":"2026-09-08T05:01:09.298101+00:00","last_received_at":"2026-09-08T05:23:20.918750+00:00","max_source_sequence":2510,"min_source_sequence":1,"session_hash":"253ffe9a26a5"},{"events":2475,"first_received_at":"2026-09-08T04:54:28.087186+00:00","last_received_at":"2026-09-08T05:01:08.350487+00:00","max_source_sequence":2475,"min_source_sequence":1,"session_hash":"2b3998047f77"},{"events":988,"first_received_at":"2026-09-08T04:43:46.442548+00:00","last_received_at":"2026-09-08T04:54:27.005150+00:00","max_source_sequence":988,"min_source_sequence":1,"session_hash":"b501ae120c1f"},{"events":589,"first_received_at":"2026-09-08T04:42:44.434580+00:00","last_received_at":"2026-09-08T04:43:45.521859+00:00","max_source_sequence":589,"min_source_sequence":1,"session_hash":"10709eb54a7b"},{"events":3620,"first_received_at":"2026-09-08T03:52:02.239825+00:00","last_received_at":"2026-09-08T04:42:43.449781+00:00","max_source_sequence":3620,"min_source_sequence":1,"session_hash":"210de3583c8e"},{"events":72124,"first_received_at":"2026-09-07T15:04:59.188298+00:00","last_received_at":"2026-09-08T03:52:00.952767+00:00","max_source_sequence":72124,"min_source_sequence":1,"session_hash":"69bb22240441"},{"events":1688,"first_received_at":"2026-09-07T14:46:51.906734+00:00","last_received_at":"2026-09-07T15:04:47.491753+00:00","max_source_sequence":1688,"min_source_sequence":1,"session_hash":"d1d81c259d86"},{"events":10295,"first_received_at":"2026-09-07T13:30:08.973280+00:00","last_received_at":"2026-09-07T14:46:39.866418+00:00","max_source_sequence":10295,"min_source_sequence":1,"session_hash":"a2db9de2102e"},{"events":14430,"first_received_at":"2026-09-07T09:50:41.075840+00:00","last_received_at":"2026-09-07T13:30:03.165612+00:00","max_source_sequence":14430,"min_source_sequence":1,"session_hash":"8da25a454977"},{"events":71006,"first_received_at":"2026-09-06T18:48:31.906387+00:00","last_received_at":"2026-09-07T09:50:13.818640+00:00","max_source_sequence":71006,"min_source_sequence":1,"session_hash":"184e0e63b1c9"}],"latest_source_receipts":[{"receipt_id":"02e5367b2692cde4f9bff73096271e6cc0598bf27413d651026f6318c8338d72","received_at":"2026-09-08T03:52:00.952767+00:00","source_sequence":72124},{"receipt_id":"568fff4620581353cea781b3cef61de359e02f12475ac54c7460e85c4baa8625","received_at":"2026-09-08T03:52:00.943741+00:00","source_sequence":72123},{"receipt_id":"3631962ca9ee6b49c4870d42ec814ad6c1c3f0ff65f78a445abecc54bcbe8567","received_at":"2026-09-08T03:52:00.931321+00:00","source_sequence":72122},{"receipt_id":"e9e23d4774b5bdc4801a3334511f50fbb5b25e117b01f8e913a98be3d98badc0","received_at":"2026-09-08T03:52:00.790541+00:00","source_sequence":72121},{"receipt_id":"59ad6dd601a0d1605e6ea3962d9bfb348cdbc67cc8666b473eb8d58b1b8c077c","received_at":"2026-09-08T03:52:00.656138+00:00","source_sequence":72120},{"receipt_id":"634a7fdd47cddc7c664450d7921d4b83093d20a6f95f72f31f6dc004b219ff0f","received_at":"2026-09-08T03:52:00.642417+00:00","source_sequence":72119},{"receipt_id":"6943e44a184672570beaf3ac076e8051162086f16c4f836d78b040c6fdb811ce","received_at":"2026-09-08T03:52:00.504076+00:00","source_sequence":72118},{"receipt_id":"063b4e0abd1065a59d6b9fe62b9e4583f4caacbbb1e83414875386170b8ba7fe","received_at":"2026-09-08T03:52:00.494856+00:00","source_sequence":72117},{"receipt_id":"0f018a85552ad881ab665baa7ddc7a0e956b6d0d66ec43ecfeee44b60e766f4c","received_at":"2026-09-08T03:52:00.481147+00:00","source_sequence":72116},{"receipt_id":"6b23823a92031d3850483879578a8528a45b5f6002b26381659904d813f5b8d2","received_at":"2026-09-08T03:52:00.333870+00:00","source_sequence":72115},{"receipt_id":"1985ce2996de079095414ce9a48bfa3fcfffe7ddcbcdcff1857e03aa0c770d7d","received_at":"2026-09-08T03:52:00.194864+00:00","source_sequence":72114},{"receipt_id":"a4ed84172daff21758b2402a6cc03ab51ddc9474ba23d7a4036f7c6c4a3af152","received_at":"2026-09-08T03:52:00.180891+00:00","source_sequence":72113},{"receipt_id":"8646a6eea56850890817a5ff2056f9639f830a876e460c3898cfebbbd881a670","received_at":"2026-09-08T03:52:00.041606+00:00","source_sequence":72112},{"receipt_id":"70ebbdab1c237840ea3cb6b543fab899e49db3b3a0ab65455e5dcb85b7844923","received_at":"2026-09-08T03:52:00.023714+00:00","source_sequence":72111},{"receipt_id":"7cb2c79c0940deed850deb26500cb3c04331baa4eee8e302a1ca9a3e1cd3023c","received_at":"2026-09-08T03:51:59.882828+00:00","source_sequence":72110}],"path":"/opt/stacks/8020-demonov-shadow/data/epochs/ec477ea41ecbd5cfdef5afc259595aab20674a7d933f41a389329ff05098b338/bitfinex_source.db","quick_check":"ok","sequence_events":{"count":179740,"max_event_seq":179740,"max_received_at":"2026-09-08T05:23:20.918750+00:00","max_source_sequence":72124},"source_receipts_columns":["receipt_id","venue_id","source_kind","received_at","source_sequence","raw_payload_hash","collector_session_id","receipt_json"]},"db_b":{"d1_revisions_count":0,"event_kind_counts":[["SEQUENCE",179781],["RECONNECT",10],["SESSION_START",1]],"exists":true,"finalized_d1_count":0,"latest_sequence_events":[{"event_kind":"SEQUENCE","event_seq":179792,"received_at":"2026-09-08T05:23:44.017776+00:00","session_hash":"253ffe9a26a5","source_sequence":2562},{"event_kind":"SEQUENCE","event_seq":179791,"received_at":"2026-09-08T05:23:43.862198+00:00","session_hash":"253ffe9a26a5","source_sequence":2561},{"event_kind":"SEQUENCE","event_seq":179790,"received_at":"2026-09-08T05:23:43.702914+00:00","session_hash":"253ffe9a26a5","source_sequence":2560},{"event_kind":"SEQUENCE","event_seq":179789,"received_at":"2026-09-08T05:23:43.541151+00:00","session_hash":"253ffe9a26a5","source_sequence":2559},{"event_kind":"SEQUENCE","event_seq":179788,"received_at":"2026-09-08T05:23:43.382833+00:00","session_hash":"253ffe9a26a5","source_sequence":2558},{"event_kind":"SEQUENCE","event_seq":179787,"received_at":"2026-09-08T05:23:43.374827+00:00","session_hash":"253ffe9a26a5","source_sequence":2557},{"event_kind":"SEQUENCE","event_seq":179786,"received_at":"2026-09-08T05:23:43.365183+00:00","session_hash":"253ffe9a26a5","source_sequence":2556},{"event_kind":"SEQUENCE","event_seq":179785,"received_at":"2026-09-08T05:23:43.356202+00:00","session_hash":"253ffe9a26a5","source_sequence":2555},{"event_kind":"SEQUENCE","event_seq":179784,"received_at":"2026-09-08T05:23:43.337857+00:00","session_hash":"253ffe9a26a5","source_sequence":2554},{"event_kind":"SEQUENCE","event_seq":179783,"received_at":"2026-09-08T05:23:43.179159+00:00","session_hash":"253ffe9a26a5","source_sequence":2553},{"event_kind":"SEQUENCE","event_seq":179782,"received_at":"2026-09-08T05:23:43.025806+00:00","session_hash":"253ffe9a26a5","source_sequence":2552},{"event_kind":"SEQUENCE","event_seq":179781,"received_at":"2026-09-08T05:23:42.863932+00:00","session_hash":"253ffe9a26a5","source_sequence":2551},{"event_kind":"SEQUENCE","event_seq":179780,"received_at":"2026-09-08T05:23:42.715680+00:00","session_hash":"253ffe9a26a5","source_sequence":2550},{"event_kind":"SEQUENCE","event_seq":179779,"received_at":"2026-09-08T05:23:42.709841+00:00","session_hash":"253ffe9a26a5","source_sequence":2549},{"event_kind":"SEQUENCE","event_seq":179778,"received_at":"2026-09-08T05:23:42.702802+00:00","session_hash":"253ffe9a26a5","source_sequence":2548},{"event_kind":"SEQUENCE","event_seq":179777,"received_at":"2026-09-08T05:23:42.695983+00:00","session_hash":"253ffe9a26a5","source_sequence":2547},{"event_kind":"SEQUENCE","event_seq":179776,"received_at":"2026-09-08T05:23:42.682500+00:00","session_hash":"253ffe9a26a5","source_sequence":2546},{"event_kind":"SEQUENCE","event_seq":179775,"received_at":"2026-09-08T05:23:33.495587+00:00","session_hash":"253ffe9a26a5","source_sequence":2545},{"event_kind":"SEQUENCE","event_seq":179774,"received_at":"2026-09-08T05:23:33.324435+00:00","session_hash":"253ffe9a26a5","source_sequence":2544},{"event_kind":"SEQUENCE","event_seq":179773,"received_at":"2026-09-08T05:23:33.170904+00:00","session_hash":"253ffe9a26a5","source_sequence":2543},{"event_kind":"SEQUENCE","event_seq":179772,"received_at":"2026-09-08T05:23:33.161405+00:00","session_hash":"253ffe9a26a5","source_sequence":2542},{"event_kind":"SEQUENCE","event_seq":179771,"received_at":"2026-09-08T05:23:33.148039+00:00","session_hash":"253ffe9a26a5","source_sequence":2541},{"event_kind":"SEQUENCE","event_seq":179770,"received_at":"2026-09-08T05:23:33.102924+00:00","session_hash":"253ffe9a26a5","source_sequence":2540},{"event_kind":"SEQUENCE","event_seq":179769,"received_at":"2026-09-08T05:23:32.054424+00:00","session_hash":"253ffe9a26a5","source_sequence":2539},{"event_kind":"SEQUENCE","event_seq":179768,"received_at":"2026-09-08T05:23:32.019933+00:00","session_hash":"253ffe9a26a5","source_sequence":2538},{"event_kind":"SEQUENCE","event_seq":179767,"received_at":"2026-09-08T05:23:30.952907+00:00","session_hash":"253ffe9a26a5","source_sequence":2537},{"event_kind":"SEQUENCE","event_seq":179766,"received_at":"2026-09-08T05:23:30.911940+00:00","session_hash":"253ffe9a26a5","source_sequence":2536},{"event_kind":"SEQUENCE","event_seq":179765,"received_at":"2026-09-08T05:23:28.052780+00:00","session_hash":"253ffe9a26a5","source_sequence":2535},{"event_kind":"SEQUENCE","event_seq":179764,"received_at":"2026-09-08T05:23:25.504960+00:00","session_hash":"253ffe9a26a5","source_sequence":2534},{"event_kind":"SEQUENCE","event_seq":179763,"received_at":"2026-09-08T05:23:25.491855+00:00","session_hash":"253ffe9a26a5","source_sequence":2533}],"latest_sessions":[{"events":2562,"first_received_at":"2026-09-08T05:01:09.298101+00:00","last_received_at":"2026-09-08T05:23:44.017776+00:00","max_source_sequence":2562,"min_source_sequence":1,"session_hash":"253ffe9a26a5"},{"events":2475,"first_received_at":"2026-09-08T04:54:28.087186+00:00","last_received_at":"2026-09-08T05:01:08.350487+00:00","max_source_sequence":2475,"min_source_sequence":1,"session_hash":"2b3998047f77"},{"events":988,"first_received_at":"2026-09-08T04:43:46.442548+00:00","last_received_at":"2026-09-08T04:54:27.005150+00:00","max_source_sequence":988,"min_source_sequence":1,"session_hash":"b501ae120c1f"},{"events":589,"first_received_at":"2026-09-08T04:42:44.434580+00:00","last_received_at":"2026-09-08T04:43:45.521859+00:00","max_source_sequence":589,"min_source_sequence":1,"session_hash":"10709eb54a7b"},{"events":3620,"first_received_at":"2026-09-08T03:52:02.239825+00:00","last_received_at":"2026-09-08T04:42:43.449781+00:00","max_source_sequence":3620,"min_source_sequence":1,"session_hash":"210de3583c8e"},{"events":72124,"first_received_at":"2026-09-07T15:04:59.188298+00:00","last_received_at":"2026-09-08T03:52:00.952767+00:00","max_source_sequence":72124,"min_source_sequence":1,"session_hash":"69bb22240441"},{"events":1688,"first_received_at":"2026-09-07T14:46:51.906734+00:00","last_received_at":"2026-09-07T15:04:47.491753+00:00","max_source_sequence":1688,"min_source_sequence":1,"session_hash":"d1d81c259d86"},{"events":10295,"first_received_at":"2026-09-07T13:30:08.973280+00:00","last_received_at":"2026-09-07T14:46:39.866418+00:00","max_source_sequence":10295,"min_source_sequence":1,"session_hash":"a2db9de2102e"},{"events":14430,"first_received_at":"2026-09-07T09:50:41.075840+00:00","last_received_at":"2026-09-07T13:30:03.165612+00:00","max_source_sequence":14430,"min_source_sequence":1,"session_hash":"8da25a454977"},{"events":71006,"first_received_at":"2026-09-06T18:48:31.906387+00:00","last_received_at":"2026-09-07T09:50:13.818640+00:00","max_source_sequence":71006,"min_source_sequence":1,"session_hash":"184e0e63b1c9"}],"latest_source_receipts":[{"receipt_id":"02e5367b2692cde4f9bff73096271e6cc0598bf27413d651026f6318c8338d72","received_at":"2026-09-08T03:52:00.952767+00:00","source_sequence":72124},{"receipt_id":"568fff4620581353cea781b3cef61de359e02f12475ac54c7460e85c4baa8625","received_at":"2026-09-08T03:52:00.943741+00:00","source_sequence":72123},{"receipt_id":"3631962ca9ee6b49c4870d42ec814ad6c1c3f0ff65f78a445abecc54bcbe8567","received_at":"2026-09-08T03:52:00.931321+00:00","source_sequence":72122},{"receipt_id":"e9e23d4774b5bdc4801a3334511f50fbb5b25e117b01f8e913a98be3d98badc0","received_at":"2026-09-08T03:52:00.790541+00:00","source_sequence":72121},{"receipt_id":"59ad6dd601a0d1605e6ea3962d9bfb348cdbc67cc8666b473eb8d58b1b8c077c","received_at":"2026-09-08T03:52:00.656138+00:00","source_sequence":72120},{"receipt_id":"634a7fdd47cddc7c664450d7921d4b83093d20a6f95f72f31f6dc004b219ff0f","received_at":"2026-09-08T03:52:00.642417+00:00","source_sequence":72119},{"receipt_id":"6943e44a184672570beaf3ac076e8051162086f16c4f836d78b040c6fdb811ce","received_at":"2026-09-08T03:52:00.504076+00:00","source_sequence":72118},{"receipt_id":"063b4e0abd1065a59d6b9fe62b9e4583f4caacbbb1e83414875386170b8ba7fe","received_at":"2026-09-08T03:52:00.494856+00:00","source_sequence":72117},{"receipt_id":"0f018a85552ad881ab665baa7ddc7a0e956b6d0d66ec43ecfeee44b60e766f4c","received_at":"2026-09-08T03:52:00.481147+00:00","source_sequence":72116},{"receipt_id":"6b23823a92031d3850483879578a8528a45b5f6002b26381659904d813f5b8d2","received_at":"2026-09-08T03:52:00.333870+00:00","source_sequence":72115},{"receipt_id":"1985ce2996de079095414ce9a48bfa3fcfffe7ddcbcdcff1857e03aa0c770d7d","received_at":"2026-09-08T03:52:00.194864+00:00","source_sequence":72114},{"receipt_id":"a4ed84172daff21758b2402a6cc03ab51ddc9474ba23d7a4036f7c6c4a3af152","received_at":"2026-09-08T03:52:00.180891+00:00","source_sequence":72113},{"receipt_id":"8646a6eea56850890817a5ff2056f9639f830a876e460c3898cfebbbd881a670","received_at":"2026-09-08T03:52:00.041606+00:00","source_sequence":72112},{"receipt_id":"70ebbdab1c237840ea3cb6b543fab899e49db3b3a0ab65455e5dcb85b7844923","received_at":"2026-09-08T03:52:00.023714+00:00","source_sequence":72111},{"receipt_id":"7cb2c79c0940deed850deb26500cb3c04331baa4eee8e302a1ca9a3e1cd3023c","received_at":"2026-09-08T03:51:59.882828+00:00","source_sequence":72110}],"path":"/opt/stacks/8020-demonov-shadow/data/epochs/ec477ea41ecbd5cfdef5afc259595aab20674a7d933f41a389329ff05098b338/bitfinex_source.db","quick_check":"ok","sequence_events":{"count":179792,"max_event_seq":179792,"max_received_at":"2026-09-08T05:23:44.017776+00:00","max_source_sequence":72124},"source_receipts_columns":["receipt_id","venue_id","source_kind","received_at","source_sequence","raw_payload_hash","collector_session_id","receipt_json"]},"decision":"HOLD_COLLECTOR_INTAKE_STALLED_WITH_PROCESS_AND_TCP_ALIVE","endpoint_probe":{"api-pub.bitfinex.com":{"dns_rc":0,"resolved":true},"api.bitfinex.com":{"dns_rc":0,"resolved":true},"platform_status":{"body":"[1]","rc":0,"stderr":""}},"epoch_exists":true,"holds":["COLLECTOR_INTAKE_STILL_STALLED"],"hostname":"core-apps","last_event_age_sec":10.6,"logs":{"keyword_counts":{"CLOSED":5,"CONNECTED":0,"DISCONNECT":0,"ERROR":5,"EXCEPTION":5,"FINAL":0,"GAP":0,"HEARTBEAT":0,"RECEIVED":5,"RECONNECT":0,"SOURCE":0,"TRACEBACK":5,"WEBSOCKET":15},"last_lines":["websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received",":130: RuntimeWarning: 'demonov_forward_map.bitfinex_trade_collector' found in sys.modules after import of package 'demonov_forward_map', but prior to execution of 'demonov_forward_map.bitfinex_trade_collector'; this may result in unpredictable behaviour","Traceback (most recent call last):","File \"\", line 203, in _run_module_as_main","File \"\", line 88, in _run_code","File \"/app/demonov_forward_map/bitfinex_trade_collector.py\", line 1246, in ","raise SystemExit(main())","~~~~^^","File \"/app/demonov_forward_map/bitfinex_trade_collector.py\", line 1175, in main","for raw in ws:","^^","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 242, in __iter__","yield self.recv()","~~~~~~~~~^^","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 336, in recv","raise self.protocol.close_exc from self.recv_exc","websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received",":130: RuntimeWarning: 'demonov_forward_map.bitfinex_trade_collector' found in sys.modules after import of package 'demonov_forward_map', but prior to execution of 'demonov_forward_map.bitfinex_trade_collector'; this may result in unpredictable behaviour","Traceback (most recent call last):","File \"\", line 203, in _run_module_as_main","File \"\", line 88, in _run_code","File \"/app/demonov_forward_map/bitfinex_trade_collector.py\", line 1246, in ","raise SystemExit(main())","~~~~^^","File \"/app/demonov_forward_map/bitfinex_trade_collector.py\", line 1175, in main","for raw in ws:","^^","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 242, in __iter__","yield self.recv()","~~~~~~~~~^^","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 336, in recv","raise self.protocol.close_exc from self.recv_exc","websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received",":130: RuntimeWarning: 'demonov_forward_map.bitfinex_trade_collector' found in sys.modules after import of package 'demonov_forward_map', but prior to execution of 'demonov_forward_map.bitfinex_trade_collector'; this may result in unpredictable behaviour","Traceback (most recent call last):","File \"\", line 203, in _run_module_as_main","File \"\", line 88, in _run_code","File \"/app/demonov_forward_map/bitfinex_trade_collector.py\", line 1246, in ","raise SystemExit(main())","~~~~^^","File \"/app/demonov_forward_map/bitfinex_trade_collector.py\", line 1175, in main","for raw in ws:","^^","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 242, in __iter__","yield self.recv()","~~~~~~~~~^^","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 336, in recv","raise self.protocol.close_exc from self.recv_exc","websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received",":130: RuntimeWarning: 'demonov_forward_map.bitfinex_trade_collector' found in sys.modules after import of package 'demonov_forward_map', but prior to execution of 'demonov_forward_map.bitfinex_trade_collector'; this may result in unpredictable behaviour"],"last_relevant":["Traceback (most recent call last):","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 242, in __iter__","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 336, in recv","websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received","Traceback (most recent call last):","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 242, in __iter__","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 336, in recv","websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received","Traceback (most recent call last):","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 242, in __iter__","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 336, in recv","websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received","Traceback (most recent call last):","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 242, in __iter__","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 336, in recv","websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received","Traceback (most recent call last):","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 242, in __iter__","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 336, in recv","websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received"],"line_count":81,"rc":0},"mutation_scope":"NONE_READ_ONLY","sequence_window":{"a":72124,"advanced_from_034":false,"b":72124,"baseline_034":72124,"grew":false,"vs_034":72124},"socket":{"established_total":1,"pid":210213,"remote_port_counts":{"443":1},"states":{"01":1,"0A":1}},"stack_exists":true,"stats":{"line":"demonov-shadow-8020-collector-1 43.29% 26.51MiB / 9.719GiB 315kB / 126kB","rc":0,"stderr":""},"top":{"lines":["PID PPID COMMAND","210213 210191 python"],"rc":0,"stderr":""}},"state":"COMPLETE"} -SIGNALBOT035_HOLDS=["COLLECTOR_INTAKE_STILL_STALLED"] -SIGNALBOT035_DECISION=HOLD_COLLECTOR_INTAKE_STALLED_WITH_PROCESS_AND_TCP_ALIVE -SIGNALBOT035_MUTATION_SCOPE=NO_RUNTIME_NO_GIT_NO_EXCHANGE_MUTATION +SB036_COLLECTOR={"cmd":["python","-m","demonov_forward_map.bitfinex_trade_collector"],"entrypoint":null,"id":"a546a70c3e8c","image":"8020-demonov-shadow:e32760c69a4311728db9066ee8bf2bf66b1e5a70","name":"demonov-shadow-8020-collector-1","ok":true,"pid":210213,"restart_count":13,"running":true,"started_at":"2026-09-08T05:01:08.70385245Z","status":"running"} +SB036_COLLECTOR_STATUS={"age_sec":0.4,"exists":true,"values":{"fail_closed_reason":"source reconnect detected","gap_detected":false,"post_finality_revision":false,"prospective_fail_closed_reason":"","prospective_gap_detected":false,"prospective_reconnect_detected":false,"reconnect_detected":true}} +SB036_DB={"d1_revisions_count":0,"event_kinds":[["SEQUENCE",180107],["RECONNECT",10],["SESSION_START",1]],"exists":true,"finalized_d1_count":0,"latest_events":[{"event_kind":"SEQUENCE","event_seq":180118,"received_at":"2026-09-08T05:28:14.303996+00:00","session_hash":"253ffe9a26a5","source_sequence":2888},{"event_kind":"SEQUENCE","event_seq":180117,"received_at":"2026-09-08T05:28:14.290899+00:00","session_hash":"253ffe9a26a5","source_sequence":2887},{"event_kind":"SEQUENCE","event_seq":180116,"received_at":"2026-09-08T05:28:14.127754+00:00","session_hash":"253ffe9a26a5","source_sequence":2886},{"event_kind":"SEQUENCE","event_seq":180115,"received_at":"2026-09-08T05:28:13.967892+00:00","session_hash":"253ffe9a26a5","source_sequence":2885},{"event_kind":"SEQUENCE","event_seq":180114,"received_at":"2026-09-08T05:28:13.801186+00:00","session_hash":"253ffe9a26a5","source_sequence":2884},{"event_kind":"SEQUENCE","event_seq":180113,"received_at":"2026-09-08T05:28:13.628877+00:00","session_hash":"253ffe9a26a5","source_sequence":2883},{"event_kind":"SEQUENCE","event_seq":180112,"received_at":"2026-09-08T05:28:13.621853+00:00","session_hash":"253ffe9a26a5","source_sequence":2882},{"event_kind":"SEQUENCE","event_seq":180111,"received_at":"2026-09-08T05:28:13.614839+00:00","session_hash":"253ffe9a26a5","source_sequence":2881},{"event_kind":"SEQUENCE","event_seq":180110,"received_at":"2026-09-08T05:28:13.607920+00:00","session_hash":"253ffe9a26a5","source_sequence":2880},{"event_kind":"SEQUENCE","event_seq":180109,"received_at":"2026-09-08T05:28:13.594856+00:00","session_hash":"253ffe9a26a5","source_sequence":2879},{"event_kind":"SEQUENCE","event_seq":180108,"received_at":"2026-09-08T05:28:13.425038+00:00","session_hash":"253ffe9a26a5","source_sequence":2878},{"event_kind":"SEQUENCE","event_seq":180107,"received_at":"2026-09-08T05:28:13.271502+00:00","session_hash":"253ffe9a26a5","source_sequence":2877},{"event_kind":"SEQUENCE","event_seq":180106,"received_at":"2026-09-08T05:28:13.112568+00:00","session_hash":"253ffe9a26a5","source_sequence":2876},{"event_kind":"SEQUENCE","event_seq":180105,"received_at":"2026-09-08T05:28:13.101767+00:00","session_hash":"253ffe9a26a5","source_sequence":2875},{"event_kind":"SEQUENCE","event_seq":180104,"received_at":"2026-09-08T05:28:13.094931+00:00","session_hash":"253ffe9a26a5","source_sequence":2874},{"event_kind":"SEQUENCE","event_seq":180103,"received_at":"2026-09-08T05:28:13.086320+00:00","session_hash":"253ffe9a26a5","source_sequence":2873},{"event_kind":"SEQUENCE","event_seq":180102,"received_at":"2026-09-08T05:28:13.055479+00:00","session_hash":"253ffe9a26a5","source_sequence":2872},{"event_kind":"SEQUENCE","event_seq":180101,"received_at":"2026-09-08T05:28:10.388362+00:00","session_hash":"253ffe9a26a5","source_sequence":2871},{"event_kind":"SEQUENCE","event_seq":180100,"received_at":"2026-09-08T05:28:10.352706+00:00","session_hash":"253ffe9a26a5","source_sequence":2870},{"event_kind":"SEQUENCE","event_seq":180099,"received_at":"2026-09-08T05:28:07.280059+00:00","session_hash":"253ffe9a26a5","source_sequence":2869}],"latest_sessions":[{"events":2888,"first_at":"2026-09-08T05:01:09.298101+00:00","last_at":"2026-09-08T05:28:14.303996+00:00","max_seq":2888,"min_seq":1,"session_hash":"253ffe9a26a5"},{"events":2475,"first_at":"2026-09-08T04:54:28.087186+00:00","last_at":"2026-09-08T05:01:08.350487+00:00","max_seq":2475,"min_seq":1,"session_hash":"2b3998047f77"},{"events":988,"first_at":"2026-09-08T04:43:46.442548+00:00","last_at":"2026-09-08T04:54:27.005150+00:00","max_seq":988,"min_seq":1,"session_hash":"b501ae120c1f"},{"events":589,"first_at":"2026-09-08T04:42:44.434580+00:00","last_at":"2026-09-08T04:43:45.521859+00:00","max_seq":589,"min_seq":1,"session_hash":"10709eb54a7b"},{"events":3620,"first_at":"2026-09-08T03:52:02.239825+00:00","last_at":"2026-09-08T04:42:43.449781+00:00","max_seq":3620,"min_seq":1,"session_hash":"210de3583c8e"},{"events":72124,"first_at":"2026-09-07T15:04:59.188298+00:00","last_at":"2026-09-08T03:52:00.952767+00:00","max_seq":72124,"min_seq":1,"session_hash":"69bb22240441"},{"events":1688,"first_at":"2026-09-07T14:46:51.906734+00:00","last_at":"2026-09-07T15:04:47.491753+00:00","max_seq":1688,"min_seq":1,"session_hash":"d1d81c259d86"},{"events":10295,"first_at":"2026-09-07T13:30:08.973280+00:00","last_at":"2026-09-07T14:46:39.866418+00:00","max_seq":10295,"min_seq":1,"session_hash":"a2db9de2102e"},{"events":14430,"first_at":"2026-09-07T09:50:41.075840+00:00","last_at":"2026-09-07T13:30:03.165612+00:00","max_seq":14430,"min_seq":1,"session_hash":"8da25a454977"},{"events":71006,"first_at":"2026-09-06T18:48:31.906387+00:00","last_at":"2026-09-07T09:50:13.818640+00:00","max_seq":71006,"min_seq":1,"session_hash":"184e0e63b1c9"},{"events":15,"first_at":"2026-09-06T18:33:12.938622+00:00","last_at":"2026-09-06T18:33:38.425961+00:00","max_seq":15,"min_seq":1,"session_hash":"90adb5ba598b"}],"quick_check":"ok","sequence_events":{"count":180118,"max_event_seq":180118,"max_received_at":"2026-09-08T05:28:14.303996+00:00","max_source_sequence":72124}} +SB036_PROC={"established_total":1,"fd_count":7,"pid":210213,"remote_port_counts":{"443":1},"tcp_states":{"01":1,"0A":1},"wchan":"futex_wait_queue"} +SB036_ENDPOINT={"body":"[1]","rc":0,"stderr":""} +SB036_LOGS={"keyword_counts":{"CLOSED":5,"CONNECTED":0,"DISCONNECT":0,"ERROR":5,"EXCEPTION":5,"FAIL_CLOSED":0,"FINAL":0,"GAP":0,"HEARTBEAT":0,"RECEIVED":5,"RECONNECT":0,"SOURCE_FINALITY":0,"TIMEOUT":5,"TRACEBACK":5,"WEBSOCKET":15},"last_lines":["raise SystemExit(main())","~~~~^^","File \"/app/demonov_forward_map/bitfinex_trade_collector.py\", line 1175, in main","for raw in ws:","^^","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 242, in __iter__","yield self.recv()","~~~~~~~~~^^","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 336, in recv","raise self.protocol.close_exc from self.recv_exc","websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received",":130: RuntimeWarning: 'demonov_forward_map.bitfinex_trade_collector' found in sys.modules after import of package 'demonov_forward_map', but prior to execution of 'demonov_forward_map.bitfinex_trade_collector'; this may result in unpredictable behaviour","Traceback (most recent call last):","File \"\", line 203, in _run_module_as_main","File \"\", line 88, in _run_code","File \"/app/demonov_forward_map/bitfinex_trade_collector.py\", line 1246, in ","raise SystemExit(main())","~~~~^^","File \"/app/demonov_forward_map/bitfinex_trade_collector.py\", line 1175, in main","for raw in ws:","^^","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 242, in __iter__","yield self.recv()","~~~~~~~~~^^","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 336, in recv","raise self.protocol.close_exc from self.recv_exc","websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received",":130: RuntimeWarning: 'demonov_forward_map.bitfinex_trade_collector' found in sys.modules after import of package 'demonov_forward_map', but prior to execution of 'demonov_forward_map.bitfinex_trade_collector'; this may result in unpredictable behaviour","Traceback (most recent call last):","File \"\", line 203, in _run_module_as_main","File \"\", line 88, in _run_code","File \"/app/demonov_forward_map/bitfinex_trade_collector.py\", line 1246, in ","raise SystemExit(main())","~~~~^^","File \"/app/demonov_forward_map/bitfinex_trade_collector.py\", line 1175, in main","for raw in ws:","^^","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 242, in __iter__","yield self.recv()","~~~~~~~~~^^","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 336, in recv","raise self.protocol.close_exc from self.recv_exc","websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received",":130: RuntimeWarning: 'demonov_forward_map.bitfinex_trade_collector' found in sys.modules after import of package 'demonov_forward_map', but prior to execution of 'demonov_forward_map.bitfinex_trade_collector'; this may result in unpredictable behaviour","Traceback (most recent call last):","File \"\", line 203, in _run_module_as_main","File \"\", line 88, in _run_code","File \"/app/demonov_forward_map/bitfinex_trade_collector.py\", line 1246, in ","raise SystemExit(main())","~~~~^^","File \"/app/demonov_forward_map/bitfinex_trade_collector.py\", line 1175, in main","for raw in ws:","^^","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 242, in __iter__","yield self.recv()","~~~~~~~~~^^","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 336, in recv","raise self.protocol.close_exc from self.recv_exc","websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received",":130: RuntimeWarning: 'demonov_forward_map.bitfinex_trade_collector' found in sys.modules after import of package 'demonov_forward_map', but prior to execution of 'demonov_forward_map.bitfinex_trade_collector'; this may result in unpredictable behaviour"],"last_relevant":["Traceback (most recent call last):","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 242, in __iter__","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 336, in recv","websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received","Traceback (most recent call last):","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 242, in __iter__","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 336, in recv","websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received","Traceback (most recent call last):","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 242, in __iter__","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 336, in recv","websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received","Traceback (most recent call last):","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 242, in __iter__","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 336, in recv","websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received","Traceback (most recent call last):","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 242, in __iter__","File \"/usr/local/lib/python3.13/site-packages/websockets/sync/connection.py\", line 336, in recv","websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received"],"line_count":81,"rc":0} +SB036_SOURCE_WINDOWS=[{"bytes":42028,"matches":[{"match":"gap_detected: bool","match_line":62,"window":[{"line":60,"text":"@dataclass(frozen=True)"},{"line":61,"text":"class BitfinexCollectorStatus:"},{"line":62,"text":"gap_detected: bool"},{"line":63,"text":"reconnect_detected: bool"},{"line":64,"text":"post_finality_revision: bool"}]},{"match":"reconnect_detected: bool","match_line":63,"window":[{"line":61,"text":"class BitfinexCollectorStatus:"},{"line":62,"text":"gap_detected: bool"},{"line":63,"text":"reconnect_detected: bool"},{"line":64,"text":"post_finality_revision: bool"},{"line":65,"text":"fail_closed_reason: str"}]},{"match":"post_finality_revision: bool","match_line":64,"window":[{"line":62,"text":"gap_detected: bool"},{"line":63,"text":"reconnect_detected: bool"},{"line":64,"text":"post_finality_revision: bool"},{"line":65,"text":"fail_closed_reason: str"},{"line":66,"text":""}]},{"match":"fail_closed_reason: str","match_line":65,"window":[{"line":63,"text":"reconnect_detected: bool"},{"line":64,"text":"post_finality_revision: bool"},{"line":65,"text":"fail_closed_reason: str"},{"line":66,"text":""},{"line":67,"text":""}]},{"match":"self._db = sqlite3.connect(","match_line":124,"window":[{"line":122,"text":")"},{"line":123,"text":"self.path.parent.mkdir(parents=True, exist_ok=True)"},{"line":124,"text":"self._db = sqlite3.connect("},{"line":125,"text":"str(self.path),"},{"line":126,"text":"timeout=5,"}]},{"match":"timeout=5,","match_line":126,"window":[{"line":124,"text":"self._db = sqlite3.connect("},{"line":125,"text":"str(self.path),"},{"line":126,"text":"timeout=5,"},{"line":127,"text":"isolation_level=None,"},{"line":128,"text":")"}]},{"match":"received_at TEXT NOT NULL,","match_line":166,"window":[{"line":164,"text":"venue_id TEXT NOT NULL,"},{"line":165,"text":"source_kind TEXT NOT NULL,"},{"line":166,"text":"received_at TEXT NOT NULL,"},{"line":167,"text":"source_sequence INTEGER NOT NULL,"},{"line":168,"text":"raw_payload_hash TEXT NOT NULL,"}]},{"match":"received_at TEXT NOT NULL,","match_line":176,"window":[{"line":174,"text":"session_id TEXT NOT NULL,"},{"line":175,"text":"source_sequence INTEGER NOT NULL,"},{"line":176,"text":"received_at TEXT NOT NULL,"},{"line":177,"text":"event_kind TEXT NOT NULL"},{"line":178,"text":");"}]},{"match":"gap_detected=self._meta_get(\"gap_detected\") == \"1\",","match_line":246,"window":[{"line":244,"text":"def _status(self) -> BitfinexCollectorStatus:"},{"line":245,"text":"return BitfinexCollectorStatus("},{"line":246,"text":"gap_detected=self._meta_get(\"gap_detected\") == \"1\","},{"line":247,"text":"reconnect_detected=self._meta_get(\"reconnect_detected\") == \"1\","},{"line":248,"text":"post_finality_revision=("}]},{"match":"reconnect_detected=self._meta_get(\"reconnect_detected\") == \"1\",","match_line":247,"window":[{"line":245,"text":"return BitfinexCollectorStatus("},{"line":246,"text":"gap_detected=self._meta_get(\"gap_detected\") == \"1\","},{"line":247,"text":"reconnect_detected=self._meta_get(\"reconnect_detected\") == \"1\","},{"line":248,"text":"post_finality_revision=("},{"line":249,"text":"self._meta_get(\"post_finality_revision\") == \"1\""}]},{"match":"post_finality_revision=(","match_line":248,"window":[{"line":246,"text":"gap_detected=self._meta_get(\"gap_detected\") == \"1\","},{"line":247,"text":"reconnect_detected=self._meta_get(\"reconnect_detected\") == \"1\","},{"line":248,"text":"post_finality_revision=("},{"line":249,"text":"self._meta_get(\"post_finality_revision\") == \"1\""},{"line":250,"text":"),"}]},{"match":"self._meta_get(\"post_finality_revision\") == \"1\"","match_line":249,"window":[{"line":247,"text":"reconnect_detected=self._meta_get(\"reconnect_detected\") == \"1\","},{"line":248,"text":"post_finality_revision=("},{"line":249,"text":"self._meta_get(\"post_finality_revision\") == \"1\""},{"line":250,"text":"),"},{"line":251,"text":"fail_closed_reason=self._meta_get(\"fail_closed_reason\") or \"\","}]},{"match":"fail_closed_reason=self._meta_get(\"fail_closed_reason\") or \"\",","match_line":251,"window":[{"line":249,"text":"self._meta_get(\"post_finality_revision\") == \"1\""},{"line":250,"text":"),"},{"line":251,"text":"fail_closed_reason=self._meta_get(\"fail_closed_reason\") or \"\","},{"line":252,"text":")"},{"line":253,"text":""}]},{"match":"prospective = self.current_prospective_source_state()","match_line":256,"window":[{"line":254,"text":"def _persist_status_file(self) -> None:"},{"line":255,"text":"status = self._status()"},{"line":256,"text":"prospective = self.current_prospective_source_state()"},{"line":257,"text":"payload = {"},{"line":258,"text":"\"gap_detected\": status.gap_detected,"}]},{"match":"\"gap_detected\": status.gap_detected,","match_line":258,"window":[{"line":256,"text":"prospective = self.current_prospective_source_state()"},{"line":257,"text":"payload = {"},{"line":258,"text":"\"gap_detected\": status.gap_detected,"},{"line":259,"text":"\"reconnect_detected\": status.reconnect_detected,"},{"line":260,"text":"\"post_finality_revision\": status.post_finality_revision,"}]},{"match":"\"reconnect_detected\": status.reconnect_detected,","match_line":259,"window":[{"line":257,"text":"payload = {"},{"line":258,"text":"\"gap_detected\": status.gap_detected,"},{"line":259,"text":"\"reconnect_detected\": status.reconnect_detected,"},{"line":260,"text":"\"post_finality_revision\": status.post_finality_revision,"},{"line":261,"text":"\"fail_closed_reason\": status.fail_closed_reason,"}]},{"match":"\"post_finality_revision\": status.post_finality_revision,","match_line":260,"window":[{"line":258,"text":"\"gap_detected\": status.gap_detected,"},{"line":259,"text":"\"reconnect_detected\": status.reconnect_detected,"},{"line":260,"text":"\"post_finality_revision\": status.post_finality_revision,"},{"line":261,"text":"\"fail_closed_reason\": status.fail_closed_reason,"},{"line":262,"text":"\"prospective_gap_detected\": prospective.gap_detected,"}]},{"match":"\"fail_closed_reason\": status.fail_closed_reason,","match_line":261,"window":[{"line":259,"text":"\"reconnect_detected\": status.reconnect_detected,"},{"line":260,"text":"\"post_finality_revision\": status.post_finality_revision,"},{"line":261,"text":"\"fail_closed_reason\": status.fail_closed_reason,"},{"line":262,"text":"\"prospective_gap_detected\": prospective.gap_detected,"},{"line":263,"text":"\"prospective_reconnect_detected\": prospective.reconnect_detected,"}]},{"match":"\"prospective_gap_detected\": prospective.gap_detected,","match_line":262,"window":[{"line":260,"text":"\"post_finality_revision\": status.post_finality_revision,"},{"line":261,"text":"\"fail_closed_reason\": status.fail_closed_reason,"},{"line":262,"text":"\"prospective_gap_detected\": prospective.gap_detected,"},{"line":263,"text":"\"prospective_reconnect_detected\": prospective.reconnect_detected,"},{"line":264,"text":"\"prospective_fail_closed_reason\": prospective.fail_closed_reason,"}]},{"match":"\"prospective_reconnect_detected\": prospective.reconnect_detected,","match_line":263,"window":[{"line":261,"text":"\"fail_closed_reason\": status.fail_closed_reason,"},{"line":262,"text":"\"prospective_gap_detected\": prospective.gap_detected,"},{"line":263,"text":"\"prospective_reconnect_detected\": prospective.reconnect_detected,"},{"line":264,"text":"\"prospective_fail_closed_reason\": prospective.fail_closed_reason,"},{"line":265,"text":"\"updated_at\": datetime.now(timezone.utc).isoformat(),"}]},{"match":"\"prospective_fail_closed_reason\": prospective.fail_closed_reason,","match_line":264,"window":[{"line":262,"text":"\"prospective_gap_detected\": prospective.gap_detected,"},{"line":263,"text":"\"prospective_reconnect_detected\": prospective.reconnect_detected,"},{"line":264,"text":"\"prospective_fail_closed_reason\": prospective.fail_closed_reason,"},{"line":265,"text":"\"updated_at\": datetime.now(timezone.utc).isoformat(),"},{"line":266,"text":"}"}]},{"match":"def _set_fail_closed(self, key: str, reason: str) -> None:","match_line":280,"window":[{"line":278,"text":"os.replace(tmp, target)"},{"line":279,"text":""},{"line":280,"text":"def _set_fail_closed(self, key: str, reason: str) -> None:"},{"line":281,"text":"self._meta_set(key, \"1\")"},{"line":282,"text":"if not self._meta_get(\"fail_closed_reason\"):"}]},{"match":"if not self._meta_get(\"fail_closed_reason\"):","match_line":282,"window":[{"line":280,"text":"def _set_fail_closed(self, key: str, reason: str) -> None:"},{"line":281,"text":"self._meta_set(key, \"1\")"},{"line":282,"text":"if not self._meta_get(\"fail_closed_reason\"):"},{"line":283,"text":"self._meta_set(\"fail_closed_reason\", reason)"},{"line":284,"text":"self._persist_status_file()"}]},{"match":"self._meta_set(\"fail_closed_reason\", reason)","match_line":283,"window":[{"line":281,"text":"self._meta_set(key, \"1\")"},{"line":282,"text":"if not self._meta_get(\"fail_closed_reason\"):"},{"line":283,"text":"self._meta_set(\"fail_closed_reason\", reason)"},{"line":284,"text":"self._persist_status_file()"},{"line":285,"text":""}]},{"match":"receipt_id, venue_id, source_kind, received_at,","match_line":292,"window":[{"line":290,"text":"\"\"\""},{"line":291,"text":"INSERT OR IGNORE INTO source_receipts("},{"line":292,"text":"receipt_id, venue_id, source_kind, received_at,"},{"line":293,"text":"source_sequence, raw_payload_hash, collector_session_id,"},{"line":294,"text":"receipt_json"}]},{"match":"receipt.received_at.isoformat(),","match_line":301,"window":[{"line":299,"text":"receipt.venue_id,"},{"line":300,"text":"receipt.source_kind,"},{"line":301,"text":"receipt.received_at.isoformat(),"},{"line":302,"text":"receipt.source_sequence,"},{"line":303,"text":"receipt.raw_payload_hash,"}]},{"match":"received_at: datetime,","match_line":315,"window":[{"line":313,"text":"session_id: str,"},{"line":314,"text":"sequence: int,"},{"line":315,"text":"received_at: datetime,"},{"line":316,"text":") -> None:"},{"line":317,"text":"if not isinstance(session_id, str) or not session_id:"}]},{"match":"received_at = _utc(received_at, \"received_at\")","match_line":327,"window":[{"line":325,"text":"\"source sequence must be a nonnegative integer\""},{"line":326,"text":")"},{"line":327,"text":"received_at = _utc(received_at, \"received_at\")"},{"line":328,"text":"active = self._meta_get(\"active_session_id\")"},{"line":329,"text":"if active is None:"}]},{"match":"session_id,source_sequence,received_at,event_kind","match_line":335,"window":[{"line":333,"text":"\"\"\""},{"line":334,"text":"INSERT INTO sequence_events("},{"line":335,"text":"session_id,source_sequence,received_at,event_kind"},{"line":336,"text":") VALUES(?,?,?,?)"},{"line":337,"text":"\"\"\","}]},{"match":"received_at.isoformat(),","match_line":341,"window":[{"line":339,"text":"session_id,"},{"line":340,"text":"sequence,"},{"line":341,"text":"received_at.isoformat(),"},{"line":342,"text":"\"SESSION_START\","},{"line":343,"text":"),"}]},{"match":"self._meta_set(\"reconnect_detected\", \"1\")","match_line":348,"window":[{"line":346,"text":"return"},{"line":347,"text":"if active != session_id:"},{"line":348,"text":"self._meta_set(\"reconnect_detected\", \"1\")"},{"line":349,"text":"if not self._meta_get(\"fail_closed_reason\"):"},{"line":350,"text":"self._meta_set("}]},{"match":"if not self._meta_get(\"fail_closed_reason\"):","match_line":349,"window":[{"line":347,"text":"if active != session_id:"},{"line":348,"text":"self._meta_set(\"reconnect_detected\", \"1\")"},{"line":349,"text":"if not self._meta_get(\"fail_closed_reason\"):"},{"line":350,"text":"self._meta_set("},{"line":351,"text":"\"fail_closed_reason\","}]},{"match":"\"fail_closed_reason\",","match_line":351,"window":[{"line":349,"text":"if not self._meta_get(\"fail_closed_reason\"):"},{"line":350,"text":"self._meta_set("},{"line":351,"text":"\"fail_closed_reason\","},{"line":352,"text":"\"source reconnect detected\","},{"line":353,"text":")"}]},{"match":"\"source reconnect detected\",","match_line":352,"window":[{"line":350,"text":"self._meta_set("},{"line":351,"text":"\"fail_closed_reason\","},{"line":352,"text":"\"source reconnect detected\","},{"line":353,"text":")"},{"line":354,"text":"self._meta_set(\"active_session_id\", session_id)"}]},{"match":"session_id,source_sequence,received_at,event_kind","match_line":359,"window":[{"line":357,"text":"\"\"\""},{"line":358,"text":"INSERT INTO sequence_events("},{"line":359,"text":"session_id,source_sequence,received_at,event_kind"},{"line":360,"text":") VALUES(?,?,?,?)"},{"line":361,"text":"\"\"\","}]},{"match":"received_at.isoformat(),","match_line":365,"window":[{"line":363,"text":"session_id,"},{"line":364,"text":"sequence,"},{"line":365,"text":"received_at.isoformat(),"},{"line":366,"text":"\"RECONNECT\","},{"line":367,"text":"),"}]},{"match":"\"RECONNECT\",","match_line":366,"window":[{"line":364,"text":"sequence,"},{"line":365,"text":"received_at.isoformat(),"},{"line":366,"text":"\"RECONNECT\","},{"line":367,"text":"),"},{"line":368,"text":")"}]},{"match":"session_id,source_sequence,received_at,event_kind","match_line":378,"window":[{"line":376,"text":"\"\"\""},{"line":377,"text":"INSERT INTO sequence_events("},{"line":378,"text":"session_id,source_sequence,received_at,event_kind"},{"line":379,"text":") VALUES(?,?,?,?)"},{"line":380,"text":"\"\"\","}]},{"match":"received_at.isoformat(),","match_line":384,"window":[{"line":382,"text":"session_id,"},{"line":383,"text":"sequence,"},{"line":384,"text":"received_at.isoformat(),"},{"line":385,"text":"\"GAP\","},{"line":386,"text":"),"}]},{"match":"self._set_fail_closed(","match_line":388,"window":[{"line":386,"text":"),"},{"line":387,"text":")"},{"line":388,"text":"self._set_fail_closed("},{"line":389,"text":"\"gap_detected\","},{"line":390,"text":"f\"sequence gap expected {expected} got {sequence}\","}]},{"match":"\"gap_detected\",","match_line":389,"window":[{"line":387,"text":")"},{"line":388,"text":"self._set_fail_closed("},{"line":389,"text":"\"gap_detected\","},{"line":390,"text":"f\"sequence gap expected {expected} got {sequence}\","},{"line":391,"text":")"}]},{"match":"session_id,source_sequence,received_at,event_kind","match_line":400,"window":[{"line":398,"text":"\"\"\""},{"line":399,"text":"INSERT INTO sequence_events("},{"line":400,"text":"session_id,source_sequence,received_at,event_kind"},{"line":401,"text":") VALUES(?,?,?,?)"},{"line":402,"text":"\"\"\","}]},{"match":"received_at.isoformat(),","match_line":406,"window":[{"line":404,"text":"session_id,"},{"line":405,"text":"sequence,"},{"line":406,"text":"received_at.isoformat(),"},{"line":407,"text":"\"SEQUENCE\","},{"line":408,"text":"),"}]},{"match":"def current_prospective_source_state(self) -> BitfinexCollectorStatus:","match_line":412,"window":[{"line":410,"text":"self._persist_status_file()"},{"line":411,"text":""},{"line":412,"text":"def current_prospective_source_state(self) -> BitfinexCollectorStatus:"},{"line":413,"text":"# GAP/RECONNECT are enforced per logical D1 by finalize_ready_d1()."},{"line":414,"text":"# Historical events must not poison later uncontaminated D1 bars."}]},{"match":"# GAP/RECONNECT are enforced per logical D1 by finalize_ready_d1().","match_line":413,"window":[{"line":411,"text":""},{"line":412,"text":"def current_prospective_source_state(self) -> BitfinexCollectorStatus:"},{"line":413,"text":"# GAP/RECONNECT are enforced per logical D1 by finalize_ready_d1()."},{"line":414,"text":"# Historical events must not poison later uncontaminated D1 bars."},{"line":415,"text":"post_finality_revision = ("}]},{"match":"post_finality_revision = (","match_line":415,"window":[{"line":413,"text":"# GAP/RECONNECT are enforced per logical D1 by finalize_ready_d1()."},{"line":414,"text":"# Historical events must not poison later uncontaminated D1 bars."},{"line":415,"text":"post_finality_revision = ("},{"line":416,"text":"self._meta_get(\"post_finality_revision\") == \"1\""},{"line":417,"text":")"}]},{"match":"self._meta_get(\"post_finality_revision\") == \"1\"","match_line":416,"window":[{"line":414,"text":"# Historical events must not poison later uncontaminated D1 bars."},{"line":415,"text":"post_finality_revision = ("},{"line":416,"text":"self._meta_get(\"post_finality_revision\") == \"1\""},{"line":417,"text":")"},{"line":418,"text":"reason = ("}]},{"match":"if post_finality_revision","match_line":420,"window":[{"line":418,"text":"reason = ("},{"line":419,"text":"\"post-finality source revision detected\""},{"line":420,"text":"if post_finality_revision"},{"line":421,"text":"else \"\""},{"line":422,"text":")"}]},{"match":"gap_detected=False,","match_line":424,"window":[{"line":422,"text":")"},{"line":423,"text":"return BitfinexCollectorStatus("},{"line":424,"text":"gap_detected=False,"},{"line":425,"text":"reconnect_detected=False,"},{"line":426,"text":"post_finality_revision=post_finality_revision,"}]},{"match":"reconnect_detected=False,","match_line":425,"window":[{"line":423,"text":"return BitfinexCollectorStatus("},{"line":424,"text":"gap_detected=False,"},{"line":425,"text":"reconnect_detected=False,"},{"line":426,"text":"post_finality_revision=post_finality_revision,"},{"line":427,"text":"fail_closed_reason=reason,"}]},{"match":"post_finality_revision=post_finality_revision,","match_line":426,"window":[{"line":424,"text":"gap_detected=False,"},{"line":425,"text":"reconnect_detected=False,"},{"line":426,"text":"post_finality_revision=post_finality_revision,"},{"line":427,"text":"fail_closed_reason=reason,"},{"line":428,"text":")"}]},{"match":"fail_closed_reason=reason,","match_line":427,"window":[{"line":425,"text":"reconnect_detected=False,"},{"line":426,"text":"post_finality_revision=post_finality_revision,"},{"line":427,"text":"fail_closed_reason=reason,"},{"line":428,"text":")"},{"line":429,"text":""}]},{"match":"\"SELECT received_at FROM source_receipts WHERE receipt_id=?\",","match_line":442,"window":[{"line":440,"text":"raise DemonovError(\"BitfinexCanonicalTradeV1 required\")"},{"line":441,"text":"receipt = self._db.execute("},{"line":442,"text":"\"SELECT received_at FROM source_receipts WHERE receipt_id=?\","},{"line":443,"text":"(receipt_id,),"},{"line":444,"text":").fetchone()"}]},{"match":"D1FinalityState.POST_FINALITY_SOURCE_REVISION,","match_line":529,"window":[{"line":527,"text":"validate_d1_finality_transition("},{"line":528,"text":"current,"},{"line":529,"text":"D1FinalityState.POST_FINALITY_SOURCE_REVISION,"},{"line":530,"text":")"},{"line":531,"text":"self._db.execute("}]},{"match":".POST_FINALITY_SOURCE_REVISION.value,","match_line":539,"window":[{"line":537,"text":"("},{"line":538,"text":"D1FinalityState"},{"line":539,"text":".POST_FINALITY_SOURCE_REVISION.value,"},{"line":540,"text":"logical_id,"},{"line":541,"text":"),"}]},{"match":"self._meta_set(\"post_finality_revision\", \"1\")","match_line":543,"window":[{"line":541,"text":"),"},{"line":542,"text":")"},{"line":543,"text":"self._meta_set(\"post_finality_revision\", \"1\")"},{"line":544,"text":"self._meta_set("},{"line":545,"text":"\"fail_closed_reason\","}]},{"match":"\"fail_closed_reason\",","match_line":545,"window":[{"line":543,"text":"self._meta_set(\"post_finality_revision\", \"1\")"},{"line":544,"text":"self._meta_set("},{"line":545,"text":"\"fail_closed_reason\","},{"line":546,"text":"\"post-finality source revision detected\","},{"line":547,"text":")"}]},{"match":"result = \"POST_FINALITY_REVISION\"","match_line":548,"window":[{"line":546,"text":"\"post-finality source revision detected\","},{"line":547,"text":")"},{"line":548,"text":"result = \"POST_FINALITY_REVISION\""},{"line":549,"text":"self._db.execute(\"COMMIT\")"},{"line":550,"text":"except Exception:"}]},{"match":"if result == \"POST_FINALITY_REVISION\":","match_line":553,"window":[{"line":551,"text":"self._db.execute(\"ROLLBACK\")"},{"line":552,"text":"raise"},{"line":553,"text":"if result == \"POST_FINALITY_REVISION\":"},{"line":554,"text":"self._persist_status_file()"},{"line":555,"text":"return result"}]},{"match":"def finalize_ready_d1(","match_line":605,"window":[{"line":603,"text":")"},{"line":604,"text":""},{"line":605,"text":"def finalize_ready_d1("},{"line":606,"text":"self,"},{"line":607,"text":"logical_d1: LogicalD1V1,"}]},{"match":"SELECT MIN(received_at) AS first_received","match_line":626,"window":[{"line":624,"text":"first_sequence = self._db.execute("},{"line":625,"text":"\"\"\""},{"line":626,"text":"SELECT MIN(received_at) AS first_received"},{"line":627,"text":"FROM sequence_events"},{"line":628,"text":"\"\"\""}]},{"match":").fetchone()[\"first_received\"]","match_line":629,"window":[{"line":627,"text":"FROM sequence_events"},{"line":628,"text":"\"\"\""},{"line":629,"text":").fetchone()[\"first_received\"]"},{"line":630,"text":"if ("},{"line":631,"text":"first_sequence is None"}]},{"match":"boundary_received_at = _dt(boundary[\"received_at\"])","match_line":641,"window":[{"line":639,"text":"if boundary is None:"},{"line":640,"text":"return None"},{"line":641,"text":"boundary_received_at = _dt(boundary[\"received_at\"])"},{"line":642,"text":"if finalized_at < boundary_received_at:"},{"line":643,"text":"raise DemonovError("}]},{"match":"if finalized_at < boundary_received_at:","match_line":642,"window":[{"line":640,"text":"return None"},{"line":641,"text":"boundary_received_at = _dt(boundary[\"received_at\"])"},{"line":642,"text":"if finalized_at < boundary_received_at:"},{"line":643,"text":"raise DemonovError("},{"line":644,"text":"\"finalized_at precedes source boundary proof\""}]},{"match":"AND received_at>=?","match_line":652,"window":[{"line":650,"text":"FROM sequence_events"},{"line":651,"text":"WHERE event_kind='GAP'"},{"line":652,"text":"AND received_at>=?"},{"line":653,"text":"AND received_at<=?"},{"line":654,"text":"LIMIT 1"}]},{"match":"AND received_at<=?","match_line":653,"window":[{"line":651,"text":"WHERE event_kind='GAP'"},{"line":652,"text":"AND received_at>=?"},{"line":653,"text":"AND received_at<=?"},{"line":654,"text":"LIMIT 1"},{"line":655,"text":"\"\"\","}]},{"match":"boundary_received_at.isoformat(),","match_line":658,"window":[{"line":656,"text":"("},{"line":657,"text":"logical_d1.open_at.isoformat(),"},{"line":658,"text":"boundary_received_at.isoformat(),"},{"line":659,"text":"),"},{"line":660,"text":").fetchone()"}]},{"match":"reconnect = self._db.execute(","match_line":666,"window":[{"line":664,"text":")"},{"line":665,"text":""},{"line":666,"text":"reconnect = self._db.execute("},{"line":667,"text":"\"\"\""},{"line":668,"text":"SELECT 1"}]},{"match":"WHERE event_kind='RECONNECT'","match_line":670,"window":[{"line":668,"text":"SELECT 1"},{"line":669,"text":"FROM sequence_events"},{"line":670,"text":"WHERE event_kind='RECONNECT'"},{"line":671,"text":"AND received_at>=?"},{"line":672,"text":"AND received_at<=?"}]},{"match":"AND received_at>=?","match_line":671,"window":[{"line":669,"text":"FROM sequence_events"},{"line":670,"text":"WHERE event_kind='RECONNECT'"},{"line":671,"text":"AND received_at>=?"},{"line":672,"text":"AND received_at<=?"},{"line":673,"text":"LIMIT 1"}]},{"match":"AND received_at<=?","match_line":672,"window":[{"line":670,"text":"WHERE event_kind='RECONNECT'"},{"line":671,"text":"AND received_at>=?"},{"line":672,"text":"AND received_at<=?"},{"line":673,"text":"LIMIT 1"},{"line":674,"text":"\"\"\","}]},{"match":"boundary_received_at.isoformat(),","match_line":677,"window":[{"line":675,"text":"("},{"line":676,"text":"logical_d1.open_at.isoformat(),"},{"line":677,"text":"boundary_received_at.isoformat(),"},{"line":678,"text":"),"},{"line":679,"text":").fetchone()"}]},{"match":"if reconnect is not None:","match_line":680,"window":[{"line":678,"text":"),"},{"line":679,"text":").fetchone()"},{"line":680,"text":"if reconnect is not None:"},{"line":681,"text":"raise DemonovError("},{"line":682,"text":"\"reconnect prevents D1 finalization\""}]},{"match":"\"reconnect prevents D1 finalization\"","match_line":682,"window":[{"line":680,"text":"if reconnect is not None:"},{"line":681,"text":"raise DemonovError("},{"line":682,"text":"\"reconnect prevents D1 finalization\""},{"line":683,"text":")"},{"line":684,"text":""}]},{"match":"sr.received_at,","match_line":901,"window":[{"line":899,"text":"SELECT"},{"line":900,"text":"tr.mts,"},{"line":901,"text":"sr.received_at,"},{"line":902,"text":"sr.collector_session_id,"},{"line":903,"text":"sr.source_sequence"}]},{"match":"\"received_at\": receipt.received_at.isoformat(),","match_line":962,"window":[{"line":960,"text":"\"venue_id\": receipt.venue_id,"},{"line":961,"text":"\"source_kind\": receipt.source_kind,"},{"line":962,"text":"\"received_at\": receipt.received_at.isoformat(),"},{"line":963,"text":"\"source_sequence\": receipt.source_sequence,"},{"line":964,"text":"\"raw_payload_hash\": receipt.raw_payload_hash,"}]},{"match":"def finalize_ready_d1_without_stopping_collection(","match_line":1102,"window":[{"line":1100,"text":""},{"line":1101,"text":""},{"line":1102,"text":"def finalize_ready_d1_without_stopping_collection("},{"line":1103,"text":"journal: SQLiteBitfinexSourceJournal,"},{"line":1104,"text":"logical_d1: LogicalD1V1,"}]},{"match":"return journal.finalize_ready_d1(","match_line":1110,"window":[{"line":1108,"text":"\"\"\"Keep collection alive when one logical D1 is non-finalizable.\"\"\""},{"line":1109,"text":"try:"},{"line":1110,"text":"return journal.finalize_ready_d1("},{"line":1111,"text":"logical_d1,"},{"line":1112,"text":"finalized_at=finalized_at,"}]},{"match":"\"reconnect prevents D1 finalization\",","match_line":1116,"window":[{"line":1114,"text":"except DemonovError as exc:"},{"line":1115,"text":"if str(exc) in {"},{"line":1116,"text":"\"reconnect prevents D1 finalization\","},{"line":1117,"text":"\"sequence gap prevents D1 finalization\","},{"line":1118,"text":"}:"}]},{"match":"return \"WS_HEARTBEAT\"","match_line":1129,"window":[{"line":1127,"text":"and message[1] == \"hb\""},{"line":1128,"text":"):"},{"line":1129,"text":"return \"WS_HEARTBEAT\""},{"line":1130,"text":"return \"WS_TRADES\""},{"line":1131,"text":""}]}],"path":"/opt/stacks/8020-demonov-shadow/.deploy/SIGNALBOT-260906-DEPLOY-022/demonov_forward_map/bitfinex_trade_collector.py","sha256":"d21cf0c3a0d4fcaf9210a57da04fd560dba4952ac1dd5a085abcc4e76ccf2eb0"},{"bytes":15930,"matches":[{"match":"POST_FINALITY_SOURCE_REVISION = \"POST_FINALITY_SOURCE_REVISION\"","match_line":69,"window":[{"line":67,"text":"RECONCILING = \"RECONCILING\""},{"line":68,"text":"FINALIZED = \"FINALIZED\""},{"line":69,"text":"POST_FINALITY_SOURCE_REVISION = \"POST_FINALITY_SOURCE_REVISION\""},{"line":70,"text":""},{"line":71,"text":""}]},{"match":"received_at: datetime","match_line":77,"window":[{"line":75,"text":"venue_id: str"},{"line":76,"text":"source_kind: str"},{"line":77,"text":"received_at: datetime"},{"line":78,"text":"source_sequence: int"},{"line":79,"text":"raw_payload_hash: str"}]},{"match":"_utc(self.received_at, \"received_at\")","match_line":86,"window":[{"line":84,"text":"_required_text(self.source_kind, \"source_kind\")"},{"line":85,"text":"_required_text(self.collector_session_id, \"collector_session_id\")"},{"line":86,"text":"_utc(self.received_at, \"received_at\")"},{"line":87,"text":"if not isinstance(self.source_sequence, int) or isinstance(self.source_sequence, bool) or self.source_sequence < 0:"},{"line":88,"text":"raise DemonovError(\"source_sequence must be a nonnegative integer\")"}]},{"match":"\"received_at\": self.received_at,","match_line":99,"window":[{"line":97,"text":"\"venue_id\": self.venue_id,"},{"line":98,"text":"\"source_kind\": self.source_kind,"},{"line":99,"text":"\"received_at\": self.received_at,"},{"line":100,"text":"\"source_sequence\": self.source_sequence,"},{"line":101,"text":"\"raw_payload_hash\": self.raw_payload_hash,"}]},{"match":"\"received_at\": kwargs[\"received_at\"],","match_line":111,"window":[{"line":109,"text":"\"venue_id\": kwargs[\"venue_id\"],"},{"line":110,"text":"\"source_kind\": kwargs[\"source_kind\"],"},{"line":111,"text":"\"received_at\": kwargs[\"received_at\"],"},{"line":112,"text":"\"source_sequence\": kwargs[\"source_sequence\"],"},{"line":113,"text":"\"raw_payload_hash\": kwargs[\"raw_payload_hash\"],"}]},{"match":"(D1FinalityState.FINALIZED, D1FinalityState.POST_FINALITY_SOURCE_REVISION),","match_line":394,"window":[{"line":392,"text":"(D1FinalityState.BOUNDARY_CROSSED, D1FinalityState.RECONCILING),"},{"line":393,"text":"(D1FinalityState.RECONCILING, D1FinalityState.FINALIZED),"},{"line":394,"text":"(D1FinalityState.FINALIZED, D1FinalityState.POST_FINALITY_SOURCE_REVISION),"},{"line":395,"text":"}"},{"line":396,"text":""}]},{"match":"received_at=record.finalized.finalized_at,","match_line":429,"window":[{"line":427,"text":"close_at=record.logical_d1.close_at,"},{"line":428,"text":"known_at=record.finalized.finalized_at,"},{"line":429,"text":"received_at=record.finalized.finalized_at,"},{"line":430,"text":"open=record.revision.open,"},{"line":431,"text":"high=record.revision.high,"}]}],"path":"/opt/stacks/8020-demonov-shadow/.deploy/SIGNALBOT-260906-DEPLOY-022/demonov_forward_map/live_d1_finality.py","sha256":"89873a9f2d026416c6c19533fa7d1ea404a8854c19fedb986395f4aabc0fe662"},{"bytes":17506,"matches":[{"match":"\"received_at\": bar.received_at.isoformat(),","match_line":98,"window":[{"line":96,"text":"\"close_at\": bar.close_at.isoformat(),"},{"line":97,"text":"\"known_at\": bar.known_at.isoformat(),"},{"line":98,"text":"\"received_at\": bar.received_at.isoformat(),"},{"line":99,"text":"\"open\": str(bar.open), \"high\": str(bar.high), \"low\": str(bar.low),"},{"line":100,"text":"\"close\": str(bar.close), \"volume\": str(bar.volume),"}]},{"match":"self.db = sqlite3.connect(str(self.path), timeout=10, isolation_level=None)","match_line":151,"window":[{"line":149,"text":"def __init__(self, path: str | Path, provenance: ExperimentProvenance):"},{"line":150,"text":"self.path = Path(path)"},{"line":151,"text":"self.db = sqlite3.connect(str(self.path), timeout=10, isolation_level=None)"},{"line":152,"text":"self.db.row_factory = sqlite3.Row"},{"line":153,"text":"self.db.execute(\"PRAGMA journal_mode=WAL\")"}]},{"match":"known_at=datetime.fromisoformat(x[\"known_at\"]), received_at=datetime.fromisoformat(x[\"received_at\"]),","match_line":217,"window":[{"line":215,"text":"bar_id=x[\"bar_id\"], market_key=x[\"market_key\"],"},{"line":216,"text":"open_at=datetime.fromisoformat(x[\"open_at\"]), close_at=datetime.fromisoformat(x[\"close_at\"]),"},{"line":217,"text":"known_at=datetime.fromisoformat(x[\"known_at\"]), received_at=datetime.fromisoformat(x[\"received_at\"]),"},{"line":218,"text":"open=Decimal(x[\"open\"]), high=Decimal(x[\"high\"]), low=Decimal(x[\"low\"]),"},{"line":219,"text":"close=Decimal(x[\"close\"]), volume=Decimal(x[\"volume\"]),"}]}],"path":"/opt/stacks/8020-demonov-shadow/src/demonov_forward_map/live_prospective.py","sha256":"2ba6be15613146223118af3d46b68b331ad0a53a154a692e4e17e13bbd793e1b"},{"bytes":17506,"matches":[{"match":"\"received_at\": bar.received_at.isoformat(),","match_line":98,"window":[{"line":96,"text":"\"close_at\": bar.close_at.isoformat(),"},{"line":97,"text":"\"known_at\": bar.known_at.isoformat(),"},{"line":98,"text":"\"received_at\": bar.received_at.isoformat(),"},{"line":99,"text":"\"open\": str(bar.open), \"high\": str(bar.high), \"low\": str(bar.low),"},{"line":100,"text":"\"close\": str(bar.close), \"volume\": str(bar.volume),"}]},{"match":"self.db = sqlite3.connect(str(self.path), timeout=10, isolation_level=None)","match_line":151,"window":[{"line":149,"text":"def __init__(self, path: str | Path, provenance: ExperimentProvenance):"},{"line":150,"text":"self.path = Path(path)"},{"line":151,"text":"self.db = sqlite3.connect(str(self.path), timeout=10, isolation_level=None)"},{"line":152,"text":"self.db.row_factory = sqlite3.Row"},{"line":153,"text":"self.db.execute(\"PRAGMA journal_mode=WAL\")"}]},{"match":"known_at=datetime.fromisoformat(x[\"known_at\"]), received_at=datetime.fromisoformat(x[\"received_at\"]),","match_line":217,"window":[{"line":215,"text":"bar_id=x[\"bar_id\"], market_key=x[\"market_key\"],"},{"line":216,"text":"open_at=datetime.fromisoformat(x[\"open_at\"]), close_at=datetime.fromisoformat(x[\"close_at\"]),"},{"line":217,"text":"known_at=datetime.fromisoformat(x[\"known_at\"]), received_at=datetime.fromisoformat(x[\"received_at\"]),"},{"line":218,"text":"open=Decimal(x[\"open\"]), high=Decimal(x[\"high\"]), low=Decimal(x[\"low\"]),"},{"line":219,"text":"close=Decimal(x[\"close\"]), volume=Decimal(x[\"volume\"]),"}]}],"path":"/opt/stacks/8020-demonov-shadow/.weekly/SIGNALBOT-260906-WEEKLY-LEGACY-030/src/demonov_forward_map/live_prospective.py","sha256":"2ba6be15613146223118af3d46b68b331ad0a53a154a692e4e17e13bbd793e1b"},{"bytes":37380,"matches":[{"match":"\"received_at\": bar.received_at.isoformat(),","match_line":184,"window":[{"line":182,"text":"\"close_at\": bar.close_at.isoformat(),"},{"line":183,"text":"\"known_at\": bar.known_at.isoformat(),"},{"line":184,"text":"\"received_at\": bar.received_at.isoformat(),"},{"line":185,"text":"\"open\": str(bar.open), \"high\": str(bar.high), \"low\": str(bar.low),"},{"line":186,"text":"\"close\": str(bar.close), \"volume\": str(bar.volume),"}]},{"match":"self.db = sqlite3.connect(str(self.path), timeout=10, isolation_level=None)","match_line":237,"window":[{"line":235,"text":"def __init__(self, path: str | Path, provenance: ExperimentProvenance):"},{"line":236,"text":"self.path = Path(path)"},{"line":237,"text":"self.db = sqlite3.connect(str(self.path), timeout=10, isolation_level=None)"},{"line":238,"text":"self.db.row_factory = sqlite3.Row"},{"line":239,"text":"self.db.execute(\"PRAGMA journal_mode=WAL\")"}]},{"match":"known_at=datetime.fromisoformat(x[\"known_at\"]), received_at=datetime.fromisoformat(x[\"received_at\"]),","match_line":324,"window":[{"line":322,"text":"bar_id=x[\"bar_id\"], market_key=x[\"market_key\"],"},{"line":323,"text":"open_at=datetime.fromisoformat(x[\"open_at\"]), close_at=datetime.fromisoformat(x[\"close_at\"]),"},{"line":324,"text":"known_at=datetime.fromisoformat(x[\"known_at\"]), received_at=datetime.fromisoformat(x[\"received_at\"]),"},{"line":325,"text":"open=Decimal(x[\"open\"]), high=Decimal(x[\"high\"]), low=Decimal(x[\"low\"]),"},{"line":326,"text":"close=Decimal(x[\"close\"]), volume=Decimal(x[\"volume\"]),"}]}],"path":"/opt/stacks/8020-demonov-shadow/.deploy/SIGNALBOT-260906-DEPLOY-022/demonov_forward_map/live_prospective.py","sha256":"f83f48dfeb4dc1382ebf3c77b7ec27deaeac6eec4a5dc097f90600963f0e4e98"},{"bytes":12681,"matches":[{"match":"FAIL_CLOSED = \"FAIL_CLOSED\"","match_line":16,"window":[{"line":14,"text":"AWAITING_PRIMARY_FINALITY = \"AWAITING_PRIMARY_FINALITY\""},{"line":15,"text":"DEGRADED = \"DEGRADED\""},{"line":16,"text":"FAIL_CLOSED = \"FAIL_CLOSED\""},{"line":17,"text":""},{"line":18,"text":""}]},{"match":"return sqlite3.connect(uri, uri=True, timeout=5)","match_line":62,"window":[{"line":60,"text":"def _open_ro(path: Path):"},{"line":61,"text":"uri = path.resolve().as_uri() + \"?mode=ro\""},{"line":62,"text":"return sqlite3.connect(uri, uri=True, timeout=5)"},{"line":63,"text":""},{"line":64,"text":""}]},{"match":"\"collector_heartbeat_slo_seconds\": _slo(","match_line":195,"window":[{"line":193,"text":""},{"line":194,"text":"slo = {"},{"line":195,"text":"\"collector_heartbeat_slo_seconds\": _slo("},{"line":196,"text":"\"COLLECTOR_HEARTBEAT_SLO_SECONDS\""},{"line":197,"text":"),"}]},{"match":"\"COLLECTOR_HEARTBEAT_SLO_SECONDS\"","match_line":196,"window":[{"line":194,"text":"slo = {"},{"line":195,"text":"\"collector_heartbeat_slo_seconds\": _slo("},{"line":196,"text":"\"COLLECTOR_HEARTBEAT_SLO_SECONDS\""},{"line":197,"text":"),"},{"line":198,"text":"\"worker_heartbeat_slo_seconds\": _slo("}]},{"match":"\"worker_heartbeat_slo_seconds\": _slo(","match_line":198,"window":[{"line":196,"text":"\"COLLECTOR_HEARTBEAT_SLO_SECONDS\""},{"line":197,"text":"),"},{"line":198,"text":"\"worker_heartbeat_slo_seconds\": _slo("},{"line":199,"text":"\"WORKER_HEARTBEAT_SLO_SECONDS\""},{"line":200,"text":"),"}]},{"match":"\"WORKER_HEARTBEAT_SLO_SECONDS\"","match_line":199,"window":[{"line":197,"text":"),"},{"line":198,"text":"\"worker_heartbeat_slo_seconds\": _slo("},{"line":199,"text":"\"WORKER_HEARTBEAT_SLO_SECONDS\""},{"line":200,"text":"),"},{"line":201,"text":"\"relay_heartbeat_slo_seconds\": _slo("}]},{"match":"\"relay_heartbeat_slo_seconds\": _slo(","match_line":201,"window":[{"line":199,"text":"\"WORKER_HEARTBEAT_SLO_SECONDS\""},{"line":200,"text":"),"},{"line":201,"text":"\"relay_heartbeat_slo_seconds\": _slo("},{"line":202,"text":"\"RELAY_HEARTBEAT_SLO_SECONDS\""},{"line":203,"text":"),"}]},{"match":"\"RELAY_HEARTBEAT_SLO_SECONDS\"","match_line":202,"window":[{"line":200,"text":"),"},{"line":201,"text":"\"relay_heartbeat_slo_seconds\": _slo("},{"line":202,"text":"\"RELAY_HEARTBEAT_SLO_SECONDS\""},{"line":203,"text":"),"},{"line":204,"text":"\"primary_finality_slo_seconds\": _slo("}]},{"match":"worker_age = _age_seconds(current, worker.get(\"heartbeat_at\"))","match_line":213,"window":[{"line":211,"text":""},{"line":212,"text":"collector_age = _age_seconds(current, collector.get(\"updated_at\"))"},{"line":213,"text":"worker_age = _age_seconds(current, worker.get(\"heartbeat_at\"))"},{"line":214,"text":"relay_age = _age_seconds(current, relay.get(\"heartbeat_at\"))"},{"line":215,"text":""}]},{"match":"relay_age = _age_seconds(current, relay.get(\"heartbeat_at\"))","match_line":214,"window":[{"line":212,"text":"collector_age = _age_seconds(current, collector.get(\"updated_at\"))"},{"line":213,"text":"worker_age = _age_seconds(current, worker.get(\"heartbeat_at\"))"},{"line":214,"text":"relay_age = _age_seconds(current, relay.get(\"heartbeat_at\"))"},{"line":215,"text":""},{"line":216,"text":"source_db = data / \"bitfinex_source.db\""}]},{"match":"prospective_gap = collector.get(\"prospective_gap_detected\", collector.get(\"gap_detected\")) is True","match_line":245,"window":[{"line":243,"text":"scientific_fail = True"},{"line":244,"text":""},{"line":245,"text":"prospective_gap = collector.get(\"prospective_gap_detected\", collector.get(\"gap_detected\")) is True"},{"line":246,"text":"prospective_reconnect = collector.get(\"prospective_reconnect_detected\", collector.get(\"reconnect_detected\")) is True"},{"line":247,"text":"if prospective_gap:"}]},{"match":"prospective_reconnect = collector.get(\"prospective_reconnect_detected\", collector.get(\"reconnect_detected\")) is True","match_line":246,"window":[{"line":244,"text":""},{"line":245,"text":"prospective_gap = collector.get(\"prospective_gap_detected\", collector.get(\"gap_detected\")) is True"},{"line":246,"text":"prospective_reconnect = collector.get(\"prospective_reconnect_detected\", collector.get(\"reconnect_detected\")) is True"},{"line":247,"text":"if prospective_gap:"},{"line":248,"text":"_append_reason(reasons, \"SOURCE_SEQUENCE_GAP\")"}]},{"match":"if prospective_reconnect:","match_line":250,"window":[{"line":248,"text":"_append_reason(reasons, \"SOURCE_SEQUENCE_GAP\")"},{"line":249,"text":"scientific_fail = True"},{"line":250,"text":"if prospective_reconnect:"},{"line":251,"text":"_append_reason(reasons, \"SOURCE_RECONNECT\")"},{"line":252,"text":"scientific_fail = True"}]},{"match":"_append_reason(reasons, \"SOURCE_RECONNECT\")","match_line":251,"window":[{"line":249,"text":"scientific_fail = True"},{"line":250,"text":"if prospective_reconnect:"},{"line":251,"text":"_append_reason(reasons, \"SOURCE_RECONNECT\")"},{"line":252,"text":"scientific_fail = True"},{"line":253,"text":"if collector.get(\"post_finality_revision\") is True:"}]},{"match":"if collector.get(\"post_finality_revision\") is True:","match_line":253,"window":[{"line":251,"text":"_append_reason(reasons, \"SOURCE_RECONNECT\")"},{"line":252,"text":"scientific_fail = True"},{"line":253,"text":"if collector.get(\"post_finality_revision\") is True:"},{"line":254,"text":"_append_reason(reasons, \"POST_FINALITY_SOURCE_REVISION\")"},{"line":255,"text":"scientific_fail = True"}]},{"match":"_append_reason(reasons, \"POST_FINALITY_SOURCE_REVISION\")","match_line":254,"window":[{"line":252,"text":"scientific_fail = True"},{"line":253,"text":"if collector.get(\"post_finality_revision\") is True:"},{"line":254,"text":"_append_reason(reasons, \"POST_FINALITY_SOURCE_REVISION\")"},{"line":255,"text":"scientific_fail = True"},{"line":256,"text":""}]},{"match":"collector_slo = slo[\"collector_heartbeat_slo_seconds\"]","match_line":257,"window":[{"line":255,"text":"scientific_fail = True"},{"line":256,"text":""},{"line":257,"text":"collector_slo = slo[\"collector_heartbeat_slo_seconds\"]"},{"line":258,"text":"if ("},{"line":259,"text":"collector_slo is not None"}]},{"match":"_append_reason(reasons, \"STALE_COLLECTOR_HEARTBEAT\")","match_line":265,"window":[{"line":263,"text":")"},{"line":264,"text":"):"},{"line":265,"text":"_append_reason(reasons, \"STALE_COLLECTOR_HEARTBEAT\")"},{"line":266,"text":"scientific_fail = True"},{"line":267,"text":""}]},{"match":"worker_slo = slo[\"worker_heartbeat_slo_seconds\"]","match_line":268,"window":[{"line":266,"text":"scientific_fail = True"},{"line":267,"text":""},{"line":268,"text":"worker_slo = slo[\"worker_heartbeat_slo_seconds\"]"},{"line":269,"text":"if ("},{"line":270,"text":"worker_slo is not None"}]},{"match":"_append_reason(reasons, \"STALE_WORKER_HEARTBEAT\")","match_line":273,"window":[{"line":271,"text":"and (worker_age is None or worker_age > worker_slo)"},{"line":272,"text":"):"},{"line":273,"text":"_append_reason(reasons, \"STALE_WORKER_HEARTBEAT\")"},{"line":274,"text":"scientific_fail = True"},{"line":275,"text":""}]},{"match":"relay_slo = slo[\"relay_heartbeat_slo_seconds\"]","match_line":276,"window":[{"line":274,"text":"scientific_fail = True"},{"line":275,"text":""},{"line":276,"text":"relay_slo = slo[\"relay_heartbeat_slo_seconds\"]"},{"line":277,"text":"if ("},{"line":278,"text":"relay_slo is not None"}]},{"match":"_append_reason(reasons, \"STALE_RELAY_HEARTBEAT\")","match_line":281,"window":[{"line":279,"text":"and (relay_age is None or relay_age > relay_slo)"},{"line":280,"text":"):"},{"line":281,"text":"_append_reason(reasons, \"STALE_RELAY_HEARTBEAT\")"},{"line":282,"text":"degraded = True"},{"line":283,"text":""}]},{"match":"elif worker and worker.get(\"status\") == \"FAIL_CLOSED\":","match_line":286,"window":[{"line":284,"text":"if worker.get(\"status\") == \"AWAITING_PRIMARY_FINALITY\":"},{"line":285,"text":"_append_reason(reasons, \"AWAITING_PRIMARY_FINALITY\")"},{"line":286,"text":"elif worker and worker.get(\"status\") == \"FAIL_CLOSED\":"},{"line":287,"text":"_append_reason(reasons, \"WORKER_FAIL_CLOSED\")"},{"line":288,"text":"scientific_fail = True"}]},{"match":"_append_reason(reasons, \"WORKER_FAIL_CLOSED\")","match_line":287,"window":[{"line":285,"text":"_append_reason(reasons, \"AWAITING_PRIMARY_FINALITY\")"},{"line":286,"text":"elif worker and worker.get(\"status\") == \"FAIL_CLOSED\":"},{"line":287,"text":"_append_reason(reasons, \"WORKER_FAIL_CLOSED\")"},{"line":288,"text":"scientific_fail = True"},{"line":289,"text":""}]},{"match":"elif relay and relay.get(\"status\") == \"FAIL_CLOSED\":","match_line":312,"window":[{"line":310,"text":"_append_reason(reasons, \"INDETERMINATE_DELIVERY\")"},{"line":311,"text":"degraded = True"},{"line":312,"text":"elif relay and relay.get(\"status\") == \"FAIL_CLOSED\":"},{"line":313,"text":"_append_reason(reasons, \"RELAY_FAIL_CLOSED\")"},{"line":314,"text":"degraded = True"}]},{"match":"_append_reason(reasons, \"RELAY_FAIL_CLOSED\")","match_line":313,"window":[{"line":311,"text":"degraded = True"},{"line":312,"text":"elif relay and relay.get(\"status\") == \"FAIL_CLOSED\":"},{"line":313,"text":"_append_reason(reasons, \"RELAY_FAIL_CLOSED\")"},{"line":314,"text":"degraded = True"},{"line":315,"text":""}]},{"match":"state = LiveHealthState.FAIL_CLOSED","match_line":339,"window":[{"line":337,"text":""},{"line":338,"text":"if scientific_fail:"},{"line":339,"text":"state = LiveHealthState.FAIL_CLOSED"},{"line":340,"text":"elif degraded:"},{"line":341,"text":"state = LiveHealthState.DEGRADED"}]},{"match":"state != LiveHealthState.FAIL_CLOSED","match_line":351,"window":[{"line":349,"text":"\"reason_codes\": reasons,"},{"line":350,"text":"\"prospective_research_collection_allowed\": ("},{"line":351,"text":"state != LiveHealthState.FAIL_CLOSED"},{"line":352,"text":"),"},{"line":353,"text":"\"production_launch_allowed\": False,"}]},{"match":"\"collector_heartbeat_fresh\": (","match_line":359,"window":[{"line":357,"text":"\"runtime_manifest_id\": runtime_manifest_id,"},{"line":358,"text":"\"experiment_id\": worker.get(\"experiment_id\"),"},{"line":359,"text":"\"collector_heartbeat_fresh\": ("},{"line":360,"text":"collector_age is not None"},{"line":361,"text":"and slo[\"collector_heartbeat_slo_seconds\"] is not None"}]},{"match":"and slo[\"collector_heartbeat_slo_seconds\"] is not None","match_line":361,"window":[{"line":359,"text":"\"collector_heartbeat_fresh\": ("},{"line":360,"text":"collector_age is not None"},{"line":361,"text":"and slo[\"collector_heartbeat_slo_seconds\"] is not None"},{"line":362,"text":"and collector_age <= slo[\"collector_heartbeat_slo_seconds\"]"},{"line":363,"text":"),"}]},{"match":"and collector_age <= slo[\"collector_heartbeat_slo_seconds\"]","match_line":362,"window":[{"line":360,"text":"collector_age is not None"},{"line":361,"text":"and slo[\"collector_heartbeat_slo_seconds\"] is not None"},{"line":362,"text":"and collector_age <= slo[\"collector_heartbeat_slo_seconds\"]"},{"line":363,"text":"),"},{"line":364,"text":"\"worker_heartbeat_fresh\": ("}]},{"match":"\"worker_heartbeat_fresh\": (","match_line":364,"window":[{"line":362,"text":"and collector_age <= slo[\"collector_heartbeat_slo_seconds\"]"},{"line":363,"text":"),"},{"line":364,"text":"\"worker_heartbeat_fresh\": ("},{"line":365,"text":"worker_age is not None"},{"line":366,"text":"and slo[\"worker_heartbeat_slo_seconds\"] is not None"}]},{"match":"and slo[\"worker_heartbeat_slo_seconds\"] is not None","match_line":366,"window":[{"line":364,"text":"\"worker_heartbeat_fresh\": ("},{"line":365,"text":"worker_age is not None"},{"line":366,"text":"and slo[\"worker_heartbeat_slo_seconds\"] is not None"},{"line":367,"text":"and worker_age <= slo[\"worker_heartbeat_slo_seconds\"]"},{"line":368,"text":"),"}]},{"match":"and worker_age <= slo[\"worker_heartbeat_slo_seconds\"]","match_line":367,"window":[{"line":365,"text":"worker_age is not None"},{"line":366,"text":"and slo[\"worker_heartbeat_slo_seconds\"] is not None"},{"line":367,"text":"and worker_age <= slo[\"worker_heartbeat_slo_seconds\"]"},{"line":368,"text":"),"},{"line":369,"text":"\"relay_heartbeat_fresh\": ("}]},{"match":"\"relay_heartbeat_fresh\": (","match_line":369,"window":[{"line":367,"text":"and worker_age <= slo[\"worker_heartbeat_slo_seconds\"]"},{"line":368,"text":"),"},{"line":369,"text":"\"relay_heartbeat_fresh\": ("},{"line":370,"text":"relay_age is not None"},{"line":371,"text":"and slo[\"relay_heartbeat_slo_seconds\"] is not None"}]},{"match":"and slo[\"relay_heartbeat_slo_seconds\"] is not None","match_line":371,"window":[{"line":369,"text":"\"relay_heartbeat_fresh\": ("},{"line":370,"text":"relay_age is not None"},{"line":371,"text":"and slo[\"relay_heartbeat_slo_seconds\"] is not None"},{"line":372,"text":"and relay_age <= slo[\"relay_heartbeat_slo_seconds\"]"},{"line":373,"text":"),"}]},{"match":"and relay_age <= slo[\"relay_heartbeat_slo_seconds\"]","match_line":372,"window":[{"line":370,"text":"relay_age is not None"},{"line":371,"text":"and slo[\"relay_heartbeat_slo_seconds\"] is not None"},{"line":372,"text":"and relay_age <= slo[\"relay_heartbeat_slo_seconds\"]"},{"line":373,"text":"),"},{"line":374,"text":"\"collector_heartbeat_age_seconds\": collector_age,"}]},{"match":"\"collector_heartbeat_age_seconds\": collector_age,","match_line":374,"window":[{"line":372,"text":"and relay_age <= slo[\"relay_heartbeat_slo_seconds\"]"},{"line":373,"text":"),"},{"line":374,"text":"\"collector_heartbeat_age_seconds\": collector_age,"},{"line":375,"text":"\"worker_heartbeat_age_seconds\": worker_age,"},{"line":376,"text":"\"relay_heartbeat_age_seconds\": relay_age,"}]},{"match":"\"worker_heartbeat_age_seconds\": worker_age,","match_line":375,"window":[{"line":373,"text":"),"},{"line":374,"text":"\"collector_heartbeat_age_seconds\": collector_age,"},{"line":375,"text":"\"worker_heartbeat_age_seconds\": worker_age,"},{"line":376,"text":"\"relay_heartbeat_age_seconds\": relay_age,"},{"line":377,"text":"\"last_finalized_primary_d1_close\": last_finalized,"}]},{"match":"\"relay_heartbeat_age_seconds\": relay_age,","match_line":376,"window":[{"line":374,"text":"\"collector_heartbeat_age_seconds\": collector_age,"},{"line":375,"text":"\"worker_heartbeat_age_seconds\": worker_age,"},{"line":376,"text":"\"relay_heartbeat_age_seconds\": relay_age,"},{"line":377,"text":"\"last_finalized_primary_d1_close\": last_finalized,"},{"line":378,"text":"\"last_finalized_primary_d1_age_seconds\": last_finalized_age,"}]},{"match":"\"source_gap_detected\": collector.get(\"gap_detected\") is True,","match_line":380,"window":[{"line":378,"text":"\"last_finalized_primary_d1_age_seconds\": last_finalized_age,"},{"line":379,"text":"\"current_logical_d1_finality_state\": current_finality_state,"},{"line":380,"text":"\"source_gap_detected\": collector.get(\"gap_detected\") is True,"},{"line":381,"text":"\"source_reconnect_detected\": ("},{"line":382,"text":"collector.get(\"reconnect_detected\") is True"}]},{"match":"\"source_reconnect_detected\": (","match_line":381,"window":[{"line":379,"text":"\"current_logical_d1_finality_state\": current_finality_state,"},{"line":380,"text":"\"source_gap_detected\": collector.get(\"gap_detected\") is True,"},{"line":381,"text":"\"source_reconnect_detected\": ("},{"line":382,"text":"collector.get(\"reconnect_detected\") is True"},{"line":383,"text":"),"}]},{"match":"collector.get(\"reconnect_detected\") is True","match_line":382,"window":[{"line":380,"text":"\"source_gap_detected\": collector.get(\"gap_detected\") is True,"},{"line":381,"text":"\"source_reconnect_detected\": ("},{"line":382,"text":"collector.get(\"reconnect_detected\") is True"},{"line":383,"text":"),"},{"line":384,"text":"\"source_post_finality_revision\": ("}]},{"match":"\"source_post_finality_revision\": (","match_line":384,"window":[{"line":382,"text":"collector.get(\"reconnect_detected\") is True"},{"line":383,"text":"),"},{"line":384,"text":"\"source_post_finality_revision\": ("},{"line":385,"text":"collector.get(\"post_finality_revision\") is True"},{"line":386,"text":"),"}]},{"match":"collector.get(\"post_finality_revision\") is True","match_line":385,"window":[{"line":383,"text":"),"},{"line":384,"text":"\"source_post_finality_revision\": ("},{"line":385,"text":"collector.get(\"post_finality_revision\") is True"},{"line":386,"text":"),"},{"line":387,"text":"\"source_fail_closed_reason\": collector.get("}]},{"match":"\"source_fail_closed_reason\": collector.get(","match_line":387,"window":[{"line":385,"text":"collector.get(\"post_finality_revision\") is True"},{"line":386,"text":"),"},{"line":387,"text":"\"source_fail_closed_reason\": collector.get("},{"line":388,"text":"\"fail_closed_reason\","},{"line":389,"text":"\"\","}]},{"match":"\"fail_closed_reason\",","match_line":388,"window":[{"line":386,"text":"),"},{"line":387,"text":"\"source_fail_closed_reason\": collector.get("},{"line":388,"text":"\"fail_closed_reason\","},{"line":389,"text":"\"\","},{"line":390,"text":"),"}]}],"path":"/opt/stacks/8020-demonov-shadow/.deploy/SIGNALBOT-260906-DEPLOY-022/demonov_forward_map/live_health.py","sha256":"cf3e5b9c8303d25524a03bf30534f1277a63068e8b01a32537dbb6be0a3420e2"}] +SB036_DECISION=COLLECTOR_STATE_SOURCE_EVIDENCE_READY +SB036_MUTATION_SCOPE=NONE_READ_ONLY +SIGNALBOT036_DECISION=COLLECTOR_STATE_SOURCE_EVIDENCE_READY +SIGNALBOT036_MUTATION_SCOPE=NO_RUNTIME_NO_GIT_NO_EXCHANGE_MUTATION OUTPUT_END CHAT_OUTPUT_END