{
  "slug": "wrangler-deploy-declares-durable-object-lifecycle-with-exports-efd1292b1b8a",
  "title": "wrangler deploy declares Durable Object lifecycle with exports",
  "tools": [
    "wrangler"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-07-02T16:33:13.000Z",
  "announced_at": "2026-07-02T16:33:13.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When declaring Durable Object class lifecycle in Wrangler config, use `exports` entries keyed by class name and deploy with `wrangler deploy`.",
    "examples": [
      "npx wrangler deploy"
    ],
    "gotchas": [
      "Version: 4.107.0",
      "exports.<Class>.type (required): Set to `\"durable-object\"` for a Durable Object class entry.",
      "exports.<Class>.state: Lifecycle state: `created` (default), `deleted`, `renamed`, `transferred`, or `expecting-transfer`.",
      "exports.<Class>.storage (required): Required for `created` or `expecting-transfer`; use `sqlite` for new namespaces.",
      "exports.<Class>.renamed_to (required): For `renamed`, names the destination class, which must also be a live entry in `exports`.",
      "exports.<Class>.transferred_to (required): For `transferred`, names the target Worker.",
      "exports.<Class>.transfer_from (required): For `expecting-transfer`, names the source Worker.",
      "Prerequisite: Declare the class in Worker code and export it; add a `durable_objects.bindings` entry if the Worker needs to access it through `env`.",
      "Prerequisite: For newly created namespaces, use `storage: \"sqlite\"`; `legacy-kv` is accepted only for already provisioned key-value namespaces.",
      "`type` is currently always `\"durable-object\"`.",
      "The `state` field defaults to `\"created\"` (live) when omitted.",
      "An actor binding (`durable_objects.bindings`) to a class declared only in `exports` on the same `wrangler versions upload` is rejected with error code 100406 because the binding cannot resolve until the namespace is provisioned.",
      "For that version upload constraint, stage the class via `ctx.exports.X` without a binding and add the binding at deploy time, or use `wrangler deploy` to provision and bind in one step; the same constraint applies to the `migrations` flow.",
      "Multi-version percentage deploys with selected versions that disagree on declarative `exports` are rejected; deploy the version that changes `exports` at 100% first, then run the percentage-split deploy. Single-version (100%) deploys are unaffected.",
      "Docs conflict: The current Durable Object docs say `wrangler versions upload` fails when the configuration contains `exports`, and that lifecycle changes apply only through `wrangler deploy`; this differs from the supplied v4.107.0 release note, which says upload forwards `exports` and reconciliation occurs at version deploy or `wrangler deploy`. https://developers.cloudflare.com/durable-objects/reference/durable-objects-migrations/",
      "Docs conflict: The current docs say gradual deployments are unsupported with `exports`; this differs from the supplied release note's percentage-split deployment guidance. The current docs are newer than v4.107.0. https://developers.cloudflare.com/durable-objects/reference/durable-objects-migrations/"
    ]
  },
  "why_it_matters": "Declare Durable Object lifecycle changes and use the declarations in deployment, local development, tests, and generated types.",
  "before": "The release note describes `migrations` as the legacy imperative alternative to declarative `exports`.",
  "sources": [
    "https://github.com/cloudflare/workers-sdk/releases/tag/wrangler%404.107.0",
    "https://developers.cloudflare.com/durable-objects/reference/durable-objects-migrations/",
    "https://developers.cloudflare.com/workers/wrangler/configuration/",
    "https://developers.cloudflare.com/changelog/post/2026-06-30-declarative-do-class-exports/"
  ],
  "rank": 0.97066,
  "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-8cc335ff8d098b7a-1:gate",
    "evidence_hash": "600392b25956935d6389be815d09ee092c4b7ce2214dda19e3074608718c16ec"
  },
  "review": {
    "draft_hash": "fdd40c28f5ee6a25c05e84a448ce91d4a4956439061a23d891325434c151511d",
    "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.97 >= 0.9; 2 needed) and Jev gave 0.77 (>= 0.6 needed)."
  }
}
