Repository navigation
fix(auth): accept WebTransport and future transport names on release - #7062
Conversation
Backport the transport schema from #5293 so a published @moq/auth parses the `webtransport` value relays on main report, and reads any future name as `unknown` instead of refusing the request. Bump @moq/auth to 0.2.3 so Release JS publishes it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit: 2cb981d
No actionable bugs found in the five-file release backport. The direction is sound: reuse main's transport parser, validate the input as a string before the unknown-name fallback, and keep the package/lockfile version and generated API aligned. This avoids importing unrelated main-branch auth changes. The widened Transport union and changed exported schema type remain intentional source-compatibility tradeoffs, not a transparent API-only patch.
Verification: inspected the complete diff, request-schema integration, regression tests, package metadata, and main's corresponding parser/migration notes. Tests and publishing were not run; the PR's reported test results were not independently reproduced.
|
Merge summary: no changes made to this PR.
Landing with a merge commit, as CONTRIBUTING.md requires for PRs into (Written by Claude Opus 5.5) |
Problem
Relays on
mainreport a WebTransport session as"transport": "webtransport"(moq-dev/moq#5293), and gateway sessions asrtmp,srt, orwebrtc. The newest published@moq/auth(0.2.2, fromrelease) has a closedTransportSchemaenum, so an auth server built on it refuses every such request. #5293 says to upgrade auth servers before relays, but no published@moq/authcan parse the new value, and the next major release also carries breaking@moq/authchanges (seejs/auth/MIGRATE.mdonmain).Approach
Port
main'sTransportSchemaand its tests unchanged: the known names gainrtmp,srt,webrtc,webtransport, andunknown, and any other string reads asunknown. Non-string values still fail. Bump@moq/auth0.2.2 -> 0.2.3 (and itsbun.lockworkspace entry) so Release JS publishes it. Backports without a bump skipped publishing before (moq-dev/moq#7019).Impact
Transportwidens from 6 to 11 names, andTransportSchemabecomes a pipe with a catch. The regeneratedjs/auth/api/index.api.mdshows only that. An exhaustiveswitchoverTransportneeds the new arms, asmain's MIGRATE.md already notes for 0.3. That is the only source change. A narrower enum that only addswebtransportwould still refuse the gateway namesmainsends.unknowninstead of failing. Malformed input (missing, null, number, object) is still refused.moq-auth0.2.x has the same closed enum. Not changed here: adding variants to its exhaustive enum is a semver-breaking crate change, so it is left to the next major release.Validation
WebTransport and future transport names follow the Rust contracttest fails againstrelease's schema and passes with this change.js/auth: 116 pass, 0 fail.just check origin/releasepasses. The first run hit a 5 s timeout in the unrelatedjs/common/worklet.test.ts(builds leave no child process behind) at load average 78. It passed alone in 3.6 s, and the full rerun passed.Follow-ups
@moq/auth@0.2.3.(Written by Claude Opus 5.5)
🤖 Generated with Claude Code