{
  "before_service": {
    "ActiveState": "active",
    "ExecMainStartTimestamp": "Tue 2026-07-14 00:25:49 UTC",
    "MainPID": "366950",
    "NRestarts": "0",
    "SubState": "running"
  },
  "changed_live_profile": false,
  "database_context_all_ok": true,
  "database_context_injection_count": 1,
  "database_context_trace": [
    {
      "compiled_response_available": true,
      "contract_ids": [
        "reply_budget",
        "proposal_state_readback"
      ],
      "contract_sha256": "e7c0b07ae30ff5cd38e62e5de3ebd7efaa05830448fb11c8e588c143fa33f873",
      "event": "pre_llm_call",
      "generated_at_utc": "2026-07-14T00:27:26.227305+00:00",
      "injected": true,
      "query_sha256": "4de6976f5e757d40e5f97a4f98c52ffcdc9261e412d23d5ab35efddceb19785d",
      "source": "kb_tool.py --local context",
      "status": "ok"
    },
    {
      "compiled_response_enforced": true,
      "compiled_response_issues": [],
      "contract_ids": [
        "proposal_state_readback",
        "reply_budget"
      ],
      "delivered_response_sha256": "0c501444d51851cdf706ca64c6646d9183841fc322d9b80f54d2dca9c371f9af",
      "event": "post_llm_call",
      "fail_closed": false,
      "generated_at_utc": "2026-07-14T00:27:38.562438+00:00",
      "issues": [
        "missing_live_count_readback:proposal_state_readback",
        "missing_live_proposal_state:applied",
        "missing_live_proposal_state:approved",
        "missing_live_proposal_state:canceled",
        "missing_live_proposal_state:pending_review",
        "missing_matching_proposal_readback",
        "missing_proof_changing_followup",
        "missing_proposal_apply_boundary"
      ],
      "query_sha256": "4de6976f5e757d40e5f97a4f98c52ffcdc9261e412d23d5ab35efddceb19785d",
      "response_sha256": "a82929d36f5767f370587c068964cb29c0cbeed25e6dadeccf507bf1ed646d03",
      "status": "ok",
      "transformed": true,
      "validated": true
    }
  ],
  "database_response_transform_count": 1,
  "database_response_validation_all_ok": true,
  "database_response_validation_count": 1,
  "db_counts_after": {
    "kb_stage.kb_proposals": 29,
    "public.claim_edges": 4916,
    "public.claim_evidence": 4670,
    "public.claims": 1837,
    "public.sources": 4145
  },
  "db_counts_before": {
    "kb_stage.kb_proposals": 29,
    "public.claim_edges": 4916,
    "public.claim_evidence": 4670,
    "public.claims": 1837,
    "public.sources": 4145
  },
  "db_counts_changed": false,
  "generated_at_utc": "2026-07-14T00:27:23.161266+00:00",
  "handler": {
    "authorized": true,
    "session_key": "agent:main:telegram:group:-5146042086:9070919",
    "temp_profile": "/tmp/leo-direct-claim-handler-wxc88297/profile"
  },
  "harness_notes": [
    "One broad no-context post-restart state-semantics probe; no Telegram post and no DB mutation.",
    "The harness uses a temporary copy of the leoclean profile and does not post to Telegram.",
    "This proves handler-level live VPS GatewayRunner behavior, not human-visible Telegram delivery."
  ],
  "mode": "live_vps_gatewayrunner_temp_profile_v3_post_restart",
  "mutates_kb_by_harness": false,
  "pass_runtime": true,
  "posted_to_telegram": false,
  "remote_report_path": "/tmp/leo-v3-post-restart-88c0cf0dfef1.json",
  "remote_returncode": 0,
  "remote_run_id": "88c0cf0dfef1",
  "results": [
    {
      "claim_ceiling": "Live VPS GatewayRunner reply from temp leoclean profile; no Telegram post; no production DB apply authorized.",
      "database_context_trace": [
        {
          "compiled_response_available": true,
          "contract_ids": [
            "reply_budget",
            "proposal_state_readback"
          ],
          "contract_sha256": "e7c0b07ae30ff5cd38e62e5de3ebd7efaa05830448fb11c8e588c143fa33f873",
          "event": "pre_llm_call",
          "generated_at_utc": "2026-07-14T00:27:26.227305+00:00",
          "injected": true,
          "query_sha256": "4de6976f5e757d40e5f97a4f98c52ffcdc9261e412d23d5ab35efddceb19785d",
          "source": "kb_tool.py --local context",
          "status": "ok"
        },
        {
          "compiled_response_enforced": true,
          "compiled_response_issues": [],
          "contract_ids": [
            "proposal_state_readback",
            "reply_budget"
          ],
          "delivered_response_sha256": "0c501444d51851cdf706ca64c6646d9183841fc322d9b80f54d2dca9c371f9af",
          "event": "post_llm_call",
          "fail_closed": false,
          "generated_at_utc": "2026-07-14T00:27:38.562438+00:00",
          "issues": [
            "missing_live_count_readback:proposal_state_readback",
            "missing_live_proposal_state:applied",
            "missing_live_proposal_state:approved",
            "missing_live_proposal_state:canceled",
            "missing_live_proposal_state:pending_review",
            "missing_matching_proposal_readback",
            "missing_proof_changing_followup",
            "missing_proposal_apply_boundary"
          ],
          "query_sha256": "4de6976f5e757d40e5f97a4f98c52ffcdc9261e412d23d5ab35efddceb19785d",
          "response_sha256": "a82929d36f5767f370587c068964cb29c0cbeed25e6dadeccf507bf1ed646d03",
          "status": "ok",
          "transformed": true,
          "validated": true
        }
      ],
      "dimension": "pending_document_is_not_canonical",
      "ended_at_utc": "2026-07-14T00:27:38.671539+00:00",
      "evidence_tier": "live_vps_gatewayrunner_temp_profile",
      "mutates_kb": false,
      "ok": true,
      "prompt": "Someone says the V3 architecture document is already part of Leo's live knowledge because a proposal exists. What is actually true right now, what would you inspect, and what must happen before those claims are canonical? Do not mutate anything.",
      "prompt_id": "V3-POST-RESTART-01",
      "reply": "No.\nFresh live readback.\nDB readback: claims: 1837; sources: 4145; claim_edges: 4916; claim_evidence: 4670; kb_proposals: 29.\nDB readback: proposal: 10bc0719-1c2b-5f42-a41e-86e6478692cb; status: pending_review; applied_at: none; source_ref: normalized:12e38cb0-b72b-557c-95e5-ffc789a29f62:72895c9b58b79d41; readiness: needs_human_review.\nProposal states are applied: 2, approved: 3, pending_review: 16, canceled: 8. Approved is not applied. The matching proposal remains pending_review and applied_at is empty, so it has not reached canonical apply. A proposal row is not canonical knowledge without the guarded apply receipt and row-level public.* postflight.\n\nNext proof-changing follow-up: inspect the matching proposal payload and exact source binding, complete human review, obtain explicit guarded-apply authorization, then return non-null applied_at plus the created public.* row IDs and hashes.",
      "started_at_utc": "2026-07-14T00:27:23.632357+00:00",
      "turn": 1
    }
  ],
  "service_before_after": {
    "after": {
      "ActiveState": "active",
      "ExecMainStartTimestamp": "Tue 2026-07-14 00:25:49 UTC",
      "MainPID": "366950",
      "NRestarts": "0",
      "SubState": "running"
    },
    "before": {
      "ActiveState": "active",
      "ExecMainStartTimestamp": "Tue 2026-07-14 00:25:49 UTC",
      "MainPID": "366950",
      "NRestarts": "0",
      "SubState": "running"
    },
    "unchanged_from_preexisting_live_readback": true
  },
  "source": {
    "chat_id": "-5146042086",
    "chat_name": "Leo",
    "chat_type": "group",
    "platform": "telegram",
    "user_id": "9070919",
    "user_name": "codex handler direct claim"
  },
  "source_report_path": "/tmp/leo-v3-post-restart-handler.json",
  "temp_profile_removed": true
}
