{
  "match_state": "finished",
  "territories": {
    "queue-one": {
      "class": "queue-builder",
      "agent": "glm-queue-builder",
      "state": "provisioning",
      "resources": 0,
      "last_health": null,
      "elimination_source": null,
      "elimination_detail": null,
      "competitor_state": "verifying",
      "milestones": {
        "service-up": {
          "evaluating": false,
          "passed": false,
          "points": 0,
          "evidence": null,
          "failure_category": "verification_failed",
          "failure_detail": "curl: (56) Recv failure: Connection reset by peer"
        }
      },
      "milestone_points": 0,
      "durable_at_ms": null
    },
    "queue-three": {
      "class": "queue-builder",
      "agent": "luna-queue-builder",
      "state": "provisioning",
      "resources": 0,
      "last_health": null,
      "elimination_source": null,
      "elimination_detail": null,
      "competitor_state": "durable",
      "milestones": {
        "host-reboot": {
          "evaluating": false,
          "passed": true,
          "points": 25,
          "evidence": {
            "job": "fresh-f414ae31be03159b",
            "payload": "opaque-cf8f2a3107117188b88cf3ca",
            "reboot": true
          },
          "failure_category": null,
          "failure_detail": null
        },
        "process-new": {
          "evaluating": false,
          "passed": true,
          "points": 20,
          "evidence": {
            "completed": true,
            "job": "fresh-f414ae31be03159b",
            "payload": "opaque-cf8f2a3107117188b88cf3ca"
          },
          "failure_category": null,
          "failure_detail": null
        },
        "recover-accepted": {
          "evaluating": false,
          "passed": true,
          "points": 25,
          "evidence": {
            "accepted_jobs": [
              "accepted-alpha-7d3",
              "accepted-beta-91e",
              "accepted-gamma-c42"
            ],
            "recovered": true
          },
          "failure_category": null,
          "failure_detail": null
        },
        "service-up": {
          "evaluating": false,
          "passed": true,
          "points": 10,
          "evidence": {
            "health": "ready"
          },
          "failure_category": null,
          "failure_detail": null
        },
        "worker-restart": {
          "evaluating": false,
          "passed": true,
          "points": 20,
          "evidence": {
            "job": "fresh-f414ae31be03159b",
            "payload": "opaque-cf8f2a3107117188b88cf3ca",
            "worker_restart": true
          },
          "failure_category": null,
          "failure_detail": null
        }
      },
      "milestone_points": 100,
      "durable_at_ms": 71706
    },
    "queue-two": {
      "class": "queue-builder",
      "agent": "deepseek-queue-builder",
      "state": "provisioning",
      "resources": 0,
      "last_health": null,
      "elimination_source": null,
      "elimination_detail": null,
      "competitor_state": "verifying",
      "milestones": {
        "service-up": {
          "evaluating": false,
          "passed": false,
          "points": 0,
          "evidence": null,
          "failure_category": "verification_failed",
          "failure_detail": "curl: (56) Recv failure: Connection reset by peer"
        }
      },
      "milestone_points": 0,
      "durable_at_ms": null
    }
  },
  "agents": {
    "deepseek-queue-builder": {
      "territory": "queue-two",
      "model": "deepseek/deepseek-v4-flash-0731",
      "running": false,
      "successful": null,
      "failure_source": "controller",
      "terminal_state": "terminated",
      "terminal_detail": "post-match drain deadline expired",
      "resource_units_used": 1,
      "input_tokens": 35188,
      "output_tokens": 3854,
      "cost_microusd": 2424
    },
    "glm-queue-builder": {
      "territory": "queue-one",
      "model": "z-ai/glm-5.2",
      "running": false,
      "successful": true,
      "failure_source": "player",
      "terminal_state": "completed",
      "terminal_detail": "3 seeded jobs all in `queued` state. Now let me write the API and worker.All 3 seeded jobs done with exactly one attempt. Now test restart durability and the full API contract.Now test the crash-recovery path: simulate a stranded `processing` job and confirm the worker recovers it with exactly one attempt.All jobs recovered with exactly one attempt. Verify the services are enabled so they return after reboot unaided.The durable job queue is deployed, verified, and running. Summary:\n\n## Implementation\n\n**`/opt/job-queue/api.py`** — HTTP API on port 8080:\n- `GET /health` → `200` with body `ready`\n- `POST /jobs/<id>` → accepts UTF-8 body as payload, persists as `queued`, returns `202`\n- `GET /jobs/<id>` → JSON with `id`, `payload`, `status`, `result`, integer `attempts`\n\n**`/opt/job-queue/worker.py`** — durable worker:\n- Polls the DB, atomically claims queued jobs (`UPDATE ... WHERE status='queued' RETURNING`), computes `result = \"processed:\" + payload`, completes in a single transaction with `attempts=1`\n- On startup, resets any `processing` rows (stranded by a crash between claim and completion) back to `queued` for reprocessing\n\n## Durability guarantees\n- SQLite in **WAL mode + `synchronous=FULL`** — every accepted job and every completion is fsync'd to disk before the call returns\n- Claim→complete is two transactions: a crash after claim but before completion leaves the row in `processing`, which the worker re-queues on restart. Processing is deterministic, so the recovered result is identical and the completed attempt count stays exactly 1.\n- A crash after the completion commit leaves the row `done` — untouched on restart, exactly-once.\n\n## Verified\n- 3 pre-existing seeded jobs (`accepted-alpha/beta/gamma`) → all `done`, `attempts=1`, `result=processed:<payload>`\n- New `POST /jobs/test-001` → completed; survived worker restart\n- API restart → still serves health and job state\n- UTF-8 payload (`héllo🌍`) → processed correctly\n- Simulated stranded `processing` job (`crash-1`) → recovered to `done` with `attempts=1`\n- All 6 jobs in DB: `status='done'`, `attempts=1`, none invalid\n- Both `queue-api.service` and `queue-worker.service` are `enabled` and `active (running)` with `Restart=always`, so they return unaided after reboot",
      "resource_units_used": 1,
      "input_tokens": 80685,
      "output_tokens": 4806,
      "cost_microusd": 18542
    },
    "luna-queue-builder": {
      "territory": "queue-three",
      "model": "openai/gpt-5.6-luna",
      "running": false,
      "successful": null,
      "failure_source": "arena",
      "terminal_state": "interrupted",
      "terminal_detail": "agent session was interrupted by the referee's host reboot",
      "resource_units_used": 1,
      "input_tokens": 196966,
      "output_tokens": 5135,
      "cost_microusd": 7604
    }
  },
  "winner": "queue-three",
  "finish_reason": "first durable deployment",
  "infrastructure_failures": 0,
  "last_sequence": 223,
  "elapsed_ms": 71710
}