{
  "slug": "wrangler-dev-serves-local-r2-objects-at-a-public-url-30bd2cac29cd",
  "title": "wrangler dev serves local R2 objects at a public URL",
  "tools": [
    "wrangler"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-06-11T15:34:04.000Z",
  "announced_at": "2026-06-11T15:34:04.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When testing a Worker with a local R2 binding, request the object from the running `wrangler dev` server at `/cdn-cgi/local/r2/public/<bucket-id>/<key>`. Use `bucket_name` as `<bucket-id>` when set, otherwise the binding; `remote: true` bindings are not exposed.",
    "examples": [
      "curl http://localhost:8787/cdn-cgi/local/r2/public/<bucket-id>/<key>"
    ],
    "gotchas": [
      "Version: 4.100.0",
      "<bucket-id> (required): Use the binding’s `bucket_name` when set; otherwise use its `binding`.",
      "<key> (required): Object key appended to the local public-bucket route.",
      "Prerequisite: Run `wrangler dev` locally; by default it uses a local R2 simulation.",
      "Only local R2 bindings are exposed; bindings configured with `remote: true` are not exposed."
    ]
  },
  "why_it_matters": "When testing a Worker locally that serves objects from a local R2 binding, request an object through the dev server’s public-bucket route.",
  "sources": [
    "https://github.com/cloudflare/workers-sdk/releases/tag/wrangler%404.100.0",
    "https://developers.cloudflare.com/r2/get-started/workers-api/"
  ],
  "rank": 0.95035,
  "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-c1933e94ed950cd5-0:gate",
    "evidence_hash": "5127e3fa7f5c5d9ac5e1842b56177b80666843ad9fbf29243b9a51a855738bab"
  },
  "review": {
    "draft_hash": "67242c9f78cf013b770d8e763413da6d92742000c8a3ac7a6db0abbe67199997",
    "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.74 (>= 0.6 needed)."
  }
}
