Skip to content

quest(m2): record the upstream E2EE gap in e2ee-rooms - #66

Merged
kixelated merged 7 commits into
mainfrom
quest/m2/e2ee-rooms
Nov 27, 2026
Merged

kixelated merged 7 commits into
mainfrom
quest/m2/e2ee-rooms

Conversation

@kixelated

@kixelated kixelated commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The pinned moq/ has no browser E2EE wiring yet, so this PR builds no crypto in Hang. It rewrites quest/m2/e2ee-rooms.md to record the gap, the Hang-side design for when upstream lands, and what the quest waits on.

It merges main after #58, which rewrote the same quest. The merge keeps this PR's plan and adds #58's requirements: moq-lite-07-wip on the client and every relay hop, a client-generated opaque room ID, and encrypted cursor/drag datagrams. The two design clashes are listed under Decisions. #58 also made m2 require m1 (quest/m2/README.md), which this PR leaves as is.

What the pinned moq/ (28d8eb84d6) and moq-dev/moq main (901714058b) provide:

  • @moq/e2ee (moq/js/e2ee, profile moq-e2ee-01-wip) exists, but it is private and its format is still changing. The moq/js/crypto package, the E2ee/Sign classes, and the moq-e2ee-00/moq-sign-00 profiles the quest named don't exist.
  • Publish/watch wiring isn't there yet: @moq/publish and @moq/watch take no credential. Upstream marked E2EE "not ready yet" on 2026-11-16. The wiring is quest/m5/e2ee/browser.md, which waits on quest/m3/e2ee-format.md, consumer.md, and net-wrap/js.md.
  • @moq/room has no encrypted mode, and no upstream quest owns one. Its roster parses identity and kind from plaintext path segments, and Credential.path() is one-way.
  • Lite version: only moq-lite-07-wip carries the publisher's instance end to end, and both @moq/net's defaults and the pinned relay leave it out.

