{
  "schema_version": 1,
  "channel": "homelab-runtime",
  "command_id": "STABLE-LOCAL-RESULT-FEED-AND-FULL-LATEST-PLAN-FIX3-20260728T163543Z",
  "status": "OK",
  "rc": 0,
  "host": "pve01",
  "mode": "verify",
  "component": "stable-local-result-feed-full-latest-plan-fix3-runner-contract",
  "started_at_utc": "2026-07-28T16:39:30Z",
  "finished_at_utc": "2026-07-28T16:39:50Z",
  "reference_register_checked": true,
  "reference_sha256": "5763f2f8edc75fcf6f3951f8c95896d1cc112ceccb6cf5b64a383f540a4deb8e",
  "error_register_checked": true,
  "error_register_sha256": "24934a2c7fa5c26f6e828583c4aefac7f143b40c0171736ed7571e617d55ab83",
  "command_sha256": "9db30ecae10f79ea07365d2acb9855f0dc845d6c4a86a1128212d8e09d958096",
  "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": "b88401e3399424484cba486f4dc05bca6f676770164d7c38e02d8441d51bc2f1",
  "sanitized_output_sha256": "259a2e656163a223bc48f823de2ebd0a55572b9ec95c5c1c40b83f5fcec845ce",
  "output_truncated_in_json": false,
  "full_sanitized_output_url": "https://git.gram1.ru/.well-known/homelab-runtime/latest.txt",
  "output": "HOMELAB_RESULT_CONTRACT={\"changes_made\":false,\"command_id\":\"STABLE-LOCAL-RESULT-FEED-AND-FULL-LATEST-PLAN-FIX3-20260728T163543Z\",\"rollback_restored\":null,\"rollback_started\":false,\"status\":\"OK\",\"version\":1}\n{\"PLAN_SHA256\":\"06a5cb5fb7aaed2588430661b3fcaa94b7d52fcd4a06cd10c0795833d51cda2c\",\"backup_changed\":false,\"changes_made\":false,\"cluster_changed\":false,\"command_id\":\"STABLE-LOCAL-RESULT-FEED-AND-FULL-LATEST-PLAN-FIX3-20260728T163543Z\",\"failure_code_contract\":{\"ADAPTER_CANDIDATE\":47,\"CURRENT_PUBLIC_SURFACE\":46,\"EDGE_CANDIDATE\":52,\"EDGE_DISCOVERY\":50,\"EDGE_SOURCE_LOCK\":51,\"LEDGER_PRECONDITION\":45,\"LOOKUP_CANDIDATE\":48,\"PRODUCTION_DRIFT\":53,\"ROOT_OR_HOST\":41,\"SERVICE_BASIC_HEALTH\":43,\"SERVICE_STABILITY\":44,\"SOURCE_LOCK\":42,\"TEMPORARY_CLEANUP\":54,\"UNEXPECTED\":99,\"UNIT_CANDIDATE\":49},\"gitea_changed\":false,\"minio_changed\":false,\"observations\":{\"candidate\":{\"adapter_sha256\":\"2b6936af2b19ba158aae89b75639590c11134480ce034fb3a8027fb45c914935\",\"edge_container_started_at\":\"2026-07-28T11:06:45.929887242Z\",\"edge_source_sha256\":\"bb8fff32953ac81b7c93a943308c939804262ea8db3c21a344a417adec45e8e8\",\"edge_target_sha256\":\"ae63d937b8d9189cd016784fb735d1fae32a363cb88ebcc7efdecc22665cc8aa\",\"lookup_sha256\":\"acb8a49e008d1c0f1a85219633ee2d4c390d2e60e0c2071ec17a2c5aeb42e57e\",\"unit_sha256\":\"c957d136ad93e1cd1386d42cb15732b798400652952f56ea0746c80e927bbd01\"},\"current_public\":{\"exact_full_output_present\":false,\"exact_http\":200,\"feed_http\":200,\"latest_http\":200},\"fixture\":{\"corruption_http\":409,\"exact_http\":200,\"feed_http\":200,\"latest_http\":200,\"latest_output_present\":true,\"latest_plan_sha_present\":true,\"restart_persistence\":true,\"sequence\":\"efea7986e5d4989d0b8deaa393c8e8a62658185acbc964b14a49a87152a5b9c4\"},\"service_stability\":{\"adapter\":{\"after\":{\"MainPID\":\"11360\",\"NRestarts\":\"22\"},\"before\":{\"MainPID\":\"11360\",\"NRestarts\":\"22\"}},\"lookup\":{\"after\":{\"MainPID\":\"466244\",\"NRestarts\":\"0\"},\"before\":{\"MainPID\":\"466244\",\"NRestarts\":\"0\"}},\"portal\":{\"after\":{\"MainPID\":\"466240\",\"NRestarts\":\"0\"},\"before\":{\"MainPID\":\"466240\",\"NRestarts\":\"0\"}}},\"source_hashes\":{\"/etc/systemd/system/homelab-command-portal.service\":\"8453eab30f5c3ccd285fc9f70fff18f564809bb27f7bf84f51f2ba593aa85263\",\"/etc/systemd/system/homelab-result-lookup.service\":\"4bcc607fd457313f75373ec3d8ec20e7020f13c7cb8a9523fd988a24b0f6609d\",\"/usr/local/sbin/homelab-chat-run\":\"b248a4c32c9cc64e5747e7dce6c7fc0a23f5124a77c71ce72e27a81aceae9d2d\",\"/usr/local/sbin/homelab-command-adapter\":\"a1a7a615c99568bf915d084cc476f0ebf54ab0eedf3ecd578c4b0e072f58c43d\",\"/usr/local/sbin/homelab-command-portal\":\"97c69bd4fccf7272dadc911281c1503f411bae2dc11dac4b22b87f33d678ae52\",\"/usr/local/sbin/homelab-result-lookup\":\"17f8d2a2ea219cdc02b0f8e821f8054b05c01de1253419b3d23349a2d383889c\"}},\"plan\":{\"anti_regression\":[\"AR-001-STABLE-URLS-NO-QUERY-STRING\",\"AR-002-FEED-AND-LATEST-SAME-SEQUENCE\",\"AR-003-LATEST-CONTAINS-FULL-OUTPUT\",\"AR-004-LATEST-CONTAINS-PLAN-SHA256\",\"AR-005-LOCAL-LEDGER-BEFORE-MINIO\",\"AR-006-IMMUTABLE-COLLISION-REJECTED\",\"AR-007-CORRUPTION-RETURNS-409\",\"AR-008-NO-GITEA-LOOKUP-DEPENDENCY\",\"AR-009-NO-MINIO-LOOKUP-DEPENDENCY\",\"AR-010-NO-PORTAL-LOOKUP-DEPENDENCY\",\"AR-011-HISTORICAL-NRESTARTS-ALLOWED\",\"AR-012-PID-AND-NRESTARTS-STABILITY\",\"AR-013-EDGE-SOURCE-SHA-LOCK\",\"AR-014-NGINX-CANDIDATE-MARKER-CARDINALITY\",\"AR-015-NO-SECOND-RUNNER\",\"AR-016-BACKUP-UNTOUCHED\",\"AR-017-FAILURE-RC-IDENTIFIES-STAGE\",\"AR-018-PLAN-SHA-BINDS-APPLY\",\"AR-019-RUNNER-DOES-NOT-USE-PVESH\",\"AR-020-EDGE-DIRECT-SSH-DEBIAN-SUDO\",\"AR-021-STRICT-HOST-KEY-CHECKING\",\"AR-022-SSH-BATCH-MODE-NO-PROMPT\",\"AR-023-SSH-REMOTE-COMMAND-IS-ONE-ARGV\",\"AR-024-EVERY-REMOTE-ARGV-ELEMENT-SHELL-QUOTED\",\"AR-025-PYTHON-C-STUB-ROUNDTRIP-THROUGH-BIN-SH\",\"AR-026-UNQUOTED-SEMICOLON-REGRESSION\",\"AR-027-PRODUCTION-FLATTENED-RUNNER-CONTRACT-SCHEMA\",\"AR-028-NESTED-RUNNER-CONTRACT-BACKWARD-COMPATIBILITY\",\"AR-029-DUPLICATE-CONTRACT-LINE-REJECTED\",\"AR-030-FLATTENED-FIELD-MISMATCH-REJECTED\",\"AR-031-BACKFILL-BEFORE-MUTATION-PASSES\"],\"apply_postconditions\":[\"new runtime smoke writes one immutable local ledger result\",\"permanent feed and latest expose the same result_sequence\",\"permanent latest command_id and capsule_sha256 match smoke\",\"permanent latest contains full output and PLAN_SHA256\",\"readback remains healthy with Portal stopped during controlled test\",\"readback remains healthy when Gitea and MinIO probes fail\",\"edge nginx container ID and StartedAt unchanged\",\"all changed files stable and services stable for 20 seconds\"],\"apply_preconditions\":[\"recompute and require this exact PLAN_SHA256\",\"all source SHA-256 locks unchanged\",\"direct SSH to debian@[PRIVATE_IP] succeeds with strict host-key checking and sudo -n; edge-vm and npmplus identity remain unchanged\",\"Adapter, Portal and Lookup stable for 20 seconds\",\"production ledger root absent\",\"current public exact lookup route healthy\",\"candidate fixture matrix PASS\",\"edge source configuration SHA exact\",\"actual production runner JSON schema fixture passes ledger write\",\"failed APPLY FIX2 is confirmed FAILED_BEFORE_MUTATION with source SHA locks intact\"],\"changes_for_apply\":{\"edge_vm\":{\"container_restart\":false,\"modify\":[\"/opt/npmplus/nginx/proxy_host/9.conf\"],\"reload_only\":\"npmplus nginx\"},\"forbidden\":[\"modify backup\",\"modify cluster membership\",\"modify Gitea repositories\",\"modify MinIO objects\",\"create a second runner\",\"force push\"],\"pve01\":{\"create\":[\"/var/lib/homelab-result-ledger\"],\"do_not_restart\":[\"homelab-command-portal.service\",\"homelab-chat-run\"],\"modify\":[\"/usr/local/sbin/homelab-command-adapter\",\"/usr/local/sbin/homelab-result-lookup\",\"/etc/systemd/system/homelab-result-lookup.service\"],\"restart\":[\"homelab-command-adapter.service\",\"homelab-result-lookup.service\"]}},\"data_contract\":{\"allowed_methods\":[\"GET\",\"HEAD\"],\"cache\":\"no-store/no-cache/must-revalidate\",\"feed_version\":4,\"full_latest_fields\":[\"command_id\",\"capsule_sha256\",\"finished_at_utc\",\"result_sequence\",\"status\",\"runner_rc\",\"runner_document_rc\",\"runner_wrapper_matches_document\",\"PLAN_SHA256\",\"output\",\"result_contract\",\"runner_document\"],\"immutable_identity\":\"{capsule_sha256}/{command_id}.json\",\"integrity_failure_http\":409,\"missing_http\":404,\"recent_results_max\":32,\"runner_contract_normalization\":{\"cross_checks\":[\"result_contract_valid=true when field exists\",\"result_contract_error is null or NONE\",\"changes_made equality\",\"rollback_started equality\",\"rollback_restored equality\",\"result_contract_status is null, NOT_APPLICABLE, or exact contract status\"],\"duplicate_contract_lines\":\"rejected\",\"flattened_schema\":\"exactly one HOMELAB_RESULT_CONTRACT= line required\",\"invalid_or_mismatched_contract\":\"rejected\",\"nested_schema\":\"accepted and validated\"},\"writer_position\":\"after validated runner_document and before evidence bundle creation and MinIO upload\"},\"deterministic_material\":{\"adapter_transform_sha256\":\"0281a8321a6a41f3eccdca5080ea592903248a23597b64079390e48c221cea22\",\"edge_route_block_sha256\":\"ca1609b433b72dba0970aa51983651f5490aeaddafc1687cbd8980ab0a78313d\",\"ledger_helpers_sha256\":\"7aeb36f73fa5427257ea525a69958db7768e40db12305c48c02837eb72f66946\",\"lookup_candidate_sha256\":\"acb8a49e008d1c0f1a85219633ee2d4c390d2e60e0c2071ec17a2c5aeb42e57e\",\"unit_candidate_sha256\":\"c957d136ad93e1cd1386d42cb15732b798400652952f56ea0746c80e927bbd01\"},\"diagnosis\":{\"classification\":\"FAILED_BEFORE_MUTATION\",\"completion_forensic_command_id\":\"STABLE-LOCAL-RESULT-APPLY-FIX2-COMPLETION-FORENSIC-20260728T162843Z\",\"evidence_sha256\":\"07358e9577c93d1efa8e42e745558b0fbd6631eb58d24dfe95907e458f8e6d0d\",\"failed_apply_command_id\":\"STABLE-LOCAL-RESULT-FEED-AND-FULL-LATEST-APPLY-FIX2-20260728T160846Z\",\"failure\":\"runner result contract missing\",\"fix\":\"Normalize both supported runner schemas: prefer a nested result_contract object when present; otherwise require exactly one HOMELAB_RESULT_CONTRACT= line, parse and validate it, and cross-check every available flattened validation field.\",\"root_cause\":\"The ledger writer required runner_document.result_contract as a nested object, but the production runner JSON schema stores the validated contract as a single HOMELAB_RESULT_CONTRACT= JSON line in output plus flattened validation fields. Therefore initial ledger backfill failed before any production mutation.\",\"superseded_plan_command_id\":\"STABLE-LOCAL-RESULT-FEED-AND-FULL-LATEST-PLAN-FIX2-20260728T152616Z\"},\"edge_discovery_contract\":{\"batch_mode\":true,\"pvesh_forbidden\":true,\"qm_guest_exec_forbidden\":true,\"remote_argv\":[\"/usr/bin/sudo\",\"-n\",\"/usr/bin/python3\",\"-B\",\"-c\",\"<compressed-probe-loader>\"],\"remote_command_transport\":\"single remote command string; each remote argv element is shell-quoted with shlex.quote\",\"remote_probe\":\"hostname, exact config SHA, base64 config, Docker container identity/state/network mode and nginx -t\",\"strict_host_key_checking\":true,\"sudo\":\"sudo -n\",\"target\":\"debian@[PRIVATE_IP]\",\"transport\":\"direct-ssh\",\"unquoted_python_c_forbidden\":true,\"writes\":false},\"failure_code_contract\":{\"ADAPTER_CANDIDATE\":47,\"CURRENT_PUBLIC_SURFACE\":46,\"EDGE_CANDIDATE\":52,\"EDGE_DISCOVERY\":50,\"EDGE_SOURCE_LOCK\":51,\"LEDGER_PRECONDITION\":45,\"LOOKUP_CANDIDATE\":48,\"PRODUCTION_DRIFT\":53,\"ROOT_OR_HOST\":41,\"SERVICE_BASIC_HEALTH\":43,\"SERVICE_STABILITY\":44,\"SOURCE_LOCK\":42,\"TEMPORARY_CLEANUP\":54,\"UNEXPECTED\":99,\"UNIT_CANDIDATE\":49},\"objective\":\"Make the two already trusted permanent URLs result-feed.json and latest.json read only from the local immutable result ledger. latest.json must contain the complete sanitized output and PLAN_SHA256. Gitea, MinIO and Portal must not be in the readback critical path.\",\"operation\":\"STABLE_LOCAL_RESULT_FEED_AND_FULL_LATEST_PLAN_FIX3_RUNNER_CONTRACT_COMPAT\",\"read_only_plan\":true,\"rollback\":{\"container_restart_forbidden\":true,\"diagnostics_before_rollback\":true,\"nginx_test_before_reload\":true,\"remove_ledger_only_if_created_by_apply\":true,\"restore_exact_files\":true,\"verify_old_routes_after_restore\":true},\"schema\":1,\"service_health_contract\":{\"basic\":\"loaded, enabled, active, running, Result=success, ExecMainStatus=0, MainPID>1\",\"historical_nonzero_nrestarts_allowed\":true,\"stability_window_seconds\":20,\"stable\":\"MainPID and cumulative NRestarts unchanged\"},\"source_locks\":{\"/etc/systemd/system/homelab-command-portal.service\":\"8453eab30f5c3ccd285fc9f70fff18f564809bb27f7bf84f51f2ba593aa85263\",\"/etc/systemd/system/homelab-result-lookup.service\":\"4bcc607fd457313f75373ec3d8ec20e7020f13c7cb8a9523fd988a24b0f6609d\",\"/usr/local/sbin/homelab-chat-run\":\"b248a4c32c9cc64e5747e7dce6c7fc0a23f5124a77c71ce72e27a81aceae9d2d\",\"/usr/local/sbin/homelab-command-adapter\":\"a1a7a615c99568bf915d084cc476f0ebf54ab0eedf3ecd578c4b0e072f58c43d\",\"/usr/local/sbin/homelab-command-portal\":\"97c69bd4fccf7272dadc911281c1503f411bae2dc11dac4b22b87f33d678ae52\",\"/usr/local/sbin/homelab-result-lookup\":\"17f8d2a2ea219cdc02b0f8e821f8054b05c01de1253419b3d23349a2d383889c\",\"edge\":{\"config\":\"/opt/npmplus/nginx/proxy_host/9.conf\",\"container_id\":\"2f18b3d7f3865edf4bdb4ae658fbecc4f75145acab1ffac2fe57df1d889952c9\",\"container_image\":\"docker.io/zoeyvid/npmplus:2026-06-17-b1\",\"container_name\":\"npmplus\",\"current_sha256\":\"bb8fff32953ac81b7c93a943308c939804262ea8db3c21a344a417adec45e8e8\",\"node\":\"pve03\",\"ssh_batch_mode\":true,\"ssh_host\":\"[PRIVATE_IP]\",\"ssh_strict_host_key_checking\":true,\"ssh_target\":\"debian@[PRIVATE_IP]\",\"ssh_user\":\"debian\",\"sudo_noninteractive\":true,\"vm_name\":\"edge-vm\",\"vmid\":130}},\"stable_urls\":{\"feed\":\"https://git.gram1.ru/.well-known/homelab-runtime/result-feed.json\",\"latest\":\"https://git.gram1.ru/.well-known/homelab-runtime/latest.json\",\"query_parameters_required\":false},\"target\":\"pve01-and-edge-vm\"},\"private_addresses_included\":false,\"rollback_started\":false,\"sanitized\":true,\"schema\":1,\"secrets_included\":false,\"status\":\"PLAN_READY\"}\n"
}
