Skip to content

Match the test rendezvous to Hosted's one-time room: late joins close 4010, pre-join frames count - #878

Merged
nedtwigg merged 2 commits into
mainfrom
fix/test-rendezvous-room-parity
Oct 1, 2026
Merged

nedtwigg merged 2 commits into
mainfrom
fix/test-rendezvous-room-parity

Conversation

@dormouse-bot

Copy link
Copy Markdown
Collaborator

createTestRendezvous, the in-memory stand-in for Hosted's one-time room that four suites drive (one-time-runtime, one-time-client, one-time-e2e, service), disagreed with the real room in two places. Its header asks that an edit to either belongs in both. This PR brings the fake back in line with hosted/server/one-time-room.ts and docs/specs/one-time.md → "Hosted rendezvous".

  • Late join. The fake closed a join past expiresAt with 4012 (unavailable), and tested expiry before "already joined". The real room answers 4012 for an unknown room, then 4011 for a joined one, then 4010 (expired). The phone maps 4012 to the "link used" message and 4010 to "link expired", so a suite joining a stale room through the fake was checking the wrong copy. No current case reaches it: the phone refuses an expired link before dialing.
  • Pre-join frames. The fake dropped a frame sent before any phone joined without counting it toward MAX_ONE_TIME_FORWARDED. The real room counts every text frame before deciding where it goes ("Every text frame counts").

The new lib/src/remote/test-rendezvous.test.ts pins both behaviours, and both cases fail against the old fake. This sandbox couldn't install dependencies (no npm registry access), so CI is the first run of the lib suite. e2e-lint and spec-lint pass locally.

The in-memory rendezvous refused a join past expiresAt with 4012 and checked
expiry before "already joined", and dropped a frame sent before any phone
joined without counting it. Hosted's OneTimeRoom and docs/specs/one-time.md
answer 4012, then 4011, then 4010, and count every text frame. Match them, and
pin both with a test of the fake.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Deploying mouseterm with  Cloudflare Pages  Cloudflare Pages

Latest commit: a3fdae1
Status: ✅  Deploy successful!
Preview URL: https://088905b5.mouseterm.pages.dev
Branch Preview URL: https://fix-test-rendezvous-room-par.mouseterm.pages.dev

View logs

@nedtwigg nedtwigg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed both fake-room changes against Hosted OneTimeRoom: join refusal precedence and accounting of frames before the phone joins now match production. Preserved main’s RELAY_PING/RELAY_PONG naming when resolving the conflict. All 236 affected local tests passed; fresh CI, Argos, and bot self-review are green with no findings.

@nedtwigg
nedtwigg merged commit bdcbb34 into main Oct 1, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants