CHAT_OUTPUT_BEGIN
COMMAND_ID=RESULT-INTEGRATION-DESIGN-PREFLIGHT-20260727T064218Z
STATUS=FAIL
RC=1
HOST=pve01
MODE=verify
COMPONENT=result-integration
REFERENCE_REGISTER_CHECK=OK
REFERENCE_SHA256=5763f2f8edc75fcf6f3951f8c95896d1cc112ceccb6cf5b64a383f540a4deb8e
ERROR_REGISTER_CHECK=OK
ERROR_REGISTER_SHA256=24934a2c7fa5c26f6e828583c4aefac7f143b40c0171736ed7571e617d55ab83
COMMAND_SHA256=2abcd8ed3caba3c56dfe1df39f3d834c9ed9e4972caf331a8e3d2132922beb6a
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=1
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=9d100401351f949bb1c6fb06d107acda5f52729fbcaedc717a0c0ce64222b74b
SANITIZED_OUTPUT_SHA256=e3e004dbf0b954143046f1135c5c929091333d74b8210438c0cdf9dc959aac55
OUTPUT_BEGIN
{"architecture":{"adapter_functions":{"dispatch":{"calls":["AdapterError","bind_enrollment","consume_bootstrap","enroll_device","evidence_url","get","import_capsule","public_state","response_ok","start_execution","str"],"line":2419,"names":["AdapterError","Any","bind_enrollment","consume_bootstrap","dict","enroll_device","evidence_url","import_capsule","operation","public_state","request","response_ok","start_execution","str"],"strings":["","bind_enrollment","client_ip","consume_bootstrap","device_token","enroll","evidence_url","execute","health","import","ok","op","session_token","short_id","state","status","token","unsupported operation","upload_path","version"]},"evidence_url":{"calls":["AdapterError","GlobalLock","authorize_session","get","isinstance","load_json","sign_evidence","state_path","str"],"line":2186,"names":["AdapterError","Any","GlobalLock","authorize_session","client_ip","dict","digest","evidence","isinstance","load_json","object_key","session_token","short_id","sign_evidence","signed","state","state_path","str"],"strings":["evidence","evidence not ready","expires_at_utc","object_key","sha256","url"]},"public_state":{"calls":["GlobalLock","authorize_session","load_json","sanitize_state","state_path"],"line":1311,"names":["Any","GlobalLock","authorize_session","client_ip","dict","load_json","sanitize_state","session_token","short_id","state","state_path","str"],"strings":[]},"sanitize_state":{"calls":["get","isinstance"],"line":1327,"names":["Any","dict","evidence","execution","isinstance","key","public_evidence","public_execution","state","str"],"strings":["bytes","capsule_bytes","capsule_sha256","command_object","error","evidence","execution","finished_at_utc","gateway_verified","imported_at_utc","manifest","object_key","runner_document_rc","runner_json_sha256","runner_rc","runner_status","runner_text_sha256","runner_wrapper_matches_document","schema_version","sha256","short_id","started_at_utc","status"]},"upload_evidence":{"calls":["AdapterError","remote_evidence_presign","run_command","sha256_file","sign_evidence","str","token_hex","unlink"],"line":1668,"names":["AdapterError","FileNotFoundError","Path","RUN_DIR","bundle","digest","object_key","remote_evidence_presign","result","run_command","secrets","sha256_file","sign_evidence","signed","signed_get","str","verify","verify_path"],"strings":["--connect-timeout","--fail","--fail-with-body","--max-time","--output","--request","--resolve","--show-error","--silent","--upload-file",".tgz",".verify-","/usr/bin/curl","10","120","; stderr=","PUT","evidence gateway SHA verification failed","evidence gateway verification failed: ","evidence upload failed: rc=","evidence.vpn.gram1.ru:443:[PRIVATE_IP]","url"]},"worker":{"calls":["AdapterError","GlobalLock","Path","atomic_json","chmod","create_evidence_bundle","dict","ensure_layout","get","getpid","int","isinstance","iso","load_json","open","read_bytes","run_existing_runner","select_runner_artifacts","sha256_bytes","sha256_file","state_path","str","substitute_argv","time","type","update","upload_evidence","validate_capsule","verify_command_object","verify_local_integrity","worker_state_owned","write","write_text"],"line":1994,"names":["AdapterError","Exception","GlobalLock","KeyError","Path","RUNNER","RUN_DIR","SAFE_ENV","TypeError","ValueError","_","argv","atomic_json","bundle","command_object","create_evidence_bundle","current","dict","display","document_rc","document_status","ensure_layout","environment","evidence_bytes","evidence_sha","exc","int","isinstance","iso","load_json","object_key","os","path","payload_root","prefix","raw","result","run_existing_runner","runner_args","runner_document","runner_json","runner_txt","select_runner_artifacts","sha256_bytes","sha256_file","short_id","started_epoch","state","state_path","str","stream","substitute_argv","time","type","upload_evidence","validate_capsule","verify_command_object","verify_local_integrity","worker_state_owned","wrapper_log","wrapper_matches"],"strings":["--",".runner.log","/","/evidence.tgz",":","FAIL","HOMELAB_TIMEOUT","RUNNING","RunnerWrapperMismatch","WORKER_ERROR=","\\n","a","argv","bytes","capsule SHA changed","capsule manifest changed","capsule_bytes","capsule_path","capsule_sha256","command object state missing","command-portal-smoke","command_id","command_object","component","error","evidence","execution","existing runner returned a different rc after writing its public artifact; runtime publication or wrapper completion failed","finished_at_utc","gateway_verified","local_bundle","manifest","message","mode","object_key","payload_root","portal","portal-tests","rc","replace","runner artifact rc invalid","runner_document_rc","runner_json","runner_json_sha256","runner_rc","runner_status","runner_text","runner_text_sha256","runner_wrapper_matches_document","sha256","status","timeout_seconds","type","utf-8","worker finalization ownership lost","worker state invalid: "]}},"command_templates":{"adapter":[["/usr/bin/curl","--fail-with-body","--silent","--show-error","--connect-timeout","10","--max-time","120","--request","PUT"]],"portal":[],"runner":[]},"portal_classes":{"Handler":{"line":451,"methods":["content_length","do_GET","do_POST","error_reply","log_message","path_parts","read_body","redirect","reply"],"strings":["","\n"," - ","(/enroll/)[A-Za-z0-9_-]{32,160}","([?&]t=)[^&\\s]+",",",".hcmd",".upload-","/api/enroll","/api/import","/api/state/([A-Z2-7]{10,20})","/bridge-setup.cmd","/bridge-setup.cmd\">Скачать установщик</a></p>\n<p>После запуска установщика файлы <code>.hcmd</code> будут открываться двойным кликом.</p>\n</body></html>","/bridge/bridge.cmd","/enroll/","/healthz","/r/","/r/([A-Z2-7]{10,20})","/r/([A-Z2-7]{10,20})/evidence","/r/([A-Z2-7]{10,20})/execute","0",":","; Max-Age=","; Path=/; Secure; HttpOnly; SameSite=Strict","<!doctype html>\n<html lang=\"ru\"><head><meta charset=\"utf-8\">\n<meta name=\"robots\" content=\"noindex,nofollow,noarchive\">\n<title>Homelab Bridge</title>\n<style>body{font-family:Segoe UI,Arial;background:#111827;color:#e5e7eb;max-width:760px;margin:40px auto;padding:20px}a{display:inline-block;background:#60a5fa;color:#172554;padding:12px 18px;border-radius:8px;text-decoration:none;font-weight:700}</style>\n</head><body>\n<h1>Установка Homelab Bridge</h1>\n<p>Профиль: ","</p>\n<p>Ссылка одноразовая и уже привязана к этому NetBird-адресу.</p>\n<p><a href=\"","APPROVE","Authorization","Bearer ","Cache-Control","Content-Disposition","Content-Length","Content-Length required","Content-Security-Policy","Content-Type","Expires","HIGH","HTTP/1.1","HomelabCommandPortal/1","Location","PORTAL_ERROR=","Pragma","Referrer-Policy","Set-Cookie","X-Content-Type-Options","X-Robots-Tag","\\1[REDACTED]","__Host-HLSESSION=","adapter","application/json; charset=utf-8","application/octet-stream","ascii","attachment; filename=\"HomelabBridgeSetup.cmd\"","attachment; filename=\"bridge.cmd\"","bind_enrollment","client_ip","command confirmation mismatch","command manifest unavailable","command_id","confirm","consume_bootstrap","default-src 'none'; style-src 'unsafe-inline'; form-action 'self'; frame-ancestors 'none'; base-uri 'none'","device authorization required","device_token","enroll","evidence_url","execute","health","import","invalid device token","invalid execute form","label","manifest","no-cache","no-referrer","no-store, no-cache, must-revalidate, max-age=0","noindex, nofollow,noarchive","nosniff","not found","ok","op","request body too large","risk","session_token","short request body","short_id","state","status","strict","t","text/html; charset=utf-8","text/plain; charset=utf-8","token","upload_path","url","utf-8","version","wb"]},"PortalError":{"line":40,"methods":[],"strings":[]},"Server":{"line":895,"methods":[],"strings":[]}},"portal_functions":{"adapter_call":{"calls":["PortalError","append","close","connect","dumps","encode","get","isinstance","join","len","loads","recv","sendall","settimeout","socket","split","str"],"line":44,"names":["Any","PortalError","SOCKET_PATH","chunk","chunks","connection","dict","encoded","exc","isinstance","json","len","raw","request","result","socket","str","total","value"],"strings":["\n",",",":","adapter error","adapter request too large","adapter response is not JSON","adapter response not object","adapter response too large","adapter result not object","error","ok","result"]},"main":{"calls":["ArgumentParser","Server","add_argument","mkdir","parse_args","self_test","serve_forever","umask","wait_for_adapter"],"line":1044,"names":["BIND","Handler","INBOX","PORT","Server","argparse","args","int","os","parser","self_test","server","wait_for_adapter"],"strings":["--self-test","store_true"]}},"relevant_literals":{"adapter":["-evidence.tgz",".evidence-","/evidence.tgz","/run/homelab-command-adapter/adapter.sock","/run/lock/homelab-command-adapter.lock","/usr/local/sbin/evidence-presign-put","/usr/local/sbin/evidence-sign","/usr/local/sbin/homelab-chat-run","/usr/local/sbin/homelab-command-store","/usr/local/sbin/homelab-vm130-exec","/var/lib/homelab-chat-run/public","/var/lib/homelab-command-adapter","/var/lib/homelab-command-portal/inbox","evidence","evidence gateway SHA verification failed","evidence gateway verification failed: ","evidence not ready","evidence publisher integrity failed","evidence signer failed: ","evidence signer integrity failed","evidence signer response mismatch","evidence signer returned non-JSON","evidence upload failed: rc=","evidence-test","evidence.vpn.gram1.ru:443:[PRIVATE_IP]","evidence_object_deleted","evidence_url","existing runner returned a different rc after writing its public artifact; runtime publication or wrapper completion failed","gitea","gitea_changed","homelab-command-capsule","homelab-command-capsules","homelab-command-portal","https://evidence.vpn.gram1.ru","minio_evidence_changed","result","results","runtime_evidence_publication"],"portal":["/evidence\">Скачать проверенное evidence</a></p>","/r/([A-Z2-7]{10,20})/evidence","/run/homelab-command-adapter/adapter.sock","/var/lib/homelab-command-portal/inbox","Gitea runtime evidence","adapter result not object","evidence","evidence_url","gitea","result"],"runner":[]},"runner_functions":{}},"backup_changed":false,"candidate_directories":{"adapter_root":{"exists":true,"gid":990,"is_dir":true,"is_symlink":false,"mode":"0o750","path":"/var/lib/homelab-command-adapter","uid":0},"result_documents_candidate":{"exists":false,"path":"/var/lib/homelab-command-adapter/public-results"},"result_signing_candidate":{"exists":false,"path":"/var/lib/homelab-command-adapter/result-signing"},"runner_public":{"exists":true,"gid":0,"is_dir":true,"is_symlink":false,"mode":"0o700","path":"/var/lib/homelab-chat-run/public","uid":0},"runner_raw":{"exists":true,"gid":0,"is_dir":true,"is_symlink":false,"mode":"0o700","path":"/var/lib/homelab-chat-run/raw","uid":0},"runner_root":{"exists":true,"gid":0,"is_dir":true,"is_symlink":false,"mode":"0o700","path":"/var/lib/homelab-chat-run","uid":0}},"changes_made":false,"checks":{"adapter_expected_sha":true,"adapter_has_final_evidence_state":true,"adapter_healthy":true,"evidence_health_public":true,"git_publication_present":false,"known_history_command_matches":true,"known_history_json_public":true,"known_history_text_public":true,"portal_expected_sha":true,"portal_health_public":true,"portal_healthy":true,"runner_expected_sha":true,"ssh_keygen_available":true},"cluster_changed":false,"command_id":"RESULT-INTEGRATION-DESIGN-PREFLIGHT-20260727T064218Z","design_decision":{"adapter_state_auth_required":true,"authoritative_reader_source":"command-scoped Gitea history document, not mutable latest pointers","final_document_publisher":"Adapter after evidence upload and final state commit","latest_pointer_authoritative":false,"public_key_path":"runtime/keys/result-signing-ed25519.pub","public_path":"runtime/final/<command_id>/<capsule_sha256>.json","reader_inputs_known_before_execution":["command_id","capsule_sha256"],"runner_history_preserved":true,"signature_scheme_preference":"Ed25519 detached signature over canonical JSON using dedicated result-signing key","terminal_only":true},"gitea_changed":false,"inventory":{"adapter":{"exists":true,"expected_match":true,"is_symlink":false,"path":"/usr/local/sbin/homelab-command-adapter","sha256":"8d0af84dcfcf6ddbfd1c4e6cbb059cef66b4cfc6c75bfd66da649acc229c7f5e"},"portal":{"exists":true,"expected_match":true,"is_symlink":false,"path":"/usr/local/sbin/homelab-command-portal","sha256":"8056faf4ef6348f0b06319ad3c49fbfeeadf25b6370f857ea19569bd27652ee2"},"runner":{"exists":true,"expected_match":true,"is_symlink":false,"path":"/usr/local/sbin/homelab-chat-run","sha256":"b248a4c32c9cc64e5747e7dce6c7fc0a23f5124a77c71ce72e27a81aceae9d2d"}},"known_history_fields":["block_reason","change_declared","changes_made","channel","command_id","command_rc","command_sha256","component","duplicate_failed_command_blocked","error_register_checked","error_register_sha256","execution_started","finished_at_utc","full_sanitized_output_url","host","mode","mutation_outcome","output","output_truncated_in_json","private_addresses_included","raw_evidence_retained_locally","raw_evidence_sha256","rc","reference_register_checked","reference_sha256","result_contract_error","result_contract_status","result_contract_valid","rollback_restored","rollback_started","sanitized","sanitized_output_sha256","schema_version","secrets_included","started_at_utc","status"],"plan_requirements":{"modify_candidates":["/usr/local/sbin/homelab-command-adapter"],"must_preserve":["/usr/local/sbin/homelab-chat-run","/usr/local/sbin/homelab-command-portal","existing evidence publication","existing Gitea runtime history","backup","cluster"],"possible_new_helpers":["/usr/local/sbin/homelab-result-publish"],"possible_new_state_dirs":["/var/lib/homelab-command-adapter/result-signing","/var/lib/homelab-command-adapter/public-results"],"required_postconditions":["exact command URL resolves without auth","document contains terminal Adapter state","evidence SHA and gateway_verified present","canonical document SHA validates","signature validates with published key","no secrets or private addresses","mutable latest not used for lookup"]},"private_addresses_included":false,"public_probe":{"evidence_health":{"http_code":200,"json_keys":["service","status"],"reachable":true},"history_json":{"http_code":200,"json_keys":["block_reason","change_declared","changes_made","channel","command_id","command_rc","command_sha256","component","duplicate_failed_command_blocked","error_register_checked","error_register_sha256","execution_started","finished_at_utc","full_sanitized_output_url","host","mode","mutation_outcome","output","output_truncated_in_json","private_addresses_included","raw_evidence_retained_locally","raw_evidence_sha256","rc","reference_register_checked","reference_sha256","result_contract_error","result_contract_status","result_contract_valid","rollback_restored","rollback_started","sanitized","sanitized_output_sha256","schema_version","secrets_included","started_at_utc","status"],"reachable":true},"history_text":{"http_code":200,"json_keys":null,"reachable":true},"portal_health":{"http_code":200,"json_keys":["adapter","status","version"],"reachable":true}},"rollback_started":false,"sanitized":true,"schema":1,"secrets_included":false,"service_files":{"adapter":{"content":"[Unit]\nDescription=Homelab command adapter\nAfter=network-online.target\nWants=network-online.target\n\n[Service]\nType=simple\nExecStart=/usr/bin/python3 -B /usr/local/sbin/homelab-command-adapter --serve\nUser=root\nGroup=homelab-command-portal\nUMask=0027\nRuntimeDirectory=homelab-command-adapter\nRuntimeDirectoryMode=0750\nRestart=on-failure\nRestartSec=2\nNoNewPrivileges=false\nPrivateTmp=true\nProtectClock=true\nProtectControlGroups=true\nProtectKernelLogs=true\nProtectKernelModules=true\nProtectKernelTunables=true\nRestrictRealtime=true\nLockPersonality=true\nMemoryDenyWriteExecute=true\nSystemCallArchitectures=native\nTimeoutStopSec=15\n\n[Install]\nWantedBy=multi-user.target\n","exists":true,"path":"/etc/systemd/system/homelab-command-adapter.service","sha256":"74d0f37878652ed9d46b53ae8556bbb30ebd683741f293c3f59b3527876ed2d7"},"portal":{"content":"[Unit]\nDescription=Homelab command portal\nAfter=network-online.target homelab-command-adapter.service\nRequires=homelab-command-adapter.service\nWants=network-online.target\nStartLimitIntervalSec=30\nStartLimitBurst=3\n\n[Service]\nType=simple\nExecStartPre=/usr/bin/python3 -B /usr/local/sbin/homelab-command-portal --self-test\nExecStart=/usr/bin/python3 -B /usr/local/sbin/homelab-command-portal\nUser=homelab-command-portal\nGroup=homelab-command-portal\nUMask=0077\nRestart=on-failure\nRestartSec=2\nNoNewPrivileges=true\nPrivateTmp=true\nPrivateDevices=true\nProtectSystem=strict\nProtectHome=true\nReadWritePaths=/var/lib/homelab-command-portal\nProtectClock=true\nProtectControlGroups=true\nProtectKernelLogs=true\nProtectKernelModules=true\nProtectKernelTunables=true\nRestrictSUIDSGID=true\nRestrictRealtime=true\nLockPersonality=true\nMemoryDenyWriteExecute=true\nRestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX\nSystemCallArchitectures=native\nTimeoutStopSec=15\n\n[Install]\nWantedBy=multi-user.target\n","exists":true,"path":"/etc/systemd/system/homelab-command-portal.service","sha256":"8453eab30f5c3ccd285fc9f70fff18f564809bb27f7bf84f51f2ba593aa85263"}},"services":{"adapter":{"active":"active","pid":"976008","restarts":"0","sub":"running"},"portal":{"active":"active","pid":"976035","restarts":"0","sub":"running"}},"signing_tools":{"gpg":{"available":true,"path":"/usr/bin/gpg","version":"gpg (GnuPG) 2.4.7\nlibgcrypt 1.11.0\nCopyright (C) 2024 g10 Code GmbH\nLicense GNU GPL-3.0-or-later <https://gnu.org/licenses/gpl.html>","version_rc":0},"openssl":{"available":true,"path":"/usr/bin/openssl","version":"OpenSSL 3.5.6 7 Apr 2026 (Library: OpenSSL 3.5.6 7 Apr 2026)","version_rc":0},"ssh-keygen":{"available":true,"path":"/usr/bin/ssh-keygen","version":"unknown option -- ?\nusage: ssh-keygen [-q] [-a rounds] [-b bits] [-C comment] [-f output_keyfile]\n                  [-m format] [-N new_passphrase] [-O option]\n                  [-t dsa | ecdsa | ecdsa-sk | ed25519 | ed25519-sk | rsa]","version_rc":1}},"status":"FAIL"}

OUTPUT_END
CHAT_OUTPUT_END
