{
  "slug": "createtestharness-can-list-durable-object-ids-ebc38206c1d8",
  "title": "createTestHarness can list Durable Object IDs",
  "tools": [
    "wrangler"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-07-09T14:09:25.000Z",
  "announced_at": "2026-07-09T14:09:25.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When an integration test needs persisted Durable Object IDs, call `listDurableObjectIds(<bindingName>)` on the `WorkerHandle` returned by `createTestHarness().getWorker()`. It returns a promise of string IDs for instances with persisted storage on that binding.",
    "examples": [
      "import { createTestHarness } from \"wrangler\";\nconst server = createTestHarness({ workers: [{ configPath: \"./wrangler.jsonc\" }] });\nconst worker = server.getWorker();\nconst ids = await worker.listDurableObjectIds(\"<bindingName>\");"
    ],
    "gotchas": [
      "Version: 4.109.0",
      "bindingName (required): Name of a Durable Object namespace binding configured on the Worker; the method returns persisted instance IDs as strings.",
      "workers[].configPath (required): Path to the Wrangler configuration file for the Worker; relative paths resolve from the harness root.",
      "Prerequisite: Use a Worker project with a Wrangler configuration file, a Node.js test runner, and Wrangler installed as a development dependency.",
      "The IDs are for persisted Durable Object instances associated with a Durable Object binding.",
      "Docs conflict: The newer Wrangler API page, last updated Sep 28, 2026, omits `listDurableObjectIds` from its listed WorkerHandle methods; the Wrangler 4.109.0 source defines it. https://developers.cloudflare.com/workers/wrangler/api/"
    ]
  },
  "why_it_matters": "Discover persisted Durable Object instances in an integration test using `createTestHarness`.",
  "sources": [
    "https://github.com/cloudflare/workers-sdk/releases/tag/wrangler%404.109.0",
    "https://github.com/cloudflare/workers-sdk/blob/wrangler@4.109.0/packages/wrangler/src/api/test-harness.ts",
    "https://developers.cloudflare.com/workers/testing/test-harness/configure/",
    "https://developers.cloudflare.com/workers/testing/test-harness/get-started/"
  ],
  "rank": 0.92023,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v1+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "backfill-20261007",
    "verdict_id": "backfill-20261007:backfill-20261007-1b03e9c442931c57-0:gate",
    "evidence_hash": "85b88c12a3e981cb494e69ea3752e2f522c395eb0d853716ae4eafd18ca69e19"
  },
  "review": {
    "draft_hash": "504de88e014a81278dec332c75022b328370fe7e721bba2f4295b6fb802b5ba2",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "backfill-20261007:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.92 >= 0.9; 2 needed) and Jev gave 0.76 (>= 0.6 needed)."
  }
}
