cloudflare / cloudflare/workerd
`placement` in production misroutes `ctx.exports.<WorkerEntrypoint>.fetch()` to main `fetch` (RPC still works)
- Dominant language
- C++
- Stars
- 8.7k
- Forks
- 739
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 174
Description
### Summary
I have a minimal reproducible case where `ctx.exports..fetch(...)` is misrouted in production when `placement` is enabled.
- RPC method call on the same entrypoint still works.
- Local `wrangler dev` behaves correctly.
- Production behaves correctly again if `placement` is removed.
This appears to be a runtime routing issue triggered by `placement` in production.
### Repro links
- Minimal repro repo:
https://github.com/alexeichhorn/cloudflare-ctx-exports-bug-reproduction
- Live deployed repro:
https://cloudflare-ctx-exports-bug-reproduction.white-meadow-a345.workers.dev/probe
- Community thread:
https://community.cloudflare.com/t/ctx-exports-workerentrypoint-fetch-misrouting-when-placement-is-enabled-rpc-still/899525
### What the repro does
`/probe` calls the same WorkerEntrypoint in two ways:
1. `ctx.exports.OutboundProbe({}).someOtherFunc()` (RPC)
2. `ctx.exports.OutboundProbe({}).fetch(new Request(...))` (fetch)
### Expected behavior
Call (2) should execute `OutboundProbe.fetch` and return text starting with `FROM_OUTBOUND_CLASS`.
### Actual behavior (production with placement enabled)
- Call (1) works and returns `FROM_RPC_METHOD ...`
- Call (2) is routed to main `index.fetch` and returns `FROM_INDEX_DEFAULT`
Current sample output from live repro:
`{"directRpc":"FROM_RPC_METHOD mode=no-props","directFetchText":"FROM_INDEX_DEFAULT","note":"Direct ctx.exports fetch should hit OutboundProbe.fetch and start with FROM_OUTBOUND_CLASS."}`
### Isolation results
- Local `wrangler dev`: correct behavior.
- Production + `placement` enabled: misrouting reproduced.
- Production + `placement` removed: correct behavior.
- Changing placement region still reproduces (not region-specific).
### Environment
- `wrangler`: `4.68.1`
- `typescript`: `5.9.3`
- `compatibility_date`: `2026-02-25`
- Placement config currently:
`"placement": { "region": "aws:eu-central-1" }`
### Fresh production request IDs
(maybe helpful)
1. `date: Sun, 01 Mar 2026 17:49:36 GMT`, `cf-ray: 9d59ffcbc99429a7-ZRH`
2. `date: Sun, 01 Mar 2026 17:49:37 GMT`, `cf-ray: 9d59ffd34eca7a85-ZRH`
3. `date: Sun, 01 Mar 2026 17:49:38 GMT`, `cf-ray: 9d59ffda0dcab159-ZRH`
Contributor guide
Assessment
This issue has not been assessed yet.