-
Notifications
You must be signed in to change notification settings - Fork 588
Open
Description
Summary
I have a minimal reproducible case where ctx.exports.<WorkerEntrypoint>.fetch(...) is misrouted in production when placement is enabled.
- RPC method call on the same entrypoint still works.
- Local
wrangler devbehaves correctly. - Production behaves correctly again if
placementis 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:
ctx.exports.OutboundProbe({}).someOtherFunc()(RPC)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.fetchand returnsFROM_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 +
placementenabled: misrouting reproduced. - Production +
placementremoved: correct behavior. - Changing placement region still reproduces (not region-specific).
Environment
wrangler:4.68.1typescript:5.9.3compatibility_date:2026-02-25- Placement config currently:
"placement": { "region": "aws:eu-central-1" }
Fresh production request IDs
(maybe helpful)
date: Sun, 01 Mar 2026 17:49:36 GMT,cf-ray: 9d59ffcbc99429a7-ZRHdate: Sun, 01 Mar 2026 17:49:37 GMT,cf-ray: 9d59ffd34eca7a85-ZRHdate: Sun, 01 Mar 2026 17:49:38 GMT,cf-ray: 9d59ffda0dcab159-ZRH
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels