Skip to content

Align Hosted and one-time reference contracts - #904

Merged
nedtwigg merged 7 commits into
spec-cleanup-relay-pocketfrom
spec-cleanup-hosted
Oct 2, 2026
Merged

nedtwigg merged 7 commits into
spec-cleanup-relay-pocketfrom
spec-cleanup-hosted

Conversation

@nedtwigg

@nedtwigg nedtwigg commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Audit Hosted, one-time connection, and Hosted security references against the unchanged runtime. Correct the implemented admin-account Relay slice, complete-Noise reservation timing, exact expiry instant, authenticated internal Worker RPC boundary, and operator README. Canonical wire/state types, CSP builders, and Wrangler migrations own their inventories.

Retain the deadline and security obligations while explicitly identifying current Origin, revocation, enrollment, and late-completion gaps. Larger runtime proposals are excluded from this reference cleanup. Four documentation files change.

Validation: source-symbol/direction checks; spec lint and 23 mutations; public-doc checks; security lint and 139 mutations. Stacked on #903.

Trimmed in review. Restored the exact /connect/ CSP literal, the Laptop UI copy strings, the frame and ceremony message shapes, the OneTimeState payloads, the email-paths sentence and the migrations inventory, with two stale points corrected. The seven parked "Known gap" lines are gone:

🤖 Generated with Claude Code

@cloudflare-workers-and-pages

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

Copy link
Copy Markdown

Deploying mouseterm with  Cloudflare Pages  Cloudflare Pages

Latest commit: 49d144b
Status: ✅  Deploy successful!
Preview URL: https://507fee27.mouseterm.pages.dev
Branch Preview URL: https://spec-cleanup-hosted.mouseterm.pages.dev

View logs

@dormouse-bot dormouse-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The reworded RelayRoom FAIL IF in security-hosted.md no longer catches a future RelayRoom RPC reachable from a public route; suggested wording inline keeps the catch-all while carving out the two account-scoped calls.

Comment thread docs/specs/security-hosted.md Outdated
@nedtwigg
nedtwigg added this pull request to stack #896 October 2, 2026 13:23
nedtwigg and others added 2 commits October 2, 2026 06:45
The PR swapped accurate, load-bearing spec content for looser prose or
pointers: the exact /connect/ CSP literal, the Laptop UI copy, the
rendezvous frame shapes (leaving "`ct` is one base64url Noise message"
dangling), the ceremony message shapes, the OneTimeState payloads, the
account email-paths sentence, and the Durable Object migrations
inventory. It also split two one-time.md bullet lists with blank lines,
and parked seven audit findings in the specs as "Known gap" lines, two of
which admitted the code fails a FAIL IF.

Restore each from base, checked against headers.ts, one-time-wire.ts,
e2e-ceremony.ts, one-time-runtime.ts, OneTimeConnection.tsx, App.tsx and
the Wrangler configs. Two were stale and are corrected: the idle hint's
middle sentence reads "Your phone can be on any network." under
`phoneOnAnyNetwork`, and `ended` carries an optional `refusal`.

Fix the cookie-route gap: `cookieAdmin` checked `Origin` only on
state-changing methods, so a GET/HEAD presenting a sibling origin passed
the security-hosted.md cookie FAIL IF's "any presented Origin but its
own". It now refuses any presented foreign Origin on every method, and
still requires one on state-changing requests. The new boundary test goes
red against the old gate. With that fixed, revert the rationale line that
pointed at the gap.

Drop the other Known gap lines. The sweep-read failure needs a policy
decision (fail closed vs. a tighter retry), and restored-token
reinsertion, the stale /enroll approval, the open() keygen wait, and the
phone client's missing pre-open deadline are real; all five go to issues.
Approval body buffering (1 KiB bodyLimit), poll entitlement before the
lock, last-slot poll ordering, the delayed-outcome direct wait, and the
late wall adapter are not reachable failures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nedtwigg
nedtwigg merged commit 5ce9132 into main Oct 2, 2026
14 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