From e40de8fda63ab2ed6618f0dca9468dc6c723f71e Mon Sep 17 00:00:00 2001 From: homelab-runtime-publisher Date: Mon, 21 Sep 2026 01:32:19 +0000 Subject: [PATCH] runtime: publish SUPPORT-260921-HOMELAB-BACKUP-V2-WRAPPER-TOPOLOGY-READONLY-1010R1 --- ...P-V2-WRAPPER-TOPOLOGY-READONLY-1010R1.json | 38 +++++++++++ ...UP-V2-WRAPPER-TOPOLOGY-READONLY-1010R1.txt | 63 +++++++++++++++++++ runtime/latest.json | 16 ++--- runtime/latest.txt | 44 ++++++++++--- 4 files changed, 145 insertions(+), 16 deletions(-) create mode 100644 runtime/history/SUPPORT-260921-HOMELAB-BACKUP-V2-WRAPPER-TOPOLOGY-READONLY-1010R1.json create mode 100644 runtime/history/SUPPORT-260921-HOMELAB-BACKUP-V2-WRAPPER-TOPOLOGY-READONLY-1010R1.txt diff --git a/runtime/history/SUPPORT-260921-HOMELAB-BACKUP-V2-WRAPPER-TOPOLOGY-READONLY-1010R1.json b/runtime/history/SUPPORT-260921-HOMELAB-BACKUP-V2-WRAPPER-TOPOLOGY-READONLY-1010R1.json new file mode 100644 index 00000000..b894e7c6 --- /dev/null +++ b/runtime/history/SUPPORT-260921-HOMELAB-BACKUP-V2-WRAPPER-TOPOLOGY-READONLY-1010R1.json @@ -0,0 +1,38 @@ +{ + "schema_version": 1, + "channel": "homelab-runtime", + "command_id": "SUPPORT-260921-HOMELAB-BACKUP-V2-WRAPPER-TOPOLOGY-READONLY-1010R1", + "status": "OK", + "rc": 0, + "host": "pve01", + "mode": "read-only", + "component": "homelab-backup-v2-wrapper-topology", + "started_at_utc": "2026-09-21T01:32:18Z", + "finished_at_utc": "2026-09-21T01:32:18Z", + "reference_register_checked": true, + "reference_sha256": "5a3d8e5154c41cb582a4e0aca68090be1f0138918bf82131a948df326f9d8d66", + "error_register_checked": true, + "error_register_sha256": "3b09a553ec0f527ed3afeed4753f52a74ee3036045bbfb3c685e9f8af4ba7ba0", + "command_sha256": "5e5fdf246ba93cf69bd15007c0f7841be1336d6804b8f438fcd8c9cdc2fb7777", + "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": "6bc6bee22d47b1f894187fc6de7668c0043a3a7c662da9f032ed015b6c3a35df", + "sanitized_output_sha256": "6bc6bee22d47b1f894187fc6de7668c0043a3a7c662da9f032ed015b6c3a35df", + "output_truncated_in_json": false, + "full_sanitized_output_url": "https://git.gram1.ru/.well-known/homelab-runtime/latest.txt", + "output": "WORKERS2_BACKUP_V2_WRAPPER_TOPOLOGY_BEGIN=1\nCOMMAND_ID=SUPPORT-260921-HOMELAB-BACKUP-V2-WRAPPER-TOPOLOGY-READONLY-1010R1\nMODE=read-only\nCOMPONENT=homelab-backup-v2-wrapper-topology\nHOST=pve01\nUID=0\nMUTATION_BOUNDARY=READ_ONLY_NO_FETCH_NO_WRITE_NO_SERVICE_ACTION_NO_BACKUP_NO_RESTORE_NO_RETENTION_NO_DELETE_NO_MAIL\nBASELINE_WRAPPER={\"bytes\":1656,\"line_count\":26,\"path\":\"/root/homelab-ops-cr-2026-1005/tasks/backup-v2-health-alerting-remediation-v1/assets/baseline/homelab-backup-v2\",\"sha256\":\"5077444065c732451cb84898680f62361b21a24ef9eb4f191253e82ead524ea2\"}\nLIVE_WRAPPER={\"bytes\":1656,\"exists\":true,\"matches_baseline\":true,\"sha256\":\"5077444065c732451cb84898680f62361b21a24ef9eb4f191253e82ead524ea2\"}\nWRAPPER_STRUCTURAL_LINES=[{\"line\":1,\"sha256\":\"b8e3eb3a9453a6029acccdb951bd492355329b651710c125505dc3bdd93e2dda\",\"text\":\"#!/usr/bin/python3\"},{\"line\":2,\"sha256\":\"a6284e6d3d43bdfbf0da732945adb2b4f31147c92bea47aee100d7f556c22d00\",\"text\":\"from __future__ import annotations\"},{\"line\":3,\"sha256\":\"d57b832dfc7acf24f005d35dc8899167b4a24174254f82c3ab1613c6fef08a9c\",\"text\":\"import hashlib, importlib, os, pathlib, stat, sys\"},{\"line\":4,\"sha256\":\"17400810c4582ee38c329bddfd08f1e890bd051b71d7d96fb9d06a05b0fdd49c\",\"text\":\"ACCEPTED=pathlib.Path('/opt/homelab-backup-v2/releases/backup-v2-overlay-504r1-ca6876fa9c3b')\"},{\"line\":5,\"sha256\":\"52c13f181fdac27c548266b89ea785484b7332cb2fe88bdc6f3f8a650d808154\",\"text\":\"EXPECTED={'fresh_lxc_helper.py': 'dbb3e6dbb71b10797df736431d9501a752a0f8c439163c9a0bddb7f76747f011', 'producer_exec_helper.py': 'b3b97099bcd7126670f866e81faae6a42a96d869d9989e6a67f6ea6c871c90b3', 'lxc_adapter.py': '3fa7d194010d76f7c8bc95035ae8876262e9337903e310f45f45df88c266dc8d', 'qemu_adapter.py': '1906db42bd34bbe85eb46fd9797b3572d46e0a41c29d1c29be5f9df5e448f15b', 'scheduler_adapter.py': 'a6f67159a64067773323f028126e3109e15cf17a8142cea5e6129970f1d4da96', 'entry504.py': 'ca6876fa9c3b1465b045344a8ad46962de16972c7dadc4ac6257c7d225047793'}\"},{\"line\":6,\"sha256\":\"53899176cd1c7bf5ff0ed1858bb5559fe73b3f583f503f5e38bde6235585b41b\",\"text\":\"def sha(p):\"},{\"line\":7,\"sha256\":\"6f05a753872e4a9d008a43f3131f07c93f0cf02ca80dd73628c8706244200664\",\"text\":\" h=hashlib.sha256()\"},{\"line\":8,\"sha256\":\"30997ff7b356f45d65ef1c5187f82f2e6141f93da71b38c59fe2c4c5e1e7f7d8\",\"text\":\" with open(p,'rb',buffering=0) as f:\"},{\"line\":9,\"sha256\":\"23658886042f84f880741d8725dcf0154bc118892bc6d91addfdf6e53d5a2cdc\",\"text\":\" while True:\"},{\"line\":10,\"sha256\":\"1b0070a369fbe1210497b72433a6fb37cf1571221e660d1ea2f4d6bdaa6d85ad\",\"text\":\" b=f.read(1048576)\"},{\"line\":11,\"sha256\":\"59298bba03fc4a48910e101eba38bd90228cf134c395434b745955b079b40142\",\"text\":\" if not b: break\"},{\"line\":12,\"sha256\":\"a1ae395f5814ee5b68d9ff0c1c455c562692686f513549d9550a1ca882f04b94\",\"text\":\" h.update(b)\"},{\"line\":13,\"sha256\":\"d38d3e66a9218f9b7e3565a1a9686e2514d11c0e7dc6e1a888b31bf726b5eabd\",\"text\":\" return h.hexdigest()\"},{\"line\":14,\"sha256\":\"2c4c5b0ebed3de9b574a3757903571ebf0dcaec6764f9f8d245ce0740a619321\",\"text\":\"def main():\"},{\"line\":15,\"sha256\":\"8ed597bfa67a39fd3247aa69d60fbf38d6c6eb2c99ba8233b08ad5707acd37d7\",\"text\":\" st=os.lstat(ACCEPTED)\"},{\"line\":16,\"sha256\":\"418757f9d5c90ddff43aa74e84da536f2a2341be2a15649bc1cea54d5a2f6614\",\"text\":\" if not stat.S_ISDIR(st.st_mode) or stat.S_ISLNK(st.st_mode) or st.st_uid!=0 or st.st_gid!=0 or stat.S_IMODE(st.st_mode)!=0o500: raise SystemExit('RELEASE_ROOT_IDENTITY')\"},{\"line\":17,\"sha256\":\"d55be1792bbfcb551d4d51970890586be4a5a1da8914179a8b2062694c0e5b5e\",\"text\":\" names=sorted(p.name for p in ACCEPTED.iterdir())\"},{\"line\":18,\"sha256\":\"e5a3133c28e977c4e9c8167dde7bb65433318db3e99df775b1f1bb647489aad1\",\"text\":\" if names!=sorted(EXPECTED): raise SystemExit('RELEASE_FILESET')\"},{\"line\":19,\"sha256\":\"fead4124009a37228b983368c62a7d9bc05cdbb43454bcc5caac80217b2905f9\",\"text\":\" for name,want in EXPECTED.items():\"},{\"line\":20,\"sha256\":\"9f397676d47b0693c062fa93bb3920967e19c945e0dfc6c97b915bd319ceb1b4\",\"text\":\" p=ACCEPTED/name; s=os.lstat(p)\"},{\"line\":21,\"sha256\":\"77ebd02c8e8b9a86beda5fbd6492917d2d9cd5dbe3dcd6af2cf494615fc01d59\",\"text\":\" if not stat.S_ISREG(s.st_mode) or stat.S_ISLNK(s.st_mode) or s.st_uid!=0 or s.st_gid!=0 or stat.S_IMODE(s.st_mode)!=0o400 or sha(p)!=want: raise SystemExit('RELEASE_FILE_IDENTITY_'+name)\"},{\"line\":22,\"sha256\":\"620a9fc1637030bd3806385e4d032f1d88f118fab60839cdcd08958ff76347d1\",\"text\":\" sys.dont_write_bytecode=True\"},{\"line\":23,\"sha256\":\"205047de2556322fcf287fe1a64a3ee1c5f1a6b6d031d7eb1ca3984be8f51cd9\",\"text\":\" sys.path.insert(0,str(ACCEPTED))\"},{\"line\":24,\"sha256\":\"007cf559e27a685d7242eeae848187802be787058680e8524508ef30d7ca8070\",\"text\":\" e=importlib.import_module('entry504')\"},{\"line\":25,\"sha256\":\"f89328a065052a0617651ce50185d40cbb3fdf066ce0451fe8ad67e23abe8579\",\"text\":\" return int(e.main())\"},{\"line\":26,\"sha256\":\"781bcc48cb7af0089f84c37d854593c43723833f0f9bced4c2d02aed0894040b\",\"text\":\"if __name__=='__main__': raise SystemExit(main())\"}]\nWRAPPER_ABSOLUTE_PATHS=[\"/opt/homelab-backup-v2/releases/backup-v2-overlay-504r1-ca6876fa9c3b\",\"/usr/bin/python3\"]\nWRAPPER_ENV_NAMES=[]\nWRAPPER_PY_NAMES=[\"entry504.py\",\"fresh_lxc_helper.py\",\"lxc_adapter.py\",\"producer_exec_helper.py\",\"qemu_adapter.py\",\"scheduler_adapter.py\"]\nWRAPPER_SHA256_LITERALS=[\"1906db42bd34bbe85eb46fd9797b3572d46e0a41c29d1c29be5f9df5e448f15b\",\"3fa7d194010d76f7c8bc95035ae8876262e9337903e310f45f45df88c266dc8d\",\"a6f67159a64067773323f028126e3109e15cf17a8142cea5e6129970f1d4da96\",\"b3b97099bcd7126670f866e81faae6a42a96d869d9989e6a67f6ea6c871c90b3\",\"ca6876fa9c3b1465b045344a8ad46962de16972c7dadc4ac6257c7d225047793\",\"dbb3e6dbb71b10797df736431d9501a752a0f8c439163c9a0bddb7f76747f011\"]\nABSOLUTE_PATH_META=[{\"bytes\":null,\"exists\":true,\"is_dir\":true,\"is_file\":false,\"path\":\"/opt/homelab-backup-v2/releases/backup-v2-overlay-504r1-ca6876fa9c3b\",\"sha256\":null},{\"bytes\":6812336,\"exists\":true,\"is_dir\":false,\"is_file\":true,\"path\":\"/usr/bin/python3\",\"sha256\":\"17b78e0a93175e86f9ac03141924fd7a7f0c0c52e66b34bfa0de20ffef989df1\"}]\nSHA_LITERAL_REFERENCE_HITS=[{\"hits\":[{\"bytes\":1656,\"path\":\"/usr/local/sbin/homelab-backup-v2\",\"sha256\":\"5077444065c732451cb84898680f62361b21a24ef9eb4f191253e82ead524ea2\"}],\"literal\":\"1906db42bd34bbe85eb46fd9797b3572d46e0a41c29d1c29be5f9df5e448f15b\"},{\"hits\":[{\"bytes\":1656,\"path\":\"/usr/local/sbin/homelab-backup-v2\",\"sha256\":\"5077444065c732451cb84898680f62361b21a24ef9eb4f191253e82ead524ea2\"}],\"literal\":\"3fa7d194010d76f7c8bc95035ae8876262e9337903e310f45f45df88c266dc8d\"},{\"hits\":[{\"bytes\":1656,\"path\":\"/usr/local/sbin/homelab-backup-v2\",\"sha256\":\"5077444065c732451cb84898680f62361b21a24ef9eb4f191253e82ead524ea2\"}],\"literal\":\"a6f67159a64067773323f028126e3109e15cf17a8142cea5e6129970f1d4da96\"},{\"hits\":[{\"bytes\":1656,\"path\":\"/usr/local/sbin/homelab-backup-v2\",\"sha256\":\"5077444065c732451cb84898680f62361b21a24ef9eb4f191253e82ead524ea2\"}],\"literal\":\"b3b97099bcd7126670f866e81faae6a42a96d869d9989e6a67f6ea6c871c90b3\"},{\"hits\":[{\"bytes\":1656,\"path\":\"/usr/local/sbin/homelab-backup-v2\",\"sha256\":\"5077444065c732451cb84898680f62361b21a24ef9eb4f191253e82ead524ea2\"}],\"literal\":\"ca6876fa9c3b1465b045344a8ad46962de16972c7dadc4ac6257c7d225047793\"},{\"hits\":[{\"bytes\":1656,\"path\":\"/usr/local/sbin/homelab-backup-v2\",\"sha256\":\"5077444065c732451cb84898680f62361b21a24ef9eb4f191253e82ead524ea2\"}],\"literal\":\"dbb3e6dbb71b10797df736431d9501a752a0f8c439163c9a0bddb7f76747f011\"}]\nARCHIVE_CANDIDATES=[]\nRUNTIME_NAME_HITS=[{\"bytes\":1656,\"path\":\"/usr/local/sbin/homelab-backup-v2\",\"sha256\":\"5077444065c732451cb84898680f62361b21a24ef9eb4f191253e82ead524ea2\"}]\nNO_MUTATION=true\nNO_GIT_FETCH=true\nNO_WRITE=true\nNO_SERVICE_ACTION=true\nNO_BACKUP_STARTED=true\nNO_RESTORE_STARTED=true\nNO_RETENTION_RUN_STARTED=true\nNO_DELETE=true\nNO_MAIL_SENT=true\nTOPOLOGY_DURATION_SEC=0.047\nTASK_RESULT=PASS_HOMELAB_BACKUP_V2_WRAPPER_TOPOLOGY_READONLY\nHOMELAB_RESULT_CONTRACT={\"changes_made\":false,\"command_id\":\"SUPPORT-260921-HOMELAB-BACKUP-V2-WRAPPER-TOPOLOGY-READONLY-1010R1\",\"rollback_restored\":null,\"rollback_started\":false,\"status\":\"OK\",\"version\":1}\nWORKERS2_BACKUP_V2_WRAPPER_TOPOLOGY_END=1\n" +} diff --git a/runtime/history/SUPPORT-260921-HOMELAB-BACKUP-V2-WRAPPER-TOPOLOGY-READONLY-1010R1.txt b/runtime/history/SUPPORT-260921-HOMELAB-BACKUP-V2-WRAPPER-TOPOLOGY-READONLY-1010R1.txt new file mode 100644 index 00000000..574b7e6d --- /dev/null +++ b/runtime/history/SUPPORT-260921-HOMELAB-BACKUP-V2-WRAPPER-TOPOLOGY-READONLY-1010R1.txt @@ -0,0 +1,63 @@ +CHAT_OUTPUT_BEGIN +COMMAND_ID=SUPPORT-260921-HOMELAB-BACKUP-V2-WRAPPER-TOPOLOGY-READONLY-1010R1 +STATUS=OK +RC=0 +HOST=pve01 +MODE=read-only +COMPONENT=homelab-backup-v2-wrapper-topology +REFERENCE_REGISTER_CHECK=OK +REFERENCE_SHA256=5a3d8e5154c41cb582a4e0aca68090be1f0138918bf82131a948df326f9d8d66 +ERROR_REGISTER_CHECK=OK +ERROR_REGISTER_SHA256=3b09a553ec0f527ed3afeed4753f52a74ee3036045bbfb3c685e9f8af4ba7ba0 +COMMAND_SHA256=5e5fdf246ba93cf69bd15007c0f7841be1336d6804b8f438fcd8c9cdc2fb7777 +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=6bc6bee22d47b1f894187fc6de7668c0043a3a7c662da9f032ed015b6c3a35df +SANITIZED_OUTPUT_SHA256=6bc6bee22d47b1f894187fc6de7668c0043a3a7c662da9f032ed015b6c3a35df +OUTPUT_BEGIN +WORKERS2_BACKUP_V2_WRAPPER_TOPOLOGY_BEGIN=1 +COMMAND_ID=SUPPORT-260921-HOMELAB-BACKUP-V2-WRAPPER-TOPOLOGY-READONLY-1010R1 +MODE=read-only +COMPONENT=homelab-backup-v2-wrapper-topology +HOST=pve01 +UID=0 +MUTATION_BOUNDARY=READ_ONLY_NO_FETCH_NO_WRITE_NO_SERVICE_ACTION_NO_BACKUP_NO_RESTORE_NO_RETENTION_NO_DELETE_NO_MAIL +BASELINE_WRAPPER={"bytes":1656,"line_count":26,"path":"/root/homelab-ops-cr-2026-1005/tasks/backup-v2-health-alerting-remediation-v1/assets/baseline/homelab-backup-v2","sha256":"5077444065c732451cb84898680f62361b21a24ef9eb4f191253e82ead524ea2"} +LIVE_WRAPPER={"bytes":1656,"exists":true,"matches_baseline":true,"sha256":"5077444065c732451cb84898680f62361b21a24ef9eb4f191253e82ead524ea2"} +WRAPPER_STRUCTURAL_LINES=[{"line":1,"sha256":"b8e3eb3a9453a6029acccdb951bd492355329b651710c125505dc3bdd93e2dda","text":"#!/usr/bin/python3"},{"line":2,"sha256":"a6284e6d3d43bdfbf0da732945adb2b4f31147c92bea47aee100d7f556c22d00","text":"from __future__ import annotations"},{"line":3,"sha256":"d57b832dfc7acf24f005d35dc8899167b4a24174254f82c3ab1613c6fef08a9c","text":"import hashlib, importlib, os, pathlib, stat, sys"},{"line":4,"sha256":"17400810c4582ee38c329bddfd08f1e890bd051b71d7d96fb9d06a05b0fdd49c","text":"ACCEPTED=pathlib.Path('/opt/homelab-backup-v2/releases/backup-v2-overlay-504r1-ca6876fa9c3b')"},{"line":5,"sha256":"52c13f181fdac27c548266b89ea785484b7332cb2fe88bdc6f3f8a650d808154","text":"EXPECTED={'fresh_lxc_helper.py': 'dbb3e6dbb71b10797df736431d9501a752a0f8c439163c9a0bddb7f76747f011', 'producer_exec_helper.py': 'b3b97099bcd7126670f866e81faae6a42a96d869d9989e6a67f6ea6c871c90b3', 'lxc_adapter.py': '3fa7d194010d76f7c8bc95035ae8876262e9337903e310f45f45df88c266dc8d', 'qemu_adapter.py': '1906db42bd34bbe85eb46fd9797b3572d46e0a41c29d1c29be5f9df5e448f15b', 'scheduler_adapter.py': 'a6f67159a64067773323f028126e3109e15cf17a8142cea5e6129970f1d4da96', 'entry504.py': 'ca6876fa9c3b1465b045344a8ad46962de16972c7dadc4ac6257c7d225047793'}"},{"line":6,"sha256":"53899176cd1c7bf5ff0ed1858bb5559fe73b3f583f503f5e38bde6235585b41b","text":"def sha(p):"},{"line":7,"sha256":"6f05a753872e4a9d008a43f3131f07c93f0cf02ca80dd73628c8706244200664","text":" h=hashlib.sha256()"},{"line":8,"sha256":"30997ff7b356f45d65ef1c5187f82f2e6141f93da71b38c59fe2c4c5e1e7f7d8","text":" with open(p,'rb',buffering=0) as f:"},{"line":9,"sha256":"23658886042f84f880741d8725dcf0154bc118892bc6d91addfdf6e53d5a2cdc","text":" while True:"},{"line":10,"sha256":"1b0070a369fbe1210497b72433a6fb37cf1571221e660d1ea2f4d6bdaa6d85ad","text":" b=f.read(1048576)"},{"line":11,"sha256":"59298bba03fc4a48910e101eba38bd90228cf134c395434b745955b079b40142","text":" if not b: break"},{"line":12,"sha256":"a1ae395f5814ee5b68d9ff0c1c455c562692686f513549d9550a1ca882f04b94","text":" h.update(b)"},{"line":13,"sha256":"d38d3e66a9218f9b7e3565a1a9686e2514d11c0e7dc6e1a888b31bf726b5eabd","text":" return h.hexdigest()"},{"line":14,"sha256":"2c4c5b0ebed3de9b574a3757903571ebf0dcaec6764f9f8d245ce0740a619321","text":"def main():"},{"line":15,"sha256":"8ed597bfa67a39fd3247aa69d60fbf38d6c6eb2c99ba8233b08ad5707acd37d7","text":" st=os.lstat(ACCEPTED)"},{"line":16,"sha256":"418757f9d5c90ddff43aa74e84da536f2a2341be2a15649bc1cea54d5a2f6614","text":" if not stat.S_ISDIR(st.st_mode) or stat.S_ISLNK(st.st_mode) or st.st_uid!=0 or st.st_gid!=0 or stat.S_IMODE(st.st_mode)!=0o500: raise SystemExit('RELEASE_ROOT_IDENTITY')"},{"line":17,"sha256":"d55be1792bbfcb551d4d51970890586be4a5a1da8914179a8b2062694c0e5b5e","text":" names=sorted(p.name for p in ACCEPTED.iterdir())"},{"line":18,"sha256":"e5a3133c28e977c4e9c8167dde7bb65433318db3e99df775b1f1bb647489aad1","text":" if names!=sorted(EXPECTED): raise SystemExit('RELEASE_FILESET')"},{"line":19,"sha256":"fead4124009a37228b983368c62a7d9bc05cdbb43454bcc5caac80217b2905f9","text":" for name,want in EXPECTED.items():"},{"line":20,"sha256":"9f397676d47b0693c062fa93bb3920967e19c945e0dfc6c97b915bd319ceb1b4","text":" p=ACCEPTED/name; s=os.lstat(p)"},{"line":21,"sha256":"77ebd02c8e8b9a86beda5fbd6492917d2d9cd5dbe3dcd6af2cf494615fc01d59","text":" if not stat.S_ISREG(s.st_mode) or stat.S_ISLNK(s.st_mode) or s.st_uid!=0 or s.st_gid!=0 or stat.S_IMODE(s.st_mode)!=0o400 or sha(p)!=want: raise SystemExit('RELEASE_FILE_IDENTITY_'+name)"},{"line":22,"sha256":"620a9fc1637030bd3806385e4d032f1d88f118fab60839cdcd08958ff76347d1","text":" sys.dont_write_bytecode=True"},{"line":23,"sha256":"205047de2556322fcf287fe1a64a3ee1c5f1a6b6d031d7eb1ca3984be8f51cd9","text":" sys.path.insert(0,str(ACCEPTED))"},{"line":24,"sha256":"007cf559e27a685d7242eeae848187802be787058680e8524508ef30d7ca8070","text":" e=importlib.import_module('entry504')"},{"line":25,"sha256":"f89328a065052a0617651ce50185d40cbb3fdf066ce0451fe8ad67e23abe8579","text":" return int(e.main())"},{"line":26,"sha256":"781bcc48cb7af0089f84c37d854593c43723833f0f9bced4c2d02aed0894040b","text":"if __name__=='__main__': raise SystemExit(main())"}] +WRAPPER_ABSOLUTE_PATHS=["/opt/homelab-backup-v2/releases/backup-v2-overlay-504r1-ca6876fa9c3b","/usr/bin/python3"] +WRAPPER_ENV_NAMES=[] +WRAPPER_PY_NAMES=["entry504.py","fresh_lxc_helper.py","lxc_adapter.py","producer_exec_helper.py","qemu_adapter.py","scheduler_adapter.py"] +WRAPPER_SHA256_LITERALS=["1906db42bd34bbe85eb46fd9797b3572d46e0a41c29d1c29be5f9df5e448f15b","3fa7d194010d76f7c8bc95035ae8876262e9337903e310f45f45df88c266dc8d","a6f67159a64067773323f028126e3109e15cf17a8142cea5e6129970f1d4da96","b3b97099bcd7126670f866e81faae6a42a96d869d9989e6a67f6ea6c871c90b3","ca6876fa9c3b1465b045344a8ad46962de16972c7dadc4ac6257c7d225047793","dbb3e6dbb71b10797df736431d9501a752a0f8c439163c9a0bddb7f76747f011"] +ABSOLUTE_PATH_META=[{"bytes":null,"exists":true,"is_dir":true,"is_file":false,"path":"/opt/homelab-backup-v2/releases/backup-v2-overlay-504r1-ca6876fa9c3b","sha256":null},{"bytes":6812336,"exists":true,"is_dir":false,"is_file":true,"path":"/usr/bin/python3","sha256":"17b78e0a93175e86f9ac03141924fd7a7f0c0c52e66b34bfa0de20ffef989df1"}] +SHA_LITERAL_REFERENCE_HITS=[{"hits":[{"bytes":1656,"path":"/usr/local/sbin/homelab-backup-v2","sha256":"5077444065c732451cb84898680f62361b21a24ef9eb4f191253e82ead524ea2"}],"literal":"1906db42bd34bbe85eb46fd9797b3572d46e0a41c29d1c29be5f9df5e448f15b"},{"hits":[{"bytes":1656,"path":"/usr/local/sbin/homelab-backup-v2","sha256":"5077444065c732451cb84898680f62361b21a24ef9eb4f191253e82ead524ea2"}],"literal":"3fa7d194010d76f7c8bc95035ae8876262e9337903e310f45f45df88c266dc8d"},{"hits":[{"bytes":1656,"path":"/usr/local/sbin/homelab-backup-v2","sha256":"5077444065c732451cb84898680f62361b21a24ef9eb4f191253e82ead524ea2"}],"literal":"a6f67159a64067773323f028126e3109e15cf17a8142cea5e6129970f1d4da96"},{"hits":[{"bytes":1656,"path":"/usr/local/sbin/homelab-backup-v2","sha256":"5077444065c732451cb84898680f62361b21a24ef9eb4f191253e82ead524ea2"}],"literal":"b3b97099bcd7126670f866e81faae6a42a96d869d9989e6a67f6ea6c871c90b3"},{"hits":[{"bytes":1656,"path":"/usr/local/sbin/homelab-backup-v2","sha256":"5077444065c732451cb84898680f62361b21a24ef9eb4f191253e82ead524ea2"}],"literal":"ca6876fa9c3b1465b045344a8ad46962de16972c7dadc4ac6257c7d225047793"},{"hits":[{"bytes":1656,"path":"/usr/local/sbin/homelab-backup-v2","sha256":"5077444065c732451cb84898680f62361b21a24ef9eb4f191253e82ead524ea2"}],"literal":"dbb3e6dbb71b10797df736431d9501a752a0f8c439163c9a0bddb7f76747f011"}] +ARCHIVE_CANDIDATES=[] +RUNTIME_NAME_HITS=[{"bytes":1656,"path":"/usr/local/sbin/homelab-backup-v2","sha256":"5077444065c732451cb84898680f62361b21a24ef9eb4f191253e82ead524ea2"}] +NO_MUTATION=true +NO_GIT_FETCH=true +NO_WRITE=true +NO_SERVICE_ACTION=true +NO_BACKUP_STARTED=true +NO_RESTORE_STARTED=true +NO_RETENTION_RUN_STARTED=true +NO_DELETE=true +NO_MAIL_SENT=true +TOPOLOGY_DURATION_SEC=0.047 +TASK_RESULT=PASS_HOMELAB_BACKUP_V2_WRAPPER_TOPOLOGY_READONLY +HOMELAB_RESULT_CONTRACT={"changes_made":false,"command_id":"SUPPORT-260921-HOMELAB-BACKUP-V2-WRAPPER-TOPOLOGY-READONLY-1010R1","rollback_restored":null,"rollback_started":false,"status":"OK","version":1} +WORKERS2_BACKUP_V2_WRAPPER_TOPOLOGY_END=1 + +OUTPUT_END +CHAT_OUTPUT_END diff --git a/runtime/latest.json b/runtime/latest.json index 4dcffc97..b894e7c6 100644 --- a/runtime/latest.json +++ b/runtime/latest.json @@ -1,19 +1,19 @@ { "schema_version": 1, "channel": "homelab-runtime", - "command_id": "SIGNALBOT-260921-RECONCILIATION-UNRESOLVED-RCA-052RCA1", + "command_id": "SUPPORT-260921-HOMELAB-BACKUP-V2-WRAPPER-TOPOLOGY-READONLY-1010R1", "status": "OK", "rc": 0, "host": "pve01", "mode": "read-only", - "component": "signalbot-reconciliation-unresolved-rca", - "started_at_utc": "2026-09-21T01:31:52Z", - "finished_at_utc": "2026-09-21T01:31:54Z", + "component": "homelab-backup-v2-wrapper-topology", + "started_at_utc": "2026-09-21T01:32:18Z", + "finished_at_utc": "2026-09-21T01:32:18Z", "reference_register_checked": true, "reference_sha256": "5a3d8e5154c41cb582a4e0aca68090be1f0138918bf82131a948df326f9d8d66", "error_register_checked": true, "error_register_sha256": "3b09a553ec0f527ed3afeed4753f52a74ee3036045bbfb3c685e9f8af4ba7ba0", - "command_sha256": "fa016567d1f883b6750dde1125c4cf074802ecf2f0db7998080c8cc7e0534f29", + "command_sha256": "5e5fdf246ba93cf69bd15007c0f7841be1336d6804b8f438fcd8c9cdc2fb7777", "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": "e103000052d95420a0460e4dfde59ebfcb62ec394ea3591409d27cdbbe048e59", - "sanitized_output_sha256": "e103000052d95420a0460e4dfde59ebfcb62ec394ea3591409d27cdbbe048e59", + "raw_evidence_sha256": "6bc6bee22d47b1f894187fc6de7668c0043a3a7c662da9f032ed015b6c3a35df", + "sanitized_output_sha256": "6bc6bee22d47b1f894187fc6de7668c0043a3a7c662da9f032ed015b6c3a35df", "output_truncated_in_json": false, "full_sanitized_output_url": "https://git.gram1.ru/.well-known/homelab-runtime/latest.txt", - "output": "SIGNALBOT052RCA1_RESULT={\"decision\":\"HOLD_D1_CLEAN_BUT_GLOBAL_UNRESOLVED_RECONCILIATION_BLOCKS_FINAL\",\"git_grep\":[\"749073ae0f894debc06fb0ffbf7a84abf9da531f:demonov_forward_map/bitfinex_reconciliation.py:57: RECONCILED = \\\"RECONCILED\\\"\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:demonov_forward_map/bitfinex_reconciliation.py:58: UNRESOLVED = \\\"UNRESOLVED\\\"\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:demonov_forward_map/bitfinex_reconciliation.py:317: failure_reason=\\\"REST_FETCH_OR_VALIDATION_FAILED\\\",\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:demonov_forward_map/bitfinex_trade_collector.py:252: CREATE TABLE IF NOT EXISTS reconnect_reconciliation(\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:demonov_forward_map/bitfinex_trade_collector.py:268: CREATE INDEX IF NOT EXISTS idx_reconnect_reconciliation_time\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:demonov_forward_map/bitfinex_trade_collector.py:269: ON reconnect_reconciliation(reconnect_received_at);\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:demonov_forward_map/bitfinex_trade_collector.py:299: \\\"SELECT COUNT(*) AS n FROM reconnect_reconciliation WHERE status=?\\\",\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:demonov_forward_map/bitfinex_trade_collector.py:314: LEFT JOIN reconnect_reconciliation rr\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:demonov_forward_map/bitfinex_trade_collector.py:323: \\\"SELECT COUNT(*) AS n FROM reconnect_reconciliation WHERE status=?\\\",\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:demonov_forward_map/bitfinex_trade_collector.py:324: (ReconciliationStatus.UNRESOLVED.value,),\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:demonov_forward_map/bitfinex_trade_collector.py:328: SELECT failure_reason FROM reconnect_reconciliation\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:demonov_forward_map/bitfinex_trade_collector.py:332: (ReconciliationStatus.UNRESOLVED.value,),\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:demonov_forward_map/bitfinex_trade_collector.py:563: INSERT OR IGNORE INTO reconnect_reconciliation(\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:demonov_forward_map/bitfinex_trade_collector.py:598: \\\"SELECT * FROM reconnect_reconciliation WHERE window_id=?\\\",\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:demonov_forward_map/bitfinex_trade_collector.py:616: SELECT * FROM reconnect_reconciliation\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:demonov_forward_map/bitfinex_trade_collector.py:648: status=ReconciliationStatus.RECONCILED,\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:demonov_forward_map/bitfinex_trade_collector.py:667: status=ReconciliationStatus.UNRESOLVED,\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:demonov_forward_map/bitfinex_trade_collector.py:684: if status not in {ReconciliationStatus.RECONCILED, ReconciliationStatus.UNRESOLVED}:\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:demonov_forward_map/bitfinex_trade_collector.py:708: UPDATE reconnect_reconciliation\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:demonov_forward_map/bitfinex_trade_collector.py:986: LEFT JOIN reconnect_reconciliation rr\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:demonov_forward_map/bitfinex_trade_collector.py:999: row[\\\"status\\\"] != ReconciliationStatus.RECONCILED.value\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:demonov_forward_map/live_health.py:269: _append_reason(reasons, \\\"RECONNECT_RECONCILIATION_UNRESOLVED\\\")\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:demonov_forward_map/producer_policy.py:101: fixture_provenance=\\\"UNRESOLVED_PRODUCTION\\\",\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:scripts/v1810_transcript_operator_audit.py:75:assert sm['JAN13_16_17_TRANSCRIPT_IDENTITY']=='RETRIEVED_BUT_OBJECT_ID_UNRESOLVED'\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:scripts/v1823_identifiability_closure.py:15: dict(hypothesis='H4_PUBLIC20_SEMANTIC_ALIAS_PHYSICAL_NOV10', physical_origin='physical 2021-11-10 high; semantic label 2021-11-20', declaration_binding='same prominent Oct03 predecessor', supporting_line='same affine line as H3', oct03_origin_render='INDISTINGUISHABLE_FROM_H3', postfreeze_farfield='INDISTINGUISHABLE_FROM_H3', downstream_ohlc='INDISTINGUISHABLE_FROM_H3', late_text='COMPATIBLE_WITH_LITERAL_PUBLIC_DATE', status='UNRESOLVED_EQUIVALENCE_CLASS'),\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:scripts/v1823_identifiability_closure.py:16: dict(hypothesis='H5_PUBLIC20_OTHER_OBJECT', physical_origin='unknown / potentially 20Nov-related', declaration_binding='different historical object than prominent Oct03 ray', supporting_line='object-specific unknown', oct03_origin_render='NOT_A_TEST_OF_THIS_OBJECT', postfreeze_farfield='NOT_A_TEST_OF_THIS_OBJECT', downstream_ohlc='cannot identify absent object geometry', late_text='COMPATIBLE', status='UNRESOLVED_OBJECT_BINDING'),\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:scripts/v1823_identifiability_closure.py:17: dict(hypothesis='H6_PUBLIC_DATE_PAIR_IS_LABEL_NOT_HANDLE_METADATA', physical_origin='unknown handle; public dates are reporting labels', declaration_binding='may be same or other object', supporting_line='underidentified', oct03_origin_render='cannot recover label semantics', postfreeze_farfield='cannot recover label semantics', downstream_ohlc='cannot recover label semantics', late_text='COMPATIBLE', status='UNRESOLVED_SEMANTIC_LAYER'),\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:scripts/v1824_modern_semantics_media_control.py:222: dict(hypothesis='H5_PUBLIC20_BINDS_OTHER_HISTORICAL_OBJECT', preserves_common_date_as_candle_identity_schema='POTENTIALLY_YES', preserves_literal_2022_text='YES', matches_prominent_2022_render='NOT_APPLICABLE_TO_OTHER_OBJECT', matches_2019_magnet_operator='POTENTIALLY_YES', matches_modern_row_semantics='YES_IF_OTHER_OBJECT_USES_20NOV_CANDLE', extra_unannounced_semantic_switch='NO', v4_1_update='UNCHANGED_UNRESOLVED_OBJECT_BINDING', reason='Still the cleanest way to preserve literal date and common operator without semantic alias, but no target album/object evidence identifies such an object.'),\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:scripts/v1824_modern_semantics_media_control.py:265: 'H5': 'UNCHANGED_UNRESOLVED_OBJECT_BINDING',\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:scripts/v1826_target_media_dual_object_audit.py:63:assert media[\\\"telegram_attachment_cardinality\\\"]==\\\"UNRESOLVED_FROM_TELEMETR_HTML\\\"\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:scripts/v1828_semantic_alias_nontransferability_audit.py:165: {'component':'PUBLIC_STRING_CORRECTION_HISTORY','v4_4':'UNRESOLVED','v4_5':'NO_IN_PLACE_CORRECTION_OBSERVED_ON_CURRENT_PUBLIC_SURFACE','delta':'Target lacks edited marker while same Telegram surface shows it on controls; mirrors preserve 20'},\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:tests/test_bitfinex_collector_reconnect_loop.py:89: rows=j.reconciliation_windows_overlapping(T0,T0+timedelta(seconds=20)); assert len(rows)==1 and rows[0].status is ReconciliationStatus.RECONCILED and len(client.calls)==1; j.close()\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:tests/test_bitfinex_d1_reconciliation_finality.py:27: if status is ReconciliationStatus.RECONCILED: j.mark_reconciliation_reconciled(window.window_id,evidence_sha256=\\\"a\\\"*64,recovered_row_count=0,resolved_at=T0+timedelta(hours=6,seconds=2))\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:tests/test_bitfinex_d1_reconciliation_finality.py:28: elif status is ReconciliationStatus.UNRESOLVED: j.mark_reconciliation_unresolved(window.window_id,evidence_sha256=\\\"b\\\"*64,failure_reason=\\\"SIMULATED\\\",resolved_at=T0+timedelta(hours=6,seconds=2))\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:tests/test_bitfinex_d1_reconciliation_finality.py:34: j,l,_=setup(tmp_path,ReconciliationStatus.RECONCILED); r=j.finalize_ready_d1(l,finalized_at=T0+timedelta(days=1,seconds=2)); assert r is not None; j.close()\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:tests/test_bitfinex_d1_reconciliation_finality.py:40: j,l,_=setup(tmp_path,ReconciliationStatus.UNRESOLVED); assert finalize_ready_d1_without_stopping_collection(j,l,finalized_at=T0+timedelta(days=1,seconds=2)) is None; j.close()\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:tests/test_bitfinex_d1_reconciliation_finality.py:43: j,l,event=setup(tmp_path,ReconciliationStatus.RECONCILED); j._db.execute(\\\"DELETE FROM reconnect_reconciliation WHERE reconnect_event_seq=?\\\",(event,)); assert finalize_ready_d1_without_stopping_collection(j,l,finalized_at=T0+timedelta(days=1,seconds=2)) is None; j.close()\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:tests/test_bitfinex_d1_reconciliation_finality.py:46: j,l,_=setup(tmp_path,ReconciliationStatus.RECONCILED); j._db.execute(\\\"INSERT INTO sequence_events(session_id,source_sequence,received_at,event_kind) VALUES(?,?,?,?)\\\",(\\\"b\\\",999,(T0+timedelta(hours=8)).isoformat(),\\\"GAP\\\")); assert finalize_ready_d1_without_stopping_collection(j,l,finalized_at=T0+timedelta(days=1,seconds=2)) is None; j.close()\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:tests/test_bitfinex_d1_reconciliation_finality.py:49: j,l,_=setup(tmp_path,ReconciliationStatus.RECONCILED); j._meta_set(\\\"post_finality_revision\\\",\\\"1\\\"); assert finalize_ready_d1_without_stopping_collection(j,l,finalized_at=T0+timedelta(days=1,seconds=2)) is None; j.close()\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:tests/test_bitfinex_reconciliation.py:105: assert resolved.status is ReconciliationStatus.RECONCILED\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:tests/test_bitfinex_reconciliation.py:118: assert unresolved.status is ReconciliationStatus.UNRESOLVED\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:tests/test_bitfinex_reconciliation.py:184: assert resolved.status is ReconciliationStatus.RECONCILED\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:tests/test_bitfinex_reconciliation.py:200: assert resolved.status is ReconciliationStatus.UNRESOLVED\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:tests/test_bitfinex_reconciliation.py:201: assert resolved.failure_reason == \\\"REST_FETCH_OR_VALIDATION_FAILED\\\"\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:tests/test_bitfinex_reconciliation.py:218: assert resolved.status is ReconciliationStatus.UNRESOLVED\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:tests/test_bitfinex_reconciliation.py:232: assert resolved.status is ReconciliationStatus.UNRESOLVED\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:tests/test_bitfinex_reconciliation.py:252: assert resolved.status is ReconciliationStatus.UNRESOLVED\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:tests/test_bitfinex_reconciliation_health.py:173: assert \\\"RECONNECT_RECONCILIATION_UNRESOLVED\\\" not in health[\\\"reason_codes\\\"]\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:tests/test_bitfinex_reconciliation_health.py:202: failure_reason=\\\"REST_FETCH_OR_VALIDATION_FAILED\\\",\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:tests/test_bitfinex_reconciliation_health.py:207: assert \\\"RECONNECT_RECONCILIATION_UNRESOLVED\\\" in health[\\\"reason_codes\\\"]\",\"749073ae0f894debc06fb0ffbf7a84abf9da531f:tests/test_bitfinex_reconciliation_health.py:209: assert health[\\\"reconciliation_last_reason\\\"] == \\\"REST_FETCH_OR_VALIDATION_FAILED\\\"\"],\"git_grep_rc\":0,\"guest\":{\"accepted_d1_candidate\":{\"close_at\":\"2026-09-19T00:00:00+00:00\",\"finality_state\":\"FINALIZED\",\"logical_d1_id\":\"bb9cbf18d81e605641e7aa9b792d35d1f55c3cae51fbe1abfe1617b72f0eaa14\",\"open_at\":\"2026-09-18T00:00:00+00:00\"},\"accepted_d1_revision_count\":1,\"collector_log_match_count\":0,\"collector_log_tail\":[],\"collector_public_rest_probe\":{\"ok\":true,\"result\":{\"bytes\":3,\"http\":200,\"prefix\":\"[1]\",\"sha256\":\"080a9ed428559ef602668b4c00f114f1a11c3f6b02a435f0bdc154578e4d7f22\"}},\"collector_status.json\":{\"prospective_reconnect_detected\":true,\"reconciliation_last_reason\":\"REST_FETCH_OR_VALIDATION_FAILED\",\"reconciliation_pending_count\":0,\"reconciliation_unresolved_count\":9,\"reconnect_detected\":true,\"updated_at\":\"2026-09-21T01:31:53.050618+00:00\"},\"failure_reason_counts\":{\"\":9,\"REST_FETCH_OR_VALIDATION_FAILED\":9},\"finalized_intervals\":[{\"close_at\":\"2026-09-19T00:00:00+00:00\",\"finality_state\":\"FINALIZED\",\"logical_d1_id\":\"bb9cbf18d81e605641e7aa9b792d35d1f55c3cae51fbe1abfe1617b72f0eaa14\",\"open_at\":\"2026-09-18T00:00:00+00:00\"}],\"host_public_rest_probe\":{\"body_prefix\":\"[1]\",\"bytes\":3,\"http\":200,\"ok\":true,\"sha256\":\"080a9ed428559ef602668b4c00f114f1a11c3f6b02a435f0bdc154578e4d7f22\"},\"live_status.json\":{\"execution_authority\":false,\"heartbeat_at\":\"2026-09-21T01:31:39.054064+00:00\",\"last_primary_closed_d1\":null,\"production_launch_allowed\":false,\"prospective_research_collection_allowed\":true,\"risk_authority\":false,\"source_fail_closed_reason\":\"REST_FETCH_OR_VALIDATION_FAILED\",\"source_reconnect_detected\":true,\"status\":\"FAIL_CLOSED\"},\"ok\":true,\"quick_check\":[\"ok\"],\"reconciliation_columns\":[\"window_id\",\"reconnect_event_seq\",\"reconnect_received_at\",\"previous_trade_identity\",\"previous_trade_mts\",\"next_trade_identity\",\"next_trade_mts\",\"status\",\"evidence_sha256\",\"recovered_row_count\",\"failure_reason\",\"created_at\",\"resolved_at\"],\"reconciliation_total\":18,\"status_counts\":{\"RECONCILED\":9,\"UNRESOLVED\":9},\"timing_classification\":\"ACCEPTED_D1_PREDATES_ALL_CURRENT_UNRESOLVED_BUT_GLOBAL_GATE_BLOCKS\",\"unresolved\":[{\"created_at\":\"2026-09-19T08:56:43.166296+00:00\",\"evidence_sha256\":\"0933e981b764b89e...\",\"failure_reason\":\"REST_FETCH_OR_VALIDATION_FAILED\",\"next_trade_identity\":\"cac1c294e6e6f358f8cb8151ecb7ca573b64f9a116d8cab2f0db588df7d83dc7\",\"next_trade_mts\":\"2026-09-19T08:56:43.071000+00:00\",\"previous_trade_identity\":\"ac5ee89769b01055080a1ef6b66a3bf2a0ee49841730f551293552af57e61809\",\"previous_trade_mts\":\"2026-09-19T08:56:34.170000+00:00\",\"reconnect_event_seq\":251009,\"reconnect_received_at\":\"2026-09-19T08:56:37.306311+00:00\",\"recovered_row_count\":0,\"resolved_at\":\"2026-09-19T08:56:43.166296+00:00\",\"status\":\"UNRESOLVED\",\"window_id\":\"9cef91126f4f0043718d71b90d627540355d1f0f0f1fd75ee30f9bef3379ad88\"},{\"created_at\":\"2026-09-19T20:55:47.702369+00:00\",\"evidence_sha256\":\"0933e981b764b89e...\",\"failure_reason\":\"REST_FETCH_OR_VALIDATION_FAILED\",\"next_trade_identity\":\"d5d2cd472e6043a8a6d5a9efe6de57f75964d72e204ff37860a0d5de899dbbf1\",\"next_trade_mts\":\"2026-09-19T20:55:47.585000+00:00\",\"previous_trade_identity\":\"8d61cfd2c7da8ed694776ff0e009bd1fb90d2cd315c202c907443449564de6d8\",\"previous_trade_mts\":\"2026-09-19T20:53:15.067000+00:00\",\"reconnect_event_seq\":303837,\"reconnect_received_at\":\"2026-09-19T20:55:45.541470+00:00\",\"recovered_row_count\":0,\"resolved_at\":\"2026-09-19T20:55:47.702369+00:00\",\"status\":\"UNRESOLVED\",\"window_id\":\"6a8bbda8609aea6fb0d659bdcedcb37cad24318deaabba9ece38b821a312ed37\"},{\"created_at\":\"2026-09-20T01:19:16.494983+00:00\",\"evidence_sha256\":\"0933e981b764b89e...\",\"failure_reason\":\"REST_FETCH_OR_VALIDATION_FAILED\",\"next_trade_identity\":\"bd6ae492eca899f8710d0c4b88704cb5a0a34ff94a23419249366f4ebd3586b6\",\"next_trade_mts\":\"2026-09-20T01:19:16.432000+00:00\",\"previous_trade_identity\":\"4d902cf30ae01b151d21f3ecd1b706af0a7f87c9c44995b381e0e064b2f236b3\",\"previous_trade_mts\":\"2026-09-20T01:19:03.365000+00:00\",\"reconnect_event_seq\":318578,\"reconnect_received_at\":\"2026-09-20T01:19:10.585588+00:00\",\"recovered_row_count\":0,\"resolved_at\":\"2026-09-20T01:19:16.494983+00:00\",\"status\":\"UNRESOLVED\",\"window_id\":\"f3342e8836aa6f1a655a977e6839647e8f305cb90ce4a1977c417f9541a0ecda\"},{\"created_at\":\"2026-09-20T07:26:46.505770+00:00\",\"evidence_sha256\":\"0933e981b764b89e...\",\"failure_reason\":\"REST_FETCH_OR_VALIDATION_FAILED\",\"next_trade_identity\":\"15a77ac49619bc44a15ab3cb04219963639c612347f0de2ba82bf482c59a6b61\",\"next_trade_mts\":\"2026-09-20T07:26:46.404000+00:00\",\"previous_trade_identity\":\"25ae8d55a395d0a39001b1c409a86130c78b7221d31bdefc80242fc7af49da60\",\"previous_trade_mts\":\"2026-09-20T07:26:42.303000+00:00\",\"reconnect_event_seq\":350488,\"reconnect_received_at\":\"2026-09-20T07:26:44.462330+00:00\",\"recovered_row_count\":0,\"resolved_at\":\"2026-09-20T07:26:46.505770+00:00\",\"status\":\"UNRESOLVED\",\"window_id\":\"f429abc398b54cb0cbd869dce8c0be4e8c8ff8fb5ec7bb1a345c3bc8c7a394fb\"},{\"created_at\":\"2026-09-20T13:53:16.842477+00:00\",\"evidence_sha256\":\"0933e981b764b89e...\",\"failure_reason\":\"REST_FETCH_OR_VALIDATION_FAILED\",\"next_trade_identity\":\"7782961f0ddf1bd08bdd9a1e311da68898b133f65fea2e24698fd9612e52a008\",\"next_trade_mts\":\"2026-09-20T13:53:16.750000+00:00\",\"previous_trade_identity\":\"102515c73c5748a56ca153cab57cdb832b5aae503a5485a23265c6313699d80f\",\"previous_trade_mts\":\"2026-09-20T13:52:37.772000+00:00\",\"reconnect_event_seq\":377008,\"reconnect_received_at\":\"2026-09-20T13:53:16.325492+00:00\",\"recovered_row_count\":0,\"resolved_at\":\"2026-09-20T13:53:16.842477+00:00\",\"status\":\"UNRESOLVED\",\"window_id\":\"7ba6b9d6bfcc433411890610b9d1282178a9646d61d026798b82f51a4985ccdc\"},{\"created_at\":\"2026-09-20T17:27:36.374674+00:00\",\"evidence_sha256\":\"0933e981b764b89e...\",\"failure_reason\":\"REST_FETCH_OR_VALIDATION_FAILED\",\"next_trade_identity\":\"8c6394e7f3a93cb2e27c18f997704fa34336ce94112dee05c8ef6a8809821b0a\",\"next_trade_mts\":\"2026-09-20T17:27:36.291000+00:00\",\"previous_trade_identity\":\"67b068829952038e414e37f3453cd0cf3903ade761e19dea3a63c276b1743041\",\"previous_trade_mts\":\"2026-09-20T17:26:57.638000+00:00\",\"reconnect_event_seq\":397710,\"reconnect_received_at\":\"2026-09-20T17:27:33.837394+00:00\",\"recovered_row_count\":0,\"resolved_at\":\"2026-09-20T17:27:36.374674+00:00\",\"status\":\"UNRESOLVED\",\"window_id\":\"3531b2a1ebb67b0c993098f03d5039596b23c365f383696f154b0de7c1f35014\"},{\"created_at\":\"2026-09-21T00:24:23.299034+00:00\",\"evidence_sha256\":\"0933e981b764b89e...\",\"failure_reason\":\"REST_FETCH_OR_VALIDATION_FAILED\",\"next_trade_identity\":\"cb133d7053bf7d9fc87bcab995eaaf7f687c598b972df115a1e268920a9e39f3\",\"next_trade_mts\":\"2026-09-21T00:24:23.217000+00:00\",\"previous_trade_identity\":\"669c24c1506be52bad95587b5671a8ca82d5c998c6d0bf4e8c21816f7f4013a1\",\"previous_trade_mts\":\"2026-09-21T00:23:51.273000+00:00\",\"reconnect_event_seq\":433876,\"reconnect_received_at\":\"2026-09-21T00:24:21.491095+00:00\",\"recovered_row_count\":0,\"resolved_at\":\"2026-09-21T00:24:23.299034+00:00\",\"status\":\"UNRESOLVED\",\"window_id\":\"ff8241e034cd198ca101e2fb3aa1490f1c1f6419d660da8dbedd53f9c793570f\"},{\"created_at\":\"2026-09-21T00:42:54.658882+00:00\",\"evidence_sha256\":\"0933e981b764b89e...\",\"failure_reason\":\"REST_FETCH_OR_VALIDATION_FAILED\",\"next_trade_identity\":\"153be4780f583c7140051c66c6db78e338eb85dc10a7b2b18823f53a886e745f\",\"next_trade_mts\":\"2026-09-21T00:42:54.561000+00:00\",\"previous_trade_identity\":\"712e7f4b0dd599f1cd5b0bda031d78b35e2ec2b13477688815f4b3e1928f5a28\",\"previous_trade_mts\":\"2026-09-21T00:41:03.150000+00:00\",\"reconnect_event_seq\":437370,\"reconnect_received_at\":\"2026-09-21T00:42:48.180360+00:00\",\"recovered_row_count\":0,\"resolved_at\":\"2026-09-21T00:42:54.658882+00:00\",\"status\":\"UNRESOLVED\",\"window_id\":\"430d641924a7288977018e3493ef5e93305dc1d92122b5f2a2ac5f50b4e66988\"},{\"created_at\":\"2026-09-21T00:49:26.894105+00:00\",\"evidence_sha256\":\"0933e981b764b89e...\",\"failure_reason\":\"REST_FETCH_OR_VALIDATION_FAILED\",\"next_trade_identity\":\"faa4ee2e78e629ed93689c4d00cfc3b5cbf532d8a208d45460da9852a7ec1cfe\",\"next_trade_mts\":\"2026-09-21T00:49:26.818000+00:00\",\"previous_trade_identity\":\"5dfdb1893e2243a4cbc8088791a958d96cc3416d9b8cdd2fb8d3fe41d3420190\",\"previous_trade_mts\":\"2026-09-21T00:48:31.003000+00:00\",\"reconnect_event_seq\":438938,\"reconnect_received_at\":\"2026-09-21T00:49:23.294194+00:00\",\"recovered_row_count\":0,\"resolved_at\":\"2026-09-21T00:49:26.894105+00:00\",\"status\":\"UNRESOLVED\",\"window_id\":\"27cab14c1de70fe0d3439f687d7ee5eafe9b6e9c02f308366178fe02eae6c6ba\"}],\"unresolved_after_accepted_d1_count\":9,\"unresolved_after_event_seq\":[251009,303837,318578,350488,377008,397710,433876,437370,438938],\"unresolved_before_accepted_d1_count\":0,\"unresolved_count\":9,\"unresolved_overlap_accepted_d1_count\":0,\"unresolved_overlap_event_seq\":[],\"worker_REST_FETCH_OR_VALIDATION_FAILED_count_2h\":0,\"worker_SOURCE_FINALITY_count_2h\":480},\"holds\":[],\"ok\":true,\"qga_guest_exitcode\":0,\"qga_guest_stderr_present\":false,\"qga_outer_rc\":0,\"qga_outer_stderr_present\":false,\"source_evidence\":{\"demonov_forward_map/bitfinex_reconciliation.py\":{\"sha256\":\"023ce0a041b50b866a48d9f752bd80479a34789d82f73c81d18246ed8871ef8e\",\"snippets\":[[\"43: \\\"trade_id\\\": trade_id,\",\"44: \\\"mts_ms\\\": mts_ms,\",\"45: \\\"amount\\\": format(amount, \\\"f\\\"),\",\"46: \\\"price\\\": format(price, \\\"f\\\"),\",\"47: },\",\"48: ensure_ascii=True,\",\"49: sort_keys=True,\",\"50: separators=(\\\",\\\", \\\":\\\"),\",\"51: ).encode(\\\"utf-8\\\")\",\"52: return hashlib.sha256(raw).hexdigest()\",\"53:\",\"54:\",\"55:class ReconciliationStatus(str, Enum):\",\"56: PENDING = \\\"PENDING\\\"\",\"57: RECONCILED = \\\"RECONCILED\\\"\",\"58: UNRESOLVED = \\\"UNRESOLVED\\\"\",\"59:\",\"60:\",\"61:@dataclass(frozen=True)\",\"62:class ReconciliationWindow:\",\"63: window_id: str\",\"64: reconnect_event_seq: int\",\"65: reconnect_received_at: datetime\",\"66: previous_trade_identity: str\",\"67: previous_trade_mts: datetime\",\"68: next_trade_identity: str\",\"69: next_trade_mts: datetime\",\"70: status: ReconciliationStatus\",\"71: evidence_sha256: str\"],[\"102: trade_id=trade_id,\",\"103: mts_ms=mts_ms,\",\"104: amount=amount,\",\"105: price=price,\",\"106: )\",\"107: return BitfinexCanonicalTradeV1.build(\",\"108: trade_id=trade_id,\",\"109: mts=datetime.fromtimestamp(mts_ms / 1000, tz=timezone.utc),\",\"110: amount=amount,\",\"111: price=price,\",\"112: source_payload_hash=source_payload_hash,\",\"113: )\",\"114:\",\"115:\",\"116:def _stdlib_fetch_json(url: str, *, timeout: float, max_bytes: int) -> object:\",\"117: request = Request(\",\"118: url,\",\"119: headers={\\\"Accept\\\": \\\"application/json\\\", \\\"User-Agent\\\": \\\"demonov-shadow/CR0116-reconcile\\\"},\",\"120: method=\\\"GET\\\",\",\"121: )\",\"122: try:\",\"123: with urlopen(request, timeout=timeout) as response:\",\"124: body = response.read(max_bytes + 1)\",\"125: except Exception as exc:\",\"126: raise DemonovError(\\\"Bitfinex public trade history request failed\\\") from exc\",\"127: if len(body) > max_bytes:\",\"128: raise DemonovError(\\\"Bitfinex public trade history response too large\\\")\",\"129: try:\",\"130: return json.loads(body.decode(\\\"utf-8\\\"))\"],[\"133:\",\"134:\",\"135:class BitfinexPublicTradeHistoryClient:\",\"136: def __init__(\",\"137: self,\",\"138: *,\",\"139: fetch_json: Callable[..., object] | None = None,\",\"140: timeout: float = 20.0,\",\"141: max_bytes: int = 4 * 1024 * 1024,\",\"142: ) -> None:\",\"143: self._fetch_json = fetch_json or _stdlib_fetch_json\",\"144: self.timeout = float(timeout)\",\"145: self.max_bytes = int(max_bytes)\",\"146:\",\"147: def fetch_trade_window(\",\"148: self,\",\"149: symbol: str,\",\"150: *,\",\"151: start_mts: datetime,\",\"152: end_mts: datetime,\",\"153: ) -> BitfinexTradeHistoryBatch:\",\"154: if not isinstance(symbol, str) or not symbol.startswith(\\\"t\\\") or len(symbol) < 2:\",\"155: raise DemonovError(\\\"Bitfinex trade history symbol invalid\\\")\",\"156: start_mts = _utc(start_mts, \\\"start_mts\\\")\",\"157: end_mts = _utc(end_mts, \\\"end_mts\\\")\",\"158: if end_mts < start_mts:\",\"159: raise DemonovError(\\\"Bitfinex trade history interval invalid\\\")\",\"160: start_ms = int(start_mts.timestamp() * 1000)\",\"161: end_ms = int(end_mts.timestamp() * 1000)\"],[\"217:\",\"218: def reconcile_window(\",\"219: self,\",\"220: journal,\",\"221: window_id: str,\",\"222: *,\",\"223: symbol: str,\",\"224: resolved_at: datetime,\",\"225: ) -> ReconciliationWindow:\",\"226: resolved_at = _utc(resolved_at, \\\"resolved_at\\\")\",\"227: window = journal.reconciliation_window(window_id)\",\"228: if window.status != ReconciliationStatus.PENDING:\",\"229: return window\",\"230: try:\",\"231: batch = self.fetch_trade_window(\",\"232: symbol,\",\"233: start_mts=window.previous_trade_mts,\",\"234: end_mts=window.next_trade_mts,\",\"235: )\",\"236: if batch.raw_row_count >= BITFINEX_PUBLIC_HISTORY_LIMIT:\",\"237: return journal.mark_reconciliation_unresolved(\",\"238: window_id,\",\"239: evidence_sha256=batch.evidence_sha256,\",\"240: failure_reason=\\\"REST_ROW_LIMIT_REACHED\\\",\",\"241: resolved_at=resolved_at,\",\"242: )\",\"243: if not batch.trades:\",\"244: return journal.mark_reconciliation_unresolved(\",\"245: window_id,\"],[\"262: for index, trade in enumerate(batch.trades):\",\"263: receipt = SourceReceiptV1.build(\",\"264: venue_id=\\\"BITFINEX\\\",\",\"265: source_kind=\\\"REST_TRADE_HISTORY\\\",\",\"266: received_at=resolved_at,\",\"267: source_sequence=index,\",\"268: raw_payload_hash=trade.source_payload_hash,\",\"269: collector_session_id=f\\\"reconciliation:{window_id}\\\",\",\"270: )\",\"271: receipt_id = journal.record_receipt(receipt)\",\"272: result = journal.record_trade(trade, receipt_id=receipt_id)\",\"273: if result == \\\"INSERTED\\\":\",\"274: recovered += 1\",\"275: elif result != \\\"DUPLICATE\\\":\",\"276: return journal.mark_reconciliation_unresolved(\",\"277: window_id,\",\"278: evidence_sha256=batch.evidence_sha256,\",\"279: failure_reason=f\\\"REST_INSERT_{result}\\\",\",\"280: resolved_at=resolved_at,\",\"281: )\",\"282:\",\"283: if not journal.has_trade_identity(window.previous_trade_identity):\",\"284: return journal.mark_reconciliation_unresolved(\",\"285: window_id,\",\"286: evidence_sha256=batch.evidence_sha256,\",\"287: failure_reason=\\\"PREVIOUS_BOUNDARY_MISSING\\\",\",\"288: resolved_at=resolved_at,\",\"289: )\",\"290: if not journal.has_trade_identity(window.next_trade_identity):\"],[\"300: window_id,\",\"301: evidence_sha256=batch.evidence_sha256,\",\"302: failure_reason=\\\"REST_MERGE_PROOF_FAILED\\\",\",\"303: resolved_at=resolved_at,\",\"304: )\",\"305: return journal.mark_reconciliation_reconciled(\",\"306: window_id,\",\"307: evidence_sha256=batch.evidence_sha256,\",\"308: recovered_row_count=recovered,\",\"309: resolved_at=resolved_at,\",\"310: )\",\"311: except DemonovError as exc:\",\"312: reason = str(exc)\",\"313: reason_hash = hashlib.sha256(reason.encode(\\\"utf-8\\\")).hexdigest()\",\"314: return journal.mark_reconciliation_unresolved(\",\"315: window_id,\",\"316: evidence_sha256=reason_hash,\",\"317: failure_reason=\\\"REST_FETCH_OR_VALIDATION_FAILED\\\",\",\"318: resolved_at=resolved_at,\",\"319: )\"]]},\"demonov_forward_map/bitfinex_trade_collector.py\":{\"sha256\":\"71ad3dfbdedd7d9bb698fd20bbfa8bfad0dace003e0592716ff6299f2c8ee121\",\"snippets\":[[\"238: CREATE TABLE IF NOT EXISTS d1_revisions(\",\"239: revision_id TEXT PRIMARY KEY,\",\"240: logical_d1_id TEXT NOT NULL,\",\"241: revision_json TEXT NOT NULL\",\"242: );\",\"243: CREATE TABLE IF NOT EXISTS finalized_d1(\",\"244: logical_d1_id TEXT PRIMARY KEY,\",\"245: close_at TEXT NOT NULL,\",\"246: finalized_d1_id TEXT NOT NULL UNIQUE,\",\"247: revision_id TEXT NOT NULL,\",\"248: logical_json TEXT NOT NULL,\",\"249: revision_json TEXT NOT NULL,\",\"250: finalized_json TEXT NOT NULL\",\"251: );\",\"252: CREATE TABLE IF NOT EXISTS reconnect_reconciliation(\",\"253: window_id TEXT PRIMARY KEY,\",\"254: reconnect_event_seq INTEGER NOT NULL UNIQUE\",\"255: REFERENCES sequence_events(event_seq),\",\"256: reconnect_received_at TEXT NOT NULL,\",\"257: previous_trade_identity TEXT NOT NULL,\",\"258: previous_trade_mts TEXT NOT NULL,\",\"259: next_trade_identity TEXT NOT NULL,\",\"260: next_trade_mts TEXT NOT NULL,\",\"261: status TEXT NOT NULL,\",\"262: evidence_sha256 TEXT NOT NULL,\",\"263: recovered_row_count INTEGER NOT NULL,\",\"264: failure_reason TEXT NOT NULL,\",\"265: created_at TEXT NOT NULL,\",\"266: resolved_at TEXT\"],[\"285: )\",\"286:\",\"287: def _status(self) -> BitfinexCollectorStatus:\",\"288: return BitfinexCollectorStatus(\",\"289: gap_detected=self._meta_get(\\\"gap_detected\\\") == \\\"1\\\",\",\"290: reconnect_detected=self._meta_get(\\\"reconnect_detected\\\") == \\\"1\\\",\",\"291: post_finality_revision=(\",\"292: self._meta_get(\\\"post_finality_revision\\\") == \\\"1\\\"\",\"293: ),\",\"294: fail_closed_reason=self._meta_get(\\\"fail_closed_reason\\\") or \\\"\\\",\",\"295: )\",\"296:\",\"297: def _reconciliation_status_summary(self) -> tuple[int, int, str]:\",\"298: pending_row = self._db.execute(\",\"299: \\\"SELECT COUNT(*) AS n FROM reconnect_reconciliation WHERE status=?\\\",\",\"300: (ReconciliationStatus.PENDING.value,),\",\"301: ).fetchone()\",\"302: active_pending = 0\",\"303: active_raw = self._meta_get(\\\"active_reconnect_pending_event_seq\\\")\",\"304: if active_raw:\",\"305: try:\",\"306: active_seq = int(active_raw)\",\"307: except ValueError:\",\"308: active_seq = 0\",\"309: if active_seq > 0:\",\"310: row = self._db.execute(\",\"311: \\\"\\\"\\\"\",\"312: SELECT se.event_kind, rr.window_id\",\"313: FROM sequence_events se\"],[\"318: (active_seq,),\",\"319: ).fetchone()\",\"320: if row is not None and row[\\\"event_kind\\\"] == \\\"RECONNECT\\\" and row[\\\"window_id\\\"] is None:\",\"321: active_pending = 1\",\"322: unresolved_row = self._db.execute(\",\"323: \\\"SELECT COUNT(*) AS n FROM reconnect_reconciliation WHERE status=?\\\",\",\"324: (ReconciliationStatus.UNRESOLVED.value,),\",\"325: ).fetchone()\",\"326: latest = self._db.execute(\",\"327: \\\"\\\"\\\"\",\"328: SELECT failure_reason FROM reconnect_reconciliation\",\"329: WHERE status=?\",\"330: ORDER BY reconnect_event_seq DESC LIMIT 1\",\"331: \\\"\\\"\\\",\",\"332: (ReconciliationStatus.UNRESOLVED.value,),\",\"333: ).fetchone()\",\"334: pending = (0 if pending_row is None else int(pending_row[\\\"n\\\"])) + active_pending\",\"335: unresolved = 0 if unresolved_row is None else int(unresolved_row[\\\"n\\\"])\",\"336: reason = \\\"\\\" if latest is None else str(latest[\\\"failure_reason\\\"])\",\"337: return pending, unresolved, reason\",\"338:\",\"339: def _persist_status_file(self) -> None:\",\"340: status = self._status()\",\"341: prospective = self.current_prospective_source_state()\",\"342: pending, unresolved, last_reason = self._reconciliation_status_summary()\",\"343: payload = {\",\"344: \\\"gap_detected\\\": status.gap_detected,\",\"345: \\\"reconnect_detected\\\": status.reconnect_detected,\",\"346: \\\"post_finality_revision\\\": status.post_finality_revision,\"],[\"469: self._meta_set(f\\\"last_sequence:{session_id}\\\", str(sequence))\",\"470: self._db.execute(\",\"471: \\\"\\\"\\\"\",\"472: INSERT INTO sequence_events(\",\"473: session_id,source_sequence,received_at,event_kind\",\"474: ) VALUES(?,?,?,?)\",\"475: \\\"\\\"\\\",\",\"476: (session_id, sequence, received_at.isoformat(), \\\"SEQUENCE\\\"),\",\"477: )\",\"478: self._persist_status_file()\",\"479: return None\",\"480:\",\"481: def current_prospective_source_state(self) -> BitfinexCollectorStatus:\",\"482: # Historical GAP/RECONNECT events are enforced per D1 by finality.\",\"483: # Only reconciliation that is still missing/pending/unresolved blocks\",\"484: # prospective scientific continuity globally.\",\"485: pending, unresolved, last_reason = self._reconciliation_status_summary()\",\"486: post_finality_revision = (\",\"487: self._meta_get(\\\"post_finality_revision\\\") == \\\"1\\\"\",\"488: )\",\"489: reconnect_blocked = pending > 0 or unresolved > 0\",\"490: if post_finality_revision:\",\"491: reason = \\\"post-finality source revision detected\\\"\",\"492: elif unresolved > 0:\",\"493: reason = last_reason or \\\"reconnect reconciliation unresolved\\\"\",\"494: elif pending > 0:\",\"495: reason = \\\"reconnect reconciliation pending\\\"\",\"496: else:\",\"497: reason = \\\"\\\"\"],[\"500: reconnect_detected=reconnect_blocked,\",\"501: post_finality_revision=post_finality_revision,\",\"502: fail_closed_reason=reason,\",\"503: )\",\"504:\",\"505: def current_gap_state(self) -> BitfinexCollectorStatus:\",\"506: return self._status()\",\"507:\",\"508: def latest_canonical_trade(self) -> BitfinexCanonicalTradeV1 | None:\",\"509: row = self._db.execute(\",\"510: \\\"\\\"\\\"\",\"511: SELECT trade_identity,semantic_hash,trade_id,mts,amount,price,source_payload_hash\",\"512: FROM trade_revisions ORDER BY revision_seq DESC LIMIT 1\",\"513: \\\"\\\"\\\"\",\"514: ).fetchone()\",\"515: if row is None:\",\"516: return None\",\"517: return BitfinexCanonicalTradeV1(\",\"518: trade_identity=str(row[\\\"trade_identity\\\"]),\",\"519: semantic_hash=str(row[\\\"semantic_hash\\\"]),\",\"520: trade_id=int(row[\\\"trade_id\\\"]),\",\"521: mts=_dt(row[\\\"mts\\\"]),\",\"522: amount=Decimal(row[\\\"amount\\\"]),\",\"523: price=Decimal(row[\\\"price\\\"]),\",\"524: source_payload_hash=str(row[\\\"source_payload_hash\\\"]),\",\"525: )\",\"526:\",\"527: def create_reconciliation_window(\",\"528: self,\"],[\"531: previous_trade: BitfinexCanonicalTradeV1,\",\"532: next_trade: BitfinexCanonicalTradeV1,\",\"533: created_at: datetime,\",\"534: ) -> ReconciliationWindow:\",\"535: if not isinstance(reconnect_event_seq, int) or isinstance(reconnect_event_seq, bool) or reconnect_event_seq <= 0:\",\"536: raise DemonovError(\\\"reconnect_event_seq must be a positive integer\\\")\",\"537: if not isinstance(previous_trade, BitfinexCanonicalTradeV1) or not isinstance(next_trade, BitfinexCanonicalTradeV1):\",\"538: raise DemonovError(\\\"canonical reconnect boundary trades required\\\")\",\"539: created_at = _utc(created_at, \\\"created_at\\\")\",\"540: if next_trade.mts < previous_trade.mts:\",\"541: raise DemonovError(\\\"reconnect trade boundaries out of order\\\")\",\"542: event = self._db.execute(\",\"543: \\\"SELECT received_at,event_kind FROM sequence_events WHERE event_seq=?\\\",\",\"544: (reconnect_event_seq,),\",\"545: ).fetchone()\",\"546: if event is None or event[\\\"event_kind\\\"] != \\\"RECONNECT\\\":\",\"547: raise DemonovError(\\\"reconciliation window requires RECONNECT event\\\")\",\"548: reconnect_received_at = _dt(event[\\\"received_at\\\"])\",\"549: window_id = canonical_hash(\",\"550: {\",\"551: \\\"schema\\\": \\\"CR0116_BITFINEX_RECONCILIATION_WINDOW_V1\\\",\",\"552: \\\"reconnect_event_seq\\\": reconnect_event_seq,\",\"553: \\\"reconnect_received_at\\\": reconnect_received_at,\",\"554: \\\"previous_trade_identity\\\": previous_trade.trade_identity,\",\"555: \\\"previous_trade_mts\\\": previous_trade.mts,\",\"556: \\\"next_trade_identity\\\": next_trade.trade_identity,\",\"557: \\\"next_trade_mts\\\": next_trade.mts,\",\"558: }\",\"559: )\"],[\"584: ),\",\"585: )\",\"586: except sqlite3.IntegrityError as exc:\",\"587: raise DemonovError(\\\"RECONNECT event already bound to a different reconciliation window\\\") from exc\",\"588: window = self.reconciliation_window(window_id)\",\"589: if window.reconnect_event_seq != reconnect_event_seq:\",\"590: raise DemonovError(\\\"reconciliation window identity conflict\\\")\",\"591: if self._meta_get(\\\"active_reconnect_pending_event_seq\\\") == str(reconnect_event_seq):\",\"592: self._meta_set(\\\"active_reconnect_pending_event_seq\\\", \\\"\\\")\",\"593: self._persist_status_file()\",\"594: return window\",\"595:\",\"596: def reconciliation_window(self, window_id: str) -> ReconciliationWindow:\",\"597: row = self._db.execute(\",\"598: \\\"SELECT * FROM reconnect_reconciliation WHERE window_id=?\\\",\",\"599: (window_id,),\",\"600: ).fetchone()\",\"601: if row is None:\",\"602: raise DemonovError(\\\"reconciliation window not found\\\")\",\"603: return self._reconciliation_from_row(row)\",\"604:\",\"605: def reconciliation_windows_overlapping(\",\"606: self,\",\"607: open_at: datetime,\",\"608: close_at: datetime,\",\"609: ) -> tuple[ReconciliationWindow, ...]:\",\"610: open_at = _utc(open_at, \\\"open_at\\\")\",\"611: close_at = _utc(close_at, \\\"close_at\\\")\",\"612: if close_at < open_at:\"],[\"618: ORDER BY reconnect_event_seq\",\"619: \\\"\\\"\\\",\",\"620: (open_at.isoformat(), close_at.isoformat()),\",\"621: ).fetchall()\",\"622: return tuple(self._reconciliation_from_row(row) for row in rows)\",\"623:\",\"624: def latest_trade_semantic_hash(self, trade_identity: str) -> str | None:\",\"625: row = self._db.execute(\",\"626: \\\"\\\"\\\"\",\"627: SELECT semantic_hash FROM trade_revisions\",\"628: WHERE trade_identity=?\",\"629: ORDER BY revision_seq DESC LIMIT 1\",\"630: \\\"\\\"\\\",\",\"631: (trade_identity,),\",\"632: ).fetchone()\",\"633: return None if row is None else str(row[\\\"semantic_hash\\\"])\",\"634:\",\"635: def has_trade_identity(self, trade_identity: str) -> bool:\",\"636: return self.latest_trade_semantic_hash(trade_identity) is not None\",\"637:\",\"638: def mark_reconciliation_reconciled(\",\"639: self,\",\"640: window_id: str,\",\"641: *,\",\"642: evidence_sha256: str,\",\"643: recovered_row_count: int,\",\"644: resolved_at: datetime,\",\"645: ) -> ReconciliationWindow:\",\"646: return self._mark_reconciliation_terminal(\"]]},\"demonov_forward_map/live_health.py\":{\"sha256\":\"a45da5b399b0a87a40fed04e68c728a9960b604e7b69c0f73aa23042c31349ec\",\"snippets\":[[\"57: return value if value > 0 else None\",\"58:\",\"59:\",\"60:def _open_ro(path: Path):\",\"61: uri = path.resolve().as_uri() + \\\"?mode=ro\\\"\",\"62: return sqlite3.connect(uri, uri=True, timeout=5)\",\"63:\",\"64:\",\"65:def _sqlite_integrity(path: Path) -> bool:\",\"66: if not path.exists():\",\"67: return True\",\"68: try:\",\"69: db = _open_ro(path)\",\"70: try:\",\"71: row = db.execute(\\\"PRAGMA quick_check\\\").fetchone()\",\"72: return bool(row and str(row[0]).lower() == \\\"ok\\\")\",\"73: finally:\",\"74: db.close()\",\"75: except sqlite3.DatabaseError:\",\"76: return False\",\"77:\",\"78:\",\"79:def _last_finalized(path: Path) -> tuple[str | None, str | None]:\",\"80: if not path.exists():\",\"81: return None, None\",\"82: try:\",\"83: db = _open_ro(path)\",\"84: try:\",\"85: close_row = db.execute(\"],[\"107:) -> tuple[int, int | None, int, str | None]:\",\"108: if not prospective_path.exists():\",\"109: return 0, None, 0, None\",\"110:\",\"111: terminal = {}\",\"112: indeterminate = 0\",\"113: last_sent = None\",\"114: if relay_path.exists():\",\"115: try:\",\"116: relay = _open_ro(relay_path)\",\"117: try:\",\"118: rows = relay.execute(\",\"119: \\\"SELECT outbox_id,status,finalized_at \\\"\",\"120: \\\"FROM notification_relay_ledger\\\"\",\"121: ).fetchall()\",\"122: finally:\",\"123: relay.close()\",\"124: for outbox_id, status, finalized_at in rows:\",\"125: terminal[str(outbox_id)] = str(status)\",\"126: if status == \\\"INDETERMINATE\\\":\",\"127: indeterminate += 1\",\"128: if status == \\\"SENT\\\" and finalized_at:\",\"129: stamp = _aware(str(finalized_at))\",\"130: if stamp is not None and (\",\"131: last_sent is None or stamp > last_sent\",\"132: ):\",\"133: last_sent = stamp\",\"134: except sqlite3.DatabaseError:\",\"135: return 0, None, 0, None\"],[\"234: now=current,\",\"235: )\",\"236:\",\"237: reasons: list[str] = []\",\"238: scientific_fail = False\",\"239: degraded = False\",\"240:\",\"241: if any(value is None for value in slo.values()):\",\"242: _append_reason(reasons, \\\"SLO_CONFIGURATION_INVALID\\\")\",\"243: scientific_fail = True\",\"244:\",\"245: prospective_gap = collector.get(\\\"prospective_gap_detected\\\", collector.get(\\\"gap_detected\\\")) is True\",\"246: prospective_reconnect = collector.get(\\\"prospective_reconnect_detected\\\", collector.get(\\\"reconnect_detected\\\")) is True\",\"247: reconciliation_pending = collector.get(\\\"reconciliation_pending_count\\\", 0)\",\"248: reconciliation_unresolved = collector.get(\\\"reconciliation_unresolved_count\\\", 0)\",\"249: reconciliation_last_reason = collector.get(\\\"reconciliation_last_reason\\\", \\\"\\\")\",\"250: reconciliation_status_invalid = (\",\"251: not isinstance(reconciliation_pending, int)\",\"252: or isinstance(reconciliation_pending, bool)\",\"253: or reconciliation_pending < 0\",\"254: or not isinstance(reconciliation_unresolved, int)\",\"255: or isinstance(reconciliation_unresolved, bool)\",\"256: or reconciliation_unresolved < 0\",\"257: or not isinstance(reconciliation_last_reason, str)\",\"258: )\",\"259: if prospective_gap:\",\"260: _append_reason(reasons, \\\"SOURCE_SEQUENCE_GAP\\\")\",\"261: scientific_fail = True\",\"262: if reconciliation_status_invalid:\"],[\"395: and slo[\\\"relay_heartbeat_slo_seconds\\\"] is not None\",\"396: and relay_age <= slo[\\\"relay_heartbeat_slo_seconds\\\"]\",\"397: ),\",\"398: \\\"collector_heartbeat_age_seconds\\\": collector_age,\",\"399: \\\"worker_heartbeat_age_seconds\\\": worker_age,\",\"400: \\\"relay_heartbeat_age_seconds\\\": relay_age,\",\"401: \\\"last_finalized_primary_d1_close\\\": last_finalized,\",\"402: \\\"last_finalized_primary_d1_age_seconds\\\": last_finalized_age,\",\"403: \\\"current_logical_d1_finality_state\\\": current_finality_state,\",\"404: \\\"source_gap_detected\\\": collector.get(\\\"gap_detected\\\") is True,\",\"405: \\\"source_reconnect_detected\\\": (\",\"406: collector.get(\\\"reconnect_detected\\\") is True\",\"407: ),\",\"408: \\\"reconciliation_pending_count\\\": reconciliation_pending,\",\"409: \\\"reconciliation_unresolved_count\\\": reconciliation_unresolved,\",\"410: \\\"reconciliation_last_reason\\\": reconciliation_last_reason,\",\"411: \\\"source_post_finality_revision\\\": (\",\"412: collector.get(\\\"post_finality_revision\\\") is True\",\"413: ),\",\"414: \\\"source_fail_closed_reason\\\": collector.get(\",\"415: \\\"fail_closed_reason\\\",\",\"416: \\\"\\\",\",\"417: ),\",\"418: \\\"signal_outbox_pending_count\\\": pending_count,\",\"419: \\\"oldest_pending_outbox_age_seconds\\\": oldest_pending_age,\",\"420: \\\"indeterminate_delivery_count\\\": indeterminate_count,\",\"421: \\\"last_successful_notification_delivery_at\\\": last_sent_at,\",\"422: \\\"sqlite_integrity_ok\\\": sqlite_integrity_ok,\",\"423: \\\"slo\\\": slo,\"]]},\"demonov_forward_map/producer_policy.py\":{\"sha256\":\"995a4155cd01296a643b0ef7464bf6e7402f68ccb48640b43e8507c8208d98cf\",\"snippets\":[[\"25: if self.decision_id!=self.content_hash: raise DemonovError(\\\"decision_id must match content hash\\\")\",\"26: @property\",\"27: def content_hash(self):\",\"28: d=dict(self.__dict__);d.pop(\\\"decision_id\\\");return canonical_hash(d)\",\"29: @classmethod\",\"30: def build(cls,**kwargs):\",\"31: n=dict(kwargs);n[\\\"payload\\\"]=dict(n.get(\\\"payload\\\",{}));n[\\\"causal_parent_event_ids\\\"]=tuple(n.get(\\\"causal_parent_event_ids\\\",()));n[\\\"source_event_ids\\\"]=tuple(n.get(\\\"source_event_ids\\\",()));return cls(decision_id=canonical_hash(n),**n)\",\"32:class ProducerTransitionPolicy(Protocol):\",\"33: def decide(self,*,state,input_event)->ProducerTransitionDecision: ...\",\"34:class LaunchBlockedTransitionPolicy:\",\"35: policy_id=\\\"CR0107_LAUNCH_BLOCKED\\\"\",\"36: def decide(self,*,state,input_event):\",\"37: decided_at=getattr(input_event,\\\"known_at\\\",None) or getattr(state,\\\"state_at\\\",None)\",\"38: state_before=getattr(state,\\\"interaction_state\\\",None)\",\"39: return ProducerTransitionDecision.build(policy_id=self.policy_id,disposition=\\\"ABSTAIN\\\",state_before=state_before,state_after=None,event_type=None,payload_schema_id=None,payload={},causal_parent_event_ids=(),source_event_ids=(),decided_at=decided_at,reason=\\\"production transition semantics unresolved\\\")\",\"40:\",\"41:@dataclass(frozen=True)\",\"42:class ProducerLaunchGate:\",\"43: transition_policy_frozen: bool\",\"44: live_schema_registry_frozen: bool\",\"45: market_registry_frozen: bool\",\"46: timeframe_registry_frozen: bool\",\"47: fixture_provenance: str\",\"48:\",\"49: def __post_init__(self):\",\"50: flags=(\",\"51: self.transition_policy_frozen,\",\"52: self.live_schema_registry_frozen,\",\"53: self.market_registry_frozen,\"],[\"87: transition_policy_frozen=transition_policy_frozen,\",\"88: live_schema_registry_frozen=live_schema_registry_frozen,\",\"89: market_registry_frozen=market_registry_frozen,\",\"90: timeframe_registry_frozen=timeframe_registry_frozen,\",\"91: fixture_provenance=fixture_provenance,\",\"92: )\",\"93:\",\"94: @classmethod\",\"95: def current(cls):\",\"96: return cls.build(\",\"97: transition_policy_frozen=False,\",\"98: live_schema_registry_frozen=False,\",\"99: market_registry_frozen=False,\",\"100: timeframe_registry_frozen=False,\",\"101: fixture_provenance=\\\"UNRESOLVED_PRODUCTION\\\",\",\"102: )\"]]},\"scripts/v1810_transcript_operator_audit.py\":{\"sha256\":\"72f1bf26be83d77f2255f463e868923e4668e363d6bd27e68997ead346421897\",\"snippets\":[[\"61:t1,y1=pts[idx]\",\"62:for t,y in pts:\",\"63: if t <= t1:\",\"64: line=y0+m_support*(t-t0)\",\"65: assert y <= line + 1e-12\",\"66:# A too-steep candidate (more negative slope) cuts at least one candle.\",\"67:m_bad=min(slopes)\",\"68:assert any(y > y0+m_bad*(t-t0)+1e-12 for t,y in pts)\",\"69:\",\"70:# Status governance.\",\"71:sm={r['rule']:r['new_v2.7'] for r in status}\",\"72:assert sm['MANUAL_CORRECTED_SUPPORTING_ENVELOPE']=='DIRECT_IMPLEMENTATION_STYLE_SUPPORT'\",\"73:assert sm['EXACT_CONVEX_HULL_IS_AUTHOR_MENTAL_RULE']=='UNPROVEN_COMPUTATIONAL_EQUIVALENCE'\",\"74:assert sm['BOUNDARY_SPECIAL_FIRST_POINT_CLASS']=='DIRECTLY_SUPPORTED'\",\"75:assert sm['JAN13_16_17_TRANSCRIPT_IDENTITY']=='RETRIEVED_BUT_OBJECT_ID_UNRESOLVED'\",\"76:\",\"77:out = {\",\"78: 'evidence_rows': len(ev),\",\"79: 'required_operator_rules_present': len(required),\",\"80: 'native_tf_status': tfmap,\",\"81: 'successor_clearance_rows': len(clear),\",\"82: 'successor_closest_interior': closest,\",\"83: 'manual_support_equivalence_synthetic': 'PASS',\",\"84: 'status_assertions': 'PASS'\",\"85:}\",\"86:rawdir=ROOT/'data'/'v18_10_raw'\",\"87:rawdir.mkdir(parents=True,exist_ok=True)\",\"88:(rawdir/'V1810_REPRO_SUMMARY_v2.7.json').write_text(json.dumps(out,ensure_ascii=False,indent=2),encoding='utf-8')\",\"89:print(json.dumps(out,ensure_ascii=False,indent=2))\"]]},\"scripts/v1823_identifiability_closure.py\":{\"sha256\":\"b1a07fd36508b6cf81d1965bc87c75849282413d93fb418d390543ec69b8f97c\",\"snippets\":[[\"1:from pathlib import Path\",\"2:import pandas as pd, json, hashlib, math\",\"3:ROOT=Path(__file__).resolve().parents[1]\",\"4:\",\"5:# Load frozen prior evidence\",\"6:feas=pd.read_csv(ROOT/'599_OCT03_NOVEMBER_ORIGIN_FEASIBILITY_v3.9.csv')\",\"7:pix=pd.read_csv(ROOT/'600_PUBLIC20_21_PIXEL_SEPARATION_STRESS_v3.9.csv')\",\"8:aff=pd.read_csv(ROOT/'603_AFFINE_SEMANTIC_DATE_VS_MAGNET_ANCHOR_STRESS_v3.9.csv')\",\"9:\",\"10:# Hypothesis falsification / identifiability matrix\",\"11:rows=[\",\"12: dict(hypothesis='H1_PUBLIC20_LITERAL_HIGH_SAME_PROMINENT_OBJECT', physical_origin='2021-11-20 daily high', declaration_binding='same prominent Oct03 predecessor', supporting_line='20NovHigh-Apr03High', oct03_origin_render='REJECTED', postfreeze_farfield='REJECTED', downstream_ohlc='requires positive tolerance on tested feeds', late_text='literal date string supports declaration only', status='FALSIFIED_FOR_PROMINENT_OBJECT_UNDER_LITERAL_HIGH_MAGNET'),\",\"13: dict(hypothesis='H2_NOV21_LITERAL_HIGH_SAME_PROMINENT_OBJECT', physical_origin='2021-11-21 daily high', declaration_binding='same prominent Oct03 predecessor', supporting_line='21NovHigh-Apr03High', oct03_origin_render='REJECTED', postfreeze_farfield='REJECTED', downstream_ohlc='requires positive tolerance on tested feeds', late_text='not literally declared', status='FALSIFIED_FOR_PROMINENT_OBJECT_UNDER_LITERAL_HIGH_MAGNET'),\",\"14: dict(hypothesis='H3_NOV10_LITERAL_HIGH_SAME_PROMINENT_OBJECT', physical_origin='2021-11-10 daily high', declaration_binding='same prominent Oct03 predecessor', supporting_line='10NovHigh-Apr03High', oct03_origin_render='COMPATIBLE; only strict-L2 among joint feasible dates', postfreeze_farfield='BEST; two-frame frozen midpoint RMS winner', downstream_ohlc='strict upper-hull certificate on Bitstamp control; no epsilon needed there', late_text='conflicts with literal public date unless typo/alias\",\"15: dict(hypothesis='H4_PUBLIC20_SEMANTIC_ALIAS_PHYSICAL_NOV10', physical_origin='physical 2021-11-10 high; semantic label 2021-11-20', declaration_binding='same prominent Oct03 predecessor', supporting_line='same affine line as H3', oct03_origin_render='INDISTINGUISHABLE_FROM_H3', postfreeze_farfield='INDISTINGUISHABLE_FROM_H3', downstream_ohlc='INDISTINGUISHABLE_FROM_H3', late_text='COMPATIBLE_WITH_LITERAL_PUBLIC_DATE', status='UNRESOLVED_EQUIVALENCE_CLASS'),\",\"16: dict(hypothesis='H5_PUBLIC20_OTHER_OBJECT', physical_origin='unknown / potentially 20Nov-related', declaration_binding='different historical object than prominent Oct03 ray', supporting_line='object-specific unknown', oct03_origin_render='NOT_A_TEST_OF_THIS_OBJECT', postfreeze_farfield='NOT_A_TEST_OF_THIS_OBJECT', downstream_ohlc='cannot identify absent object geometry', late_text='COMPATIBLE', status='UNRESOLVED_OBJECT_BINDING'),\",\"17: dict(hypothesis='H6_PUBLIC_DATE_PAIR_IS_LABEL_NOT_HANDLE_METADATA', physical_origin='unknown handle; public dates are reporting labels', declaration_binding='may be same or other object', supporting_line='underidentified', oct03_origin_render='cannot recover label semantics', postfreeze_farfield='cannot recover label semantics', downstream_ohlc='cannot recover label semantics', late_text='COMPATIBLE', status='UNRESOLVED_SEMANTIC_LAYER'),\",\"18:]\",\"19:pd.DataFrame(rows).to_csv(ROOT/'616_ADVERSARIAL_HYPOTHESIS_FALSIFICATION_MATRIX_v4.0.csv',index=False)\",\"20:\",\"21:channels=[\",\"22: ('DOWNSTREAM_OHLC_AFTER_ORIGIN','supporting-line geometry and clearance','NO','H3 vs H4 are affine-identical after physical line is fixed'),\",\"23: ('FAR_FIELD_CONTEMPORANEOUS_SCREENSHOT','line family / slope-position','NO','can reject 20/21 literal family but not typo vs semantic alias on same line'),\",\"24: ('VISIBLE_FINITE_RAY_ORIGIN_RENDER','physical endpoint region','NO','can bind physical Nov8/9/10 region; cannot tell why late text says Nov20'),\",\"25: ('STRICT_PIVOT_OPERATOR_PRIOR','operator compatibility discriminator','NO','selects Nov10 within feasible region but does not decode declaration semantics'),\",\"26: ('LATE_POST_TEXT_ONLY','declared date-pair identity','NO','reveals literal Nov20 string but not which rendered object/handle it names'),\",\"27: ('LATE_FOLLOWUP_CLASS_NARRATION','2026-to-2022 trendline analogy class','NO','binds analogy at class level, not exact historical object or anchor'),\",\"28: ('ORIGINAL_AUG17_ALBUM_PIXELS','object-to-caption correspondence','POTENTIALLY_YES','can show which line is paired with 20.11.21-03.04.22'),\",\"29: ('SELECTED_HANDLE_OR_EDITABLE_OBJECT','native physical anchor metadata','YES_FOR_HANDLE','can distinguish Nov10 vs 8/9 physical handle; still needs text/object binding for typo vs semantic alias'),\"]]},\"scripts/v1824_modern_semantics_media_control.py\":{\"sha256\":\"ee0794d3780e610f1b8754e034b8b25b9289e7eeff9c2d658752b289bae88f0a\",\"snippets\":[[\"208: dict(test='MODERN_RAW_DATE_HIGH_NO_HIDDENY', evidence='Raw date-high line yields clean outer-envelope holdout and no hidden Y is required for decisive August state sequence.', result='PASS', implication='Modern row does not need arbitrary label semantics to explain geometry.', strength='GEOMETRIC'),\",\"209: dict(test='MODERN_MAY14_ACTIVE_CONSTRAINT_UPDATE', evidence=f'May14 becomes the final active support update in May1-20; it protrudes {float(u14.protrusion_above_previous_active_line_usd):.3f} USD ({float(u14.protrusion_above_previous_active_line_pct):.6f}%) above the prior Oct06->May11 active line.', result='PASS', implication='May14 is operator-like correction/most-protruding-candle event, not merely a nearby calendar label.', strength='DYNAMIC_HULL'),\",\"210: dict(test='MODERN_BREAK_FSM_CROSSFEED', evidence='Both Bitfinex and Coinbase reproduce Aug17 CLOSE -> Aug18 FULL_RANGE for raw date-high ray.', result='PASS', implication='The same compact date identities generate a specific later event chronology on two feeds.', strength='PROSPECTIVE_STYLE_HOLDOUT'),\",\"211: dict(test='LEGACY_PUBLIC20_UNDER_CANDLE_IDENTITY', evidence='Nov20 fails strict L1/L2 cross-venue and literal high+magnet is rejected for prominent Oct03 ray by source-render/far-field evidence.', result='ANOMALY', implication='Under shared operator-compressed semantics, 2022 public `20` is exceptional and needs typo/correction, other-object binding, or explicit semantic exception.', strength='CROSS_ERA_CONTRAST'),\",\"212: dict(test='SEMANTIC_ALIAS_IDENTIFIABILITY', evidence='A semantic 20Nov label can still name the same Nov10 physical line mathematically.', result='NOT_FALSIFIED', implication='Schema evidence changes parsimony/priors but does not logically prove typo.', strength='IDENTIFIABILITY_LIMIT'),\",\"213:]\",\"214:pd.DataFrame(sem_rows).to_csv(ROOT / '628_MODERN_DECLARATION_SEMANTICS_CONTROL_v4.1.csv', index=False)\",\"215:\",\"216:# ---------------------------------------------------------------------------\",\"217:# 6. Same-post schema consistency / hypothesis update without fake probabilities.\",\"218:# ---------------------------------------------------------------------------\",\"219:schema_rows = [\",\"220: dict(hypothesis='H3_NOV10_PHYSICAL_PUBLIC20_TYPO_OR_CORRECTION', preserves_common_date_as_candle_identity_schema='YES', preserves_literal_2022_text='NO_WITHOUT_CORRECTION', matches_prominent_2022_render='YES', matches_2019_magnet_operator='YES', matches_modern_row_semantics='YES', extra_unannounced_semantic_switch='NO', v4_1_update='UPGRADED_IF_SAME_PROMINENT_OBJECT', reason='One character/date correction reconciles common schema, strict pivot, visible origin, far-field geometry and no-cut o\",\"221: dict(hypothesis='H4_PUBLIC20_SEMANTIC_ALIAS_PHYSICAL_NOV10', preserves_common_date_as_candle_identity_schema='NO_OR_REQUIRES_EXCEPTION', preserves_literal_2022_text='YES', matches_prominent_2022_render='YES_PHYSICAL_NOV10', matches_2019_magnet_operator='PHYSICAL_YES_SEMANTIC_LABEL_NO', matches_modern_row_semantics='REQUIRES_2022_ONLY_SCHEMA_EXCEPTION', extra_unannounced_semantic_switch='YES', v4_1_update='DOWNGRADED_BUT_NOT_FALSIFIED', reason='Geometry remains identical to H3, but public dat\",\"222: dict(hypothesis='H5_PUBLIC20_BINDS_OTHER_HISTORICAL_OBJECT', preserves_common_date_as_candle_identity_schema='POTENTIALLY_YES', preserves_literal_2022_text='YES', matches_prominent_2022_render='NOT_APPLICABLE_TO_OTHER_OBJECT', matches_2019_magnet_operator='POTENTIALLY_YES', matches_modern_row_semantics='YES_IF_OTHER_OBJECT_USES_20NOV_CANDLE', extra_unannounced_semantic_switch='NO', v4_1_update='UNCHANGED_UNRESOLVED_OBJECT_BINDING', reason='Still the cleanest way to preserve literal date and \",\"223: dict(hypothesis='H6_DATE_PAIRS_ARE_ARBITRARY_REPORTING_LABELS', preserves_common_date_as_candle_identity_schema='NO', preserves_literal_2022_text='YES', matches_prominent_2022_render='UNDERIDENTIFIED', matches_2019_magnet_operator='WEAK', matches_modern_row_semantics='WEAK_AGAINST_CONTROL', extra_unannounced_semantic_switch='GLOBAL_LABEL_MODEL', v4_1_update='MATERIALLY_DOWNGRADED_NOT_FALSIFIED', reason='Modern dates independently coincide with pivot, active-constraint and break-FSM structure\",\"224:]\",\"225:pd.DataFrame(schema_rows).to_csv(ROOT / '631_SAME_POST_COORDINATE_SCHEMA_CONSISTENCY_v4.1.csv', index=False)\",\"226:\",\"227:# ---------------------------------------------------------------------------\",\"228:# 7. Frozen media observability ledger (manual web retrieval state, no network in script).\",\"229:# ---------------------------------------------------------------------------\",\"230:media_rows = [\",\"231: dict(item='AUG17_TARGET_POST', source='Telegram @tradertrend/4992', observed='post identity + literal text', media_state='TARGET_MEDIA_BYTES_UNOBSERVED', attachment_count='4 via Telemetr search index', access_state='PUBLIC_POST_TEXT_OBSERVED_MEDIA_NOT_EXPOSED_IN_INDEXABLE_TELEGRAM_HTML', url='https://t.me/tradertrend/4992', consequence='Text/object binding remains missing.'),\",\"232: dict(item='AUG17_TELEMETR_INDEX', source='Telemetr channel content page/search index', observed='four Image placeholders after exact coordinate text', media_state='ATTACHMENT_COUNT_KNOWN_BYTES_UNOBSERVED', attachment_count='4', access_state='PUBLIC_INDEX_VISIBLE; direct target media URLs not surfaced in current search representation', url='https://telemetr.me/content/AAAAAEt9uY5bGaRQ2MUsRQ', consequence='Confirms album cardinality, not object-caption mapping.'),\",\"233: dict(item='TELEMETR_PUBLIC_API', source='Telemetr.io Public API Swagger', observed='ChannelMessage has media support; API requires access key', media_state='POTENTIAL_METADATA_CHANNEL_AUTH_GATED', attachment_count='unknown without authenticated query', access_state='ACCESS_KEY_REQUIRED', url='https://api.telemetr.io/swagger-ui/', consequence='Possible future retrieval route if authorized access is available; not evidence by itself.'),\",\"234: dict(item='MAY18_AUTHOR_RENDER_MIRROR', source='Mondiara mirror attributed to Trader 80/20', observed='original author TradingView chart metadata 18.05.2026 10:08 UTC+3; Bitfinex BTC/USD 1D', media_state='MIRROR_BYTES_OBSERVED_IN_WEB_LAYER', attachment_count='1 relevant chart', access_state='PUBLIC_MIRROR', url='https://news.mondiara.com/categories/38/posts/231899', consequence='Confirms modern workflow/feed checkpoint; exact later-published descending object remains visually ambiguous.'),\",\"235: dict(item='MAY18_TELEGRAM_POST', source='Telegram @tradertrend/4947', observed='original post identity recovered', media_state='ORIGINAL_CDN_NOT_PERSISTENTLY_RETRIEVED; MIRRORS_SURVIVE', attachment_count='>=1', access_state='PUBLIC_POST; mirror preservation useful', url='https://t.me/tradertrend/4947', consequence='Establishes mirror-preservation strategy for target Aug17 album.'),\",\"236:]\"],[\"251: 'public_dates': ['2025-10-06','2026-05-14'],\",\"252: 'strict_L1_bitfinex_coinbase': True,\",\"253: 'strict_L2_coinbase': True,\",\"254: 'crossfeed_high_diff_pct': {'oct06': oct_crossfeed_pct, 'may14': may_crossfeed_pct},\",\"255: 'certified_may_support_dates': cert_dates,\",\"256: 'latest_active_constraint_date': updates_df.iloc[-1].new_active_date,\",\"257: 'may14_protrusion_vs_previous_active_usd': float(u14.protrusion_above_previous_active_line_usd),\",\"258: 'may14_protrusion_vs_previous_active_pct': float(u14.protrusion_above_previous_active_line_pct),\",\"259: 'minimum_monthly_proxy_guard_slack_pct_under_preMay14_active_line': float(min_guard[4]),\",\"260: 'aug17_to_aug18_state_two_feeds': 'CLOSE -> FULL_RANGE',\",\"261: },\",\"262: 'hypothesis_update': {\",\"263: 'H3': 'UPGRADED_IF_SAME_PROMINENT_OBJECT',\",\"264: 'H4': 'DOWNGRADED_BUT_GEOMETRICALLY_NONFALSIFIABLE_VS_H3',\",\"265: 'H5': 'UNCHANGED_UNRESOLVED_OBJECT_BINDING',\",\"266: 'H6': 'MATERIALLY_DOWNGRADED_NOT_FALSIFIED'\",\"267: },\",\"268: 'media_bottleneck': 'POST_ID_KNOWN + ATTACHMENT_COUNT_4_KNOWN; TARGET_MEDIA_BYTES/OBJECT_CAPTION_MAPPING_UNOBSERVED',\",\"269:}\",\"270:(RAW / 'V1824_MODERN_SEMANTICS_MEDIA_CONTROL_SUMMARY_v4.1.json').write_text(json.dumps(summary, ensure_ascii=False, indent=2) + '\\\\n', encoding='utf-8')\",\"271:\",\"272:# Freeze direct operator excerpt for audit without needing to parse nested corpus manually.\",\"273:(RAW / 'V1824_DIRECT_AUTHOR_OPERATOR_EXCERPT_m65_v4.1.txt').write_text(\",\"274: f'mnum=65\\\\ndate={by_mnum[65].get(\\\"date\\\")}\\\\n\\\\n{m65}\\\\n', encoding='utf-8')\",\"275:\",\"276:print('V18.24 MODERN SEMANTICS / MEDIA CONTROL: PASS')\",\"277:print(json.dumps(summary, ensure_ascii=False, indent=2))\"]]},\"scripts/v1826_target_media_dual_object_audit.py\":{\"sha256\":\"ec31207b2e873f39c2db6d41775c294ab371fff793b83c1c6bf43edc978bbaea\",\"snippets\":[[\"49:\",\"50:assert abs(get(\\\"BF_NOV10_TO_APR03\\\",\\\"2022-10-03\\\") - 20457.54166667) < 1e-6\",\"51:assert abs(get(\\\"BF_PUBLIC20_TO_APR03\\\",\\\"2022-10-03\\\") - 30835.01492537) < 1e-6\",\"52:assert abs(get(\\\"BF_NOV10_TO_APR03\\\",\\\"2022-11-03\\\") - 15859.63888889) < 1e-6\",\"53:assert abs(get(\\\"CB_APR03_TO_NOV05_SUCCESSOR\\\",\\\"2022-12-22\\\") - 15823.43796296) < 1e-6\",\"54:assert abs(get(\\\"CB_PUBLIC20_TO_APR03\\\",\\\"2023-01-14\\\") - 20938.41791045) < 1e-6\",\"55:\",\"56:# Target media structure: verify only URL/slot facts, not pixels.\",\"57:media=json.load(open(RAW/\\\"V1826_TARGET_MEDIA_BROWSER_OBSERVED_v4.3.json\\\",encoding=\\\"utf-8\\\"))\",\"58:slots=media[\\\"rendered_slots\\\"]\",\"59:assert [x[\\\"telemetr_link_number\\\"] for x in slots] == [39,40,39,40]\",\"60:urls=[x[\\\"url\\\"] for x in slots]\",\"61:assert len(slots)==4\",\"62:assert len(set(urls))==2\",\"63:assert media[\\\"telegram_attachment_cardinality\\\"]==\\\"UNRESOLVED_FROM_TELEMETR_HTML\\\"\",\"64:assert media[\\\"local_byte_freeze\\\"] is False\",\"65:\",\"66:# Jan negative-control arithmetic. Visual band itself is a manual browser estimate,\",\"67:# therefore only separation conditional on that recorded broad band is asserted.\",\"68:jan=json.load(open(RAW/\\\"V1826_JAN2023_BROWSER_IMAGE_LEAD_v4.3.json\\\",encoding=\\\"utf-8\\\"))\",\"69:bf_lit=get(\\\"BF_PUBLIC20_TO_APR03\\\",\\\"2023-01-14\\\")\",\"70:assert abs(bf_lit - jan[\\\"bitfinex_literal20_to_apr03_projection_2023_01_14_usd\\\"]) < 1e-6\",\"71:upper=float(jan[\\\"manual_broad_y_band_at_january_break_candle_usd\\\"][1])\",\"72:assert bf_lit - upper > 2000\",\"73:assert jan[\\\"classification\\\"]==\\\"NEGATIVE_CONTROL_NOT_LITERAL20_OBJECT\\\"\",\"74:\",\"75:# Hypothesis decomposition consistency.\",\"76:h=list(csv.DictReader(open(R/\\\"661_HYPOTHESIS_BINDING_DECOMPOSITION_v4.3.csv\\\",encoding=\\\"utf-8\\\")))\",\"77:hd={x[\\\"hypothesis_component\\\"]:x for x in h}\"]]}},\"source_paths\":[\"demonov_forward_map/bitfinex_reconciliation.py\",\"demonov_forward_map/bitfinex_trade_collector.py\",\"demonov_forward_map/live_health.py\",\"demonov_forward_map/producer_policy.py\",\"scripts/v1810_transcript_operator_audit.py\",\"scripts/v1823_identifiability_closure.py\",\"scripts/v1824_modern_semantics_media_control.py\",\"scripts/v1826_target_media_dual_object_audit.py\",\"scripts/v1828_semantic_alias_nontransferability_audit.py\",\"tests/test_bitfinex_collector_reconnect_loop.py\",\"tests/test_bitfinex_d1_reconciliation_finality.py\",\"tests/test_bitfinex_reconciliation.py\",\"tests/test_bitfinex_reconciliation_health.py\"]}\nTASK_RESULT=HOLD_D1_CLEAN_BUT_GLOBAL_UNRESOLVED_RECONCILIATION_BLOCKS_FINAL\nHOMELAB_RESULT_CONTRACT={\"version\":1,\"command_id\":\"SIGNALBOT-260921-RECONCILIATION-UNRESOLVED-RCA-052RCA1\",\"status\":\"OK\",\"changes_made\":false,\"rollback_started\":false,\"rollback_restored\":null}\n" + "output": "WORKERS2_BACKUP_V2_WRAPPER_TOPOLOGY_BEGIN=1\nCOMMAND_ID=SUPPORT-260921-HOMELAB-BACKUP-V2-WRAPPER-TOPOLOGY-READONLY-1010R1\nMODE=read-only\nCOMPONENT=homelab-backup-v2-wrapper-topology\nHOST=pve01\nUID=0\nMUTATION_BOUNDARY=READ_ONLY_NO_FETCH_NO_WRITE_NO_SERVICE_ACTION_NO_BACKUP_NO_RESTORE_NO_RETENTION_NO_DELETE_NO_MAIL\nBASELINE_WRAPPER={\"bytes\":1656,\"line_count\":26,\"path\":\"/root/homelab-ops-cr-2026-1005/tasks/backup-v2-health-alerting-remediation-v1/assets/baseline/homelab-backup-v2\",\"sha256\":\"5077444065c732451cb84898680f62361b21a24ef9eb4f191253e82ead524ea2\"}\nLIVE_WRAPPER={\"bytes\":1656,\"exists\":true,\"matches_baseline\":true,\"sha256\":\"5077444065c732451cb84898680f62361b21a24ef9eb4f191253e82ead524ea2\"}\nWRAPPER_STRUCTURAL_LINES=[{\"line\":1,\"sha256\":\"b8e3eb3a9453a6029acccdb951bd492355329b651710c125505dc3bdd93e2dda\",\"text\":\"#!/usr/bin/python3\"},{\"line\":2,\"sha256\":\"a6284e6d3d43bdfbf0da732945adb2b4f31147c92bea47aee100d7f556c22d00\",\"text\":\"from __future__ import annotations\"},{\"line\":3,\"sha256\":\"d57b832dfc7acf24f005d35dc8899167b4a24174254f82c3ab1613c6fef08a9c\",\"text\":\"import hashlib, importlib, os, pathlib, stat, sys\"},{\"line\":4,\"sha256\":\"17400810c4582ee38c329bddfd08f1e890bd051b71d7d96fb9d06a05b0fdd49c\",\"text\":\"ACCEPTED=pathlib.Path('/opt/homelab-backup-v2/releases/backup-v2-overlay-504r1-ca6876fa9c3b')\"},{\"line\":5,\"sha256\":\"52c13f181fdac27c548266b89ea785484b7332cb2fe88bdc6f3f8a650d808154\",\"text\":\"EXPECTED={'fresh_lxc_helper.py': 'dbb3e6dbb71b10797df736431d9501a752a0f8c439163c9a0bddb7f76747f011', 'producer_exec_helper.py': 'b3b97099bcd7126670f866e81faae6a42a96d869d9989e6a67f6ea6c871c90b3', 'lxc_adapter.py': '3fa7d194010d76f7c8bc95035ae8876262e9337903e310f45f45df88c266dc8d', 'qemu_adapter.py': '1906db42bd34bbe85eb46fd9797b3572d46e0a41c29d1c29be5f9df5e448f15b', 'scheduler_adapter.py': 'a6f67159a64067773323f028126e3109e15cf17a8142cea5e6129970f1d4da96', 'entry504.py': 'ca6876fa9c3b1465b045344a8ad46962de16972c7dadc4ac6257c7d225047793'}\"},{\"line\":6,\"sha256\":\"53899176cd1c7bf5ff0ed1858bb5559fe73b3f583f503f5e38bde6235585b41b\",\"text\":\"def sha(p):\"},{\"line\":7,\"sha256\":\"6f05a753872e4a9d008a43f3131f07c93f0cf02ca80dd73628c8706244200664\",\"text\":\" h=hashlib.sha256()\"},{\"line\":8,\"sha256\":\"30997ff7b356f45d65ef1c5187f82f2e6141f93da71b38c59fe2c4c5e1e7f7d8\",\"text\":\" with open(p,'rb',buffering=0) as f:\"},{\"line\":9,\"sha256\":\"23658886042f84f880741d8725dcf0154bc118892bc6d91addfdf6e53d5a2cdc\",\"text\":\" while True:\"},{\"line\":10,\"sha256\":\"1b0070a369fbe1210497b72433a6fb37cf1571221e660d1ea2f4d6bdaa6d85ad\",\"text\":\" b=f.read(1048576)\"},{\"line\":11,\"sha256\":\"59298bba03fc4a48910e101eba38bd90228cf134c395434b745955b079b40142\",\"text\":\" if not b: break\"},{\"line\":12,\"sha256\":\"a1ae395f5814ee5b68d9ff0c1c455c562692686f513549d9550a1ca882f04b94\",\"text\":\" h.update(b)\"},{\"line\":13,\"sha256\":\"d38d3e66a9218f9b7e3565a1a9686e2514d11c0e7dc6e1a888b31bf726b5eabd\",\"text\":\" return h.hexdigest()\"},{\"line\":14,\"sha256\":\"2c4c5b0ebed3de9b574a3757903571ebf0dcaec6764f9f8d245ce0740a619321\",\"text\":\"def main():\"},{\"line\":15,\"sha256\":\"8ed597bfa67a39fd3247aa69d60fbf38d6c6eb2c99ba8233b08ad5707acd37d7\",\"text\":\" st=os.lstat(ACCEPTED)\"},{\"line\":16,\"sha256\":\"418757f9d5c90ddff43aa74e84da536f2a2341be2a15649bc1cea54d5a2f6614\",\"text\":\" if not stat.S_ISDIR(st.st_mode) or stat.S_ISLNK(st.st_mode) or st.st_uid!=0 or st.st_gid!=0 or stat.S_IMODE(st.st_mode)!=0o500: raise SystemExit('RELEASE_ROOT_IDENTITY')\"},{\"line\":17,\"sha256\":\"d55be1792bbfcb551d4d51970890586be4a5a1da8914179a8b2062694c0e5b5e\",\"text\":\" names=sorted(p.name for p in ACCEPTED.iterdir())\"},{\"line\":18,\"sha256\":\"e5a3133c28e977c4e9c8167dde7bb65433318db3e99df775b1f1bb647489aad1\",\"text\":\" if names!=sorted(EXPECTED): raise SystemExit('RELEASE_FILESET')\"},{\"line\":19,\"sha256\":\"fead4124009a37228b983368c62a7d9bc05cdbb43454bcc5caac80217b2905f9\",\"text\":\" for name,want in EXPECTED.items():\"},{\"line\":20,\"sha256\":\"9f397676d47b0693c062fa93bb3920967e19c945e0dfc6c97b915bd319ceb1b4\",\"text\":\" p=ACCEPTED/name; s=os.lstat(p)\"},{\"line\":21,\"sha256\":\"77ebd02c8e8b9a86beda5fbd6492917d2d9cd5dbe3dcd6af2cf494615fc01d59\",\"text\":\" if not stat.S_ISREG(s.st_mode) or stat.S_ISLNK(s.st_mode) or s.st_uid!=0 or s.st_gid!=0 or stat.S_IMODE(s.st_mode)!=0o400 or sha(p)!=want: raise SystemExit('RELEASE_FILE_IDENTITY_'+name)\"},{\"line\":22,\"sha256\":\"620a9fc1637030bd3806385e4d032f1d88f118fab60839cdcd08958ff76347d1\",\"text\":\" sys.dont_write_bytecode=True\"},{\"line\":23,\"sha256\":\"205047de2556322fcf287fe1a64a3ee1c5f1a6b6d031d7eb1ca3984be8f51cd9\",\"text\":\" sys.path.insert(0,str(ACCEPTED))\"},{\"line\":24,\"sha256\":\"007cf559e27a685d7242eeae848187802be787058680e8524508ef30d7ca8070\",\"text\":\" e=importlib.import_module('entry504')\"},{\"line\":25,\"sha256\":\"f89328a065052a0617651ce50185d40cbb3fdf066ce0451fe8ad67e23abe8579\",\"text\":\" return int(e.main())\"},{\"line\":26,\"sha256\":\"781bcc48cb7af0089f84c37d854593c43723833f0f9bced4c2d02aed0894040b\",\"text\":\"if __name__=='__main__': raise SystemExit(main())\"}]\nWRAPPER_ABSOLUTE_PATHS=[\"/opt/homelab-backup-v2/releases/backup-v2-overlay-504r1-ca6876fa9c3b\",\"/usr/bin/python3\"]\nWRAPPER_ENV_NAMES=[]\nWRAPPER_PY_NAMES=[\"entry504.py\",\"fresh_lxc_helper.py\",\"lxc_adapter.py\",\"producer_exec_helper.py\",\"qemu_adapter.py\",\"scheduler_adapter.py\"]\nWRAPPER_SHA256_LITERALS=[\"1906db42bd34bbe85eb46fd9797b3572d46e0a41c29d1c29be5f9df5e448f15b\",\"3fa7d194010d76f7c8bc95035ae8876262e9337903e310f45f45df88c266dc8d\",\"a6f67159a64067773323f028126e3109e15cf17a8142cea5e6129970f1d4da96\",\"b3b97099bcd7126670f866e81faae6a42a96d869d9989e6a67f6ea6c871c90b3\",\"ca6876fa9c3b1465b045344a8ad46962de16972c7dadc4ac6257c7d225047793\",\"dbb3e6dbb71b10797df736431d9501a752a0f8c439163c9a0bddb7f76747f011\"]\nABSOLUTE_PATH_META=[{\"bytes\":null,\"exists\":true,\"is_dir\":true,\"is_file\":false,\"path\":\"/opt/homelab-backup-v2/releases/backup-v2-overlay-504r1-ca6876fa9c3b\",\"sha256\":null},{\"bytes\":6812336,\"exists\":true,\"is_dir\":false,\"is_file\":true,\"path\":\"/usr/bin/python3\",\"sha256\":\"17b78e0a93175e86f9ac03141924fd7a7f0c0c52e66b34bfa0de20ffef989df1\"}]\nSHA_LITERAL_REFERENCE_HITS=[{\"hits\":[{\"bytes\":1656,\"path\":\"/usr/local/sbin/homelab-backup-v2\",\"sha256\":\"5077444065c732451cb84898680f62361b21a24ef9eb4f191253e82ead524ea2\"}],\"literal\":\"1906db42bd34bbe85eb46fd9797b3572d46e0a41c29d1c29be5f9df5e448f15b\"},{\"hits\":[{\"bytes\":1656,\"path\":\"/usr/local/sbin/homelab-backup-v2\",\"sha256\":\"5077444065c732451cb84898680f62361b21a24ef9eb4f191253e82ead524ea2\"}],\"literal\":\"3fa7d194010d76f7c8bc95035ae8876262e9337903e310f45f45df88c266dc8d\"},{\"hits\":[{\"bytes\":1656,\"path\":\"/usr/local/sbin/homelab-backup-v2\",\"sha256\":\"5077444065c732451cb84898680f62361b21a24ef9eb4f191253e82ead524ea2\"}],\"literal\":\"a6f67159a64067773323f028126e3109e15cf17a8142cea5e6129970f1d4da96\"},{\"hits\":[{\"bytes\":1656,\"path\":\"/usr/local/sbin/homelab-backup-v2\",\"sha256\":\"5077444065c732451cb84898680f62361b21a24ef9eb4f191253e82ead524ea2\"}],\"literal\":\"b3b97099bcd7126670f866e81faae6a42a96d869d9989e6a67f6ea6c871c90b3\"},{\"hits\":[{\"bytes\":1656,\"path\":\"/usr/local/sbin/homelab-backup-v2\",\"sha256\":\"5077444065c732451cb84898680f62361b21a24ef9eb4f191253e82ead524ea2\"}],\"literal\":\"ca6876fa9c3b1465b045344a8ad46962de16972c7dadc4ac6257c7d225047793\"},{\"hits\":[{\"bytes\":1656,\"path\":\"/usr/local/sbin/homelab-backup-v2\",\"sha256\":\"5077444065c732451cb84898680f62361b21a24ef9eb4f191253e82ead524ea2\"}],\"literal\":\"dbb3e6dbb71b10797df736431d9501a752a0f8c439163c9a0bddb7f76747f011\"}]\nARCHIVE_CANDIDATES=[]\nRUNTIME_NAME_HITS=[{\"bytes\":1656,\"path\":\"/usr/local/sbin/homelab-backup-v2\",\"sha256\":\"5077444065c732451cb84898680f62361b21a24ef9eb4f191253e82ead524ea2\"}]\nNO_MUTATION=true\nNO_GIT_FETCH=true\nNO_WRITE=true\nNO_SERVICE_ACTION=true\nNO_BACKUP_STARTED=true\nNO_RESTORE_STARTED=true\nNO_RETENTION_RUN_STARTED=true\nNO_DELETE=true\nNO_MAIL_SENT=true\nTOPOLOGY_DURATION_SEC=0.047\nTASK_RESULT=PASS_HOMELAB_BACKUP_V2_WRAPPER_TOPOLOGY_READONLY\nHOMELAB_RESULT_CONTRACT={\"changes_made\":false,\"command_id\":\"SUPPORT-260921-HOMELAB-BACKUP-V2-WRAPPER-TOPOLOGY-READONLY-1010R1\",\"rollback_restored\":null,\"rollback_started\":false,\"status\":\"OK\",\"version\":1}\nWORKERS2_BACKUP_V2_WRAPPER_TOPOLOGY_END=1\n" } diff --git a/runtime/latest.txt b/runtime/latest.txt index 1755cb73..574b7e6d 100644 --- a/runtime/latest.txt +++ b/runtime/latest.txt @@ -1,15 +1,15 @@ CHAT_OUTPUT_BEGIN -COMMAND_ID=SIGNALBOT-260921-RECONCILIATION-UNRESOLVED-RCA-052RCA1 +COMMAND_ID=SUPPORT-260921-HOMELAB-BACKUP-V2-WRAPPER-TOPOLOGY-READONLY-1010R1 STATUS=OK RC=0 HOST=pve01 MODE=read-only -COMPONENT=signalbot-reconciliation-unresolved-rca +COMPONENT=homelab-backup-v2-wrapper-topology REFERENCE_REGISTER_CHECK=OK REFERENCE_SHA256=5a3d8e5154c41cb582a4e0aca68090be1f0138918bf82131a948df326f9d8d66 ERROR_REGISTER_CHECK=OK ERROR_REGISTER_SHA256=3b09a553ec0f527ed3afeed4753f52a74ee3036045bbfb3c685e9f8af4ba7ba0 -COMMAND_SHA256=fa016567d1f883b6750dde1125c4cf074802ecf2f0db7998080c8cc7e0534f29 +COMMAND_SHA256=5e5fdf246ba93cf69bd15007c0f7841be1336d6804b8f438fcd8c9cdc2fb7777 DUPLICATE_FAILED_COMMAND_BLOCKED=false EXECUTION_STARTED=true CHANGE_DECLARED=false @@ -24,12 +24,40 @@ MUTATION_OUTCOME=NO_MUTATION SANITIZED=yes SECRETS_INCLUDED=no PRIVATE_ADDRESSES_INCLUDED=no -RAW_EVIDENCE_SHA256=e103000052d95420a0460e4dfde59ebfcb62ec394ea3591409d27cdbbe048e59 -SANITIZED_OUTPUT_SHA256=e103000052d95420a0460e4dfde59ebfcb62ec394ea3591409d27cdbbe048e59 +RAW_EVIDENCE_SHA256=6bc6bee22d47b1f894187fc6de7668c0043a3a7c662da9f032ed015b6c3a35df +SANITIZED_OUTPUT_SHA256=6bc6bee22d47b1f894187fc6de7668c0043a3a7c662da9f032ed015b6c3a35df OUTPUT_BEGIN -SIGNALBOT052RCA1_RESULT={"decision":"HOLD_D1_CLEAN_BUT_GLOBAL_UNRESOLVED_RECONCILIATION_BLOCKS_FINAL","git_grep":["749073ae0f894debc06fb0ffbf7a84abf9da531f:demonov_forward_map/bitfinex_reconciliation.py:57: RECONCILED = \"RECONCILED\"","749073ae0f894debc06fb0ffbf7a84abf9da531f:demonov_forward_map/bitfinex_reconciliation.py:58: UNRESOLVED = \"UNRESOLVED\"","749073ae0f894debc06fb0ffbf7a84abf9da531f:demonov_forward_map/bitfinex_reconciliation.py:317: failure_reason=\"REST_FETCH_OR_VALIDATION_FAILED\",","749073ae0f894debc06fb0ffbf7a84abf9da531f:demonov_forward_map/bitfinex_trade_collector.py:252: CREATE TABLE IF NOT EXISTS reconnect_reconciliation(","749073ae0f894debc06fb0ffbf7a84abf9da531f:demonov_forward_map/bitfinex_trade_collector.py:268: CREATE INDEX IF NOT EXISTS idx_reconnect_reconciliation_time","749073ae0f894debc06fb0ffbf7a84abf9da531f:demonov_forward_map/bitfinex_trade_collector.py:269: ON reconnect_reconciliation(reconnect_received_at);","749073ae0f894debc06fb0ffbf7a84abf9da531f:demonov_forward_map/bitfinex_trade_collector.py:299: \"SELECT COUNT(*) AS n FROM reconnect_reconciliation WHERE status=?\",","749073ae0f894debc06fb0ffbf7a84abf9da531f:demonov_forward_map/bitfinex_trade_collector.py:314: LEFT JOIN reconnect_reconciliation rr","749073ae0f894debc06fb0ffbf7a84abf9da531f:demonov_forward_map/bitfinex_trade_collector.py:323: \"SELECT COUNT(*) AS n FROM reconnect_reconciliation WHERE status=?\",","749073ae0f894debc06fb0ffbf7a84abf9da531f:demonov_forward_map/bitfinex_trade_collector.py:324: (ReconciliationStatus.UNRESOLVED.value,),","749073ae0f894debc06fb0ffbf7a84abf9da531f:demonov_forward_map/bitfinex_trade_collector.py:328: SELECT failure_reason FROM reconnect_reconciliation","749073ae0f894debc06fb0ffbf7a84abf9da531f:demonov_forward_map/bitfinex_trade_collector.py:332: (ReconciliationStatus.UNRESOLVED.value,),","749073ae0f894debc06fb0ffbf7a84abf9da531f:demonov_forward_map/bitfinex_trade_collector.py:563: INSERT OR IGNORE INTO reconnect_reconciliation(","749073ae0f894debc06fb0ffbf7a84abf9da531f:demonov_forward_map/bitfinex_trade_collector.py:598: \"SELECT * FROM reconnect_reconciliation WHERE window_id=?\",","749073ae0f894debc06fb0ffbf7a84abf9da531f:demonov_forward_map/bitfinex_trade_collector.py:616: SELECT * FROM reconnect_reconciliation","749073ae0f894debc06fb0ffbf7a84abf9da531f:demonov_forward_map/bitfinex_trade_collector.py:648: status=ReconciliationStatus.RECONCILED,","749073ae0f894debc06fb0ffbf7a84abf9da531f:demonov_forward_map/bitfinex_trade_collector.py:667: status=ReconciliationStatus.UNRESOLVED,","749073ae0f894debc06fb0ffbf7a84abf9da531f:demonov_forward_map/bitfinex_trade_collector.py:684: if status not in {ReconciliationStatus.RECONCILED, ReconciliationStatus.UNRESOLVED}:","749073ae0f894debc06fb0ffbf7a84abf9da531f:demonov_forward_map/bitfinex_trade_collector.py:708: UPDATE reconnect_reconciliation","749073ae0f894debc06fb0ffbf7a84abf9da531f:demonov_forward_map/bitfinex_trade_collector.py:986: LEFT JOIN reconnect_reconciliation rr","749073ae0f894debc06fb0ffbf7a84abf9da531f:demonov_forward_map/bitfinex_trade_collector.py:999: row[\"status\"] != ReconciliationStatus.RECONCILED.value","749073ae0f894debc06fb0ffbf7a84abf9da531f:demonov_forward_map/live_health.py:269: _append_reason(reasons, \"RECONNECT_RECONCILIATION_UNRESOLVED\")","749073ae0f894debc06fb0ffbf7a84abf9da531f:demonov_forward_map/producer_policy.py:101: fixture_provenance=\"UNRESOLVED_PRODUCTION\",","749073ae0f894debc06fb0ffbf7a84abf9da531f:scripts/v1810_transcript_operator_audit.py:75:assert sm['JAN13_16_17_TRANSCRIPT_IDENTITY']=='RETRIEVED_BUT_OBJECT_ID_UNRESOLVED'","749073ae0f894debc06fb0ffbf7a84abf9da531f:scripts/v1823_identifiability_closure.py:15: dict(hypothesis='H4_PUBLIC20_SEMANTIC_ALIAS_PHYSICAL_NOV10', physical_origin='physical 2021-11-10 high; semantic label 2021-11-20', declaration_binding='same prominent Oct03 predecessor', supporting_line='same affine line as H3', oct03_origin_render='INDISTINGUISHABLE_FROM_H3', postfreeze_farfield='INDISTINGUISHABLE_FROM_H3', downstream_ohlc='INDISTINGUISHABLE_FROM_H3', late_text='COMPATIBLE_WITH_LITERAL_PUBLIC_DATE', status='UNRESOLVED_EQUIVALENCE_CLASS'),","749073ae0f894debc06fb0ffbf7a84abf9da531f:scripts/v1823_identifiability_closure.py:16: dict(hypothesis='H5_PUBLIC20_OTHER_OBJECT', physical_origin='unknown / potentially 20Nov-related', declaration_binding='different historical object than prominent Oct03 ray', supporting_line='object-specific unknown', oct03_origin_render='NOT_A_TEST_OF_THIS_OBJECT', postfreeze_farfield='NOT_A_TEST_OF_THIS_OBJECT', downstream_ohlc='cannot identify absent object geometry', late_text='COMPATIBLE', status='UNRESOLVED_OBJECT_BINDING'),","749073ae0f894debc06fb0ffbf7a84abf9da531f:scripts/v1823_identifiability_closure.py:17: dict(hypothesis='H6_PUBLIC_DATE_PAIR_IS_LABEL_NOT_HANDLE_METADATA', physical_origin='unknown handle; public dates are reporting labels', declaration_binding='may be same or other object', supporting_line='underidentified', oct03_origin_render='cannot recover label semantics', postfreeze_farfield='cannot recover label semantics', downstream_ohlc='cannot recover label semantics', late_text='COMPATIBLE', status='UNRESOLVED_SEMANTIC_LAYER'),","749073ae0f894debc06fb0ffbf7a84abf9da531f:scripts/v1824_modern_semantics_media_control.py:222: dict(hypothesis='H5_PUBLIC20_BINDS_OTHER_HISTORICAL_OBJECT', preserves_common_date_as_candle_identity_schema='POTENTIALLY_YES', preserves_literal_2022_text='YES', matches_prominent_2022_render='NOT_APPLICABLE_TO_OTHER_OBJECT', matches_2019_magnet_operator='POTENTIALLY_YES', matches_modern_row_semantics='YES_IF_OTHER_OBJECT_USES_20NOV_CANDLE', extra_unannounced_semantic_switch='NO', v4_1_update='UNCHANGED_UNRESOLVED_OBJECT_BINDING', reason='Still the cleanest way to preserve literal date and common operator without semantic alias, but no target album/object evidence identifies such an object.'),","749073ae0f894debc06fb0ffbf7a84abf9da531f:scripts/v1824_modern_semantics_media_control.py:265: 'H5': 'UNCHANGED_UNRESOLVED_OBJECT_BINDING',","749073ae0f894debc06fb0ffbf7a84abf9da531f:scripts/v1826_target_media_dual_object_audit.py:63:assert media[\"telegram_attachment_cardinality\"]==\"UNRESOLVED_FROM_TELEMETR_HTML\"","749073ae0f894debc06fb0ffbf7a84abf9da531f:scripts/v1828_semantic_alias_nontransferability_audit.py:165: {'component':'PUBLIC_STRING_CORRECTION_HISTORY','v4_4':'UNRESOLVED','v4_5':'NO_IN_PLACE_CORRECTION_OBSERVED_ON_CURRENT_PUBLIC_SURFACE','delta':'Target lacks edited marker while same Telegram surface shows it on controls; mirrors preserve 20'},","749073ae0f894debc06fb0ffbf7a84abf9da531f:tests/test_bitfinex_collector_reconnect_loop.py:89: rows=j.reconciliation_windows_overlapping(T0,T0+timedelta(seconds=20)); assert len(rows)==1 and rows[0].status is ReconciliationStatus.RECONCILED and len(client.calls)==1; j.close()","749073ae0f894debc06fb0ffbf7a84abf9da531f:tests/test_bitfinex_d1_reconciliation_finality.py:27: if status is ReconciliationStatus.RECONCILED: j.mark_reconciliation_reconciled(window.window_id,evidence_sha256=\"a\"*64,recovered_row_count=0,resolved_at=T0+timedelta(hours=6,seconds=2))","749073ae0f894debc06fb0ffbf7a84abf9da531f:tests/test_bitfinex_d1_reconciliation_finality.py:28: elif status is ReconciliationStatus.UNRESOLVED: j.mark_reconciliation_unresolved(window.window_id,evidence_sha256=\"b\"*64,failure_reason=\"SIMULATED\",resolved_at=T0+timedelta(hours=6,seconds=2))","749073ae0f894debc06fb0ffbf7a84abf9da531f:tests/test_bitfinex_d1_reconciliation_finality.py:34: j,l,_=setup(tmp_path,ReconciliationStatus.RECONCILED); r=j.finalize_ready_d1(l,finalized_at=T0+timedelta(days=1,seconds=2)); assert r is not None; j.close()","749073ae0f894debc06fb0ffbf7a84abf9da531f:tests/test_bitfinex_d1_reconciliation_finality.py:40: j,l,_=setup(tmp_path,ReconciliationStatus.UNRESOLVED); assert finalize_ready_d1_without_stopping_collection(j,l,finalized_at=T0+timedelta(days=1,seconds=2)) is None; j.close()","749073ae0f894debc06fb0ffbf7a84abf9da531f:tests/test_bitfinex_d1_reconciliation_finality.py:43: j,l,event=setup(tmp_path,ReconciliationStatus.RECONCILED); j._db.execute(\"DELETE FROM reconnect_reconciliation WHERE reconnect_event_seq=?\",(event,)); assert finalize_ready_d1_without_stopping_collection(j,l,finalized_at=T0+timedelta(days=1,seconds=2)) is None; j.close()","749073ae0f894debc06fb0ffbf7a84abf9da531f:tests/test_bitfinex_d1_reconciliation_finality.py:46: j,l,_=setup(tmp_path,ReconciliationStatus.RECONCILED); j._db.execute(\"INSERT INTO sequence_events(session_id,source_sequence,received_at,event_kind) VALUES(?,?,?,?)\",(\"b\",999,(T0+timedelta(hours=8)).isoformat(),\"GAP\")); assert finalize_ready_d1_without_stopping_collection(j,l,finalized_at=T0+timedelta(days=1,seconds=2)) is None; j.close()","749073ae0f894debc06fb0ffbf7a84abf9da531f:tests/test_bitfinex_d1_reconciliation_finality.py:49: j,l,_=setup(tmp_path,ReconciliationStatus.RECONCILED); j._meta_set(\"post_finality_revision\",\"1\"); assert finalize_ready_d1_without_stopping_collection(j,l,finalized_at=T0+timedelta(days=1,seconds=2)) is None; j.close()","749073ae0f894debc06fb0ffbf7a84abf9da531f:tests/test_bitfinex_reconciliation.py:105: assert resolved.status is ReconciliationStatus.RECONCILED","749073ae0f894debc06fb0ffbf7a84abf9da531f:tests/test_bitfinex_reconciliation.py:118: assert unresolved.status is ReconciliationStatus.UNRESOLVED","749073ae0f894debc06fb0ffbf7a84abf9da531f:tests/test_bitfinex_reconciliation.py:184: assert resolved.status is ReconciliationStatus.RECONCILED","749073ae0f894debc06fb0ffbf7a84abf9da531f:tests/test_bitfinex_reconciliation.py:200: assert resolved.status is ReconciliationStatus.UNRESOLVED","749073ae0f894debc06fb0ffbf7a84abf9da531f:tests/test_bitfinex_reconciliation.py:201: assert resolved.failure_reason == \"REST_FETCH_OR_VALIDATION_FAILED\"","749073ae0f894debc06fb0ffbf7a84abf9da531f:tests/test_bitfinex_reconciliation.py:218: assert resolved.status is ReconciliationStatus.UNRESOLVED","749073ae0f894debc06fb0ffbf7a84abf9da531f:tests/test_bitfinex_reconciliation.py:232: assert resolved.status is ReconciliationStatus.UNRESOLVED","749073ae0f894debc06fb0ffbf7a84abf9da531f:tests/test_bitfinex_reconciliation.py:252: assert resolved.status is ReconciliationStatus.UNRESOLVED","749073ae0f894debc06fb0ffbf7a84abf9da531f:tests/test_bitfinex_reconciliation_health.py:173: assert \"RECONNECT_RECONCILIATION_UNRESOLVED\" not in health[\"reason_codes\"]","749073ae0f894debc06fb0ffbf7a84abf9da531f:tests/test_bitfinex_reconciliation_health.py:202: failure_reason=\"REST_FETCH_OR_VALIDATION_FAILED\",","749073ae0f894debc06fb0ffbf7a84abf9da531f:tests/test_bitfinex_reconciliation_health.py:207: assert \"RECONNECT_RECONCILIATION_UNRESOLVED\" in health[\"reason_codes\"]","749073ae0f894debc06fb0ffbf7a84abf9da531f:tests/test_bitfinex_reconciliation_health.py:209: assert health[\"reconciliation_last_reason\"] == \"REST_FETCH_OR_VALIDATION_FAILED\""],"git_grep_rc":0,"guest":{"accepted_d1_candidate":{"close_at":"2026-09-19T00:00:00+00:00","finality_state":"FINALIZED","logical_d1_id":"bb9cbf18d81e605641e7aa9b792d35d1f55c3cae51fbe1abfe1617b72f0eaa14","open_at":"2026-09-18T00:00:00+00:00"},"accepted_d1_revision_count":1,"collector_log_match_count":0,"collector_log_tail":[],"collector_public_rest_probe":{"ok":true,"result":{"bytes":3,"http":200,"prefix":"[1]","sha256":"080a9ed428559ef602668b4c00f114f1a11c3f6b02a435f0bdc154578e4d7f22"}},"collector_status.json":{"prospective_reconnect_detected":true,"reconciliation_last_reason":"REST_FETCH_OR_VALIDATION_FAILED","reconciliation_pending_count":0,"reconciliation_unresolved_count":9,"reconnect_detected":true,"updated_at":"2026-09-21T01:31:53.050618+00:00"},"failure_reason_counts":{"":9,"REST_FETCH_OR_VALIDATION_FAILED":9},"finalized_intervals":[{"close_at":"2026-09-19T00:00:00+00:00","finality_state":"FINALIZED","logical_d1_id":"bb9cbf18d81e605641e7aa9b792d35d1f55c3cae51fbe1abfe1617b72f0eaa14","open_at":"2026-09-18T00:00:00+00:00"}],"host_public_rest_probe":{"body_prefix":"[1]","bytes":3,"http":200,"ok":true,"sha256":"080a9ed428559ef602668b4c00f114f1a11c3f6b02a435f0bdc154578e4d7f22"},"live_status.json":{"execution_authority":false,"heartbeat_at":"2026-09-21T01:31:39.054064+00:00","last_primary_closed_d1":null,"production_launch_allowed":false,"prospective_research_collection_allowed":true,"risk_authority":false,"source_fail_closed_reason":"REST_FETCH_OR_VALIDATION_FAILED","source_reconnect_detected":true,"status":"FAIL_CLOSED"},"ok":true,"quick_check":["ok"],"reconciliation_columns":["window_id","reconnect_event_seq","reconnect_received_at","previous_trade_identity","previous_trade_mts","next_trade_identity","next_trade_mts","status","evidence_sha256","recovered_row_count","failure_reason","created_at","resolved_at"],"reconciliation_total":18,"status_counts":{"RECONCILED":9,"UNRESOLVED":9},"timing_classification":"ACCEPTED_D1_PREDATES_ALL_CURRENT_UNRESOLVED_BUT_GLOBAL_GATE_BLOCKS","unresolved":[{"created_at":"2026-09-19T08:56:43.166296+00:00","evidence_sha256":"0933e981b764b89e...","failure_reason":"REST_FETCH_OR_VALIDATION_FAILED","next_trade_identity":"cac1c294e6e6f358f8cb8151ecb7ca573b64f9a116d8cab2f0db588df7d83dc7","next_trade_mts":"2026-09-19T08:56:43.071000+00:00","previous_trade_identity":"ac5ee89769b01055080a1ef6b66a3bf2a0ee49841730f551293552af57e61809","previous_trade_mts":"2026-09-19T08:56:34.170000+00:00","reconnect_event_seq":251009,"reconnect_received_at":"2026-09-19T08:56:37.306311+00:00","recovered_row_count":0,"resolved_at":"2026-09-19T08:56:43.166296+00:00","status":"UNRESOLVED","window_id":"9cef91126f4f0043718d71b90d627540355d1f0f0f1fd75ee30f9bef3379ad88"},{"created_at":"2026-09-19T20:55:47.702369+00:00","evidence_sha256":"0933e981b764b89e...","failure_reason":"REST_FETCH_OR_VALIDATION_FAILED","next_trade_identity":"d5d2cd472e6043a8a6d5a9efe6de57f75964d72e204ff37860a0d5de899dbbf1","next_trade_mts":"2026-09-19T20:55:47.585000+00:00","previous_trade_identity":"8d61cfd2c7da8ed694776ff0e009bd1fb90d2cd315c202c907443449564de6d8","previous_trade_mts":"2026-09-19T20:53:15.067000+00:00","reconnect_event_seq":303837,"reconnect_received_at":"2026-09-19T20:55:45.541470+00:00","recovered_row_count":0,"resolved_at":"2026-09-19T20:55:47.702369+00:00","status":"UNRESOLVED","window_id":"6a8bbda8609aea6fb0d659bdcedcb37cad24318deaabba9ece38b821a312ed37"},{"created_at":"2026-09-20T01:19:16.494983+00:00","evidence_sha256":"0933e981b764b89e...","failure_reason":"REST_FETCH_OR_VALIDATION_FAILED","next_trade_identity":"bd6ae492eca899f8710d0c4b88704cb5a0a34ff94a23419249366f4ebd3586b6","next_trade_mts":"2026-09-20T01:19:16.432000+00:00","previous_trade_identity":"4d902cf30ae01b151d21f3ecd1b706af0a7f87c9c44995b381e0e064b2f236b3","previous_trade_mts":"2026-09-20T01:19:03.365000+00:00","reconnect_event_seq":318578,"reconnect_received_at":"2026-09-20T01:19:10.585588+00:00","recovered_row_count":0,"resolved_at":"2026-09-20T01:19:16.494983+00:00","status":"UNRESOLVED","window_id":"f3342e8836aa6f1a655a977e6839647e8f305cb90ce4a1977c417f9541a0ecda"},{"created_at":"2026-09-20T07:26:46.505770+00:00","evidence_sha256":"0933e981b764b89e...","failure_reason":"REST_FETCH_OR_VALIDATION_FAILED","next_trade_identity":"15a77ac49619bc44a15ab3cb04219963639c612347f0de2ba82bf482c59a6b61","next_trade_mts":"2026-09-20T07:26:46.404000+00:00","previous_trade_identity":"25ae8d55a395d0a39001b1c409a86130c78b7221d31bdefc80242fc7af49da60","previous_trade_mts":"2026-09-20T07:26:42.303000+00:00","reconnect_event_seq":350488,"reconnect_received_at":"2026-09-20T07:26:44.462330+00:00","recovered_row_count":0,"resolved_at":"2026-09-20T07:26:46.505770+00:00","status":"UNRESOLVED","window_id":"f429abc398b54cb0cbd869dce8c0be4e8c8ff8fb5ec7bb1a345c3bc8c7a394fb"},{"created_at":"2026-09-20T13:53:16.842477+00:00","evidence_sha256":"0933e981b764b89e...","failure_reason":"REST_FETCH_OR_VALIDATION_FAILED","next_trade_identity":"7782961f0ddf1bd08bdd9a1e311da68898b133f65fea2e24698fd9612e52a008","next_trade_mts":"2026-09-20T13:53:16.750000+00:00","previous_trade_identity":"102515c73c5748a56ca153cab57cdb832b5aae503a5485a23265c6313699d80f","previous_trade_mts":"2026-09-20T13:52:37.772000+00:00","reconnect_event_seq":377008,"reconnect_received_at":"2026-09-20T13:53:16.325492+00:00","recovered_row_count":0,"resolved_at":"2026-09-20T13:53:16.842477+00:00","status":"UNRESOLVED","window_id":"7ba6b9d6bfcc433411890610b9d1282178a9646d61d026798b82f51a4985ccdc"},{"created_at":"2026-09-20T17:27:36.374674+00:00","evidence_sha256":"0933e981b764b89e...","failure_reason":"REST_FETCH_OR_VALIDATION_FAILED","next_trade_identity":"8c6394e7f3a93cb2e27c18f997704fa34336ce94112dee05c8ef6a8809821b0a","next_trade_mts":"2026-09-20T17:27:36.291000+00:00","previous_trade_identity":"67b068829952038e414e37f3453cd0cf3903ade761e19dea3a63c276b1743041","previous_trade_mts":"2026-09-20T17:26:57.638000+00:00","reconnect_event_seq":397710,"reconnect_received_at":"2026-09-20T17:27:33.837394+00:00","recovered_row_count":0,"resolved_at":"2026-09-20T17:27:36.374674+00:00","status":"UNRESOLVED","window_id":"3531b2a1ebb67b0c993098f03d5039596b23c365f383696f154b0de7c1f35014"},{"created_at":"2026-09-21T00:24:23.299034+00:00","evidence_sha256":"0933e981b764b89e...","failure_reason":"REST_FETCH_OR_VALIDATION_FAILED","next_trade_identity":"cb133d7053bf7d9fc87bcab995eaaf7f687c598b972df115a1e268920a9e39f3","next_trade_mts":"2026-09-21T00:24:23.217000+00:00","previous_trade_identity":"669c24c1506be52bad95587b5671a8ca82d5c998c6d0bf4e8c21816f7f4013a1","previous_trade_mts":"2026-09-21T00:23:51.273000+00:00","reconnect_event_seq":433876,"reconnect_received_at":"2026-09-21T00:24:21.491095+00:00","recovered_row_count":0,"resolved_at":"2026-09-21T00:24:23.299034+00:00","status":"UNRESOLVED","window_id":"ff8241e034cd198ca101e2fb3aa1490f1c1f6419d660da8dbedd53f9c793570f"},{"created_at":"2026-09-21T00:42:54.658882+00:00","evidence_sha256":"0933e981b764b89e...","failure_reason":"REST_FETCH_OR_VALIDATION_FAILED","next_trade_identity":"153be4780f583c7140051c66c6db78e338eb85dc10a7b2b18823f53a886e745f","next_trade_mts":"2026-09-21T00:42:54.561000+00:00","previous_trade_identity":"712e7f4b0dd599f1cd5b0bda031d78b35e2ec2b13477688815f4b3e1928f5a28","previous_trade_mts":"2026-09-21T00:41:03.150000+00:00","reconnect_event_seq":437370,"reconnect_received_at":"2026-09-21T00:42:48.180360+00:00","recovered_row_count":0,"resolved_at":"2026-09-21T00:42:54.658882+00:00","status":"UNRESOLVED","window_id":"430d641924a7288977018e3493ef5e93305dc1d92122b5f2a2ac5f50b4e66988"},{"created_at":"2026-09-21T00:49:26.894105+00:00","evidence_sha256":"0933e981b764b89e...","failure_reason":"REST_FETCH_OR_VALIDATION_FAILED","next_trade_identity":"faa4ee2e78e629ed93689c4d00cfc3b5cbf532d8a208d45460da9852a7ec1cfe","next_trade_mts":"2026-09-21T00:49:26.818000+00:00","previous_trade_identity":"5dfdb1893e2243a4cbc8088791a958d96cc3416d9b8cdd2fb8d3fe41d3420190","previous_trade_mts":"2026-09-21T00:48:31.003000+00:00","reconnect_event_seq":438938,"reconnect_received_at":"2026-09-21T00:49:23.294194+00:00","recovered_row_count":0,"resolved_at":"2026-09-21T00:49:26.894105+00:00","status":"UNRESOLVED","window_id":"27cab14c1de70fe0d3439f687d7ee5eafe9b6e9c02f308366178fe02eae6c6ba"}],"unresolved_after_accepted_d1_count":9,"unresolved_after_event_seq":[251009,303837,318578,350488,377008,397710,433876,437370,438938],"unresolved_before_accepted_d1_count":0,"unresolved_count":9,"unresolved_overlap_accepted_d1_count":0,"unresolved_overlap_event_seq":[],"worker_REST_FETCH_OR_VALIDATION_FAILED_count_2h":0,"worker_SOURCE_FINALITY_count_2h":480},"holds":[],"ok":true,"qga_guest_exitcode":0,"qga_guest_stderr_present":false,"qga_outer_rc":0,"qga_outer_stderr_present":false,"source_evidence":{"demonov_forward_map/bitfinex_reconciliation.py":{"sha256":"023ce0a041b50b866a48d9f752bd80479a34789d82f73c81d18246ed8871ef8e","snippets":[["43: \"trade_id\": trade_id,","44: \"mts_ms\": mts_ms,","45: \"amount\": format(amount, \"f\"),","46: \"price\": format(price, \"f\"),","47: },","48: ensure_ascii=True,","49: sort_keys=True,","50: separators=(\",\", \":\"),","51: ).encode(\"utf-8\")","52: return hashlib.sha256(raw).hexdigest()","53:","54:","55:class ReconciliationStatus(str, Enum):","56: PENDING = \"PENDING\"","57: RECONCILED = \"RECONCILED\"","58: UNRESOLVED = \"UNRESOLVED\"","59:","60:","61:@dataclass(frozen=True)","62:class ReconciliationWindow:","63: window_id: str","64: reconnect_event_seq: int","65: reconnect_received_at: datetime","66: previous_trade_identity: str","67: previous_trade_mts: datetime","68: next_trade_identity: str","69: next_trade_mts: datetime","70: status: ReconciliationStatus","71: evidence_sha256: str"],["102: trade_id=trade_id,","103: mts_ms=mts_ms,","104: amount=amount,","105: price=price,","106: )","107: return BitfinexCanonicalTradeV1.build(","108: trade_id=trade_id,","109: mts=datetime.fromtimestamp(mts_ms / 1000, tz=timezone.utc),","110: amount=amount,","111: price=price,","112: source_payload_hash=source_payload_hash,","113: )","114:","115:","116:def _stdlib_fetch_json(url: str, *, timeout: float, max_bytes: int) -> object:","117: request = Request(","118: url,","119: headers={\"Accept\": \"application/json\", \"User-Agent\": \"demonov-shadow/CR0116-reconcile\"},","120: method=\"GET\",","121: )","122: try:","123: with urlopen(request, timeout=timeout) as response:","124: body = response.read(max_bytes + 1)","125: except Exception as exc:","126: raise DemonovError(\"Bitfinex public trade history request failed\") from exc","127: if len(body) > max_bytes:","128: raise DemonovError(\"Bitfinex public trade history response too large\")","129: try:","130: return json.loads(body.decode(\"utf-8\"))"],["133:","134:","135:class BitfinexPublicTradeHistoryClient:","136: def __init__(","137: self,","138: *,","139: fetch_json: Callable[..., object] | None = None,","140: timeout: float = 20.0,","141: max_bytes: int = 4 * 1024 * 1024,","142: ) -> None:","143: self._fetch_json = fetch_json or _stdlib_fetch_json","144: self.timeout = float(timeout)","145: self.max_bytes = int(max_bytes)","146:","147: def fetch_trade_window(","148: self,","149: symbol: str,","150: *,","151: start_mts: datetime,","152: end_mts: datetime,","153: ) -> BitfinexTradeHistoryBatch:","154: if not isinstance(symbol, str) or not symbol.startswith(\"t\") or len(symbol) < 2:","155: raise DemonovError(\"Bitfinex trade history symbol invalid\")","156: start_mts = _utc(start_mts, \"start_mts\")","157: end_mts = _utc(end_mts, \"end_mts\")","158: if end_mts < start_mts:","159: raise DemonovError(\"Bitfinex trade history interval invalid\")","160: start_ms = int(start_mts.timestamp() * 1000)","161: end_ms = int(end_mts.timestamp() * 1000)"],["217:","218: def reconcile_window(","219: self,","220: journal,","221: window_id: str,","222: *,","223: symbol: str,","224: resolved_at: datetime,","225: ) -> ReconciliationWindow:","226: resolved_at = _utc(resolved_at, \"resolved_at\")","227: window = journal.reconciliation_window(window_id)","228: if window.status != ReconciliationStatus.PENDING:","229: return window","230: try:","231: batch = self.fetch_trade_window(","232: symbol,","233: start_mts=window.previous_trade_mts,","234: end_mts=window.next_trade_mts,","235: )","236: if batch.raw_row_count >= BITFINEX_PUBLIC_HISTORY_LIMIT:","237: return journal.mark_reconciliation_unresolved(","238: window_id,","239: evidence_sha256=batch.evidence_sha256,","240: failure_reason=\"REST_ROW_LIMIT_REACHED\",","241: resolved_at=resolved_at,","242: )","243: if not batch.trades:","244: return journal.mark_reconciliation_unresolved(","245: window_id,"],["262: for index, trade in enumerate(batch.trades):","263: receipt = SourceReceiptV1.build(","264: venue_id=\"BITFINEX\",","265: source_kind=\"REST_TRADE_HISTORY\",","266: received_at=resolved_at,","267: source_sequence=index,","268: raw_payload_hash=trade.source_payload_hash,","269: collector_session_id=f\"reconciliation:{window_id}\",","270: )","271: receipt_id = journal.record_receipt(receipt)","272: result = journal.record_trade(trade, receipt_id=receipt_id)","273: if result == \"INSERTED\":","274: recovered += 1","275: elif result != \"DUPLICATE\":","276: return journal.mark_reconciliation_unresolved(","277: window_id,","278: evidence_sha256=batch.evidence_sha256,","279: failure_reason=f\"REST_INSERT_{result}\",","280: resolved_at=resolved_at,","281: )","282:","283: if not journal.has_trade_identity(window.previous_trade_identity):","284: return journal.mark_reconciliation_unresolved(","285: window_id,","286: evidence_sha256=batch.evidence_sha256,","287: failure_reason=\"PREVIOUS_BOUNDARY_MISSING\",","288: resolved_at=resolved_at,","289: )","290: if not journal.has_trade_identity(window.next_trade_identity):"],["300: window_id,","301: evidence_sha256=batch.evidence_sha256,","302: failure_reason=\"REST_MERGE_PROOF_FAILED\",","303: resolved_at=resolved_at,","304: )","305: return journal.mark_reconciliation_reconciled(","306: window_id,","307: evidence_sha256=batch.evidence_sha256,","308: recovered_row_count=recovered,","309: resolved_at=resolved_at,","310: )","311: except DemonovError as exc:","312: reason = str(exc)","313: reason_hash = hashlib.sha256(reason.encode(\"utf-8\")).hexdigest()","314: return journal.mark_reconciliation_unresolved(","315: window_id,","316: evidence_sha256=reason_hash,","317: failure_reason=\"REST_FETCH_OR_VALIDATION_FAILED\",","318: resolved_at=resolved_at,","319: )"]]},"demonov_forward_map/bitfinex_trade_collector.py":{"sha256":"71ad3dfbdedd7d9bb698fd20bbfa8bfad0dace003e0592716ff6299f2c8ee121","snippets":[["238: CREATE TABLE IF NOT EXISTS d1_revisions(","239: revision_id TEXT PRIMARY KEY,","240: logical_d1_id TEXT NOT NULL,","241: revision_json TEXT NOT NULL","242: );","243: CREATE TABLE IF NOT EXISTS finalized_d1(","244: logical_d1_id TEXT PRIMARY KEY,","245: close_at TEXT NOT NULL,","246: finalized_d1_id TEXT NOT NULL UNIQUE,","247: revision_id TEXT NOT NULL,","248: logical_json TEXT NOT NULL,","249: revision_json TEXT NOT NULL,","250: finalized_json TEXT NOT NULL","251: );","252: CREATE TABLE IF NOT EXISTS reconnect_reconciliation(","253: window_id TEXT PRIMARY KEY,","254: reconnect_event_seq INTEGER NOT NULL UNIQUE","255: REFERENCES sequence_events(event_seq),","256: reconnect_received_at TEXT NOT NULL,","257: previous_trade_identity TEXT NOT NULL,","258: previous_trade_mts TEXT NOT NULL,","259: next_trade_identity TEXT NOT NULL,","260: next_trade_mts TEXT NOT NULL,","261: status TEXT NOT NULL,","262: evidence_sha256 TEXT NOT NULL,","263: recovered_row_count INTEGER NOT NULL,","264: failure_reason TEXT NOT NULL,","265: created_at TEXT NOT NULL,","266: resolved_at TEXT"],["285: )","286:","287: def _status(self) -> BitfinexCollectorStatus:","288: return BitfinexCollectorStatus(","289: gap_detected=self._meta_get(\"gap_detected\") == \"1\",","290: reconnect_detected=self._meta_get(\"reconnect_detected\") == \"1\",","291: post_finality_revision=(","292: self._meta_get(\"post_finality_revision\") == \"1\"","293: ),","294: fail_closed_reason=self._meta_get(\"fail_closed_reason\") or \"\",","295: )","296:","297: def _reconciliation_status_summary(self) -> tuple[int, int, str]:","298: pending_row = self._db.execute(","299: \"SELECT COUNT(*) AS n FROM reconnect_reconciliation WHERE status=?\",","300: (ReconciliationStatus.PENDING.value,),","301: ).fetchone()","302: active_pending = 0","303: active_raw = self._meta_get(\"active_reconnect_pending_event_seq\")","304: if active_raw:","305: try:","306: active_seq = int(active_raw)","307: except ValueError:","308: active_seq = 0","309: if active_seq > 0:","310: row = self._db.execute(","311: \"\"\"","312: SELECT se.event_kind, rr.window_id","313: FROM sequence_events se"],["318: (active_seq,),","319: ).fetchone()","320: if row is not None and row[\"event_kind\"] == \"RECONNECT\" and row[\"window_id\"] is None:","321: active_pending = 1","322: unresolved_row = self._db.execute(","323: \"SELECT COUNT(*) AS n FROM reconnect_reconciliation WHERE status=?\",","324: (ReconciliationStatus.UNRESOLVED.value,),","325: ).fetchone()","326: latest = self._db.execute(","327: \"\"\"","328: SELECT failure_reason FROM reconnect_reconciliation","329: WHERE status=?","330: ORDER BY reconnect_event_seq DESC LIMIT 1","331: \"\"\",","332: (ReconciliationStatus.UNRESOLVED.value,),","333: ).fetchone()","334: pending = (0 if pending_row is None else int(pending_row[\"n\"])) + active_pending","335: unresolved = 0 if unresolved_row is None else int(unresolved_row[\"n\"])","336: reason = \"\" if latest is None else str(latest[\"failure_reason\"])","337: return pending, unresolved, reason","338:","339: def _persist_status_file(self) -> None:","340: status = self._status()","341: prospective = self.current_prospective_source_state()","342: pending, unresolved, last_reason = self._reconciliation_status_summary()","343: payload = {","344: \"gap_detected\": status.gap_detected,","345: \"reconnect_detected\": status.reconnect_detected,","346: \"post_finality_revision\": status.post_finality_revision,"],["469: self._meta_set(f\"last_sequence:{session_id}\", str(sequence))","470: self._db.execute(","471: \"\"\"","472: INSERT INTO sequence_events(","473: session_id,source_sequence,received_at,event_kind","474: ) VALUES(?,?,?,?)","475: \"\"\",","476: (session_id, sequence, received_at.isoformat(), \"SEQUENCE\"),","477: )","478: self._persist_status_file()","479: return None","480:","481: def current_prospective_source_state(self) -> BitfinexCollectorStatus:","482: # Historical GAP/RECONNECT events are enforced per D1 by finality.","483: # Only reconciliation that is still missing/pending/unresolved blocks","484: # prospective scientific continuity globally.","485: pending, unresolved, last_reason = self._reconciliation_status_summary()","486: post_finality_revision = (","487: self._meta_get(\"post_finality_revision\") == \"1\"","488: )","489: reconnect_blocked = pending > 0 or unresolved > 0","490: if post_finality_revision:","491: reason = \"post-finality source revision detected\"","492: elif unresolved > 0:","493: reason = last_reason or \"reconnect reconciliation unresolved\"","494: elif pending > 0:","495: reason = \"reconnect reconciliation pending\"","496: else:","497: reason = \"\""],["500: reconnect_detected=reconnect_blocked,","501: post_finality_revision=post_finality_revision,","502: fail_closed_reason=reason,","503: )","504:","505: def current_gap_state(self) -> BitfinexCollectorStatus:","506: return self._status()","507:","508: def latest_canonical_trade(self) -> BitfinexCanonicalTradeV1 | None:","509: row = self._db.execute(","510: \"\"\"","511: SELECT trade_identity,semantic_hash,trade_id,mts,amount,price,source_payload_hash","512: FROM trade_revisions ORDER BY revision_seq DESC LIMIT 1","513: \"\"\"","514: ).fetchone()","515: if row is None:","516: return None","517: return BitfinexCanonicalTradeV1(","518: trade_identity=str(row[\"trade_identity\"]),","519: semantic_hash=str(row[\"semantic_hash\"]),","520: trade_id=int(row[\"trade_id\"]),","521: mts=_dt(row[\"mts\"]),","522: amount=Decimal(row[\"amount\"]),","523: price=Decimal(row[\"price\"]),","524: source_payload_hash=str(row[\"source_payload_hash\"]),","525: )","526:","527: def create_reconciliation_window(","528: self,"],["531: previous_trade: BitfinexCanonicalTradeV1,","532: next_trade: BitfinexCanonicalTradeV1,","533: created_at: datetime,","534: ) -> ReconciliationWindow:","535: if not isinstance(reconnect_event_seq, int) or isinstance(reconnect_event_seq, bool) or reconnect_event_seq <= 0:","536: raise DemonovError(\"reconnect_event_seq must be a positive integer\")","537: if not isinstance(previous_trade, BitfinexCanonicalTradeV1) or not isinstance(next_trade, BitfinexCanonicalTradeV1):","538: raise DemonovError(\"canonical reconnect boundary trades required\")","539: created_at = _utc(created_at, \"created_at\")","540: if next_trade.mts < previous_trade.mts:","541: raise DemonovError(\"reconnect trade boundaries out of order\")","542: event = self._db.execute(","543: \"SELECT received_at,event_kind FROM sequence_events WHERE event_seq=?\",","544: (reconnect_event_seq,),","545: ).fetchone()","546: if event is None or event[\"event_kind\"] != \"RECONNECT\":","547: raise DemonovError(\"reconciliation window requires RECONNECT event\")","548: reconnect_received_at = _dt(event[\"received_at\"])","549: window_id = canonical_hash(","550: {","551: \"schema\": \"CR0116_BITFINEX_RECONCILIATION_WINDOW_V1\",","552: \"reconnect_event_seq\": reconnect_event_seq,","553: \"reconnect_received_at\": reconnect_received_at,","554: \"previous_trade_identity\": previous_trade.trade_identity,","555: \"previous_trade_mts\": previous_trade.mts,","556: \"next_trade_identity\": next_trade.trade_identity,","557: \"next_trade_mts\": next_trade.mts,","558: }","559: )"],["584: ),","585: )","586: except sqlite3.IntegrityError as exc:","587: raise DemonovError(\"RECONNECT event already bound to a different reconciliation window\") from exc","588: window = self.reconciliation_window(window_id)","589: if window.reconnect_event_seq != reconnect_event_seq:","590: raise DemonovError(\"reconciliation window identity conflict\")","591: if self._meta_get(\"active_reconnect_pending_event_seq\") == str(reconnect_event_seq):","592: self._meta_set(\"active_reconnect_pending_event_seq\", \"\")","593: self._persist_status_file()","594: return window","595:","596: def reconciliation_window(self, window_id: str) -> ReconciliationWindow:","597: row = self._db.execute(","598: \"SELECT * FROM reconnect_reconciliation WHERE window_id=?\",","599: (window_id,),","600: ).fetchone()","601: if row is None:","602: raise DemonovError(\"reconciliation window not found\")","603: return self._reconciliation_from_row(row)","604:","605: def reconciliation_windows_overlapping(","606: self,","607: open_at: datetime,","608: close_at: datetime,","609: ) -> tuple[ReconciliationWindow, ...]:","610: open_at = _utc(open_at, \"open_at\")","611: close_at = _utc(close_at, \"close_at\")","612: if close_at < open_at:"],["618: ORDER BY reconnect_event_seq","619: \"\"\",","620: (open_at.isoformat(), close_at.isoformat()),","621: ).fetchall()","622: return tuple(self._reconciliation_from_row(row) for row in rows)","623:","624: def latest_trade_semantic_hash(self, trade_identity: str) -> str | None:","625: row = self._db.execute(","626: \"\"\"","627: SELECT semantic_hash FROM trade_revisions","628: WHERE trade_identity=?","629: ORDER BY revision_seq DESC LIMIT 1","630: \"\"\",","631: (trade_identity,),","632: ).fetchone()","633: return None if row is None else str(row[\"semantic_hash\"])","634:","635: def has_trade_identity(self, trade_identity: str) -> bool:","636: return self.latest_trade_semantic_hash(trade_identity) is not None","637:","638: def mark_reconciliation_reconciled(","639: self,","640: window_id: str,","641: *,","642: evidence_sha256: str,","643: recovered_row_count: int,","644: resolved_at: datetime,","645: ) -> ReconciliationWindow:","646: return self._mark_reconciliation_terminal("]]},"demonov_forward_map/live_health.py":{"sha256":"a45da5b399b0a87a40fed04e68c728a9960b604e7b69c0f73aa23042c31349ec","snippets":[["57: return value if value > 0 else None","58:","59:","60:def _open_ro(path: Path):","61: uri = path.resolve().as_uri() + \"?mode=ro\"","62: return sqlite3.connect(uri, uri=True, timeout=5)","63:","64:","65:def _sqlite_integrity(path: Path) -> bool:","66: if not path.exists():","67: return True","68: try:","69: db = _open_ro(path)","70: try:","71: row = db.execute(\"PRAGMA quick_check\").fetchone()","72: return bool(row and str(row[0]).lower() == \"ok\")","73: finally:","74: db.close()","75: except sqlite3.DatabaseError:","76: return False","77:","78:","79:def _last_finalized(path: Path) -> tuple[str | None, str | None]:","80: if not path.exists():","81: return None, None","82: try:","83: db = _open_ro(path)","84: try:","85: close_row = db.execute("],["107:) -> tuple[int, int | None, int, str | None]:","108: if not prospective_path.exists():","109: return 0, None, 0, None","110:","111: terminal = {}","112: indeterminate = 0","113: last_sent = None","114: if relay_path.exists():","115: try:","116: relay = _open_ro(relay_path)","117: try:","118: rows = relay.execute(","119: \"SELECT outbox_id,status,finalized_at \"","120: \"FROM notification_relay_ledger\"","121: ).fetchall()","122: finally:","123: relay.close()","124: for outbox_id, status, finalized_at in rows:","125: terminal[str(outbox_id)] = str(status)","126: if status == \"INDETERMINATE\":","127: indeterminate += 1","128: if status == \"SENT\" and finalized_at:","129: stamp = _aware(str(finalized_at))","130: if stamp is not None and (","131: last_sent is None or stamp > last_sent","132: ):","133: last_sent = stamp","134: except sqlite3.DatabaseError:","135: return 0, None, 0, None"],["234: now=current,","235: )","236:","237: reasons: list[str] = []","238: scientific_fail = False","239: degraded = False","240:","241: if any(value is None for value in slo.values()):","242: _append_reason(reasons, \"SLO_CONFIGURATION_INVALID\")","243: scientific_fail = True","244:","245: prospective_gap = collector.get(\"prospective_gap_detected\", collector.get(\"gap_detected\")) is True","246: prospective_reconnect = collector.get(\"prospective_reconnect_detected\", collector.get(\"reconnect_detected\")) is True","247: reconciliation_pending = collector.get(\"reconciliation_pending_count\", 0)","248: reconciliation_unresolved = collector.get(\"reconciliation_unresolved_count\", 0)","249: reconciliation_last_reason = collector.get(\"reconciliation_last_reason\", \"\")","250: reconciliation_status_invalid = (","251: not isinstance(reconciliation_pending, int)","252: or isinstance(reconciliation_pending, bool)","253: or reconciliation_pending < 0","254: or not isinstance(reconciliation_unresolved, int)","255: or isinstance(reconciliation_unresolved, bool)","256: or reconciliation_unresolved < 0","257: or not isinstance(reconciliation_last_reason, str)","258: )","259: if prospective_gap:","260: _append_reason(reasons, \"SOURCE_SEQUENCE_GAP\")","261: scientific_fail = True","262: if reconciliation_status_invalid:"],["395: and slo[\"relay_heartbeat_slo_seconds\"] is not None","396: and relay_age <= slo[\"relay_heartbeat_slo_seconds\"]","397: ),","398: \"collector_heartbeat_age_seconds\": collector_age,","399: \"worker_heartbeat_age_seconds\": worker_age,","400: \"relay_heartbeat_age_seconds\": relay_age,","401: \"last_finalized_primary_d1_close\": last_finalized,","402: \"last_finalized_primary_d1_age_seconds\": last_finalized_age,","403: \"current_logical_d1_finality_state\": current_finality_state,","404: \"source_gap_detected\": collector.get(\"gap_detected\") is True,","405: \"source_reconnect_detected\": (","406: collector.get(\"reconnect_detected\") is True","407: ),","408: \"reconciliation_pending_count\": reconciliation_pending,","409: \"reconciliation_unresolved_count\": reconciliation_unresolved,","410: \"reconciliation_last_reason\": reconciliation_last_reason,","411: \"source_post_finality_revision\": (","412: collector.get(\"post_finality_revision\") is True","413: ),","414: \"source_fail_closed_reason\": collector.get(","415: \"fail_closed_reason\",","416: \"\",","417: ),","418: \"signal_outbox_pending_count\": pending_count,","419: \"oldest_pending_outbox_age_seconds\": oldest_pending_age,","420: \"indeterminate_delivery_count\": indeterminate_count,","421: \"last_successful_notification_delivery_at\": last_sent_at,","422: \"sqlite_integrity_ok\": sqlite_integrity_ok,","423: \"slo\": slo,"]]},"demonov_forward_map/producer_policy.py":{"sha256":"995a4155cd01296a643b0ef7464bf6e7402f68ccb48640b43e8507c8208d98cf","snippets":[["25: if self.decision_id!=self.content_hash: raise DemonovError(\"decision_id must match content hash\")","26: @property","27: def content_hash(self):","28: d=dict(self.__dict__);d.pop(\"decision_id\");return canonical_hash(d)","29: @classmethod","30: def build(cls,**kwargs):","31: n=dict(kwargs);n[\"payload\"]=dict(n.get(\"payload\",{}));n[\"causal_parent_event_ids\"]=tuple(n.get(\"causal_parent_event_ids\",()));n[\"source_event_ids\"]=tuple(n.get(\"source_event_ids\",()));return cls(decision_id=canonical_hash(n),**n)","32:class ProducerTransitionPolicy(Protocol):","33: def decide(self,*,state,input_event)->ProducerTransitionDecision: ...","34:class LaunchBlockedTransitionPolicy:","35: policy_id=\"CR0107_LAUNCH_BLOCKED\"","36: def decide(self,*,state,input_event):","37: decided_at=getattr(input_event,\"known_at\",None) or getattr(state,\"state_at\",None)","38: state_before=getattr(state,\"interaction_state\",None)","39: return ProducerTransitionDecision.build(policy_id=self.policy_id,disposition=\"ABSTAIN\",state_before=state_before,state_after=None,event_type=None,payload_schema_id=None,payload={},causal_parent_event_ids=(),source_event_ids=(),decided_at=decided_at,reason=\"production transition semantics unresolved\")","40:","41:@dataclass(frozen=True)","42:class ProducerLaunchGate:","43: transition_policy_frozen: bool","44: live_schema_registry_frozen: bool","45: market_registry_frozen: bool","46: timeframe_registry_frozen: bool","47: fixture_provenance: str","48:","49: def __post_init__(self):","50: flags=(","51: self.transition_policy_frozen,","52: self.live_schema_registry_frozen,","53: self.market_registry_frozen,"],["87: transition_policy_frozen=transition_policy_frozen,","88: live_schema_registry_frozen=live_schema_registry_frozen,","89: market_registry_frozen=market_registry_frozen,","90: timeframe_registry_frozen=timeframe_registry_frozen,","91: fixture_provenance=fixture_provenance,","92: )","93:","94: @classmethod","95: def current(cls):","96: return cls.build(","97: transition_policy_frozen=False,","98: live_schema_registry_frozen=False,","99: market_registry_frozen=False,","100: timeframe_registry_frozen=False,","101: fixture_provenance=\"UNRESOLVED_PRODUCTION\",","102: )"]]},"scripts/v1810_transcript_operator_audit.py":{"sha256":"72f1bf26be83d77f2255f463e868923e4668e363d6bd27e68997ead346421897","snippets":[["61:t1,y1=pts[idx]","62:for t,y in pts:","63: if t <= t1:","64: line=y0+m_support*(t-t0)","65: assert y <= line + 1e-12","66:# A too-steep candidate (more negative slope) cuts at least one candle.","67:m_bad=min(slopes)","68:assert any(y > y0+m_bad*(t-t0)+1e-12 for t,y in pts)","69:","70:# Status governance.","71:sm={r['rule']:r['new_v2.7'] for r in status}","72:assert sm['MANUAL_CORRECTED_SUPPORTING_ENVELOPE']=='DIRECT_IMPLEMENTATION_STYLE_SUPPORT'","73:assert sm['EXACT_CONVEX_HULL_IS_AUTHOR_MENTAL_RULE']=='UNPROVEN_COMPUTATIONAL_EQUIVALENCE'","74:assert sm['BOUNDARY_SPECIAL_FIRST_POINT_CLASS']=='DIRECTLY_SUPPORTED'","75:assert sm['JAN13_16_17_TRANSCRIPT_IDENTITY']=='RETRIEVED_BUT_OBJECT_ID_UNRESOLVED'","76:","77:out = {","78: 'evidence_rows': len(ev),","79: 'required_operator_rules_present': len(required),","80: 'native_tf_status': tfmap,","81: 'successor_clearance_rows': len(clear),","82: 'successor_closest_interior': closest,","83: 'manual_support_equivalence_synthetic': 'PASS',","84: 'status_assertions': 'PASS'","85:}","86:rawdir=ROOT/'data'/'v18_10_raw'","87:rawdir.mkdir(parents=True,exist_ok=True)","88:(rawdir/'V1810_REPRO_SUMMARY_v2.7.json').write_text(json.dumps(out,ensure_ascii=False,indent=2),encoding='utf-8')","89:print(json.dumps(out,ensure_ascii=False,indent=2))"]]},"scripts/v1823_identifiability_closure.py":{"sha256":"b1a07fd36508b6cf81d1965bc87c75849282413d93fb418d390543ec69b8f97c","snippets":[["1:from pathlib import Path","2:import pandas as pd, json, hashlib, math","3:ROOT=Path(__file__).resolve().parents[1]","4:","5:# Load frozen prior evidence","6:feas=pd.read_csv(ROOT/'599_OCT03_NOVEMBER_ORIGIN_FEASIBILITY_v3.9.csv')","7:pix=pd.read_csv(ROOT/'600_PUBLIC20_21_PIXEL_SEPARATION_STRESS_v3.9.csv')","8:aff=pd.read_csv(ROOT/'603_AFFINE_SEMANTIC_DATE_VS_MAGNET_ANCHOR_STRESS_v3.9.csv')","9:","10:# Hypothesis falsification / identifiability matrix","11:rows=[","12: dict(hypothesis='H1_PUBLIC20_LITERAL_HIGH_SAME_PROMINENT_OBJECT', physical_origin='2021-11-20 daily high', declaration_binding='same prominent Oct03 predecessor', supporting_line='20NovHigh-Apr03High', oct03_origin_render='REJECTED', postfreeze_farfield='REJECTED', downstream_ohlc='requires positive tolerance on tested feeds', late_text='literal date string supports declaration only', status='FALSIFIED_FOR_PROMINENT_OBJECT_UNDER_LITERAL_HIGH_MAGNET'),","13: dict(hypothesis='H2_NOV21_LITERAL_HIGH_SAME_PROMINENT_OBJECT', physical_origin='2021-11-21 daily high', declaration_binding='same prominent Oct03 predecessor', supporting_line='21NovHigh-Apr03High', oct03_origin_render='REJECTED', postfreeze_farfield='REJECTED', downstream_ohlc='requires positive tolerance on tested feeds', late_text='not literally declared', status='FALSIFIED_FOR_PROMINENT_OBJECT_UNDER_LITERAL_HIGH_MAGNET'),","14: dict(hypothesis='H3_NOV10_LITERAL_HIGH_SAME_PROMINENT_OBJECT', physical_origin='2021-11-10 daily high', declaration_binding='same prominent Oct03 predecessor', supporting_line='10NovHigh-Apr03High', oct03_origin_render='COMPATIBLE; only strict-L2 among joint feasible dates', postfreeze_farfield='BEST; two-frame frozen midpoint RMS winner', downstream_ohlc='strict upper-hull certificate on Bitstamp control; no epsilon needed there', late_text='conflicts with literal public date unless typo/alias","15: dict(hypothesis='H4_PUBLIC20_SEMANTIC_ALIAS_PHYSICAL_NOV10', physical_origin='physical 2021-11-10 high; semantic label 2021-11-20', declaration_binding='same prominent Oct03 predecessor', supporting_line='same affine line as H3', oct03_origin_render='INDISTINGUISHABLE_FROM_H3', postfreeze_farfield='INDISTINGUISHABLE_FROM_H3', downstream_ohlc='INDISTINGUISHABLE_FROM_H3', late_text='COMPATIBLE_WITH_LITERAL_PUBLIC_DATE', status='UNRESOLVED_EQUIVALENCE_CLASS'),","16: dict(hypothesis='H5_PUBLIC20_OTHER_OBJECT', physical_origin='unknown / potentially 20Nov-related', declaration_binding='different historical object than prominent Oct03 ray', supporting_line='object-specific unknown', oct03_origin_render='NOT_A_TEST_OF_THIS_OBJECT', postfreeze_farfield='NOT_A_TEST_OF_THIS_OBJECT', downstream_ohlc='cannot identify absent object geometry', late_text='COMPATIBLE', status='UNRESOLVED_OBJECT_BINDING'),","17: dict(hypothesis='H6_PUBLIC_DATE_PAIR_IS_LABEL_NOT_HANDLE_METADATA', physical_origin='unknown handle; public dates are reporting labels', declaration_binding='may be same or other object', supporting_line='underidentified', oct03_origin_render='cannot recover label semantics', postfreeze_farfield='cannot recover label semantics', downstream_ohlc='cannot recover label semantics', late_text='COMPATIBLE', status='UNRESOLVED_SEMANTIC_LAYER'),","18:]","19:pd.DataFrame(rows).to_csv(ROOT/'616_ADVERSARIAL_HYPOTHESIS_FALSIFICATION_MATRIX_v4.0.csv',index=False)","20:","21:channels=[","22: ('DOWNSTREAM_OHLC_AFTER_ORIGIN','supporting-line geometry and clearance','NO','H3 vs H4 are affine-identical after physical line is fixed'),","23: ('FAR_FIELD_CONTEMPORANEOUS_SCREENSHOT','line family / slope-position','NO','can reject 20/21 literal family but not typo vs semantic alias on same line'),","24: ('VISIBLE_FINITE_RAY_ORIGIN_RENDER','physical endpoint region','NO','can bind physical Nov8/9/10 region; cannot tell why late text says Nov20'),","25: ('STRICT_PIVOT_OPERATOR_PRIOR','operator compatibility discriminator','NO','selects Nov10 within feasible region but does not decode declaration semantics'),","26: ('LATE_POST_TEXT_ONLY','declared date-pair identity','NO','reveals literal Nov20 string but not which rendered object/handle it names'),","27: ('LATE_FOLLOWUP_CLASS_NARRATION','2026-to-2022 trendline analogy class','NO','binds analogy at class level, not exact historical object or anchor'),","28: ('ORIGINAL_AUG17_ALBUM_PIXELS','object-to-caption correspondence','POTENTIALLY_YES','can show which line is paired with 20.11.21-03.04.22'),","29: ('SELECTED_HANDLE_OR_EDITABLE_OBJECT','native physical anchor metadata','YES_FOR_HANDLE','can distinguish Nov10 vs 8/9 physical handle; still needs text/object binding for typo vs semantic alias'),"]]},"scripts/v1824_modern_semantics_media_control.py":{"sha256":"ee0794d3780e610f1b8754e034b8b25b9289e7eeff9c2d658752b289bae88f0a","snippets":[["208: dict(test='MODERN_RAW_DATE_HIGH_NO_HIDDENY', evidence='Raw date-high line yields clean outer-envelope holdout and no hidden Y is required for decisive August state sequence.', result='PASS', implication='Modern row does not need arbitrary label semantics to explain geometry.', strength='GEOMETRIC'),","209: dict(test='MODERN_MAY14_ACTIVE_CONSTRAINT_UPDATE', evidence=f'May14 becomes the final active support update in May1-20; it protrudes {float(u14.protrusion_above_previous_active_line_usd):.3f} USD ({float(u14.protrusion_above_previous_active_line_pct):.6f}%) above the prior Oct06->May11 active line.', result='PASS', implication='May14 is operator-like correction/most-protruding-candle event, not merely a nearby calendar label.', strength='DYNAMIC_HULL'),","210: dict(test='MODERN_BREAK_FSM_CROSSFEED', evidence='Both Bitfinex and Coinbase reproduce Aug17 CLOSE -> Aug18 FULL_RANGE for raw date-high ray.', result='PASS', implication='The same compact date identities generate a specific later event chronology on two feeds.', strength='PROSPECTIVE_STYLE_HOLDOUT'),","211: dict(test='LEGACY_PUBLIC20_UNDER_CANDLE_IDENTITY', evidence='Nov20 fails strict L1/L2 cross-venue and literal high+magnet is rejected for prominent Oct03 ray by source-render/far-field evidence.', result='ANOMALY', implication='Under shared operator-compressed semantics, 2022 public `20` is exceptional and needs typo/correction, other-object binding, or explicit semantic exception.', strength='CROSS_ERA_CONTRAST'),","212: dict(test='SEMANTIC_ALIAS_IDENTIFIABILITY', evidence='A semantic 20Nov label can still name the same Nov10 physical line mathematically.', result='NOT_FALSIFIED', implication='Schema evidence changes parsimony/priors but does not logically prove typo.', strength='IDENTIFIABILITY_LIMIT'),","213:]","214:pd.DataFrame(sem_rows).to_csv(ROOT / '628_MODERN_DECLARATION_SEMANTICS_CONTROL_v4.1.csv', index=False)","215:","216:# ---------------------------------------------------------------------------","217:# 6. Same-post schema consistency / hypothesis update without fake probabilities.","218:# ---------------------------------------------------------------------------","219:schema_rows = [","220: dict(hypothesis='H3_NOV10_PHYSICAL_PUBLIC20_TYPO_OR_CORRECTION', preserves_common_date_as_candle_identity_schema='YES', preserves_literal_2022_text='NO_WITHOUT_CORRECTION', matches_prominent_2022_render='YES', matches_2019_magnet_operator='YES', matches_modern_row_semantics='YES', extra_unannounced_semantic_switch='NO', v4_1_update='UPGRADED_IF_SAME_PROMINENT_OBJECT', reason='One character/date correction reconciles common schema, strict pivot, visible origin, far-field geometry and no-cut o","221: dict(hypothesis='H4_PUBLIC20_SEMANTIC_ALIAS_PHYSICAL_NOV10', preserves_common_date_as_candle_identity_schema='NO_OR_REQUIRES_EXCEPTION', preserves_literal_2022_text='YES', matches_prominent_2022_render='YES_PHYSICAL_NOV10', matches_2019_magnet_operator='PHYSICAL_YES_SEMANTIC_LABEL_NO', matches_modern_row_semantics='REQUIRES_2022_ONLY_SCHEMA_EXCEPTION', extra_unannounced_semantic_switch='YES', v4_1_update='DOWNGRADED_BUT_NOT_FALSIFIED', reason='Geometry remains identical to H3, but public dat","222: dict(hypothesis='H5_PUBLIC20_BINDS_OTHER_HISTORICAL_OBJECT', preserves_common_date_as_candle_identity_schema='POTENTIALLY_YES', preserves_literal_2022_text='YES', matches_prominent_2022_render='NOT_APPLICABLE_TO_OTHER_OBJECT', matches_2019_magnet_operator='POTENTIALLY_YES', matches_modern_row_semantics='YES_IF_OTHER_OBJECT_USES_20NOV_CANDLE', extra_unannounced_semantic_switch='NO', v4_1_update='UNCHANGED_UNRESOLVED_OBJECT_BINDING', reason='Still the cleanest way to preserve literal date and ","223: dict(hypothesis='H6_DATE_PAIRS_ARE_ARBITRARY_REPORTING_LABELS', preserves_common_date_as_candle_identity_schema='NO', preserves_literal_2022_text='YES', matches_prominent_2022_render='UNDERIDENTIFIED', matches_2019_magnet_operator='WEAK', matches_modern_row_semantics='WEAK_AGAINST_CONTROL', extra_unannounced_semantic_switch='GLOBAL_LABEL_MODEL', v4_1_update='MATERIALLY_DOWNGRADED_NOT_FALSIFIED', reason='Modern dates independently coincide with pivot, active-constraint and break-FSM structure","224:]","225:pd.DataFrame(schema_rows).to_csv(ROOT / '631_SAME_POST_COORDINATE_SCHEMA_CONSISTENCY_v4.1.csv', index=False)","226:","227:# ---------------------------------------------------------------------------","228:# 7. Frozen media observability ledger (manual web retrieval state, no network in script).","229:# ---------------------------------------------------------------------------","230:media_rows = [","231: dict(item='AUG17_TARGET_POST', source='Telegram @tradertrend/4992', observed='post identity + literal text', media_state='TARGET_MEDIA_BYTES_UNOBSERVED', attachment_count='4 via Telemetr search index', access_state='PUBLIC_POST_TEXT_OBSERVED_MEDIA_NOT_EXPOSED_IN_INDEXABLE_TELEGRAM_HTML', url='https://t.me/tradertrend/4992', consequence='Text/object binding remains missing.'),","232: dict(item='AUG17_TELEMETR_INDEX', source='Telemetr channel content page/search index', observed='four Image placeholders after exact coordinate text', media_state='ATTACHMENT_COUNT_KNOWN_BYTES_UNOBSERVED', attachment_count='4', access_state='PUBLIC_INDEX_VISIBLE; direct target media URLs not surfaced in current search representation', url='https://telemetr.me/content/AAAAAEt9uY5bGaRQ2MUsRQ', consequence='Confirms album cardinality, not object-caption mapping.'),","233: dict(item='TELEMETR_PUBLIC_API', source='Telemetr.io Public API Swagger', observed='ChannelMessage has media support; API requires access key', media_state='POTENTIAL_METADATA_CHANNEL_AUTH_GATED', attachment_count='unknown without authenticated query', access_state='ACCESS_KEY_REQUIRED', url='https://api.telemetr.io/swagger-ui/', consequence='Possible future retrieval route if authorized access is available; not evidence by itself.'),","234: dict(item='MAY18_AUTHOR_RENDER_MIRROR', source='Mondiara mirror attributed to Trader 80/20', observed='original author TradingView chart metadata 18.05.2026 10:08 UTC+3; Bitfinex BTC/USD 1D', media_state='MIRROR_BYTES_OBSERVED_IN_WEB_LAYER', attachment_count='1 relevant chart', access_state='PUBLIC_MIRROR', url='https://news.mondiara.com/categories/38/posts/231899', consequence='Confirms modern workflow/feed checkpoint; exact later-published descending object remains visually ambiguous.'),","235: dict(item='MAY18_TELEGRAM_POST', source='Telegram @tradertrend/4947', observed='original post identity recovered', media_state='ORIGINAL_CDN_NOT_PERSISTENTLY_RETRIEVED; MIRRORS_SURVIVE', attachment_count='>=1', access_state='PUBLIC_POST; mirror preservation useful', url='https://t.me/tradertrend/4947', consequence='Establishes mirror-preservation strategy for target Aug17 album.'),","236:]"],["251: 'public_dates': ['2025-10-06','2026-05-14'],","252: 'strict_L1_bitfinex_coinbase': True,","253: 'strict_L2_coinbase': True,","254: 'crossfeed_high_diff_pct': {'oct06': oct_crossfeed_pct, 'may14': may_crossfeed_pct},","255: 'certified_may_support_dates': cert_dates,","256: 'latest_active_constraint_date': updates_df.iloc[-1].new_active_date,","257: 'may14_protrusion_vs_previous_active_usd': float(u14.protrusion_above_previous_active_line_usd),","258: 'may14_protrusion_vs_previous_active_pct': float(u14.protrusion_above_previous_active_line_pct),","259: 'minimum_monthly_proxy_guard_slack_pct_under_preMay14_active_line': float(min_guard[4]),","260: 'aug17_to_aug18_state_two_feeds': 'CLOSE -> FULL_RANGE',","261: },","262: 'hypothesis_update': {","263: 'H3': 'UPGRADED_IF_SAME_PROMINENT_OBJECT',","264: 'H4': 'DOWNGRADED_BUT_GEOMETRICALLY_NONFALSIFIABLE_VS_H3',","265: 'H5': 'UNCHANGED_UNRESOLVED_OBJECT_BINDING',","266: 'H6': 'MATERIALLY_DOWNGRADED_NOT_FALSIFIED'","267: },","268: 'media_bottleneck': 'POST_ID_KNOWN + ATTACHMENT_COUNT_4_KNOWN; TARGET_MEDIA_BYTES/OBJECT_CAPTION_MAPPING_UNOBSERVED',","269:}","270:(RAW / 'V1824_MODERN_SEMANTICS_MEDIA_CONTROL_SUMMARY_v4.1.json').write_text(json.dumps(summary, ensure_ascii=False, indent=2) + '\\n', encoding='utf-8')","271:","272:# Freeze direct operator excerpt for audit without needing to parse nested corpus manually.","273:(RAW / 'V1824_DIRECT_AUTHOR_OPERATOR_EXCERPT_m65_v4.1.txt').write_text(","274: f'mnum=65\\ndate={by_mnum[65].get(\"date\")}\\n\\n{m65}\\n', encoding='utf-8')","275:","276:print('V18.24 MODERN SEMANTICS / MEDIA CONTROL: PASS')","277:print(json.dumps(summary, ensure_ascii=False, indent=2))"]]},"scripts/v1826_target_media_dual_object_audit.py":{"sha256":"ec31207b2e873f39c2db6d41775c294ab371fff793b83c1c6bf43edc978bbaea","snippets":[["49:","50:assert abs(get(\"BF_NOV10_TO_APR03\",\"2022-10-03\") - 20457.54166667) < 1e-6","51:assert abs(get(\"BF_PUBLIC20_TO_APR03\",\"2022-10-03\") - 30835.01492537) < 1e-6","52:assert abs(get(\"BF_NOV10_TO_APR03\",\"2022-11-03\") - 15859.63888889) < 1e-6","53:assert abs(get(\"CB_APR03_TO_NOV05_SUCCESSOR\",\"2022-12-22\") - 15823.43796296) < 1e-6","54:assert abs(get(\"CB_PUBLIC20_TO_APR03\",\"2023-01-14\") - 20938.41791045) < 1e-6","55:","56:# Target media structure: verify only URL/slot facts, not pixels.","57:media=json.load(open(RAW/\"V1826_TARGET_MEDIA_BROWSER_OBSERVED_v4.3.json\",encoding=\"utf-8\"))","58:slots=media[\"rendered_slots\"]","59:assert [x[\"telemetr_link_number\"] for x in slots] == [39,40,39,40]","60:urls=[x[\"url\"] for x in slots]","61:assert len(slots)==4","62:assert len(set(urls))==2","63:assert media[\"telegram_attachment_cardinality\"]==\"UNRESOLVED_FROM_TELEMETR_HTML\"","64:assert media[\"local_byte_freeze\"] is False","65:","66:# Jan negative-control arithmetic. Visual band itself is a manual browser estimate,","67:# therefore only separation conditional on that recorded broad band is asserted.","68:jan=json.load(open(RAW/\"V1826_JAN2023_BROWSER_IMAGE_LEAD_v4.3.json\",encoding=\"utf-8\"))","69:bf_lit=get(\"BF_PUBLIC20_TO_APR03\",\"2023-01-14\")","70:assert abs(bf_lit - jan[\"bitfinex_literal20_to_apr03_projection_2023_01_14_usd\"]) < 1e-6","71:upper=float(jan[\"manual_broad_y_band_at_january_break_candle_usd\"][1])","72:assert bf_lit - upper > 2000","73:assert jan[\"classification\"]==\"NEGATIVE_CONTROL_NOT_LITERAL20_OBJECT\"","74:","75:# Hypothesis decomposition consistency.","76:h=list(csv.DictReader(open(R/\"661_HYPOTHESIS_BINDING_DECOMPOSITION_v4.3.csv\",encoding=\"utf-8\")))","77:hd={x[\"hypothesis_component\"]:x for x in h}"]]}},"source_paths":["demonov_forward_map/bitfinex_reconciliation.py","demonov_forward_map/bitfinex_trade_collector.py","demonov_forward_map/live_health.py","demonov_forward_map/producer_policy.py","scripts/v1810_transcript_operator_audit.py","scripts/v1823_identifiability_closure.py","scripts/v1824_modern_semantics_media_control.py","scripts/v1826_target_media_dual_object_audit.py","scripts/v1828_semantic_alias_nontransferability_audit.py","tests/test_bitfinex_collector_reconnect_loop.py","tests/test_bitfinex_d1_reconciliation_finality.py","tests/test_bitfinex_reconciliation.py","tests/test_bitfinex_reconciliation_health.py"]} -TASK_RESULT=HOLD_D1_CLEAN_BUT_GLOBAL_UNRESOLVED_RECONCILIATION_BLOCKS_FINAL -HOMELAB_RESULT_CONTRACT={"version":1,"command_id":"SIGNALBOT-260921-RECONCILIATION-UNRESOLVED-RCA-052RCA1","status":"OK","changes_made":false,"rollback_started":false,"rollback_restored":null} +WORKERS2_BACKUP_V2_WRAPPER_TOPOLOGY_BEGIN=1 +COMMAND_ID=SUPPORT-260921-HOMELAB-BACKUP-V2-WRAPPER-TOPOLOGY-READONLY-1010R1 +MODE=read-only +COMPONENT=homelab-backup-v2-wrapper-topology +HOST=pve01 +UID=0 +MUTATION_BOUNDARY=READ_ONLY_NO_FETCH_NO_WRITE_NO_SERVICE_ACTION_NO_BACKUP_NO_RESTORE_NO_RETENTION_NO_DELETE_NO_MAIL +BASELINE_WRAPPER={"bytes":1656,"line_count":26,"path":"/root/homelab-ops-cr-2026-1005/tasks/backup-v2-health-alerting-remediation-v1/assets/baseline/homelab-backup-v2","sha256":"5077444065c732451cb84898680f62361b21a24ef9eb4f191253e82ead524ea2"} +LIVE_WRAPPER={"bytes":1656,"exists":true,"matches_baseline":true,"sha256":"5077444065c732451cb84898680f62361b21a24ef9eb4f191253e82ead524ea2"} +WRAPPER_STRUCTURAL_LINES=[{"line":1,"sha256":"b8e3eb3a9453a6029acccdb951bd492355329b651710c125505dc3bdd93e2dda","text":"#!/usr/bin/python3"},{"line":2,"sha256":"a6284e6d3d43bdfbf0da732945adb2b4f31147c92bea47aee100d7f556c22d00","text":"from __future__ import annotations"},{"line":3,"sha256":"d57b832dfc7acf24f005d35dc8899167b4a24174254f82c3ab1613c6fef08a9c","text":"import hashlib, importlib, os, pathlib, stat, sys"},{"line":4,"sha256":"17400810c4582ee38c329bddfd08f1e890bd051b71d7d96fb9d06a05b0fdd49c","text":"ACCEPTED=pathlib.Path('/opt/homelab-backup-v2/releases/backup-v2-overlay-504r1-ca6876fa9c3b')"},{"line":5,"sha256":"52c13f181fdac27c548266b89ea785484b7332cb2fe88bdc6f3f8a650d808154","text":"EXPECTED={'fresh_lxc_helper.py': 'dbb3e6dbb71b10797df736431d9501a752a0f8c439163c9a0bddb7f76747f011', 'producer_exec_helper.py': 'b3b97099bcd7126670f866e81faae6a42a96d869d9989e6a67f6ea6c871c90b3', 'lxc_adapter.py': '3fa7d194010d76f7c8bc95035ae8876262e9337903e310f45f45df88c266dc8d', 'qemu_adapter.py': '1906db42bd34bbe85eb46fd9797b3572d46e0a41c29d1c29be5f9df5e448f15b', 'scheduler_adapter.py': 'a6f67159a64067773323f028126e3109e15cf17a8142cea5e6129970f1d4da96', 'entry504.py': 'ca6876fa9c3b1465b045344a8ad46962de16972c7dadc4ac6257c7d225047793'}"},{"line":6,"sha256":"53899176cd1c7bf5ff0ed1858bb5559fe73b3f583f503f5e38bde6235585b41b","text":"def sha(p):"},{"line":7,"sha256":"6f05a753872e4a9d008a43f3131f07c93f0cf02ca80dd73628c8706244200664","text":" h=hashlib.sha256()"},{"line":8,"sha256":"30997ff7b356f45d65ef1c5187f82f2e6141f93da71b38c59fe2c4c5e1e7f7d8","text":" with open(p,'rb',buffering=0) as f:"},{"line":9,"sha256":"23658886042f84f880741d8725dcf0154bc118892bc6d91addfdf6e53d5a2cdc","text":" while True:"},{"line":10,"sha256":"1b0070a369fbe1210497b72433a6fb37cf1571221e660d1ea2f4d6bdaa6d85ad","text":" b=f.read(1048576)"},{"line":11,"sha256":"59298bba03fc4a48910e101eba38bd90228cf134c395434b745955b079b40142","text":" if not b: break"},{"line":12,"sha256":"a1ae395f5814ee5b68d9ff0c1c455c562692686f513549d9550a1ca882f04b94","text":" h.update(b)"},{"line":13,"sha256":"d38d3e66a9218f9b7e3565a1a9686e2514d11c0e7dc6e1a888b31bf726b5eabd","text":" return h.hexdigest()"},{"line":14,"sha256":"2c4c5b0ebed3de9b574a3757903571ebf0dcaec6764f9f8d245ce0740a619321","text":"def main():"},{"line":15,"sha256":"8ed597bfa67a39fd3247aa69d60fbf38d6c6eb2c99ba8233b08ad5707acd37d7","text":" st=os.lstat(ACCEPTED)"},{"line":16,"sha256":"418757f9d5c90ddff43aa74e84da536f2a2341be2a15649bc1cea54d5a2f6614","text":" if not stat.S_ISDIR(st.st_mode) or stat.S_ISLNK(st.st_mode) or st.st_uid!=0 or st.st_gid!=0 or stat.S_IMODE(st.st_mode)!=0o500: raise SystemExit('RELEASE_ROOT_IDENTITY')"},{"line":17,"sha256":"d55be1792bbfcb551d4d51970890586be4a5a1da8914179a8b2062694c0e5b5e","text":" names=sorted(p.name for p in ACCEPTED.iterdir())"},{"line":18,"sha256":"e5a3133c28e977c4e9c8167dde7bb65433318db3e99df775b1f1bb647489aad1","text":" if names!=sorted(EXPECTED): raise SystemExit('RELEASE_FILESET')"},{"line":19,"sha256":"fead4124009a37228b983368c62a7d9bc05cdbb43454bcc5caac80217b2905f9","text":" for name,want in EXPECTED.items():"},{"line":20,"sha256":"9f397676d47b0693c062fa93bb3920967e19c945e0dfc6c97b915bd319ceb1b4","text":" p=ACCEPTED/name; s=os.lstat(p)"},{"line":21,"sha256":"77ebd02c8e8b9a86beda5fbd6492917d2d9cd5dbe3dcd6af2cf494615fc01d59","text":" if not stat.S_ISREG(s.st_mode) or stat.S_ISLNK(s.st_mode) or s.st_uid!=0 or s.st_gid!=0 or stat.S_IMODE(s.st_mode)!=0o400 or sha(p)!=want: raise SystemExit('RELEASE_FILE_IDENTITY_'+name)"},{"line":22,"sha256":"620a9fc1637030bd3806385e4d032f1d88f118fab60839cdcd08958ff76347d1","text":" sys.dont_write_bytecode=True"},{"line":23,"sha256":"205047de2556322fcf287fe1a64a3ee1c5f1a6b6d031d7eb1ca3984be8f51cd9","text":" sys.path.insert(0,str(ACCEPTED))"},{"line":24,"sha256":"007cf559e27a685d7242eeae848187802be787058680e8524508ef30d7ca8070","text":" e=importlib.import_module('entry504')"},{"line":25,"sha256":"f89328a065052a0617651ce50185d40cbb3fdf066ce0451fe8ad67e23abe8579","text":" return int(e.main())"},{"line":26,"sha256":"781bcc48cb7af0089f84c37d854593c43723833f0f9bced4c2d02aed0894040b","text":"if __name__=='__main__': raise SystemExit(main())"}] +WRAPPER_ABSOLUTE_PATHS=["/opt/homelab-backup-v2/releases/backup-v2-overlay-504r1-ca6876fa9c3b","/usr/bin/python3"] +WRAPPER_ENV_NAMES=[] +WRAPPER_PY_NAMES=["entry504.py","fresh_lxc_helper.py","lxc_adapter.py","producer_exec_helper.py","qemu_adapter.py","scheduler_adapter.py"] +WRAPPER_SHA256_LITERALS=["1906db42bd34bbe85eb46fd9797b3572d46e0a41c29d1c29be5f9df5e448f15b","3fa7d194010d76f7c8bc95035ae8876262e9337903e310f45f45df88c266dc8d","a6f67159a64067773323f028126e3109e15cf17a8142cea5e6129970f1d4da96","b3b97099bcd7126670f866e81faae6a42a96d869d9989e6a67f6ea6c871c90b3","ca6876fa9c3b1465b045344a8ad46962de16972c7dadc4ac6257c7d225047793","dbb3e6dbb71b10797df736431d9501a752a0f8c439163c9a0bddb7f76747f011"] +ABSOLUTE_PATH_META=[{"bytes":null,"exists":true,"is_dir":true,"is_file":false,"path":"/opt/homelab-backup-v2/releases/backup-v2-overlay-504r1-ca6876fa9c3b","sha256":null},{"bytes":6812336,"exists":true,"is_dir":false,"is_file":true,"path":"/usr/bin/python3","sha256":"17b78e0a93175e86f9ac03141924fd7a7f0c0c52e66b34bfa0de20ffef989df1"}] +SHA_LITERAL_REFERENCE_HITS=[{"hits":[{"bytes":1656,"path":"/usr/local/sbin/homelab-backup-v2","sha256":"5077444065c732451cb84898680f62361b21a24ef9eb4f191253e82ead524ea2"}],"literal":"1906db42bd34bbe85eb46fd9797b3572d46e0a41c29d1c29be5f9df5e448f15b"},{"hits":[{"bytes":1656,"path":"/usr/local/sbin/homelab-backup-v2","sha256":"5077444065c732451cb84898680f62361b21a24ef9eb4f191253e82ead524ea2"}],"literal":"3fa7d194010d76f7c8bc95035ae8876262e9337903e310f45f45df88c266dc8d"},{"hits":[{"bytes":1656,"path":"/usr/local/sbin/homelab-backup-v2","sha256":"5077444065c732451cb84898680f62361b21a24ef9eb4f191253e82ead524ea2"}],"literal":"a6f67159a64067773323f028126e3109e15cf17a8142cea5e6129970f1d4da96"},{"hits":[{"bytes":1656,"path":"/usr/local/sbin/homelab-backup-v2","sha256":"5077444065c732451cb84898680f62361b21a24ef9eb4f191253e82ead524ea2"}],"literal":"b3b97099bcd7126670f866e81faae6a42a96d869d9989e6a67f6ea6c871c90b3"},{"hits":[{"bytes":1656,"path":"/usr/local/sbin/homelab-backup-v2","sha256":"5077444065c732451cb84898680f62361b21a24ef9eb4f191253e82ead524ea2"}],"literal":"ca6876fa9c3b1465b045344a8ad46962de16972c7dadc4ac6257c7d225047793"},{"hits":[{"bytes":1656,"path":"/usr/local/sbin/homelab-backup-v2","sha256":"5077444065c732451cb84898680f62361b21a24ef9eb4f191253e82ead524ea2"}],"literal":"dbb3e6dbb71b10797df736431d9501a752a0f8c439163c9a0bddb7f76747f011"}] +ARCHIVE_CANDIDATES=[] +RUNTIME_NAME_HITS=[{"bytes":1656,"path":"/usr/local/sbin/homelab-backup-v2","sha256":"5077444065c732451cb84898680f62361b21a24ef9eb4f191253e82ead524ea2"}] +NO_MUTATION=true +NO_GIT_FETCH=true +NO_WRITE=true +NO_SERVICE_ACTION=true +NO_BACKUP_STARTED=true +NO_RESTORE_STARTED=true +NO_RETENTION_RUN_STARTED=true +NO_DELETE=true +NO_MAIL_SENT=true +TOPOLOGY_DURATION_SEC=0.047 +TASK_RESULT=PASS_HOMELAB_BACKUP_V2_WRAPPER_TOPOLOGY_READONLY +HOMELAB_RESULT_CONTRACT={"changes_made":false,"command_id":"SUPPORT-260921-HOMELAB-BACKUP-V2-WRAPPER-TOPOLOGY-READONLY-1010R1","rollback_restored":null,"rollback_started":false,"status":"OK","version":1} +WORKERS2_BACKUP_V2_WRAPPER_TOPOLOGY_END=1 OUTPUT_END CHAT_OUTPUT_END