From 7be024a149d7173f463d6ff99142aca666aeacef Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Fri, 6 Nov 2026 08:51:20 -0800 Subject: [PATCH 1/2] quest: plan browser route-key proofs verified at the relay Co-Authored-By: Claude Opus 5.5 --- quest/m2/cluster-routing/routes/README.md | 1 + .../cluster-routing/routes/browser-proof.md | 51 +++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 quest/m2/cluster-routing/routes/browser-proof.md diff --git a/quest/m2/cluster-routing/routes/README.md b/quest/m2/cluster-routing/routes/README.md index f11c48a24d6..406fd1fdc39 100644 --- a/quest/m2/cluster-routing/routes/README.md +++ b/quest/m2/cluster-routing/routes/README.md @@ -534,6 +534,7 @@ benchmarks. - [Route session integration](/quest/m2/cluster-routing/routes/session.md) - one router per origin node drives the origin and every lite-07 announce stream - [Announcement availability](/quest/m2/cluster-routing/routes/availability.md) - announcements report availability, and a let-go is offline rather than END, in Rust and JS - [js/net route layer](/quest/m2/cluster-routing/routes/js.md) - `js/net` encodes, decodes, and resolves the route layer +- [Browser tabs prove their route key](/quest/m2/cluster-routing/routes/browser-proof.md) - current Firefox and Chromium tabs open lite-07 sessions with a route-key proof the relay verifies, checked nightly - [Route layer acceptance](/quest/m2/cluster-routing/routes/acceptance.md) - forwarding fixtures ported and the model deleted, incident fixtures, end-to-end checks, and benchmarks ## Related diff --git a/quest/m2/cluster-routing/routes/browser-proof.md b/quest/m2/cluster-routing/routes/browser-proof.md new file mode 100644 index 00000000000..0473d74583e --- /dev/null +++ b/quest/m2/cluster-routing/routes/browser-proof.md @@ -0,0 +1,51 @@ +# [M] Browser tabs prove their route key to the relay + +## Goal + +Before the lite-07 cut, a lite-07 session from a current Firefox tab and a +current Chromium tab connects to `moq-relay` with its route-key proof +verified, and a nightly browser test keeps it that way. + +A tab proves a key whenever its WebTransport exposes `exportKeyingMaterial` +(`js/net/src/lite/route_key.ts`). The relay derives each WebTransport +session's secret per draft-ietf-webtrans-http3 section 4.8 +(`rs/moq-tokio/src/quic/web/session.rs`, `rs/moq-uring/src/quic/web.rs`), and +ends the session with a protocol violation when a proof does not verify +(`rs/moq-net/src/lite/setup.rs`). So a browser whose exporter disagrees with +the relay cannot open a lite-07 session at all. Tests compare the Rust and JS +transcript vectors and both Rust exporter ends, but no real browser exporter +has ever run against the relay +([moq-dev/moq#7937](https://github.com/moq-dev/moq/pull/7937) left this gap). + +Browser support as of 2026-11-06: Firefox 155 shipped `exportKeyingMaterial` +on an older draft (context optional, output fixed at 32 bytes), and Firefox 160 +(stable 2026-11-10) follows the spec's three arguments +([MDN BCD #30999](https://github.com/mdn/browser-compat-data/pull/30999)). +Chromium enabled it by default in Canary, targeting Chrome 158 +([crbug 556304550](https://issues.chromium.org/issues/556304550)), and mixes +the session's CONNECT stream into the derivation. + +## Plan + +Decided 2026-11-06 (maintainer, /quest-complete while queueing +[moq-dev/moq#8022](https://github.com/moq-dev/moq/pull/8022)): + +- ✅ **Cover Firefox and Chromium**, and treat a mismatch as a bug that + blocks the cut. It joins the Routes epic, which gates the cut. Not chosen: + Firefox only until Chrome 158 ships; not planning it. +- ✅ **A nightly Playwright lane.** Firefox and Chromium tabs in the interop + suite (`test/interop`, nightly and the release gate) dial a relay on + lite-07 and assert the relay accepted the tab's proven key. A browser + build without the exporter fails the lane loud rather than passing + unproven. Not chosen: a one-time manual check before the cut. +- ✅ **A browser whose exporter cannot match sends no proof.** If Firefox + 155-159's older-draft export differs from the relay's derivation, the JS + client tells it apart at setup from the exporter's shape (the old draft + takes two arguments, the spec three) and sends no proof there, so the tab + connects unproven. Never send a proof the relay will reject. Not chosen: + requiring Firefox 160+; ignoring 155-159. + +Start by running both browsers against a local relay and comparing the +exported bytes with the relay's for the same session. Fix any mismatch at the +root cause, on whichever side departs from the draft. Pin the Playwright +browser builds that carry the exporter, and record their versions here. From 116643f762d2ab5fb8fdd30aad241e207d343121 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Fri, 6 Nov 2026 09:21:20 -0800 Subject: [PATCH 2/2] quest: browser proofs wait on a Playwright bump, observe the proof, and name the old-draft predicate by measurement Co-Authored-By: Claude Opus 5.5 --- quest/m2/cluster-routing/routes/README.md | 1 + .../cluster-routing/routes/browser-proof.md | 37 ++++++++++++++--- .../cluster-routing/routes/playwright-pin.md | 41 +++++++++++++++++++ 3 files changed, 74 insertions(+), 5 deletions(-) create mode 100644 quest/m2/cluster-routing/routes/playwright-pin.md diff --git a/quest/m2/cluster-routing/routes/README.md b/quest/m2/cluster-routing/routes/README.md index 406fd1fdc39..c9c7179255d 100644 --- a/quest/m2/cluster-routing/routes/README.md +++ b/quest/m2/cluster-routing/routes/README.md @@ -535,6 +535,7 @@ benchmarks. - [Announcement availability](/quest/m2/cluster-routing/routes/availability.md) - announcements report availability, and a let-go is offline rather than END, in Rust and JS - [js/net route layer](/quest/m2/cluster-routing/routes/js.md) - `js/net` encodes, decodes, and resolves the route layer - [Browser tabs prove their route key](/quest/m2/cluster-routing/routes/browser-proof.md) - current Firefox and Chromium tabs open lite-07 sessions with a route-key proof the relay verifies, checked nightly +- [Playwright bundles the spec exporters](/quest/m2/cluster-routing/routes/playwright-pin.md) - the toolchain's Playwright bundles Chromium 158+ and Firefox 160+, so the browser proof lane asserts both tabs proven - [Route layer acceptance](/quest/m2/cluster-routing/routes/acceptance.md) - forwarding fixtures ported and the model deleted, incident fixtures, end-to-end checks, and benchmarks ## Related diff --git a/quest/m2/cluster-routing/routes/browser-proof.md b/quest/m2/cluster-routing/routes/browser-proof.md index 0473d74583e..58334dac61a 100644 --- a/quest/m2/cluster-routing/routes/browser-proof.md +++ b/quest/m2/cluster-routing/routes/browser-proof.md @@ -7,7 +7,8 @@ current Chromium tab connects to `moq-relay` with its route-key proof verified, and a nightly browser test keeps it that way. A tab proves a key whenever its WebTransport exposes `exportKeyingMaterial` -(`js/net/src/lite/route_key.ts`). The relay derives each WebTransport +and the page can generate an Ed25519 key; it sends no proof when either is +missing (`js/net/src/lite/route_key.ts`). The relay derives each WebTransport session's secret per draft-ietf-webtrans-http3 section 4.8 (`rs/moq-tokio/src/quic/web/session.rs`, `rs/moq-uring/src/quic/web.rs`), and ends the session with a protocol violation when a proof does not verify @@ -38,14 +39,40 @@ Decided 2026-11-06 (maintainer, /quest-complete while queueing lite-07 and assert the relay accepted the tab's proven key. A browser build without the exporter fails the lane loud rather than passing unproven. Not chosen: a one-time manual check before the cut. +- ✅ **Bump Playwright; the cut waits for it.** The pinned 1.64.1 bundles + Chromium 156 and Firefox 157, so neither tab proves today. + [Playwright bundles the spec exporters](/quest/m2/cluster-routing/routes/playwright-pin.md) + carries the bumps. Not chosen: installed browser channels; an + informational lane that does not gate the cut. - ✅ **A browser whose exporter cannot match sends no proof.** If Firefox 155-159's older-draft export differs from the relay's derivation, the JS - client tells it apart at setup from the exporter's shape (the old draft - takes two arguments, the spec three) and sends no proof there, so the tab + client tells it apart at setup and sends no proof there, so the tab connects unproven. Never send a proof the relay will reject. Not chosen: requiring Firefox 160+; ignoring 155-159. Start by running both browsers against a local relay and comparing the exported bytes with the relay's for the same session. Fix any mismatch at the -root cause, on whichever side departs from the draft. Pin the Playwright -browser builds that carry the exporter, and record their versions here. +root cause, on whichever side departs from the draft. The pinned Firefox 157 +is an old-draft build, so the old-draft comparison can run now. + +Name the old-draft predicate from that run, not from the exporter's arity: +WebIDL's `length` counts only required arguments, and the old draft's +`context` is optional, so arity does not tell the drafts apart. If the +old-draft bytes differ, gate on the Firefox major version, since 155-159 is +a closed set. Record the predicate and the build it was checked against +here. + +The relay never acknowledges a proof, and a session that sent none also +stays open, so the lane observes both halves: the page reports whether +`proveRouteKey` returned a proof (`js/net/src/lite/connection.ts`), and the +session staying open past SETUP shows the relay accepted it, since a bad +proof ends it with a protocol violation (`rs/moq-net/src/lite/setup.rs`). + +The lane keys its expectation on each tab's reported browser version: +Chromium 158+ and Firefox 160+ must prove, Firefox 155-159 must send none, +and a build older than its browser's first exporter is "not yet covered". +Any other outcome fails the lane, and the release gate also fails while a +browser is not yet covered, so the cut waits on the +[Playwright bump](/quest/m2/cluster-routing/routes/playwright-pin.md). The lane +prints both browser builds, and they stay current with the toolchain +refresh that bumps the pin. diff --git a/quest/m2/cluster-routing/routes/playwright-pin.md b/quest/m2/cluster-routing/routes/playwright-pin.md new file mode 100644 index 00000000000..677662dde38 --- /dev/null +++ b/quest/m2/cluster-routing/routes/playwright-pin.md @@ -0,0 +1,41 @@ +# [S] Playwright bundles the spec exporters + +## Goal + +The toolchain's Playwright moves to a release whose bundled Chromium is 158 +or later and Firefox 160 or later, the first builds whose +`exportKeyingMaterial` follows draft-ietf-webtrans-http3, so the +[browser proof lane](/quest/m2/cluster-routing/routes/browser-proof.md) can +assert both tabs proven. + +The root flake's `pkgs.playwright-driver` supplies `PLAYWRIGHT_BROWSERS_PATH` +and `PLAYWRIGHT_VERSION` (`flake.nix`), and the npm pins +(`test/interop/clients/js/package.json`, `bun.lock`) must match it +(`test/smoke/freshness.sh`). As of 2026-11-06 both are 1.64.1, bundling +Chromium 156 and Firefox 157. npm's latest, 1.65.0, bundles Chromium +158.0.8127.18 and Firefox 159.0; no release bundles Firefox 160 yet, and +nixpkgs still carries 1.64.1. + +## Plan + +Decided 2026-11-06 (maintainer, /quest-complete, on Pullfrog's review of +[moq-dev/moq#8037](https://github.com/moq-dev/moq/pull/8037)): ✅ bump +Playwright, and the lite-07 cut waits for it. Not chosen: running installed +Chrome and Firefox channels instead of the bundled builds; leaving the lane +informational so the cut does not wait. + +Take each step as nixpkgs carries it: 1.65.0 or later proves the Chromium +tab, and the first release bundling Firefox 160 or later proves the Firefox +tab. With each bump, move the lane's expectation for that browser from "not +yet covered" or "sends no proof" to "proven". Refresh the flake lock and the +npm pins together, as `smoke-toolchain.yml` describes. Overriding +`playwright-driver` in the flake was considered and not chosen: it would +rebuild and pin browser binaries outside nixpkgs. + +## Waiting + +- nixpkgs: `playwright-driver` at 1.65.0 or later on `nixpkgs-unstable`; + check `pkgs/development/web/playwright/driver.nix` there. +- Playwright: a release whose bundled Firefox is 160 or later; check + `browsers.json` in `npm view playwright-core dist-tags.latest`'s tarball, + then wait for nixpkgs to carry it.