{
  "schema_version": 1,
  "channel": "homelab-runtime",
  "command_id": "HOMELAB-MUTATION-CLOSURE-FORENSIC-FIX2-20260727T164022Z",
  "status": "OK",
  "rc": 0,
  "host": "pve01",
  "mode": "verify",
  "component": "mutation-closure-forensic",
  "started_at_utc": "2026-07-27T16:42:37Z",
  "finished_at_utc": "2026-07-27T16:42:37Z",
  "reference_register_checked": true,
  "reference_sha256": "5763f2f8edc75fcf6f3951f8c95896d1cc112ceccb6cf5b64a383f540a4deb8e",
  "error_register_checked": true,
  "error_register_sha256": "24934a2c7fa5c26f6e828583c4aefac7f143b40c0171736ed7571e617d55ab83",
  "command_sha256": "886574cbeb287526a708cd96da96c9eec91136dd4a11492efad91343bd68f1ea",
  "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": "44df2f482dc40d2f26af8b8192b29186e46a9e099537792292b2928ea234fd4a",
  "sanitized_output_sha256": "44df2f482dc40d2f26af8b8192b29186e46a9e099537792292b2928ea234fd4a",
  "output_truncated_in_json": false,
  "full_sanitized_output_url": "https://git.gram1.ru/.well-known/homelab-runtime/latest.txt",
  "output": "{\"anti_regression\":{\"FORENSIC-AR-001-ALL-TARGET-STATES-LOCATED\":true,\"FORENSIC-AR-002-PAYLOAD-SCHEMA-AND-SHA-VERIFIED\":true,\"FORENSIC-AR-003-WORKER-LOGS-HASHED\":true,\"FORENSIC-AR-004-PUBLIC-AND-RAW-SEPARATED\":true,\"FORENSIC-AR-005-ROLLBACK-ROOT-READ-ONLY-SCANNED\":true,\"FORENSIC-AR-006-LINKED-IDENTITY-EXACT\":true,\"FORENSIC-AR-007-ACTIVE-REFS-EXCLUDE-BACKUPS-TEMP\":true,\"FORENSIC-AR-008-NO-MUTATION\":true},\"backup_changed\":false,\"changes_made\":false,\"cluster_changed\":false,\"command_id\":\"HOMELAB-MUTATION-CLOSURE-FORENSIC-FIX2-20260727T164022Z\",\"diagnostic\":\"MUTATION_CLOSURE_AND_SECOND_RUNNER_FORENSIC\",\"diagnostic_completed\":true,\"gitea_changed\":false,\"missing_targets\":[],\"production_changed\":false,\"read_only\":true,\"rollback_forensics\":{\"files_seen\":23,\"matched_directories\":[{\"directory\":{\"device\":64513,\"executable\":true,\"exists\":true,\"gid\":0,\"inode\":2373848,\"is_symlink\":false,\"mode\":\"0700\",\"path\":\"/var/lib/homelab-change-rollback/ADAPTER-LIFECYCLE-APPLY-20260727\",\"regular\":false,\"resolved\":\"/var/lib/homelab-change-rollback/ADAPTER-LIFECYCLE-APPLY-20260727\",\"size\":4096,\"uid\":0},\"files\":[{\"device\":64513,\"executable\":false,\"exists\":true,\"gid\":0,\"inode\":2373904,\"is_symlink\":false,\"json_facts\":{\"plan_sha256\":\"940d56f6f65c6ac0afd7f57cf034a7627b5d00cd05518a94d4dfbc6dc3e91585\"},\"mode\":\"0600\",\"path\":\"/var/lib/homelab-change-rollback/ADAPTER-LIFECYCLE-APPLY-20260727/metadata.json\",\"regular\":true,\"resolved\":\"/var/lib/homelab-change-rollback/ADAPTER-LIFECYCLE-APPLY-20260727/metadata.json\",\"sha256\":\"ec3fd386647591cb22fccf7176168901d9dbeb18fb5453bb9b82995d0dff79e3\",\"size\":1029,\"uid\":0}]},{\"directory\":{\"device\":64513,\"executable\":true,\"exists\":true,\"gid\":0,\"inode\":2373243,\"is_symlink\":false,\"mode\":\"0700\",\"path\":\"/var/lib/homelab-change-rollback/ADAPTER-RECOVERY-APPLY-FIX1-20260727\",\"regular\":false,\"resolved\":\"/var/lib/homelab-change-rollback/ADAPTER-RECOVERY-APPLY-FIX1-20260727\",\"size\":4096,\"uid\":0},\"files\":[{\"device\":64513,\"executable\":false,\"exists\":true,\"gid\":0,\"inode\":2373831,\"is_symlink\":false,\"json_facts\":{\"plan_sha256\":\"4018541089c67dc0611d8fe3bdaa4689517c140e1a5fbf7ad58efeecab450026\"},\"mode\":\"0600\",\"path\":\"/var/lib/homelab-change-rollback/ADAPTER-RECOVERY-APPLY-FIX1-20260727/metadata.json\",\"regular\":true,\"resolved\":\"/var/lib/homelab-change-rollback/ADAPTER-RECOVERY-APPLY-FIX1-20260727/metadata.json\",\"sha256\":\"0f196712e2883121effe69b4e4be0ccbb38e0fe9be357c7ab5ddb44ca70cb667\",\"size\":1056,\"uid\":0}]},{\"directory\":{\"device\":64513,\"executable\":true,\"exists\":true,\"gid\":990,\"inode\":2374057,\"is_symlink\":false,\"mode\":\"0700\",\"path\":\"/var/lib/homelab-change-rollback/MINIMAL-RESULT-FEED-EMERGENCY-APPLY-20260727T090847Z\",\"regular\":false,\"resolved\":\"/var/lib/homelab-change-rollback/MINIMAL-RESULT-FEED-EMERGENCY-APPLY-20260727T090847Z\",\"size\":4096,\"uid\":0},\"files\":[{\"device\":64513,\"executable\":false,\"exists\":true,\"gid\":990,\"inode\":2374060,\"is_symlink\":false,\"json_facts\":{\"PLAN_SHA256\":\"ce45802551553ab4f5f0cef37d29efcdcb1aae0f19d81ab3ab9430fa5ea9704c\"},\"mode\":\"0600\",\"path\":\"/var/lib/homelab-change-rollback/MINIMAL-RESULT-FEED-EMERGENCY-APPLY-20260727T090847Z/plan.json\",\"regular\":true,\"resolved\":\"/var/lib/homelab-change-rollback/MINIMAL-RESULT-FEED-EMERGENCY-APPLY-20260727T090847Z/plan.json\",\"sha256\":\"13b1bd4f98939b222e09e3d3d780e000c1f06d22cd2e41d17e12e62a89e44db6\",\"size\":1013,\"uid\":0},{\"device\":64513,\"executable\":true,\"exists\":true,\"gid\":990,\"inode\":2374058,\"is_symlink\":false,\"mode\":\"0750\",\"path\":\"/var/lib/homelab-change-rollback/MINIMAL-RESULT-FEED-EMERGENCY-APPLY-20260727T090847Z/homelab-command-adapter\",\"regular\":true,\"resolved\":\"/var/lib/homelab-change-rollback/MINIMAL-RESULT-FEED-EMERGENCY-APPLY-20260727T090847Z/homelab-command-adapter\",\"sha256\":\"8d0af84dcfcf6ddbfd1c4e6cbb059cef66b4cfc6c75bfd66da649acc229c7f5e\",\"size\":79938,\"uid\":0},{\"device\":64513,\"executable\":true,\"exists\":true,\"gid\":990,\"inode\":2374059,\"is_symlink\":false,\"mode\":\"0750\",\"path\":\"/var/lib/homelab-change-rollback/MINIMAL-RESULT-FEED-EMERGENCY-APPLY-20260727T090847Z/homelab-command-portal\",\"regular\":true,\"resolved\":\"/var/lib/homelab-change-rollback/MINIMAL-RESULT-FEED-EMERGENCY-APPLY-20260727T090847Z/homelab-command-portal\",\"sha256\":\"8056faf4ef6348f0b06319ad3c49fbfeeadf25b6370f857ea19569bd27652ee2\",\"size\":39362,\"uid\":0}]},{\"directory\":{\"device\":64513,\"executable\":true,\"exists\":true,\"gid\":0,\"inode\":2374039,\"is_symlink\":false,\"mode\":\"0700\",\"path\":\"/var/lib/homelab-change-rollback/MINIMAL-RESULT-FEED-EMERGENCY-APPLY-20260727T093554Z\",\"regular\":false,\"resolved\":\"/var/lib/homelab-change-rollback/MINIMAL-RESULT-FEED-EMERGENCY-APPLY-20260727T093554Z\",\"size\":4096,\"uid\":0},\"files\":[{\"device\":64513,\"executable\":false,\"exists\":true,\"gid\":0,\"inode\":2374065,\"is_symlink\":false,\"json_facts\":{\"PLAN_SHA256\":\"ce45802551553ab4f5f0cef37d29efcdcb1aae0f19d81ab3ab9430fa5ea9704c\"},\"mode\":\"0600\",\"path\":\"/var/lib/homelab-change-rollback/MINIMAL-RESULT-FEED-EMERGENCY-APPLY-20260727T093554Z/plan.json\",\"regular\":true,\"resolved\":\"/var/lib/homelab-change-rollback/MINIMAL-RESULT-FEED-EMERGENCY-APPLY-20260727T093554Z/plan.json\",\"sha256\":\"13b1bd4f98939b222e09e3d3d780e000c1f06d22cd2e41d17e12e62a89e44db6\",\"size\":1013,\"uid\":0},{\"device\":64513,\"executable\":true,\"exists\":true,\"gid\":0,\"inode\":2374055,\"is_symlink\":false,\"mode\":\"0755\",\"path\":\"/var/lib/homelab-change-rollback/MINIMAL-RESULT-FEED-EMERGENCY-APPLY-20260727T093554Z/homelab-command-adapter\",\"regular\":true,\"resolved\":\"/var/lib/homelab-change-rollback/MINIMAL-RESULT-FEED-EMERGENCY-APPLY-20260727T093554Z/homelab-command-adapter\",\"sha256\":\"8d0af84dcfcf6ddbfd1c4e6cbb059cef66b4cfc6c75bfd66da649acc229c7f5e\",\"size\":79938,\"uid\":0},{\"device\":64513,\"executable\":false,\"exists\":true,\"gid\":0,\"inode\":2373060,\"is_symlink\":false,\"json_facts\":{\"PLAN_SHA256\":\"ce45802551553ab4f5f0cef37d29efcdcb1aae0f19d81ab3ab9430fa5ea9704c\",\"changes_made\":true,\"rollback_started\":false,\"status\":\"OK\"},\"mode\":\"0600\",\"path\":\"/var/lib/homelab-change-rollback/MINIMAL-RESULT-FEED-EMERGENCY-APPLY-20260727T093554Z/apply-report.json\",\"regular\":true,\"resolved\":\"/var/lib/homelab-change-rollback/MINIMAL-RESULT-FEED-EMERGENCY-APPLY-20260727T093554Z/apply-report.json\",\"sha256\":\"297b1771bd231defa9d1fa4360c5f563f26cd2bcb84ddd55c26bfa9c37ae3091\",\"size\":911,\"uid\":0},{\"device\":64513,\"executable\":true,\"exists\":true,\"gid\":0,\"inode\":2374062,\"is_symlink\":false,\"mode\":\"0755\",\"path\":\"/var/lib/homelab-change-rollback/MINIMAL-RESULT-FEED-EMERGENCY-APPLY-20260727T093554Z/homelab-command-portal\",\"regular\":true,\"resolved\":\"/var/lib/homelab-change-rollback/MINIMAL-RESULT-FEED-EMERGENCY-APPLY-20260727T093554Z/homelab-command-portal\",\"sha256\":\"8056faf4ef6348f0b06319ad3c49fbfeeadf25b6370f857ea19569bd27652ee2\",\"size\":39362,\"uid\":0}]},{\"directory\":{\"device\":64513,\"executable\":true,\"exists\":true,\"gid\":0,\"inode\":2374031,\"is_symlink\":false,\"mode\":\"0700\",\"path\":\"/var/lib/homelab-change-rollback/PORTAL-RESULT-FEED-ALIAS-20260727T101120Z\",\"regular\":false,\"resolved\":\"/var/lib/homelab-change-rollback/PORTAL-RESULT-FEED-ALIAS-20260727T101120Z\",\"size\":4096,\"uid\":0},\"files\":[{\"device\":64513,\"executable\":false,\"exists\":true,\"gid\":0,\"inode\":2374079,\"is_symlink\":false,\"json_facts\":{\"plan_sha256\":\"5672ff00eaf567eba7463c9b10b612ab2ba459752c3acaf499892a070941fb45\",\"source_sha256\":\"493eed48b5ed23b77ea3f554e8264438c0aea91744efb98363a325b4548b179b\",\"target_sha256\":\"97c69bd4fccf7272dadc911281c1503f411bae2dc11dac4b22b87f33d678ae52\"},\"mode\":\"0600\",\"path\":\"/var/lib/homelab-change-rollback/PORTAL-RESULT-FEED-ALIAS-20260727T101120Z/plan.json\",\"regular\":true,\"resolved\":\"/var/lib/homelab-change-rollback/PORTAL-RESULT-FEED-ALIAS-20260727T101120Z/plan.json\",\"sha256\":\"c01c0525bd8fa1ed169d1acae555f50fe6c591bcc13335160c0820f8515d631e\",\"size\":905,\"uid\":0}]},{\"directory\":{\"device\":64513,\"executable\":true,\"exists\":true,\"gid\":0,\"inode\":2373887,\"is_symlink\":false,\"mode\":\"0700\",\"path\":\"/var/lib/homelab-change-rollback/RUNNER-ADAPTER-PAIR-APPLY-20260727\",\"regular\":false,\"resolved\":\"/var/lib/homelab-change-rollback/RUNNER-ADAPTER-PAIR-APPLY-20260727\",\"size\":4096,\"uid\":0},\"files\":[{\"device\":64513,\"executable\":false,\"exists\":true,\"gid\":0,\"inode\":2373891,\"is_symlink\":false,\"json_facts\":{\"plan_sha256\":\"a4662969765895626989038cd231e47f7fe3f80b9fbd1b85e0fcb64881821d3f\"},\"mode\":\"0600\",\"path\":\"/var/lib/homelab-change-rollback/RUNNER-ADAPTER-PAIR-APPLY-20260727/metadata.json\",\"regular\":true,\"resolved\":\"/var/lib/homelab-change-rollback/RUNNER-ADAPTER-PAIR-APPLY-20260727/metadata.json\",\"sha256\":\"1383dc03bd940525464cb2dd9429b0b0e94bccc4e9b00c80dfb06e1b60ca186b\",\"size\":1595,\"uid\":0}]},{\"directory\":{\"device\":64513,\"executable\":true,\"exists\":true,\"gid\":0,\"inode\":2373863,\"is_symlink\":false,\"mode\":\"0700\",\"path\":\"/var/lib/homelab-change-rollback/RUNNER-MUTATION-CONTRACT-APPLY-20260726T205715Z\",\"regular\":false,\"resolved\":\"/var/lib/homelab-change-rollback/RUNNER-MUTATION-CONTRACT-APPLY-20260726T205715Z\",\"size\":4096,\"uid\":0},\"files\":[{\"device\":64513,\"executable\":false,\"exists\":true,\"gid\":0,\"inode\":2373865,\"is_symlink\":false,\"json_facts\":{\"plan_sha256\":\"22eedf9b1090960a7f92cef992f481d8d6cc3f42e4f4ecd6e27bbda4ebf752bd\",\"source_sha256\":\"2a88defef9517f89bc60934dce82097f8e316b08af9417e95167ea5d759a10d9\",\"target_sha256\":\"b248a4c32c9cc64e5747e7dce6c7fc0a23f5124a77c71ce72e27a81aceae9d2d\"},\"mode\":\"0600\",\"path\":\"/var/lib/homelab-change-rollback/RUNNER-MUTATION-CONTRACT-APPLY-20260726T205715Z/metadata.json\",\"regular\":true,\"resolved\":\"/var/lib/homelab-change-rollback/RUNNER-MUTATION-CONTRACT-APPLY-20260726T205715Z/metadata.json\",\"sha256\":\"d93828f83ef5789d779e779303fbdcff147ffb020844f610d471ce0b21e726c6\",\"size\":819,\"uid\":0},{\"device\":64513,\"executable\":false,\"exists\":true,\"gid\":0,\"inode\":2373864,\"is_symlink\":false,\"mode\":\"0600\",\"path\":\"/var/lib/homelab-change-rollback/RUNNER-MUTATION-CONTRACT-APPLY-20260726T205715Z/homelab-chat-run.rollback\",\"regular\":true,\"resolved\":\"/var/lib/homelab-change-rollback/RUNNER-MUTATION-CONTRACT-APPLY-20260726T205715Z/homelab-chat-run.rollback\",\"sha256\":\"2a88defef9517f89bc60934dce82097f8e316b08af9417e95167ea5d759a10d9\",\"size\":11864,\"uid\":0}]}],\"root_exists\":true,\"scan_limits\":{\"max_files\":5000,\"max_text_file_bytes\":2097152,\"max_top_directories\":1000}},\"rollback_started\":false,\"schema\":1,\"second_runner\":{\"active_config_references\":[],\"active_process_references\":[],\"canonical\":{\"device\":64513,\"executable\":true,\"exists\":true,\"gid\":0,\"inode\":5148538,\"is_symlink\":false,\"mode\":\"0750\",\"path\":\"/usr/local/sbin/homelab-chat-run\",\"regular\":true,\"resolved\":\"/usr/local/sbin/homelab-chat-run\",\"sha256\":\"b248a4c32c9cc64e5747e7dce6c7fc0a23f5124a77c71ce72e27a81aceae9d2d\",\"size\":21321,\"uid\":0},\"distinct_executable\":true,\"linked\":{\"content_available\":true,\"content_sanitized\":\"#!/usr/bin/env bash\\nset -o pipefail\\ntmp=$(/usr/bin/mktemp)\\ntrap '/usr/bin/rm -f \\\"$tmp\\\"' EXIT\\n\\n/usr/local/sbin/homelab-chat-run \\\"$@\\\" 2>&1 | /usr/bin/tee \\\"$tmp\\\"\\nrc=${PIPESTATUS[0]}\\n\\ncid=$(/usr/bin/sed -n \\\"s/^COMMAND_ID=//p\\\" \\\"$tmp\\\" | /usr/bin/tail -n 1)\\nsha=$(/usr/bin/sed -n \\\"s/^COMMIT_SHA=//p\\\" \\\"$tmp\\\" | /usr/bin/tail -n 1)\\nraw=$(/usr/bin/sed -n \\\"s/^LOCAL_RAW_FILE=//p\\\" \\\"$tmp\\\" | /usr/bin/tail -n 1)\\n\\nif [[ \\\"$cid\\\" =~ ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$ && \\\"$sha\\\" =~ ^[0-9a-f]{40}$ ]]; then\\n    /usr/bin/printf \\\"COMMIT_URL=https://git.gram1.ru/homelab-admin/homelab-public-context/commit/%s\\\\n\\\" \\\"$sha\\\"\\n    /usr/bin/printf \\\"IMMUTABLE_RESULT_URL=https://git.gram1.[LONG_TOKEN_REDACTED]%s/runtime/history/%s.txt\\\\n\\\" \\\"$sha\\\" \\\"$cid\\\"\\nfi\\n\\n# HOMELAB_READER_RESULT_FEED_V1\\nfeed_rc=0\\nif [[ \\\"$cid\\\" =~ ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$ && \\\"$sha\\\" =~ ^[0-9a-f]{40}$ && -n \\\"$raw\\\" && -r \\\"$raw\\\" ]]; then\\n    if feed_out=$(/usr/local/sbin/homelab-reader-result-publish \\\"$cid\\\" \\\"$sha\\\" \\\"$tmp\\\" \\\"$raw\\\" \\\"$rc\\\" 2>&1); then\\n        /usr/bin/printf \\\"%s\\\\n\\\" \\\"$feed_out\\\"\\n    else\\n        feed_rc=$?\\n        /usr/bin/printf \\\"RESULT_FEED_PUBLICATION=FAIL\\\\n\\\"\\n        /usr/bin/printf \\\"RESULT_FEED_PUBLISHER_RC=%s\\\\n\\\" \\\"$feed_rc\\\"\\n        /usr/bin/printf \\\"%s\\\\n\\\" \\\"$feed_out\\\" | /usr/bin/tail -n 20\\n    fi\\nelse\\n    /usr/bin/printf \\\"RESULT_FEED_PUBLICATION=SKIPPED_INVALID_INPUT\\\\n\\\"\\nfi\\n\\n/usr/bin/printf \\\"FAILURE_DIAGNOSTIC_BEGIN\\\\n\\\"\\nif [[ -n \\\"$raw\\\" && -r \\\"$raw\\\" ]]; then\\n    /usr/bin/grep -Ei '^(DECISION|DETAIL|FAILURE_REASON|ERROR_CODE|SOURCE_DECISION|NGINX_[A-Z0-9_]*|READER_[A-Z0-9_]*|RESULT_FEED_URL|PUBLIC_HEALTH_URL|HTTPS_[A-Z0-9_]*|LOCAL_[A-Z0-9_]*|CHANGES_MADE)=|Traceback|RuntimeError|SystemExit|FileNotFoundError|PermissionError|command not found|No such file or directory|Connection refused|failed|invalid|missing' \\\"$raw\\\" | /usr/bin/tail -n 100 || true\\nfi\\n/usr/bin/printf \\\"FAILURE_DIAGNOSTIC_END\\\\n\\\"\\n\\nexit \\\"$rc\\\"\\n\",\"device\":64513,\"executable\":true,\"exists\":true,\"gid\":0,\"inode\":5148536,\"is_symlink\":false,\"line_count\":39,\"mentions_canonical\":true,\"mentions_linked\":false,\"mode\":\"0755\",\"path\":\"/usr/local/sbin/homelab-chat-run-linked\",\"regular\":true,\"resolved\":\"/usr/local/sbin/homelab-chat-run-linked\",\"sha256\":\"5e8725e129fd2055b36fe2fae13fc95fc4b3271074a0e0d4bb7347e7b2f270a1\",\"size\":1901,\"uid\":0},\"safe_to_plan_removal_candidate\":true},\"source_locks\":{\"/etc/systemd/system/homelab-command-adapter.service\":{\"device\":64513,\"executable\":false,\"exists\":true,\"gid\":0,\"inode\":4982677,\"is_symlink\":false,\"mode\":\"0644\",\"path\":\"/etc/systemd/system/homelab-command-adapter.service\",\"regular\":true,\"resolved\":\"/etc/systemd/system/homelab-command-adapter.service\",\"sha256\":\"74d0f37878652ed9d46b53ae8556bbb30ebd683741f293c3f59b3527876ed2d7\",\"size\":665,\"uid\":0},\"/etc/systemd/system/homelab-command-portal.service\":{\"device\":64513,\"executable\":false,\"exists\":true,\"gid\":0,\"inode\":4982830,\"is_symlink\":false,\"mode\":\"0644\",\"path\":\"/etc/systemd/system/homelab-command-portal.service\",\"regular\":true,\"resolved\":\"/etc/systemd/system/homelab-command-portal.service\",\"sha256\":\"8453eab30f5c3ccd285fc9f70fff18f564809bb27f7bf84f51f2ba593aa85263\",\"size\":981,\"uid\":0},\"/etc/systemd/system/homelab-result-lookup.service\":{\"device\":64513,\"executable\":false,\"exists\":true,\"gid\":0,\"inode\":4997316,\"is_symlink\":false,\"mode\":\"0644\",\"path\":\"/etc/systemd/system/homelab-result-lookup.service\",\"regular\":true,\"resolved\":\"/etc/systemd/system/homelab-result-lookup.service\",\"sha256\":\"4bcc607fd457313f75373ec3d8ec20e7020f13c7cb8a9523fd988a24b0f6609d\",\"size\":785,\"uid\":0},\"/usr/local/sbin/homelab-chat-run\":{\"device\":64513,\"executable\":true,\"exists\":true,\"gid\":0,\"inode\":5148538,\"is_symlink\":false,\"mode\":\"0750\",\"path\":\"/usr/local/sbin/homelab-chat-run\",\"regular\":true,\"resolved\":\"/usr/local/sbin/homelab-chat-run\",\"sha256\":\"b248a4c32c9cc64e5747e7dce6c7fc0a23f5124a77c71ce72e27a81aceae9d2d\",\"size\":21321,\"uid\":0},\"/usr/local/sbin/homelab-chat-run-linked\":{\"device\":64513,\"executable\":true,\"exists\":true,\"gid\":0,\"inode\":5148536,\"is_symlink\":false,\"mode\":\"0755\",\"path\":\"/usr/local/sbin/homelab-chat-run-linked\",\"regular\":true,\"resolved\":\"/usr/local/sbin/homelab-chat-run-linked\",\"sha256\":\"5e8725e129fd2055b36fe2fae13fc95fc4b3271074a0e0d4bb7347e7b2f270a1\",\"size\":1901,\"uid\":0},\"/usr/local/sbin/homelab-command-adapter\":{\"device\":64513,\"executable\":true,\"exists\":true,\"gid\":0,\"inode\":5148537,\"is_symlink\":false,\"mode\":\"0755\",\"path\":\"/usr/local/sbin/homelab-command-adapter\",\"regular\":true,\"resolved\":\"/usr/local/sbin/homelab-command-adapter\",\"sha256\":\"a1a7a615c99568bf915d084cc476f0ebf54ab0eedf3ecd578c4b0e072f58c43d\",\"size\":86019,\"uid\":0},\"/usr/local/sbin/homelab-command-portal\":{\"device\":64513,\"executable\":true,\"exists\":true,\"gid\":0,\"inode\":5148541,\"is_symlink\":false,\"mode\":\"0755\",\"path\":\"/usr/local/sbin/homelab-command-portal\",\"regular\":true,\"resolved\":\"/usr/local/sbin/homelab-command-portal\",\"sha256\":\"97c69bd4fccf7272dadc911281c1503f411bae2dc11dac4b22b87f33d678ae52\",\"size\":39936,\"uid\":0},\"/usr/local/sbin/homelab-result-lookup\":{\"device\":64513,\"executable\":true,\"exists\":true,\"gid\":0,\"inode\":5148539,\"is_symlink\":false,\"mode\":\"0755\",\"path\":\"/usr/local/sbin/homelab-result-lookup\",\"regular\":true,\"resolved\":\"/usr/local/sbin/homelab-result-lookup\",\"sha256\":\"17f8d2a2ea219cdc02b0f8e821f8054b05c01de1253419b3d23349a2d383889c\",\"size\":12083,\"uid\":0}},\"status\":\"OK\",\"target\":\"pve01\",\"target_states\":{\"MINIMAL-RESULT-FEED-EMERGENCY-APPLY-20260727T090755Z\":{\"capsule_file\":{\"device\":64513,\"executable\":false,\"exists\":true,\"gid\":990,\"inode\":2374051,\"is_symlink\":false,\"mode\":\"0600\",\"path\":\"/var/lib/homelab-command-adapter/capsules/0d7f18443ac0132c693f1b16a72dd7ce5385cd21bf00932a562ee62768133a5d/capsule.hcmd\",\"regular\":true,\"resolved\":\"/var/lib/homelab-command-adapter/capsules/0d7f18443ac0132c693f1b16a72dd7ce5385cd21bf00932a562ee62768133a5d/capsule.hcmd\",\"sha256\":\"0d7f18443ac0132c693f1b16a72dd7ce5385cd21bf00932a562ee62768133a5d\",\"size\":41135,\"uid\":0},\"manifest_facts\":{\"change_flags\":{\"backup\":false,\"cluster\":false,\"gitea\":false,\"production\":true},\"component\":\"result-integration\",\"mode\":\"change\",\"payload\":[{\"bytes\":29442,\"mode\":\"0700\",\"path\":\"apply_minimal_result_feed.py\",\"sha256\":\"8c80470ef84b03766b23a96bfb4e31dce7c54dd772899add65a71a748efd62d7\"}],\"risk\":\"REVERSIBLE\",\"rollback\":{\"available\":true,\"description\":\"Свежие точные копии Adapter и Portal создаются до остановки сервисов. При провале постусловий сначала собирается диагностика, затем оба файла атомарно восстанавливаются и сервисы проверяются.\"}},\"payload_analysis\":{\"items\":[{\"actual_sha256\":\"8c80470ef84b03766b23a96bfb4e31dce7c54dd772899add65a71a748efd62d7\",\"all_sha256_literals\":[\"8056faf4ef6348f0b06319ad3c49fbfeeadf25b6370f857ea19569bd27652ee2\",\"8d0af84dcfcf6ddbfd1c4e6cbb059cef66b4cfc6c75bfd66da649acc229c7f5e\",\"97a6dc8d4353d4f414a2c6eab15ceb2f6f8344c1f15265673cbbc62fe735155b\",\"b248a4c32c9cc64e5747e7dce6c7fc0a23f5124a77c71ce72e27a81aceae9d2d\"],\"ast_valid\":true,\"bytes\":29442,\"contains_plan_sha256_symbol\":true,\"contains_result_contract\":true,\"declared_sha256\":\"8c80470ef84b03766b23a96bfb4e31dce7c54dd772899add65a71a748efd62d7\",\"decode_ok\":true,\"index\":0,\"line_count\":816,\"marker_lines\":[\"133:    changes_made = state.get(\\\"changes_made\\\")\",\"134:    if not isinstance(changes_made, bool):\",\"135:        changes_made = None\",\"137:    rollback_started = state.get(\",\"138:        \\\"rollback_started\\\"\",\"140:    if not isinstance(rollback_started, bool):\",\"141:        rollback_started = None\",\"174:        \\\"changes_made\\\": changes_made,\",\"175:        \\\"rollback_started\\\": rollback_started,\",\"393:        '/usr/bin/systemctl', 'show', unit, '--no-pager',\",\"503:            'changes_made': False, 'rollback_started': False,\",\"511:            'changes_made': False, 'rollback_started': False,\",\"602:def save_diagnostics(rollback_dir: pathlib.Path, reason: str) -> None:\",\"603:    diagnostic = rollback_dir / 'diagnostics-before-rollback.txt'\",\"606:        show = run(['/usr/bin/systemctl', 'show', unit, '--no-pager'], timeout=20)\",\"616:def restore(rollback_dir: pathlib.Path) -> None:\",\"617:    run(['/usr/bin/systemctl', 'stop', 'homelab-command-portal.service'], timeout=30)\",\"618:    run(['/usr/bin/systemctl', 'stop', 'homelab-command-adapter.service'], timeout=30)\",\"619:    for live, backup in ((ADAPTER, rollback_dir / ADAPTER.name), (PORTAL, rollback_dir / PORTAL.name)):\",\"620:        temp = live.parent / f'.{live.name}.rollback.{os.getpid()}'\",\"621:        shutil.copy2(backup, temp)\",\"624:        os.replace(temp, live)\",\"625:    run(['/usr/bin/systemctl', 'start', 'homelab-command-adapter.service'], timeout=30, check=True)\",\"627:    run(['/usr/bin/systemctl', 'start', 'homelab-command-portal.service'], timeout=30, check=True)\",\"633:    changes_made: bool,\",\"634:    rollback_started: bool,\",\"635:    rollback_restored: bool | None,\",\"638:        \\\"HOMELAB_RESULT_CONTRACT=\\\"\",\"644:                \\\"changes_made\\\": changes_made,\",\"645:                \\\"rollback_started\\\": rollback_started,\",\"646:                \\\"rollback_restored\\\": rollback_restored,\",\"706:        'rollback': True,\",\"709:    print(f'PLAN_SHA256={plan_sha}')\",\"712:    rollback_root = pathlib.Path('/var/lib/homelab-change-rollback')\",\"713:    rollback_root.mkdir(parents=True, exist_ok=True)\",\"715:    rollback_dir = rollback_root / f'MINIMAL-RESULT-FEED-EMERGENCY-APPLY-{stamp}'\",\"716:    rollback_dir.mkdir(mode=0o700)\",\"717:    shutil.copy2(ADAPTER, rollback_dir / ADAPTER.name)\",\"718:    shutil.copy2(PORTAL, rollback_dir / PORTAL.name)\",\"719:    (rollback_dir / 'plan.json').write_text(json.dumps({'PLAN_SHA256': plan_sha, 'plan': plan}, ensure_ascii=False, sort_keys=True, indent=2), encoding='utf-8')\",\"720:    os.chmod(rollback_dir / 'plan.json', 0o600)\",\"736:        run(['/usr/bin/systemctl', 'stop', 'homelab-command-portal.service'], timeout=30, check=True)\",\"737:        run(['/usr/bin/systemctl', 'stop', 'homelab-command-adapter.service'], timeout=30, check=True)\",\"738:        os.replace(adapter_temp, ADAPTER)\",\"739:        os.replace(portal_temp, PORTAL)\",\"747:        run(['/usr/bin/systemctl', 'start', 'homelab-command-adapter.service'], timeout=30, check=True)\",\"749:        run(['/usr/bin/systemctl', 'start', 'homelab-command-portal.service'], timeout=30, check=True)\",\"767:            'PLAN_SHA256': plan_sha,\",\"772:            'rollback_dir': str(rollback_dir),\",\"773:            'changes_made': True,\",\"774:            'rollback_started': False,\",\"777:        (rollback_dir / 'apply-report.json').write_text(json.dumps(report, ensure_ascii=False, sort_keys=True, indent=2), encoding='utf-8')\",\"778:        os.chmod(rollback_dir / 'apply-report.json', 0o600)\",\"786:        print(f'ROLLBACK_DIR={rollback_dir}')\",\"790:            save_diagnostics(rollback_dir, f'{type(exc).__name__}: {exc}')\",\"791:            restore(rollback_dir)\",\"797:            print(f'ROLLBACK_DIR={rollback_dir}')\",\"803:                temp.unlink()\"],\"mode\":\"0700\",\"mutation_calls\":{\"WORK_DIR.mkdir\":1,\"adapter_path.write_text\":1,\"adapter_temp.write_text\":1,\"diagnostic.write_text\":1,\"os.chmod\":5,\"os.chown\":2,\"os.replace\":3,\"portal_path.write_text\":1,\"portal_temp.write_text\":1,\"replace\":1,\"rollback_dir.mkdir\":1,\"rollback_root.mkdir\":1,\"shutil.copy2\":3,\"source.replace\":2,\"temp.unlink\":1,\"test_state_dir.mkdir\":1,\"write_text\":3},\"path\":\"apply_minimal_result_feed.py\",\"schema_exact\":true,\"sha_match\":true,\"systemctl_actions\":[\"start\",\"stop\"]}],\"payload_valid\":true},\"public_results\":[],\"raw_results\":[],\"state_facts\":{\"capsule_sha256\":\"0d7f18443ac0132c693f1b16a72dd7ce5385cd21bf00932a562ee62768133a5d\",\"changes_made\":null,\"error_message_sha256\":\"01626831c30f18bef5e5621858387d988cf0edb83c6ba723ebc0e7081b38a91a\",\"error_stage\":null,\"error_type\":\"InterruptedExecution\",\"evidence_sha256\":null,\"finished_at_utc\":\"2026-07-27T09:11:52.964315+00:00\",\"gateway_verified\":null,\"imported_at_utc\":\"2026-07-27T09:08:40.761423+00:00\",\"mutation_outcome\":null,\"rollback_restored\":null,\"rollback_started\":null,\"runner_document_rc\":null,\"runner_rc\":null,\"runner_status\":null,\"runner_wrapper_matches_document\":null,\"short_id\":\"BV7RQRB2YA\",\"started_at_utc\":\"2026-07-27T09:08:46.908375+00:00\",\"status\":\"FAIL\",\"worker_pid\":1544362},\"state_file\":{\"device\":64513,\"executable\":false,\"exists\":true,\"gid\":990,\"inode\":2374061,\"is_symlink\":false,\"mode\":\"0640\",\"path\":\"/var/lib/homelab-command-adapter/state/BV7RQRB2YA.json\",\"regular\":true,\"resolved\":\"/var/lib/homelab-command-adapter/state/BV7RQRB2YA.json\",\"sha256\":\"a84b2520927f498a9289ec19fcef83ce01e74ac6d9d29ce2e66de234d311e819\",\"size\":3844,\"uid\":0},\"worker_log\":{\"device\":64513,\"executable\":false,\"exists\":true,\"gid\":990,\"inode\":2374027,\"is_symlink\":false,\"mode\":\"0640\",\"path\":\"/var/lib/homelab-command-adapter/runs/BV7RQRB2YA.worker.log\",\"regular\":true,\"resolved\":\"/var/lib/homelab-command-adapter/runs/BV7RQRB2YA.worker.log\",\"selected_lines\":[],\"sha256\":\"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\",\"size\":0,\"uid\":0},\"worker_process\":{\"pid\":1544362,\"proc_exists\":false}},\"RUNNER-LINKED-REMOVAL-APPLY-20260726T202107Z\":{\"capsule_file\":{\"device\":64513,\"executable\":false,\"exists\":true,\"gid\":990,\"inode\":2373807,\"is_symlink\":false,\"mode\":\"0600\",\"path\":\"/var/lib/homelab-command-adapter/capsules/ba4a8e897dff0a4e5b9e77d2d769551041a45ebcdbb285bd753febfa721f8d0d/capsule.hcmd\",\"regular\":true,\"resolved\":\"/var/lib/homelab-command-adapter/capsules/ba4a8e897dff0a4e5b9e77d2d769551041a45ebcdbb285bd753febfa721f8d0d/capsule.hcmd\",\"sha256\":\"ba4a8e897dff0a4e5b9e77d2d769551041a45ebcdbb285bd753febfa721f8d0d\",\"size\":27283,\"uid\":0},\"manifest_facts\":{\"change_flags\":{\"backup\":false,\"cluster\":false,\"gitea\":false,\"production\":true},\"component\":\"runner\",\"mode\":\"change\",\"payload\":[{\"bytes\":19557,\"mode\":\"0700\",\"path\":\"apply.py\",\"sha256\":\"98fad507d6539cf41dd7a491cf599d1af7bf1be353066315e833291fa98f9ef7\"}],\"risk\":\"REVERSIBLE\",\"rollback\":{\"available\":true,\"description\":\"Exact SHA-verified mode-0600 rollback copy before removal; diagnostics before atomic restore on failed postcondition.\"}},\"payload_analysis\":{\"items\":[{\"actual_sha256\":\"98fad507d6539cf41dd7a491cf599d1af7bf1be353066315e833291fa98f9ef7\",\"all_sha256_literals\":[\"2a88defef9517f89bc60934dce82097f8e316b08af9417e95167ea5d759a10d9\",\"48c056521382e38a280c1ead171c4906c5a42465526aff459cb1c0053ac2c7a1\",\"5e8725e129fd2055b36fe2fae13fc95fc4b3271074a0e0d4bb7347e7b2f270a1\",\"74d0f37878652ed9d46b53ae8556bbb30ebd683741f293c3f59b3527876ed2d7\",\"8056faf4ef6348f0b06319ad3c49fbfeeadf25b6370f857ea19569bd27652ee2\",\"8453eab30f5c3ccd285fc9f70fff18f564809bb27f7bf84f51f2ba593aa85263\",\"8cb775587817330dd12296c2f17665110353bcd090330d9bef36e4b61a23541e\",\"98faa546f7a612f0d1f439d637c1293355371592afbcadf6cae0ee05b3552ef8\",\"dfb769b991c2f8d60879b29e258a6d09f07f900cf3bfe0f12632d68314c66e0e\",\"f2410cd328e2837b99e8ce4a28e25cb031a6bdd596d0286ac77a1822ef1cecd0\",\"fc444570ebc55232fa3cedc9dbe6f0feedd1eba0d1563a88d990739a9ca3ee97\"],\"ast_valid\":true,\"bytes\":19557,\"contains_plan_sha256_symbol\":true,\"contains_result_contract\":false,\"declared_sha256\":\"98fad507d6539cf41dd7a491cf599d1af7bf1be353066315e833291fa98f9ef7\",\"decode_ok\":true,\"index\":0,\"line_count\":568,\"marker_lines\":[\"16:PLAN_SHA256 = \\\"[LONG_TOKEN_REDACTED]\\\"\",\"23:    \\\"plan_sha256\\\": PLAN_SHA256,\",\"32:ROLLBACK_ROOT = pathlib.Path(\\\"/var/lib/homelab-change-rollback\\\")\",\"135:        \\\"/usr/bin/systemctl\\\", \\\"show\\\", name, \\\"--no-pager\\\",\",\"329:def make_rollback() -> dict[str, Any]:\",\"331:    rollback_dir = ROLLBACK_ROOT / COMMAND_ID\",\"332:    rollback_dir.mkdir(parents=True, mode=0o700, exist_ok=False)\",\"333:    os.chmod(rollback_dir, 0o700)\",\"335:    copy_path = rollback_dir / \\\"homelab-chat-run-linked.rollback\\\"\",\"336:    metadata_path = rollback_dir / \\\"metadata.json\\\"\",\"339:    fd, temp_name = tempfile.mkstemp(prefix=\\\".copy.\\\", dir=str(rollback_dir))\",\"347:        os.replace(temp_path, copy_path)\",\"349:        temp_path.unlink(missing_ok=True)\",\"358:        \\\"plan_sha256\\\": PLAN_SHA256,\",\"365:    fsync_dir(rollback_dir)\",\"368:        raise RuntimeError(\\\"rollback SHA mismatch\\\")\",\"370:        raise RuntimeError(\\\"rollback mode mismatch\\\")\",\"373:        \\\"dir\\\": rollback_dir,\",\"380:def remove_linked() -> None:\",\"381:    LINKED.unlink()\",\"385:def restore_linked(rollback: dict[str, Any]) -> bool:\",\"386:    copy_path = pathlib.Path(rollback[\\\"copy\\\"])\",\"396:        os.chmod(temp_path, int(rollback[\\\"mode\\\"]))\",\"398:            os.chown(temp_path, int(rollback[\\\"uid\\\"]), int(rollback[\\\"gid\\\"]))\",\"401:            ns=(int(rollback[\\\"atime_ns\\\"]), int(rollback[\\\"mtime_ns\\\"])),\",\"403:        os.replace(temp_path, LINKED)\",\"405:        temp_path.unlink(missing_ok=True)\",\"450:        \\\"plan_bound\\\": PLAN_SOURCE[\\\"plan_sha256\\\"] == PLAN_SHA256,\",\"476:            \\\"PLAN_SHA256\\\": PLAN_SHA256,\",\"478:            \\\"changes_made\\\": False,\",\"479:            \\\"rollback_started\\\": False,\",\"483:    rollback = None\",\"486:        rollback = make_rollback()\",\"487:        remove_linked()\",\"516:            \\\"rollback_sha\\\": sha256_file(pathlib.Path(rollback[\\\"copy\\\"])) == EXPECTED[str(LINKED)],\",\"517:            \\\"rollback_mode\\\": stat.S_IMODE(pathlib.Path(rollback[\\\"copy\\\"]).stat().st_mode) == 0o600,\",\"527:            \\\"PLAN_SHA256\\\": PLAN_SHA256,\",\"530:            \\\"rollback_copy\\\": str(rollback[\\\"copy\\\"]),\",\"531:            \\\"rollback_metadata\\\": str(rollback[\\\"metadata\\\"]),\",\"533:            \\\"changes_made\\\": True,\",\"539:            \\\"rollback_started\\\": False,\",\"545:        rollback_started = bool(removed and rollback is not None)\",\"547:            restore_linked(rollback)\",\"548:            if rollback_started\",\"553:            \\\"PLAN_SHA256\\\": PLAN_SHA256,\",\"556:            \\\"diagnostics_before_rollback\\\": diag,\",\"557:            \\\"changes_made\\\": removed,\",\"558:            \\\"rollback_started\\\": rollback_started,\",\"559:            \\\"rollback_restored\\\": restored,\"],\"mode\":\"0700\",\"mutation_calls\":{\"LINKED.unlink\":1,\"metadata_path.write_text\":1,\"os.chmod\":4,\"os.chown\":1,\"os.replace\":2,\"rollback_dir.mkdir\":1,\"temp_path.unlink\":2},\"path\":\"apply.py\",\"schema_exact\":true,\"sha_match\":true,\"systemctl_actions\":[]}],\"payload_valid\":true},\"public_results\":[{\"facts\":{\"change_declared\":null,\"changes_made\":true,\"command_id\":\"RUNNER-LINKED-REMOVAL-APPLY-20260726T202107Z\",\"command_rc\":null,\"component\":\"runner\",\"execution_started\":true,\"mode\":\"change\",\"mutation_outcome\":null,\"output_json_facts\":{\"PLAN_SHA256\":\"8cb775587817330dd12296c2f17665110353bcd090330d9bef36e4b61a23541e\",\"changes_made\":false,\"rollback_started\":false,\"status\":\"BLOCKED\"},\"output_selected_lines\":[\"1:{\\\"PLAN_SHA256\\\":\\\"[LONG_TOKEN_REDACTED]\\\",\\\"changes_made\\\":false,\\\"preconditions\\\":{\\\"adapter_healthy\\\":true,\\\"adapter_self_test\\\":true,\\\"current_capsule\\\":false,\\\"linked_regular\\\":true,\\\"no_other_mutating\\\":false,\\\"package_unmanaged\\\":true,\\\"plan_bound\\\":true,\\\"portal_health\\\":true,\\\"portal_healthy\\\":true,\\\"portal_self_test\\\":true,\\\"source_lock\\\":true,\\\"zero_fds\\\":true,\\\"zero_live_refs\\\":true,\\\"zero_processes\\\":true},\\\"rollback_started\\\":false,\\\"status\\\":\\\"BLOCKED\\\"}\"],\"output_sha256\":\"dc5edc4974ec58fc16aa68ed6cf3da25fdccb016047861d5cd78253c704319fc\",\"output_type\":\"str\",\"private_addresses_included\":false,\"raw_evidence_sha256\":\"dc5edc4974ec58fc16aa68ed6cf3da25fdccb016047861d5cd78253c704319fc\",\"rc\":2,\"result_contract_error\":null,\"result_contract_status\":null,\"result_contract_valid\":null,\"rollback_restored\":null,\"rollback_started\":null,\"sanitized\":true,\"sanitized_output_sha256\":\"dc5edc4974ec58fc16aa68ed6cf3da25fdccb016047861d5cd78253c704319fc\",\"secrets_included\":false,\"status\":\"FAIL\"},\"file_sha256\":\"a1c17abc64bc32706aa43ef97f19bce5894a05fdabae6834f2d2e4deed611e5c\",\"path\":\"/var/lib/homelab-chat-run/public/RUNNER-LINKED-REMOVAL-APPLY-20260726T202107Z-20260726T202333Z.json\"}],\"raw_results\":[],\"state_facts\":{\"capsule_sha256\":\"ba4a8e897dff0a4e5b9e77d2d769551041a45ebcdbb285bd753febfa721f8d0d\",\"changes_made\":null,\"error_message_sha256\":null,\"error_stage\":null,\"error_type\":null,\"evidence_sha256\":\"d33b0cb4f775fb6bfb57d7681273a2ae9b3e884088ae794f1c152797cd03f6dd\",\"finished_at_utc\":\"2026-07-26T20:23:37.595816+00:00\",\"gateway_verified\":true,\"imported_at_utc\":\"2026-07-26T20:23:28.952530+00:00\",\"mutation_outcome\":null,\"rollback_restored\":null,\"rollback_started\":null,\"runner_document_rc\":2,\"runner_rc\":2,\"runner_status\":\"FAIL\",\"runner_wrapper_matches_document\":true,\"short_id\":\"XJFI5CL574\",\"started_at_utc\":\"2026-07-26T20:23:32.925742+00:00\",\"status\":\"FAIL\",\"worker_pid\":3321816},\"state_file\":{\"device\":64513,\"executable\":false,\"exists\":true,\"gid\":990,\"inode\":2373817,\"is_symlink\":false,\"mode\":\"0640\",\"path\":\"/var/lib/homelab-command-adapter/state/XJFI5CL574.json\",\"regular\":true,\"resolved\":\"/var/lib/homelab-command-adapter/state/XJFI5CL574.json\",\"sha256\":\"98cf95f846d89ccf9d2a6dcdac1e249587854bf845eba45f17681c964bc27501\",\"size\":3778,\"uid\":0},\"worker_log\":{\"device\":64513,\"executable\":false,\"exists\":true,\"gid\":990,\"inode\":2373793,\"is_symlink\":false,\"mode\":\"0640\",\"path\":\"/var/lib/homelab-command-adapter/runs/XJFI5CL574.worker.log\",\"regular\":true,\"resolved\":\"/var/lib/homelab-command-adapter/runs/XJFI5CL574.worker.log\",\"selected_lines\":[],\"sha256\":\"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\",\"size\":0,\"uid\":0},\"worker_process\":{\"pid\":3321816,\"proc_exists\":false}},\"RUNNER-LINKED-REMOVAL-APPLY-FINAL-20260726T202825Z\":{\"capsule_file\":{\"device\":64513,\"executable\":false,\"exists\":true,\"gid\":990,\"inode\":2373833,\"is_symlink\":false,\"mode\":\"0600\",\"path\":\"/var/lib/homelab-command-adapter/capsules/84f120ca27f6de4f1c05e36bcecd59588f8b9298bccb129f480b99ee316702e2/capsule.hcmd\",\"regular\":true,\"resolved\":\"/var/lib/homelab-command-adapter/capsules/84f120ca27f6de4f1c05e36bcecd59588f8b9298bccb129f480b99ee316702e2/capsule.hcmd\",\"sha256\":\"84f120ca27f6de4f1c05e36bcecd59588f8b9298bccb129f480b99ee316702e2\",\"size\":34363,\"uid\":0},\"manifest_facts\":{\"change_flags\":{\"backup\":false,\"cluster\":false,\"gitea\":false,\"production\":true},\"component\":\"runner\",\"mode\":\"change\",\"payload\":[{\"bytes\":24727,\"mode\":\"0700\",\"path\":\"apply_final.py\",\"sha256\":\"659439e2ee73b1cf4cac6a5719642541f39d2999846419e827b8fe160ccf647a\"}],\"risk\":\"REVERSIBLE\",\"rollback\":{\"available\":true,\"description\":\"Exact SHA-verified mode-0600 rollback copy before removal; diagnostics before atomic restore on failed postcondition.\"}},\"payload_analysis\":{\"items\":[{\"actual_sha256\":\"659439e2ee73b1cf4cac6a5719642541f39d2999846419e827b8fe160ccf647a\",\"all_sha256_literals\":[\"2a88defef9517f89bc60934dce82097f8e316b08af9417e95167ea5d759a10d9\",\"48c056521382e38a280c1ead171c4906c5a42465526aff459cb1c0053ac2c7a1\",\"5e8725e129fd2055b36fe2fae13fc95fc4b3271074a0e0d4bb7347e7b2f270a1\",\"74d0f37878652ed9d46b53ae8556bbb30ebd683741f293c3f59b3527876ed2d7\",\"8056faf4ef6348f0b06319ad3c49fbfeeadf25b6370f857ea19569bd27652ee2\",\"8453eab30f5c3ccd285fc9f70fff18f564809bb27f7bf84f51f2ba593aa85263\",\"8cb775587817330dd12296c2f17665110353bcd090330d9bef36e4b61a23541e\",\"98faa546f7a612f0d1f439d637c1293355371592afbcadf6cae0ee05b3552ef8\",\"a1c17abc64bc32706aa43ef97f19bce5894a05fdabae6834f2d2e4deed611e5c\",\"ba4a8e897dff0a4e5b9e77d2d769551041a45ebcdbb285bd753febfa721f8d0d\",\"d33b0cb4f775fb6bfb57d7681273a2ae9b3e884088ae794f1c152797cd03f6dd\",\"dfb769b991c2f8d60879b29e258a6d09f07f900cf3bfe0f12632d68314c66e0e\",\"f2410cd328e2837b99e8ce4a28e25cb031a6bdd596d0286ac77a1822ef1cecd0\",\"fc444570ebc55232fa3cedc9dbe6f0feedd1eba0d1563a88d990739a9ca3ee97\"],\"ast_valid\":true,\"bytes\":24727,\"contains_plan_sha256_symbol\":true,\"contains_result_contract\":false,\"declared_sha256\":\"659439e2ee73b1cf4cac6a5719642541f39d2999846419e827b8fe160ccf647a\",\"decode_ok\":true,\"index\":0,\"line_count\":742,\"marker_lines\":[\"16:PLAN_SHA256 = \\\"[LONG_TOKEN_REDACTED]\\\"\",\"32:    \\\"plan_sha256\\\": PLAN_SHA256,\",\"41:ROLLBACK_ROOT = pathlib.Path(\\\"/var/lib/homelab-change-rollback\\\")\",\"144:        \\\"/usr/bin/systemctl\\\", \\\"show\\\", name, \\\"--no-pager\\\",\",\"289:    if document.get(\\\"changes_made\\\") is not False:\",\"304:        result.get(\\\"PLAN_SHA256\\\")\",\"308:    if result.get(\\\"changes_made\\\") is not False:\",\"310:    if result.get(\\\"rollback_started\\\") is not False:\",\"496:def make_rollback() -> dict[str, Any]:\",\"498:    rollback_dir = ROLLBACK_ROOT / COMMAND_ID\",\"499:    rollback_dir.mkdir(parents=True, mode=0o700, exist_ok=False)\",\"500:    os.chmod(rollback_dir, 0o700)\",\"502:    copy_path = rollback_dir / \\\"homelab-chat-run-linked.rollback\\\"\",\"503:    metadata_path = rollback_dir / \\\"metadata.json\\\"\",\"506:    fd, temp_name = tempfile.mkstemp(prefix=\\\".copy.\\\", dir=str(rollback_dir))\",\"514:        os.replace(temp_path, copy_path)\",\"516:        temp_path.unlink(missing_ok=True)\",\"525:        \\\"plan_sha256\\\": PLAN_SHA256,\",\"532:    fsync_dir(rollback_dir)\",\"535:        raise RuntimeError(\\\"rollback SHA mismatch\\\")\",\"537:        raise RuntimeError(\\\"rollback mode mismatch\\\")\",\"540:        \\\"dir\\\": rollback_dir,\",\"547:def remove_linked() -> None:\",\"548:    LINKED.unlink()\",\"552:def restore_linked(rollback: dict[str, Any]) -> bool:\",\"553:    copy_path = pathlib.Path(rollback[\\\"copy\\\"])\",\"563:        os.chmod(temp_path, int(rollback[\\\"mode\\\"]))\",\"565:            os.chown(temp_path, int(rollback[\\\"uid\\\"]), int(rollback[\\\"gid\\\"]))\",\"568:            ns=(int(rollback[\\\"atime_ns\\\"]), int(rollback[\\\"mtime_ns\\\"])),\",\"570:        os.replace(temp_path, LINKED)\",\"572:        temp_path.unlink(missing_ok=True)\",\"618:        \\\"plan_bound\\\": PLAN_SOURCE[\\\"plan_sha256\\\"] == PLAN_SHA256,\",\"648:            \\\"PLAN_SHA256\\\": PLAN_SHA256,\",\"651:            \\\"changes_made\\\": False,\",\"652:            \\\"rollback_started\\\": False,\",\"656:    rollback = None\",\"659:        rollback = make_rollback()\",\"660:        remove_linked()\",\"689:            \\\"rollback_sha\\\": sha256_file(pathlib.Path(rollback[\\\"copy\\\"])) == EXPECTED[str(LINKED)],\",\"690:            \\\"rollback_mode\\\": stat.S_IMODE(pathlib.Path(rollback[\\\"copy\\\"]).stat().st_mode) == 0o600,\",\"700:            \\\"PLAN_SHA256\\\": PLAN_SHA256,\",\"703:            \\\"rollback_copy\\\": str(rollback[\\\"copy\\\"]),\",\"704:            \\\"rollback_metadata\\\": str(rollback[\\\"metadata\\\"]),\",\"707:            \\\"changes_made\\\": True,\",\"713:            \\\"rollback_started\\\": False,\",\"719:        rollback_started = bool(removed and rollback is not None)\",\"721:            restore_linked(rollback)\",\"722:            if rollback_started\",\"727:            \\\"PLAN_SHA256\\\": PLAN_SHA256,\",\"730:            \\\"diagnostics_before_rollback\\\": diag,\",\"731:            \\\"changes_made\\\": removed,\",\"732:            \\\"rollback_started\\\": rollback_started,\",\"733:            \\\"rollback_restored\\\": restored,\"],\"mode\":\"0700\",\"mutation_calls\":{\"LINKED.unlink\":1,\"metadata_path.write_text\":1,\"os.chmod\":4,\"os.chown\":1,\"os.replace\":2,\"rollback_dir.mkdir\":1,\"temp_path.unlink\":2},\"path\":\"apply_final.py\",\"schema_exact\":true,\"sha_match\":true,\"systemctl_actions\":[]}],\"payload_valid\":true},\"public_results\":[{\"facts\":{\"change_declared\":null,\"changes_made\":true,\"command_id\":\"RUNNER-LINKED-REMOVAL-APPLY-FINAL-20260726T202825Z\",\"command_rc\":null,\"component\":\"runner\",\"execution_started\":true,\"mode\":\"change\",\"mutation_outcome\":null,\"output_json_facts\":{\"PLAN_SHA256\":\"8cb775587817330dd12296c2f17665110353bcd090330d9bef36e4b61a23541e\",\"changes_made\":false,\"rollback_started\":false,\"status\":\"BLOCKED\"},\"output_selected_lines\":[\"1:{\\\"PLAN_SHA256\\\":\\\"[LONG_TOKEN_REDACTED]\\\",\\\"changes_made\\\":false,\\\"mutating_state_classification\\\":{\\\"closed\\\":[],\\\"unresolved\\\":[\\\"RUNNER-LINKED-REMOVAL-APPLY-20260726T202107Z\\\"]},\\\"preconditions\\\":{\\\"adapter_healthy\\\":true,\\\"adapter_self_test\\\":true,\\\"current_capsule\\\":true,\\\"linked_regular\\\":true,\\\"no_other_mutating\\\":false,\\\"package_unmanaged\\\":true,\\\"plan_bound\\\":true,\\\"portal_health\\\":true,\\\"portal_healthy\\\":true,\\\"portal_self_test\\\":true,\\\"previous_blocked_attempt_closed\\\":false,\\\"source_lock\\\":true,\\\"zero_fds\\\":true,\\\"zero_live_refs\\\":true,\\\"zero_processes\\\":true},\\\"rollback_started\\\":false,\\\"status\\\":\\\"BLOCKED\\\"}\"],\"output_sha256\":\"2b955106e013727b7506d472c868d43efbc226530202e72292e1444d839503e7\",\"output_type\":\"str\",\"private_addresses_included\":false,\"raw_evidence_sha256\":\"2b955106e013727b7506d472c868d43efbc226530202e72292e1444d839503e7\",\"rc\":2,\"result_contract_error\":null,\"result_contract_status\":null,\"result_contract_valid\":null,\"rollback_restored\":null,\"rollback_started\":null,\"sanitized\":true,\"sanitized_output_sha256\":\"2b955106e013727b7506d472c868d43efbc226530202e72292e1444d839503e7\",\"secrets_included\":false,\"status\":\"FAIL\"},\"file_sha256\":\"535f79c0d76cc3bd6adeffe6f9d27ed37e6b4b971a3fa260f12b2c57fb5d6a52\",\"path\":\"/var/lib/homelab-chat-run/public/RUNNER-LINKED-REMOVAL-APPLY-FINAL-20260726T202825Z-20260726T203051Z.json\"}],\"raw_results\":[],\"state_facts\":{\"capsule_sha256\":\"84f120ca27f6de4f1c05e36bcecd59588f8b9298bccb129f480b99ee316702e2\",\"changes_made\":null,\"error_message_sha256\":null,\"error_stage\":null,\"error_type\":null,\"evidence_sha256\":\"98474ad0c0c5ab2b6507c2469ea804b3c771f8a8f71c23a8238fd64ae1fe989d\",\"finished_at_utc\":\"2026-07-26T20:30:56.238685+00:00\",\"gateway_verified\":true,\"imported_at_utc\":\"2026-07-26T20:30:47.474045+00:00\",\"mutation_outcome\":null,\"rollback_restored\":null,\"rollback_started\":null,\"runner_document_rc\":2,\"runner_rc\":2,\"runner_status\":\"FAIL\",\"runner_wrapper_matches_document\":true,\"short_id\":\"QTYSBSRH63\",\"started_at_utc\":\"2026-07-26T20:30:51.488097+00:00\",\"status\":\"FAIL\",\"worker_pid\":3358045},\"state_file\":{\"device\":64513,\"executable\":false,\"exists\":true,\"gid\":990,\"inode\":2373842,\"is_symlink\":false,\"mode\":\"0640\",\"path\":\"/var/lib/homelab-command-adapter/state/QTYSBSRH63.json\",\"regular\":true,\"resolved\":\"/var/lib/homelab-command-adapter/state/QTYSBSRH63.json\",\"sha256\":\"ab5495eba8f2f81c97bd50b849d3a8e27a5c157672be28bf604050eabde4274e\",\"size\":3980,\"uid\":0},\"worker_log\":{\"device\":64513,\"executable\":false,\"exists\":true,\"gid\":990,\"inode\":2373822,\"is_symlink\":false,\"mode\":\"0640\",\"path\":\"/var/lib/homelab-command-adapter/runs/QTYSBSRH63.worker.log\",\"regular\":true,\"resolved\":\"/var/lib/homelab-command-adapter/runs/QTYSBSRH63.worker.log\",\"selected_lines\":[],\"sha256\":\"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\",\"size\":0,\"uid\":0},\"worker_process\":{\"pid\":3358045,\"proc_exists\":false}},\"RUNNER-MUTATION-CONTRACT-ACCEPTANCE-FIX-20260726T210744Z\":{\"capsule_file\":{\"device\":64513,\"executable\":false,\"exists\":true,\"gid\":990,\"inode\":2373872,\"is_symlink\":false,\"mode\":\"0600\",\"path\":\"/var/lib/homelab-command-adapter/capsules/c2f0488dd5d50bee032ddcd75aa46f388bfa538d66797c2ef98af9dd8eff473f/capsule.hcmd\",\"regular\":true,\"resolved\":\"/var/lib/homelab-command-adapter/capsules/c2f0488dd5d50bee032ddcd75aa46f388bfa538d66797c2ef98af9dd8eff473f/capsule.hcmd\",\"sha256\":\"c2f0488dd5d50bee032ddcd75aa46f388bfa538d66797c2ef98af9dd8eff473f\",\"size\":11570,\"uid\":0},\"manifest_facts\":{\"change_flags\":{\"backup\":false,\"cluster\":false,\"gitea\":false,\"production\":true},\"component\":\"runner\",\"mode\":\"change\",\"payload\":[{\"bytes\":7525,\"mode\":\"0700\",\"path\":\"acceptance_fix.py\",\"sha256\":\"dccc63dd169d61728a60180130ee1341d6f72a133178d3744df246e0cadd0f7c\"}],\"risk\":\"REVERSIBLE\",\"rollback\":{\"available\":true,\"description\":\"No-op acceptance не изменяет систему. Доступен реальный rollback из /var/lib/homelab-change-rollback/RUNNER-MUTATION-CONTRACT-APPLY-20260726T205715Z/: точная копия прежнего runner и metadata.json.\"}},\"payload_analysis\":{\"items\":[{\"actual_sha256\":\"dccc63dd169d61728a60180130ee1341d6f72a133178d3744df246e0cadd0f7c\",\"all_sha256_literals\":[\"22eedf9b1090960a7f92cef992f481d8d6cc3f42e4f4ecd6e27bbda4ebf752bd\",\"2a88defef9517f89bc60934dce82097f8e316b08af9417e95167ea5d759a10d9\",\"5e8725e129fd2055b36fe2fae13fc95fc4b3271074a0e0d4bb7347e7b2f270a1\",\"74d0f37878652ed9d46b53ae8556bbb30ebd683741f293c3f59b3527876ed2d7\",\"8056faf4ef6348f0b06319ad3c49fbfeeadf25b6370f857ea19569bd27652ee2\",\"8453eab30f5c3ccd285fc9f70fff18f564809bb27f7bf84f51f2ba593aa85263\",\"9ac413b007bdf2ab6eb393d872bcd3eed101da0647924051ae3ea4abf7d4eca0\",\"b248a4c32c9cc64e5747e7dce6c7fc0a23f5124a77c71ce72e27a81aceae9d2d\",\"f2410cd328e2837b99e8ce4a28e25cb031a6bdd596d0286ac77a1822ef1cecd0\"],\"ast_valid\":true,\"bytes\":7525,\"contains_plan_sha256_symbol\":true,\"contains_result_contract\":true,\"declared_sha256\":\"dccc63dd169d61728a60180130ee1341d6f72a133178d3744df246e0cadd0f7c\",\"decode_ok\":true,\"index\":0,\"line_count\":262,\"marker_lines\":[\"14:PLAN_SHA256 = \\\"[LONG_TOKEN_REDACTED]\\\"\",\"16:ROLLBACK_COPY = pathlib.Path(\\\"[LONG_TOKEN_REDACTED].rollback\\\")\",\"17:ROLLBACK_META = pathlib.Path(\\\"[LONG_TOKEN_REDACTED].json\\\")\",\"74:        \\\"/usr/bin/systemctl\\\",\",\"135:        \\\"HOMELAB_RESULT_CONTRACT=\\\"\",\"141:                \\\"changes_made\\\": False,\",\"142:                \\\"rollback_started\\\": False,\",\"143:                \\\"rollback_restored\\\": None,\",\"218:        \\\"rollback_copy_exists\\\": ROLLBACK_COPY.exists(),\",\"219:        \\\"rollback_copy_sha\\\": (\",\"224:        \\\"rollback_copy_mode_0600\\\": (\",\"231:        \\\"rollback_metadata_exists\\\": ROLLBACK_META.exists(),\",\"240:            \\\"PLAN_SHA256\\\": PLAN_SHA256,\",\"248:            \\\"changes_made\\\": False,\",\"249:            \\\"rollback_started\\\": False,\"],\"mode\":\"0700\",\"mutation_calls\":{},\"path\":\"acceptance_fix.py\",\"schema_exact\":true,\"sha_match\":true,\"systemctl_actions\":[]}],\"payload_valid\":true},\"public_results\":[],\"raw_results\":[],\"state_facts\":{\"capsule_sha256\":\"c2f0488dd5d50bee032ddcd75aa46f388bfa538d66797c2ef98af9dd8eff473f\",\"changes_made\":null,\"error_message_sha256\":\"01626831c30f18bef5e5621858387d988cf0edb83c6ba723ebc0e7081b38a91a\",\"error_stage\":null,\"error_type\":\"InterruptedExecution\",\"evidence_sha256\":null,\"finished_at_utc\":\"2026-07-27T05:07:17.967688+00:00\",\"gateway_verified\":null,\"imported_at_utc\":\"2026-07-26T21:10:03.805618+00:00\",\"mutation_outcome\":null,\"rollback_restored\":null,\"rollback_started\":null,\"runner_document_rc\":null,\"runner_rc\":null,\"runner_status\":null,\"runner_wrapper_matches_document\":null,\"short_id\":\"YLYERDOV2U\",\"started_at_utc\":\"2026-07-26T21:10:07.680130+00:00\",\"status\":\"FAIL\",\"worker_pid\":3484244},\"state_file\":{\"device\":64513,\"executable\":false,\"exists\":true,\"gid\":990,\"inode\":2373885,\"is_symlink\":false,\"mode\":\"0640\",\"path\":\"/var/lib/homelab-command-adapter/state/YLYERDOV2U.json\",\"regular\":true,\"resolved\":\"/var/lib/homelab-command-adapter/state/YLYERDOV2U.json\",\"sha256\":\"36285550ceb849bf22aef539bc56ad4741c0fb61553d108eefd6fdc6805d02d9\",\"size\":3327,\"uid\":0},\"worker_log\":{\"device\":64513,\"executable\":false,\"exists\":true,\"gid\":990,\"inode\":2373811,\"is_symlink\":false,\"mode\":\"0640\",\"path\":\"/var/lib/homelab-command-adapter/runs/YLYERDOV2U.worker.log\",\"regular\":true,\"resolved\":\"/var/lib/homelab-command-adapter/runs/YLYERDOV2U.worker.log\",\"selected_lines\":[\"1:Traceback (most recent call last):\",\"11:    raise AdapterError(\",\"12:        f\\\"helper integrity mismatch: {path}: {actual}\\\"\",\"14:AdapterError: helper integrity mismatch: /usr/local/sbin/homelab-chat-run: [LONG_TOKEN_REDACTED]\"],\"sha256\":\"67696052b4003d1cf0374688de70e22a355b79304c70c76b8e76e270cb10f1b5\",\"size\":705,\"uid\":0},\"worker_process\":{\"pid\":3484244,\"proc_exists\":false}}},\"units\":{\"homelab-command-adapter.service\":{\"ActiveState\":\"active\",\"ExecMainStatus\":\"0\",\"ExecStart_mentions_canonical\":false,\"ExecStart_mentions_linked\":false,\"ExecStart_sha256\":\"3493588fb9c796055b267e57fb1881243972be59e2507910d4cbe948989b5ee3\",\"Group\":\"homelab-command-portal\",\"LoadState\":\"loaded\",\"MainPID\":\"1637015\",\"NRestarts\":\"0\",\"Result\":\"success\",\"SubState\":\"running\",\"UnitFileState\":\"enabled\",\"User\":\"root\",\"show_rc\":0,\"stderr_sha256\":\"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\"},\"homelab-command-portal.service\":{\"ActiveState\":\"active\",\"ExecMainStatus\":\"0\",\"ExecStart_mentions_canonical\":false,\"ExecStart_mentions_linked\":false,\"ExecStart_sha256\":\"e34879c7ae83e8b092ab9f1c561f8a1c47c4eb972df3d3d4abc5da544bf00fa6\",\"Group\":\"homelab-command-portal\",\"LoadState\":\"loaded\",\"MainPID\":\"1759597\",\"NRestarts\":\"0\",\"Result\":\"success\",\"SubState\":\"running\",\"UnitFileState\":\"enabled\",\"User\":\"homelab-command-portal\",\"show_rc\":0,\"stderr_sha256\":\"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\"},\"homelab-result-lookup.service\":{\"ActiveState\":\"active\",\"ExecMainStatus\":\"0\",\"ExecStart_mentions_canonical\":false,\"ExecStart_mentions_linked\":false,\"ExecStart_sha256\":\"f5194a04a3fc4499702b837aa40dc74dd0d047ff0bbfd048367de1af802ababe\",\"Group\":\"homelab-result-lookup\",\"LoadState\":\"loaded\",\"MainPID\":\"2718720\",\"NRestarts\":\"0\",\"Result\":\"success\",\"SubState\":\"running\",\"UnitFileState\":\"enabled\",\"User\":\"homelab-result-lookup\",\"show_rc\":0,\"stderr_sha256\":\"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\"}}}\n"
}