Decisions

  • Merge /quest-merge pick (maintainer, comment): ✅ /quest-merge (rejected: iterate, skip). The moq-dev/moq follow-up (encrypted @moq/room roster) is kept, for /quest-plan there.
  • Signing: ✅ drop it (rejected: keep with an upstream JS signer first). Maintainer decided this on 2026-11-26, recorded in quest: audit the quest tree #58. The Maintainer: signing item in ## Waiting is gone.
  • Opaque room ID, reconciled with quest: audit the quest tree #58: ✅ a random opaque ID the client generates alongside the credential (rejected: this PR's earlier ID derived from the credential). quest: audit the quest tree #58 is the newer decision. A random ID also keeps key derivation out of Hang, which builds no crypto. Both hide the plaintext name from api/ and the relay. api/src/room.ts now receives the opaque ID and never signs a grant under the plaintext name.
  • Lite version (from quest: audit the quest tree #58): ✅ private rooms connect only with versions that preserve the publisher's instance (moq-lite-07-wip) and refuse any other. dev/root.toml enables it, and cdn.moq.dev must accept it.
  • Datagrams (from quest: audit the quest tree #58): ✅ cursor and drag datagram tracks from datagrams-p2p are encrypted under the profile's datagram key domain, and the leak test also captures datagrams.
  • Quest-only PR: no crypto in Hang. This follows the quest's own rule to upstream missing wiring rather than reimplement it.
  • Separate URL route: private rooms get their own URL route, so a link missing its #fragment shows a "missing key" warning instead of an empty room.
  • Relay-visible identity: the participant identity segment (account_id, or the guest id from #53) stays visible to the relay, which already learns it from the token. Hiding it would need the opaque roster upstream and an api/ change.
  • No reused epochs: every publish takes a fresh producing instance from the upstream wrapper, announced as the route's instance, and nothing is persisted. A planned unit test pins it.
  • Memory-only credential: it lives in the fragment and in memory only (no localStorage, settings, logs, or attributes), matching upstream browser.md.
  • Stats and echo off: both are disabled while a credential is set, as upstream browser.md requires.
  • OAuth and favorites: the plan strips the fragment from OAuth login redirects and hides favorites in private rooms. Both came from review round 1.
  • Encrypted discovery in both views (review of this head): the lobby preview and the 3D room's own announce loop (app/src/room/index.ts, which parses plaintext path segments today) both discover through upstream's encrypted roster. The 3D room needs a discovery-only API that opens no Watch.Player, so no peer is watched twice. The moq-dev/moq roster follow-up now asks for that API.
  • Size stays [M].
  • Base merge (afk, iterate): ✅ merge main in after #64 and #71 so quest merge accepts the head (rejected: rebasing a published branch). The merge was conflict-free and leaves this PR's diff unchanged, so the review of 6fa7044 still covers it.

Follow-ups

  • moq-dev/moq (for /quest-plan there, since no quest owns it): an encrypted @moq/room mode whose roster finds participants and their kind without parsing plaintext path segments, with a discovery-only API that opens no Watch.Player. Recorded as a moq-dev/moq: item in the quest's ## Waiting. Kept by the maintainer.

Public API / wire impact

None. Quest text only.

Validation

  • quest check and quest check --base origin/main pass on the merge, with the moq/ submodule checked out so links into it are checked.

  • The moq-lite-07-wip claims were rechecked against the pinned submodule (moq/js/net, moq/rs/moq-relay).

  • quest gate just check locally: everything passes except app/test/media.browser.ts, whose beforeAll (relay plus Vite startup) runs past bun's 5s hook default on this host (2 CPUs, load average ~23). The relay itself starts in 26ms. With --timeout 60000 the hook passes but two browser tests still time out under the same load. This PR changes only quest text, so the code under test is main's and the failure is environmental (GitHub CI passed it). Not filed as a quest here; reported to the coordinator.

  • Base merge 9c6eb0f: conflict-free. quest check --base origin/main passes, and fallow, bun run check, and the API and app unit tests pass locally. test:media was not run locally (browser tests time out on this loaded host); CI runs it.

Models

  • Size: M
  • Implementer: Claude Code, claude-opus-5-5, high
  • Implementer: Claude Code, claude-opus-5-5, medium effort (iterate, S)
  • Implementer: Claude Code, claude-opus-5-5, medium effort (iterate, XS)

🤖 Generated with Claude Code

(Written by Claude Opus 5.5 with medium)

Review

Rewritten by quest review after each round.

  • Head: 6fa7044

  • Base: origin/main at 1b75c4a

  • Risk: medium, it adds to plans under quest/, which agents start without a person reading them

  • Classified: medium by default

  • Risk file: none

  • Reviewer: Codex, gpt-6.2-sol, high effort

  • Session: 01a21a13-9784-7050-b61e-75361b216c4b, round 3

  • Score: 10/10, The plan is ready to land because it requires encrypted discovery in both views and preserves a single watch pipeline per 3D tile.

  • Rounds: 3; first round 1 (medium 1); findings 1 (medium 1): fixed 1, refuted 0, open 0

  • Findings: none

  • The last round's findings, at 934c1dc:

    • Fixed: medium, quest/m2/e2ee-rooms.md:91: Require discovery without a second watch pipeline; The plan requires the 3D room to use a discovery-only API that creates no `Watch.Player` (`quest/m2/e2ee-rooms.md:90`), and the readiness check requires that API in the pinned workspace (`quest/m2/e2ee-rooms.md:110`).

kixelated and others added 2 commits November 25, 2026 23:14
Quest-Claim: 9ae9127a2f29a78f
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated kixelated changed the title End-to-end encrypted private rooms quest(m2): record the upstream E2EE gap in e2ee-rooms Nov 26, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated
kixelated marked this pull request as ready for review November 26, 2026 07:21
@coderabbitai

coderabbitai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The document revises the encrypted-room plan. It defines Hang’s credential and routing requirements, describes private-session encryption and validation, and lists upstream publish, watch, and room-roster requirements.

Merge Risk: Minimal · up to 618e9

This change only updates planning documentation for encrypted rooms and has no code, API, or runtime impact. No merge-blocking risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "quest(m2): record the upstream E2EE gap in e2ee-rooms" matches the main change: the PR rewrites quest/m2/e2ee-rooms.md to record that the pinned moq/ lacks browser E2EE wiring, along with t…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description is specific and related to the changeset. It explains that the PR rewrites quest/m2/e2ee-rooms.md to record the missing upstream browser E2EE wiring, the Hang-side design, and the upst…
Full details: Title check

Explanation

The title "quest(m2): record the upstream E2EE gap in e2ee-rooms" matches the main change: the PR rewrites quest/m2/e2ee-rooms.md to record that the pinned moq/ lacks browser E2EE wiring, along with the Hang-side design and upstream dependencies. It is specific and concise, and it names the file's topic. The title does not mention the merge with #58 or the decisions, but it does not need to cover every detail.

Full details: Description check

Explanation

The description is specific and related to the changeset. It explains that the PR rewrites quest/m2/e2ee-rooms.md to record the missing upstream browser E2EE wiring, the Hang-side design, and the upstream dependencies. It also covers the merge with #58 (moq-lite-07-wip, opaque room IDs, encrypted datagrams), the recorded decisions, and validation steps. This matches the changeset summary, which describes the same plan updates, so the check passes.

Finishing Touches

Simplify code

  • Commit to this branch
  • Create a new PR
  • 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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b784f853-b401-444a-a704-1ed66a1b1d6e
Commits

Reviewing files that changed from the base of the PR and between 9234698 and 618e976.

Files selected for processing: 1

  • quest/m2/e2ee-rooms.md

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@kixelated

Copy link
Copy Markdown
Collaborator Author

Maintainer decision (via /quest-run): ✅ /quest-merge this PR (rejected: iterate, skip). Follow-up for moq-dev/moq (encrypted @moq/room roster mode): ✅ keep, for /quest-plan there (rejected: drop).

(Written by Claude Opus 5.5)

kixelated and others added 3 commits November 26, 2026 14:42
Reconcile quest/m2/e2ee-rooms.md with #58's rewrite: keep this PR's
plan, adopt #58's client-generated opaque room ID over the
credential-derived one, and add the moq-lite-07-wip requirement and
encrypted cursor/drag datagrams. Drop the signing Waiting item, which
the maintainer settled on 2026-11-26.

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>
@kixelated

Copy link
Copy Markdown
Collaborator Author

Applying the maintainer decision on head 6fa7044:

  • /quest-merge pick stands. Main is merged in (no rebase), reconciling quest: audit the quest tree #58's rewrite of quest/m2/e2ee-rooms.md: this PR's plan is kept, quest: audit the quest tree #58's moq-lite-07-wip, opaque room ID, and datagram requirements are added, and the room ID follows quest: audit the quest tree #58's client-generated random ID rather than this PR's credential-derived one (newer decision, and it keeps key derivation out of Hang).
  • The moq-dev/moq follow-up (encrypted @moq/room roster) is kept in the quest's ## Waiting for /quest-plan there. Review of this head extended it to ask for a discovery-only API that opens no Watch.Player.
  • Fresh local review on this head: 10/10, no findings.

(Written by Claude Opus 5.5 with medium)

@kixelated
kixelated merged commit b909e5b into main Nov 27, 2026
2 checks passed
@kixelated
kixelated deleted the quest/m2/e2ee-rooms branch November 27, 2026 01:20
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.

1 participant