Repository navigation
Move the one-time phone page to its own origin - #1536
Conversation
Adds dormouse-connect on connect.dormouse.sh: the page, its client route, and OneTimeRoom, with no Hyperdrive or secret. The relay keeps the Burrow route, binds the room by script name, and answers its old page path with a 308 to the page's origin, so nothing a link sends renders beside Pocket. Frames admit both origins; previews, the production deploy order and smokes, and the dev loop follow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A stock Hosted build writes HOSTED_ONE_TIME_ORIGIN into the link it shows and keeps its socket on the relay origin. The page frames at that origin alone, and a lint holds the relay Worker to serving no page and admitting no phone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One rule for which origins frame, a null one-time link origin in a self-host build as its siblings have, one Durable Object binding rewrite and one relay bundle per suite. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Deploying mouseterm with
|
| Latest commit: |
7d5e1ed
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://41194d92.mouseterm.pages.dev |
| Branch Preview URL: | https://one-time-own-origin.mouseterm.pages.dev |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dormouse-bot
left a comment
There was a problem hiding this comment.
One stale comment outside the diff: OneTimeRoom.fetch in hosted/server/one-time-room.ts still says it is "Reached only through oneTimeRoutes", which this PR splits into oneTimeBurrowRoute (relay Worker) and oneTimeClientRoute (connect Worker). Since the room is now reached from two Workers, the comment is the one place a reader learns who has already checked the upgrade, Origin, room id, and rate limit, so it's worth naming both. I can push that one-line fix if you want it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The stale comment is fixed in 361a0a5: |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Worker is dormouse-try, its previews dormouse-try-pr-N, and its config, entry, bindings, rules, smoke, and staging follow. The link keeps its path, so it reads https://try.dormouse.sh/connect/#…. The Worker has never deployed, so this needs no migration of its own: its v1 still introduces OneTimeRoom, and the relay's v3 still deletes its own copy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keeps the frame domain's guarantee true of both pages that frame it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Moves the one-time phone page off Pocket's origin onto its own,
try.dormouse.sh, so the origin that renders what a link sends holds no paired phone's keys.What changes
dormouse-try: serves the page and the client route, and implementsOneTimeRoom. It has no Hyperdrive and no secret.HOSTED_ONE_TIME_ORIGINinto the link it shows, ashttps://try.dormouse.sh/connect/#…. Its socket stays on the relay origin, and it never connects to the new origin.APP_ORIGIN, so a page on the relay's origin cannot join.frame-ancestorsnow names both origins (CLIENT_ORIGINS), andframeDomainForadmits both.Links from older builds
Older builds show
https://relay.dormouse.sh/connect/#…and mint on the relay's Burrow route. Both keep working:/connectand/connect/with a 308 to the new origin. A browser carries the fragment across the redirect, and the prologue binds no origin, so the same link completes unchanged.The old path therefore renders nothing from the first deploy that includes this, with no grace period. The redirect stays while a shipped Burrow may show such a link. A phone that already had the old page open at the moment of the deploy reads generic failure copy at its Connect tap and needs a new link.
Previews and local development
dormouse-try-pr-N, wired to that PR's relay.dor tool one-timeruns both Workers, the relay atPORTand the try Worker on the next port, sharing the room through Wrangler's local registry.Deploy order
Production deploys frames, try, relay, voice, then account. The try Worker must pass its revision check and page smoke before the relay starts redirecting to it. The relay's
v3migration deletes its oldOneTimeRoomand is a rollback floor.Hosted production must run before any desktop release built from this.
docs/specs/deploy.md-> "Release checklist" states this. The new hostname also needs setup before the release; seehosted/README.md-> "Provision the production boundary", step 5.Decision to check
The link keeps the
/connect/path on the new origin, so old and new links share one grammar and dev builds need no second baked origin.https://try.dormouse.sh/#…would be shorter, but it would need a second link shape or a dev-only baked origin.Testing
pnpm testat the root passes except one unrelated timing failure:lib/src/lib/lath/group-drop.test.tshit its 5 s timeout under load and passes when run alone. The Postgres-backed relay, relay-room, workers, and billing suites pass, and so dopnpm build:hostedwith its Wrangler dry runs,tsc -binlib, andtsc --noEmitinstandalone/.wrangler dev: a link at the relay's old path followed the 308, kept its fragment, and reached the Connect screen on the page's origin. Connect joined a room minted on the relay, and the Burrow stand-in received theinitframe. That run predates the last refactor of the dev configs and the rename totry.dormouse.sh, which change names and strings and which the unit tests and Miniflare suites cover.v3deletion, and the redirect in Safari on a real phone.🤖 Generated with Claude Code