https://entire.com/gh/phaseoteam/-/trails/148/changes/Phaseo/148
IMPORTANT
Merge only after
phaseo-realtimeexists. First run theRealtime relay deployworkflow withinitial=true; the realtime-maintenance skill covers the first deploy. Merging first would make the gateway deploy fail, because the binding would point at a Worker that doesn't exist.
What changed
phaseo-gateway(wrangler.toml) andphaseo-jobs(wrangler.jobs.toml) bindREALTIME_RELAYwithscript_name = "phaseo-realtime". Relay connections and reconciliation calls now go to the relay Worker added in #3367.phaseo-gatewaystill exports its oldRealtimeRelayDurableObjectclass and keeps its migration, so nothing is deleted. Removing it later is a destructive migration that needs explicit approval.- A config test checks both bindings. A changeset is included.
Why
Every merge to main deploys phaseo-gateway, and a deploy restarts the Durable Objects it hosts, which ends every live realtime call. #3367 added phaseo-realtime, which deploys only in maintenance windows. In a test with throwaway Workers, redeploying a Worker that forwards a WebSocket to a Durable Object in another Worker didn't cut the connection over 9+ minutes. Redeploying the Durable Object's own Worker cut it about 4 minutes later. This PR is the switch that puts live calls behind that protection.
How
- Binding only: clients still connect through
api.phaseo.app, and the gateway's relay route forwards to the binding as before, so SDKs and URLs don't change. - Fresh namespace: the new Worker's namespace has no state, and none is needed. No realtime session has run in production since 2026-09-11.
- Calls in progress: any call in the gateway's old namespace ends when this deploy lands, like any gateway deploy today. The skill says to check the live-session count first.
Before and after
| Before | After | |
|---|---|---|
| Merge to main (gateway deploy) | Ends every live realtime call | Doesn't end calls; only phaseo-realtime deploys, in announced windows, do |
| Relay URL | api.phaseo.app/v1/{realtime,live}/sessions/{id}/relay | Same |
Verification
wrangler deploy --dry-run(gateway):env.REALTIME_RELAY (RealtimeRelayDurableObject, defined in phaseo-realtime). Same forpnpm run build:jobs.vitest run src/realtime-worker-config.test.ts: 4 passed. With main'swrangler.tomlrestored, the new binding test fails (1 failed, 3 passed).- Not verified yet: a connection through production after the switch. Once deployed, I'll run the skill's relay probe, which expects
401 realtime session not found or token invalidfrom the relay.
Model: Claude Opus 5.5 (effort unknown) · Harness: Claude Code in T3 Code
🤖 Generated with Claude Code
Activity
6WARNING
Review limit reached
You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.
Next included review available in 52 minutes.
View limit details
Limit details: You’ve used the included review currently available.
Review configuration:
Run configuration
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: defaults
- Review profile: CHILL
- Plan: Advanced
- Run ID:
79902dc4-94d2-4dbf-87fd-79f4671faf60
Commits
Reviewing files that changed from the base of the PR and between 21bd0b5cf3d4ff95789f7c10eba12b3c843daa3a and 83c1a4b7a2b3451a8abcc90205c6449bf78fd316.
Files selected for processing: 4
.changeset/realtime-relay-binding.mdapps/api/src/realtime-worker-config.test.tsapps/api/wrangler.jobs.tomlapps/api/wrangler.toml
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
-
- (https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)
- Mastodon
Comment @coderabbitai help to get the list of available commands.
Dependency Review
✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned Files
NoneCodex Review Summary
This comment shows the latest Codex review activity on this pull request.
| Review | Status | Commit | Review trigger |
|---|---|---|---|
| 📝 Code Review | ✅ Completed 2026-10-29T14:20:20.837900Z | 83c1a4b | Draft marked ready |
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review" or "@codex security review".
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
The latest updates on your projects. Learn more about Vercel for GitHub.