It Worked in Production and Could Never Have Been Previewed

The plan looked fine. One shared Worker for real-time rooms, mounted on each site with a zone route, "like the analytics collector". My assistant wrote it, I read it, and I nearly said yes.
It would have worked on the live domain. It would have worked nowhere else. And the rule on that site is that every change gets looked at on a branch preview before it merges.
Where the plan broke
A zone route matches requests on the custom domain. That is what it is for. My branch previews live on a subdomain of the Pages project, the <branch>.<project>.pages.dev address that Cloudflare hands out for free. No zone route ever sees that hostname.
So the feature would have been invisible on every preview. The only way to try it would have been to merge it, which is the one thing the review process exists to prevent. The design had quietly assumed that "test it" meant "ship it and look".
Nobody wrote that assumption down. It was just in the shape of the plan.
The fix was small
Instead of a zone route, each site got a tiny Pages Function that forwards /rooms/* over a service binding to the shared Worker. The Worker itself has no public entry at all. Pages Functions run on previews exactly as they run on the live domain, so the same code path exists everywhere a reviewer might look.
That change paid for itself twice. Because nothing but a service binding can reach the Worker, a trust header from the site to the Worker became safe. There is no public surface for someone to forge it on.
The second trap, which only appeared once the first was fixed
With the preview path real, we tried it, and every WebSocket on every preview died with a generic close and no message.
The site has a middleware that rebuilds every response on the pages.dev host so it can add a noindex header. Sensible. Previews should not end up in a search index. But a WebSocket upgrade is a response with status 101, and new Response(body, { status: 101 }) throws. The middleware was tearing down the upgrade and handing back an error that said nothing.
The live domain never had this problem because the middleware only runs on the preview host. So the first design would have shipped without anyone seeing this bug, and a second design that worked everywhere else would have failed only where reviewers look.
What I take from it
"How will this be reviewed before it ships?" is a design question. Write it into the plan next to "how does it scale" and "what does it cost". Then check, concretely, that the review environment can reach the thing. Not "it should", but a request from a preview URL that comes back from the new code.
Anything that rewrites responses on the review path is a suspect. Header injectors, middleware, noindex wrappers, anything that does new Response(...) around the original. Protocol upgrades do not survive being rebuilt. If your preview host has one of these and your feature uses WebSockets or streaming, test that combination first.
"Like the analytics collector" is not a justification. It was a precedent, and a reasonable one. The collector is fire-and-forget, so nobody needs to review it on a branch. The rooms Worker is interactive and visible. Same mounting pattern, different requirements. When the assistant reaches for "like the existing thing", ask which properties of the existing thing actually carry over.
I still like the plan the assistant wrote. The architecture was clean and the Worker was right. It just answered every question except the one about where I would be standing when I tried it.