{
  "slug": "wrangler-test-helpers-can-disable-persistence-775c1392d6a8",
  "title": "wrangler test helpers can disable persistence",
  "tools": [
    "wrangler"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-03-13T09:31:07.000Z",
  "announced_at": "2026-03-13T09:31:07.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When tests need clean state on each run, set `persist: false` in `unstable_dev()` options or in the `dev` options passed to `unstable_startWorker()`.",
    "examples": [
      "const worker = await unstable_dev(\"./src/worker.ts\", { persist: false });",
      "const worker = await unstable_startWorker({ entrypoint: \"./src/worker.ts\", dev: { persist: false } });"
    ],
    "gotchas": [
      "Version: 4.73.0",
      "unstable_dev(script, options) — `script` (required): Worker script path, relative to the project root.",
      "unstable_dev options — `persist`: Set to `false` to prevent binding data from being read from or written to the filesystem.",
      "unstable_startWorker options — `entrypoint` (required): Worker entrypoint path, as shown in the v4.73.0 release example.",
      "unstable_startWorker options — `dev.persist`: Set to `false` in the `dev` options to disable persistence.",
      "Docs conflict: Current Wrangler API docs mark both unstable APIs as deprecated and recommend `createTestHarness()`; that is newer-version guidance and does not change the v4.73.0 release-note examples."
    ]
  },
  "why_it_matters": "Run a Worker in tests that need a clean state on every run.",
  "sources": [
    "https://github.com/cloudflare/workers-sdk/releases/tag/wrangler%404.73.0",
    "https://github.com/cloudflare/workers-sdk/blob/wrangler@4.73.0/packages/wrangler/src/api/dev.ts",
    "https://developers.cloudflare.com/workers/wrangler/api/"
  ],
  "rank": 0.95028,
  "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-dd2f67bd49383a4e-1:gate",
    "evidence_hash": "464a8203a37763c9188d0ec4ff2f75cb199734906feef56d26cddaf338682a9d"
  },
  "review": {
    "draft_hash": "6987885cb5b734578876882e147ed51a76d8e6e9219ef1374143192a45e09980",
    "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.95 >= 0.9; 2 needed) and Jev gave 0.75 (>= 0.6 needed)."
  }
}
