CHAT_OUTPUT_BEGIN
COMMAND_ID=HOMELAB-CLUSTER-ADMIN-UPDATES-V40-V38-REPORT-GATE-FIXED-READ-ONLY-20260805T235700Z
STATUS=OK
RC=0
HOST=pve01
MODE=verify
COMPONENT=homelab-cluster-admin-update-visibility
REFERENCE_REGISTER_CHECK=OK
REFERENCE_SHA256=5763f2f8edc75fcf6f3951f8c95896d1cc112ceccb6cf5b64a383f540a4deb8e
ERROR_REGISTER_CHECK=OK
ERROR_REGISTER_SHA256=24934a2c7fa5c26f6e828583c4aefac7f143b40c0171736ed7571e617d55ab83
COMMAND_SHA256=40e337b8546bf399230574f80cb4c3bb835b85ff81aded9ac9bd5e0d5952331b
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=62cb553771c048eb8d4e0850a019afd5a353b01b920e0066eb8d2d08c5af8abf
SANITIZED_OUTPUT_SHA256=e4a62f4bcfcf99af8d575e1d805639820045b267a24839c5613ce5ac117a58b9
OUTPUT_BEGIN
HOMELAB_RESULT_CONTRACT={"changes_made":false,"command_id":"HOMELAB-CLUSTER-ADMIN-UPDATES-V40-V38-REPORT-GATE-FIXED-READ-ONLY-20260805T235700Z","command_rc":0,"control_plane_error":null,"mutation_outcome":"NO_MUTATION","patch_strategy":"patch-signature-file-before-body-close","patch_target_path":"/opt/cluster-admin-incident-engine/app.py","patch_target_sha256":"17d95ebfc28cef34846a8999664019d5d032ee8176b7fedd9ceeebfc5c97e3b6","rc":0,"ready_for_atomic_patch":true,"report_bytes":14975,"report_sha256":"625060097c811eb029117b21401f06d65be298b83be34b34e23ea534e4b29f1b","rollback_restored":false,"rollback_started":false,"root_route_function":"dashboard","root_route_segment_sha256":"15204052654de13a12aaefde894c076ab4f88909c78d37b0a0a3a348af8dacf4","service_active_running":true,"status":"OK","target_not_already_patched":true,"unique_patch_target":true,"uvicorn_port_8081":true,"v38_exact_result_identity_confirmed":true,"v38_no_mutation_confirmed":true,"v38_report_gate_fix":"declared-vs-sanitized-separated","v39_exact_failure_identity_confirmed":true,"version":1}
{"changes_made":false,"command_id":"HOMELAB-CLUSTER-ADMIN-UPDATES-V40-V38-REPORT-GATE-FIXED-READ-ONLY-20260805T235700Z","gate":{"ready_for_atomic_patch":true,"service_active_running":true,"target_not_already_patched":true,"unique_patch_target":true,"uvicorn_port_8081":true},"mutation_outcome":"NO_MUTATION","patch_target_analysis":{"euid":0,"gate":{"ready_for_atomic_patch":true,"service_active_running":true,"target_not_already_patched":true,"unique_patch_target":true,"uvicorn_port_8081":true},"hostname":"cluster-admin","http_baseline":[{"body_bytes":0,"body_sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","contains_incident_signature":false,"contains_updates_card":false,"http_status":303,"location":"/login","path":"/","rc":0},{"body_bytes":1070,"body_sha256":"2898292615e77575830b59e3d97275aefe15d1ef7d7da946c43bb7a3791b27a9","contains_incident_signature":false,"contains_updates_card":false,"http_status":200,"location":null,"path":"/login","rc":0},{"body_bytes":81,"body_sha256":"8c6f8f05af356537211023cc5af3bcc70916211cf8d576d67dad41ab58893c0a","contains_incident_signature":false,"contains_updates_card":false,"http_status":200,"location":null,"path":"/health","rc":0},{"body_bytes":22,"body_sha256":"37ec4665a8102d115ffd1ac20dae94c98b4dac64b0c1a68228aa2a531caeb35d","contains_incident_signature":false,"contains_updates_card":false,"http_status":404,"location":null,"path":"/healthz","rc":0}],"patch_strategy":"patch-signature-file-before-body-close","patch_target":{"bytes":28599,"contains_body_close":true,"contains_incident_title":true,"contains_updates_card":false,"gid":994,"mode":488,"path":"/opt/cluster-admin-incident-engine/app.py","sha256":"17d95ebfc28cef34846a8999664019d5d032ee8176b7fedd9ceeebfc5c97e3b6","signature_hits":["Cluster Admin Incident Engine","observe/notify","auto-heal отключён","Активные инциденты","VM и CT","Инциденты"],"suffix":".py","uid":0},"root_route":{"end_line":221,"file_response_paths":[],"function":"dashboard","html_literals":[],"line":198,"response_kinds":["HTMLResponse","RedirectResponse"],"segment_bytes":5441,"segment_sha256":"15204052654de13a12aaefde894c076ab4f88909c78d37b0a0a3a348af8dacf4","template_names":[]},"service":{"ActiveState":"active","ExecStart":"{ path=/usr/bin/python3 ; argv[]=/usr/bin/python3 -m uvicorn app:app --host 0.0.0.0 --port 8081 --proxy-headers --forwarded-allow-ips=[PRIVATE_IP],127.0.0.1 ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }","FragmentPath":"/etc/systemd/system/cluster-admin-incident-engine.service","LoadState":"loaded","MainPID":"487","Result":"success","SubState":"running","UnitFileState":"enabled","WorkingDirectory":"/opt/cluster-admin-incident-engine"},"signature_files":[{"bytes":28599,"contains_body_close":true,"contains_incident_title":true,"contains_updates_card":false,"gid":994,"mode":488,"path":"/opt/cluster-admin-incident-engine/app.py","sha256":"17d95ebfc28cef34846a8999664019d5d032ee8176b7fedd9ceeebfc5c97e3b6","signature_hits":["Cluster Admin Incident Engine","observe/notify","auto-heal отключён","Активные инциденты","VM и CT","Инциденты"],"suffix":".py","uid":0}],"source":{"bytes":28599,"gid":994,"mode":488,"path":"/opt/cluster-admin-incident-engine/app.py","sha256":"17d95ebfc28cef34846a8999664019d5d032ee8176b7fedd9ceeebfc5c97e3b6","uid":0}},"read_only":true,"rollback_restored":false,"rollback_started":false,"schema":40,"status":"OK","transport":{"rc":0,"stderr":"","stderr_bytes":0,"stderr_sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","stdout_bytes":3360,"stdout_sha256":"964ab76c7a554440e633587d51e21d3800e7b84631100cba6a4c76f9ed7ed69a"},"v38_exact_result":{"changes_made":false,"control_plane_error":null,"declared_report_bytes":25528,"declared_report_sha256":"6aff9754ef0cad6693b35f068bb20bb058f066aff2d448686afa417a684c9c49","identity_confirmed":true,"mutation_outcome":"NO_MUTATION","output_bytes":26452,"output_sha256":"18280be36baf6d3a99198e7ab86e4d63eebb5e57d4b5ff330b08bc254d38e8ec","report_identity_mode":"full-output-sha-plus-declared-sanitized-separation","rollback_restored":false,"rollback_started":false,"root_route":{"function":"dashboard","line":198,"method":"get","path":"/","redirect_targets":["/login"],"response_kinds":["HTMLResponse","RedirectResponse"],"templates":[]},"runner_json_sha256":"51d07bf2c6a0084bb9495d999a4c1bfe6d59d96ace4530c069c286152d6ddb1e","runner_text_sha256":"0ad8526ebf81a248f8b64034448093701d65ad65c959f20cba36d1354865feec","sanitized_report_bytes":25527,"sanitized_report_sha256":"fd3f6ea3d4847e9d4c759973e03df31b1e8873d0a46a48ffaa2d32b705ae2db3","signature_files":[{"bytes":28599,"contexts":[{"line":73,"text":"    return f\"\"\"<!doctype html><html lang=<REDACTED>"},{"line":208,"text":"    cards = \"\".join([summary_card(\"Ноды\", counts[\"nodes\"], \"OK\" if counts[\"nodes\"] > 0 else \"ERROR\"), summary_card(\"VM и CT\", counts[\"guests\"], \"OK\" if counts[\"guests\"] > 0 else \"ERROR\"), summary_card(\"Сервисы\", counts[\"services\"], \"OK\" if counts[\"services\"] > 0 else \"ERROR\"), summary_card(\"Инциденты\", counts[\"incidents\"], \"ERROR\" if counts[\"incidents\"] > 0 else \"OK\")])"},{"line":217,"text":"    incidents_html = health_section(\"Активные инциденты\", len(incidents), incidents_state, incidents_table)"},{"line":220,"text":"    page = f\"\"\"<!doctype html><html lang=\"ru\"><head><meta charset=\"utf-8\"><meta name=\"viewport\" content=\"width=device-width,initial-scale=1\"><meta http-equiv=\"refresh\" content=\"30\"><title>Cluster Admin Incident Engine</title><style>body{{margin:0;background:#07101d;color:#e8eef7;font:14px Arial}}header{{padding:14px 22px;background:#101b2b;border-bottom:1px solid #2a3b54;display:flex;justify-content:space-between}}main{{max-width:1500px;margin:auto;padding:20px}}.cards{{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}}.card,.panel{{background:#111d2e;border:1px solid #283b56;border-radius:14px;padding:16px}}.card b{{font-size:30px;display:block}}.card span,.muted{{color:#879ab3}}.grid{{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:14px}}.wide{{grid-column:1/-1}}table{{width:100%;border-collapse:collapse}}th,td{{padding:9px;border-bottom:1px solid #253750;text-align:left}}th{{color:#8fa3bc}}.state{{display:inline-flex;align-items:center;gap:7px;font-weight:700}}.state-dot{{width:10px;height:10px;border-radius:50%;display:inline-block;background:#8392a5}}.state-ok .state-dot{{background:#39d98a;box-shadow:0 0 12px rgba(57,217,138,.75)}}.state-bad .state-dot{{background:#ff5d73;box-shadow:0 0 12px rgba(255,93,115,.75)}}.state-warn .state-dot{{background:#f6c85f;box-shadow:0 0 12px rgba(246,200,95,.7)}}.state-unknown .state-dot{{background:#8392a5}}.row-bad{{background:rgba(255,93,115,.07)}}.row-warn{{background:rgba(246,200,95,.06)}}.card-health{{float:right}}.health-section{{padding:0;overflow:hidden}}.health-section summary{{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px;user-select:none}}.health-section summary::-webkit-details-marker{{display:none}}.section-heading{{display:flex;align-items:center;gap:10px;font-size:20px;font-weight:700}}.section-heading .state{{font-size:0}}.section-title{{color:#e8eef7}}.section-count{{font-size:12px;color:#879ab3;border:1px solid #334a68;border-radius:999px;padding:3px 8px}}.section-chevron{{font-size:20px;color:#8fa3bc;transition:transform .18s ease}}.health-section[open] .section-chevron{{transform:rotate(180deg)}}.health-section[open] summary{{border-bottom:1px solid #253750;margin-bottom:8px}}.section-body{{padding:0 16px 16px}}button{{background:#18283d;color:white;border:1px solid #3b506d;border-radius:8px;padding:8px 12px}}@media(max-width:800px){{.cards,.grid{{grid-template-columns:1fr 1fr}}.wide{{grid-column:1/-1}}}}</style></head><body><header><div><b>Cluster Admin Incident Engine</b> {engine_badge}<div class=muted>observe/notify · auto-heal отключён</div></div><form method=\"post\" action=\"/logout\"><input type=\"hidden\" name=\"csrf\" value=\"{csrf}\"><button>Выйти</button></form></header><main><section class=cards>{cards}</section><section class=grid>{nodes_html}{incidents_html}{services_html}</section></main></body></html>\"\"\""},{"line":243,"text":"        \"# HELP cluster_admin_up Cluster Admin Incident Engine availability\","}],"path":"/opt/cluster-admin-incident-engine/app.py","referenced_by_source":false,"relative_path":"app.py","sha256":"17d95ebfc28cef34846a8999664019d5d032ee8176b7fedd9ceeebfc5c97e3b6","signature_hits":["Cluster Admin Incident Engine","observe/notify","auto-heal отключён","Активные инциденты","VM и CT","Инциденты"]}],"source":{"bytes":28599,"contexts":[{"line":73,"text":"    return f\"\"\"<!doctype html><html lang=<REDACTED>"},{"line":151,"text":"def health():"},{"line":155,"text":"def get_login(request:Request):"},{"line":159,"text":"async def post_login(request:Request):"},{"line":178,"text":"async def logout(request:Request):"},{"line":190,"text":"def api_summary(request:Request):"},{"line":198,"text":"def dashboard(request:Request):"},{"line":208,"text":"    cards = \"\".join([summary_card(\"Ноды\", counts[\"nodes\"], \"OK\" if counts[\"nodes\"] > 0 else \"ERROR\"), summary_card(\"VM и CT\", counts[\"guests\"], \"OK\" if counts[\"guests\"] > 0 else \"ERROR\"), summary_card(\"Сервисы\", counts[\"services\"], \"OK\" if counts[\"services\"] > 0 else \"ERROR\"), summary_card(\"Инциденты\", counts[\"incidents\"], \"ERROR\" if counts[\"incidents\"] > 0 else \"OK\")])"},{"line":217,"text":"    incidents_html = health_section(\"Активные инциденты\", len(incidents), incidents_state, incidents_table)"},{"line":220,"text":"    page = f\"\"\"<!doctype html><html lang=\"ru\"><head><meta charset=\"utf-8\"><meta name=\"viewport\" content=\"width=device-width,initial-scale=1\"><meta http-equiv=\"refresh\" content=\"30\"><title>Cluster Admin Incident Engine</title><style>body{{margin:0;background:#07101d;color:#e8eef7;font:14px Arial}}header{{padding:14px 22px;background:#101b2b;border-bottom:1px solid #2a3b54;display:flex;justify-content:space-between}}main{{max-width:1500px;margin:auto;padding:20px}}.cards{{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}}.card,.panel{{background:#111d2e;border:1px solid #283b56;border-radius:14px;padding:16px}}.card b{{font-size:30px;display:block}}.card span,.muted{{color:#879ab3}}.grid{{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:14px}}.wide{{grid-column:1/-1}}table{{width:100%;border-collapse:collapse}}th,td{{padding:9px;border-bottom:1px solid #253750;text-align:left}}th{{color:#8fa3bc}}.state{{display:inline-flex;align-items:center;gap:7px;font-weight:700}}.state-dot{{width:10px;height:10px;border-radius:50%;display:inline-block;background:#8392a5}}.state-ok .state-dot{{background:#39d98a;box-shadow:0 0 12px rgba(57,217,138,.75)}}.state-bad .state-dot{{background:#ff5d73;box-shadow:0 0 12px rgba(255,93,115,.75)}}.state-warn .state-dot{{background:#f6c85f;box-shadow:0 0 12px rgba(246,200,95,.7)}}.state-unknown .state-dot{{background:#8392a5}}.row-bad{{background:rgba(255,93,115,.07)}}.row-warn{{background:rgba(246,200,95,.06)}}.card-health{{float:right}}.health-section{{padding:0;overflow:hidden}}.health-section summary{{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px;user-select:none}}.health-section summary::-webkit-details-marker{{display:none}}.section-heading{{display:flex;align-items:center;gap:10px;font-size:20px;font-weight:700}}.section-heading .state{{font-size:0}}.section-title{{color:#e8eef7}}.section-count{{font-size:12px;color:#879ab3;border:1px solid #334a68;border-radius:999px;padding:3px 8px}}.section-chevron{{font-size:20px;color:#8fa3bc;transition:transform .18s ease}}.health-section[open] .section-chevron{{transform:rotate(180deg)}}.health-section[open] summary{{border-bottom:1px solid #253750;margin-bottom:8px}}.section-body{{padding:0 16px 16px}}button{{background:#18283d;color:white;border:1px solid #3b506d;border-radius:8px;padding:8px 12px}}@media(max-width:800px){{.cards,.grid{{grid-template-columns:1fr 1fr}}.wide{{grid-column:1/-1}}}}</style></head><body><header><div><b>Cluster Admin Incident Engine</b> {engine_badge}<div class=muted>observe/notify · auto-heal отключён</div></div><form method=\"post\" action=\"/logout\"><input type=\"hidden\" name=\"csrf\" value=\"{csrf}\"><button>Выйти</button></form></header><main><section class=cards>{cards}</section><section class=grid>{nodes_html}{incidents_html}{services_html}</section></main></body></html>\"\"\""},{"line":226,"text":"def metrics():"},{"line":243,"text":"        \"# HELP cluster_admin_up Cluster Admin Incident Engine availability\","},{"line":327,"text":"def api_v1_entities(request: Request, limit: int = 100, cursor: str = \"\", entity_type: str = \"\", lifecycle_status: str = \"\", source_of_truth: str = \"\", updated_since: str = \"\", search: str = \"\"):"},{"line":365,"text":"def api_v1_entity_dependencies(request: Request, entity_key: str, limit: int = 100, cursor: str = \"\"):"},{"line":392,"text":"def api_v1_entity_detail(request: Request, entity_key: str):"},{"line":407,"text":"def api_v1_dependencies(request: Request, limit: int = 100, cursor: str = \"\", parent_entity_key: str = \"\", child_entity_key: str = \"\", relation_type: str = \"\", source_relation: str = \"\", criticality: str = \"\", edge_state: str = \"\"):"},{"line":437,"text":"def api_v1_sources(request: Request):"},{"line":447,"text":"def api_v1_policies(request: Request):"},{"line":457,"text":"def api_v1_collector_runs(request: Request, limit: int = 100, cursor: str = \"\", collector: str = \"\", status: str = \"\"):"}],"mode":"0o750","path":"/opt/cluster-admin-incident-engine/app.py","sha256":"17d95ebfc28cef34846a8999664019d5d032ee8176b7fedd9ceeebfc5c97e3b6","signature_hits":["Cluster Admin Incident Engine","observe/notify","auto-heal отключён","Активные инциденты","VM и CT","Инциденты"]},"state_document_sha256":"8da3ff9f5777480c2230b7a2cf5f42cf9ac0e5e4fdf0e108275bbf777c90dd20"},"v39_exact_failure":{"changes_made":false,"control_plane_error":null,"exact_error":"V38 report identity","identity_confirmed":true,"mutation_outcome":"NO_MUTATION","output_bytes":628,"output_sha256":"e3f31190c59af9293cee34aac7836c9a16164c176d8168b343f0bd120deaf2c3","rollback_restored":false,"rollback_started":false,"runner_json_sha256":"3585dc23eb196bf7f7db8dc489e781bc45f104da44682981b65cf01e9c8c20ab","runner_text_sha256":"dee1aba85e5f84dcbcc3a67ca12319b688378021f2ea32b69c339b96d0595664","state_document_sha256":"e7b2b397b4f6b655b5ef08d00c6ec63fd1d60b30577533843889adb727cd59eb"}}

OUTPUT_END
CHAT_OUTPUT_END
