{
  "checker": {
    "claims": [
      {
        "claim": "The MCP server is started with dhp-mcp --root and rejects a malformed handoff ID",
        "command": "<guest-path> --root <guest-path> tools/call {\"tool\": \"dhp_status\", \"arguments\": {\"handoff_id\": \"not-a-handoff\"}}",
        "evidence": "malformed handoff_id (want 64 lowercase hex chars)\\\", \\\"code\\\": \\\"ValidationError\\\"}\", \"type\": \"text\"}], \"isError\": false, \"structuredContent\": {\"result\": \"{\\\"ok\\\": false, \\\"error\\\": \\\"malformed handoff_id (want 64 lowercase hex chars)\\\", \\\"code\\\": \\\"ValidationError\\\"}\"}}",
        "expected": "ValidationError: malformed handoff_id (want 64 lowercase hex chars)",
        "input": "{\"tool\": \"dhp_status\", \"arguments\": {\"handoff_id\": \"not-a-handoff\"}}",
        "kind": "claim",
        "outcome": "Real input produced the expected result: malformed handoff_id (want 64 lowercase hex chars)",
        "source": "run `dhp-mcp --root <dir>` and point any MCP client at it.",
        "source_checked": true,
        "source_file": "README.md",
        "verdict": "yes"
      }
    ],
    "cycle_checks": [
      {
        "claim": "The supervisor runs a periodic lease scan loop until its duration elapses",
        "command": "<guest-path> <guest-path> sup1 2",
        "evidence": "{\n \"supervisor\": \"sup1\",\n \"was_leader\": true,\n \"actions\": [],\n \"metrics\": {\n  \"scans\": 2,\n  \"orphans\": 0,\n  \"dlq\": 0,\n  \"leadership_changes\": 1,\n  \"errors\": 0,\n  \"uptime_s\": 2.0\n }\n}\n2026-10-25 23:05:00,684 INFO [dhp] store: initialized schema v3 at <guest-path>\n2026-10-25 23:05:00,685 INFO [dhp] supervisor sup1: watching (scan every 1.0s)\n2026-10-25 23:05:00,688 INFO [dhp] supervisor sup1: became leader\n2026-10-25 23:05:02,694 INFO [dhp] supervisor sup1: stopped (0 actions)",
        "expected": "two scans run, leader elected, JSON summary printed",
        "input": "root <guest-path>, supervisor id sup1, 2 seconds",
        "kind": "cycle",
        "method": "run-once: dhp-supervisor with a 2 second duration (manual trigger, no source edits)",
        "outcome": "Triggered one cycle by hand (run-once: dhp-supervisor with a 2 second duration (manual trigger, no source edits); normal trigger: scan every supervisor_scan_s (default 1.0s) for the duration given on the command line): {\n \"supervisor\": \"sup1\",\n \"was_leader\": true,\n \"actions\": [],\n \"metrics\": {\n  \"scans\": 2,\n  \"orphans\": 0,\n  \"dlq\": 0,\n  \"leadership_changes\": 1,\n  \"errors\": 0,\n  \"uptime_s\": 2.0\n }\n}\n2026-10-25 23:05:00,684 INFO [dhp] store: initialized schema v3 at <guest-path>\n2026-10-25 23:05:00,685 INFO [dhp] supervisor sup1: watching (scan every 1.0s)\n2026-10-25 23:05:00,688 INFO [dhp] supervisor sup1: became leader\n2026-10-25 23:05:02,694 INFO [dhp] supervisor sup1: stopped (0 actions)",
        "returncode": 0,
        "schedule": "scan every supervisor_scan_s (default 1.0s) for the duration given on the command line",
        "source": "dhp/supervisor3.py",
        "verdict": "yes"
      }
    ],
    "details": {
      "argv": [
        "<guest-path>",
        "--root",
        "<guest-path>"
      ],
      "kind": "mcp",
      "scope": "product operation",
      "serverInfo": {
        "name": "dhp",
        "version": ""
      },
      "tool_result": {
        "content": [
          {
            "text": "{\"ok\": false, \"error\": \"malformed handoff_id (want 64 lowercase hex chars)\", \"code\": \"ValidationError\"}",
            "type": "text"
          }
        ],
        "isError": false,
        "structuredContent": {
          "result": "{\"ok\": false, \"error\": \"malformed handoff_id (want 64 lowercase hex chars)\", \"code\": \"ValidationError\"}"
        }
      },
      "tool_result_checked": true,
      "tool_schema_bytes": 9441,
      "tools": [
        "dhp_dispatch",
        "dhp_claim",
        "dhp_checkpoint",
        "dhp_heartbeat",
        "dhp_complete",
        "dhp_recover",
        "dhp_status",
        "dhp_last_checkpoint",
        "dhp_health",
        "dhp_record_effect",
        "dhp_effect_done",
        "dhp_note_spend",
        "dhp_note_activity",
        "dhp_request_approval",
        "dhp_approval_status",
        "dhp_approve",
        "dhp_deny",
        "dhp_require_capability"
      ],
      "working": true
    },
    "evidence_strength": "readme_checked",
    "example_checks": [
      {
        "claim": "Run the conformance suite (README Contributing: dhp-conform reports 10/10)",
        "command": "<guest-path>",
        "deferred": false,
        "evidence": "nformance suite (v0.4):\n  PASS no-lost-results\n  PASS no-crossed-inputs\n  PASS no-untyped-results\n  PASS no-silent-budget-overrun\n  PASS no-runner-lock-in\n  PASS exactly-one-wins\n  PASS fencing\n  PASS leader-election\n  PASS transport\n  PASS dead-letter-queue\n\n10 passed, 0 failed\ncomplete aed2c1c311af: schema failure \u2192 DLQ: result violates output_schema: 'x' is a required property\n\nFailed validating 'required' in schema:\n    {'type': 'object',\n     'properties': {'x': {'type': 'integer'}},\n     'required': ['x']}\n\nOn instance:\n    {'wrong': 'shape'}\norphan dc32c4cbf057: DLQ (attempt 1 >= max 1)",
        "expected": "10 passed, 0 failed",
        "input": "no arguments",
        "kind": "example",
        "outcome": "command completed successfully",
        "returncode": 0,
        "source": "README.md Contributing section",
        "verdict": "yes"
      },
      {
        "claim": "Run the pytest suite documented in README Contributing; warnings plugin disabled and the test that hardcodes a missing author path deselected",
        "command": "<guest-path> -m pytest tests/ -q -p no:warnings --deselect tests/test_adversarial.py::test_kill9_during_writes",
        "deferred": false,
        "evidence": "...........................................................              [100%]\n59 passed, 1 deselected in 22.64s",
        "expected": "59 passed, 1 deselected",
        "input": "tests/ -q, -p no:warnings, deselect test_kill9_during_writes",
        "kind": "example",
        "outcome": "command completed successfully",
        "returncode": 0,
        "source": "README.md Contributing section",
        "verdict": "yes"
      }
    ],
    "status": "PASS"
  },
  "deviations": [
    "Used a venv because Ubuntu 24.04 blocks system-wide pip (PEP 668); README-required Python >=3.10 is satisfied by 3.12.3.",
    "pip install -e \".[dev]\" created build metadata inside the checkout (egg-info); no product source was edited.",
    "tests/test_adversarial.py::test_kill9_during_writes fails on this VM: the subprocess script hardcodes <host-path> and the test kills the child after a fixed 0.4s sleep, so the DB file was not created before sqlite3.connect (OperationalError). Deselected for the documented pytest example; not fixed in product source.",
    "Pytest output includes an unhandled thread exception: OSError Bad file descriptor from TransportServer's accept loop (dhp/net.py line 177) during teardown. Suppressed in the replayed example with -p no:warnings; the run itself passed 59 tests. This is a real issue in the repo to investigate.",
    "README test count is stale: it says 45 passed; the suite now has 60 tests (59 pass here).",
    "demo/run_mad_demo.py could not run: it opens <host-path> (FileNotFoundError). Not worked around; the path is not created in the guest. scripts/daily_loop.sh has the same hardcoded path and is the author's cron/git-push script, not a product cycle.",
    "The README's MCP promise was verified with dhp_status rejecting a malformed handoff ID rather than with dhp_dispatch's returned handoff ID, because the ID is nonce-based and changes every run; the checker cannot match a random value. The successful dispatch was observed manually with ok true."
  ],
  "fault_owner": "repo",
  "main_blocker": null,
  "operation": "Start the DHP MCP server (dhp-mcp --root <dir>) and dispatch/validate durable work through its tools",
  "operation_scope": "Linux Ubuntu 24.04 guest, Python 3.12.3 in a venv at <guest-path>, pip install -e \".[dev]\" from the pinned checkout. Local stdio MCP only. Kill demo and network chaos not run (need author-specific paths and internet). A successful dhp_dispatch was observed by hand (handoff id returned with ok true); replay checks a malformed-id rejection because the handoff id contains a nonce and changes every run.",
  "outcome": "working",
  "plain_failure": null,
  "steps": [
    "python3 -m venv <guest-path>",
    "<guest-path> -m pip install -q -e \".[dev]\"",
    "<guest-path> -m pytest tests/ -q -p no:warnings --deselect tests/test_adversarial.py::test_kill9_during_writes  (59 passed, 1 deselected)",
    "<guest-path> (10 passed, 0 failed)",
    "<guest-path> --root <guest-path>  (stdio JSON-RPC: tools/call dhp_dispatch -> ok true, handoff_id returned; tools/call dhp_status with malformed id -> ValidationError)",
    "<guest-path> <guest-path> sup1 2  (two scans, leader elected, 0 actions)"
  ],
  "stuck_step": null,
  "suggested_fix": "Remove hardcoded author paths (<host-path>) from demo/run_mad_demo.py, demo/net_chaos.py, demo/crawl_worker.py and tests/test_adversarial.py (use paths relative to the repo or tempdirs); make the kill-9 test wait for the DB file instead of a fixed sleep; close the TransportServer accept socket cleanly on shutdown so no thread exception is raised; update the README test count."
}
