Skip to content

refactor!: stop shipping unused API surface - #6454

Merged
kixelated merged 5 commits into
mainfrom
quest/m1/api-audit/unpublish
Oct 24, 2026
Merged

kixelated merged 5 commits into
mainfrom
quest/m1/api-audit/unpublish

Conversation

@kixelated

@kixelated kixelated commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

The release exposed packages, namespace re-exports, optional listeners, and stats handles with no application consumer. The Game Boy binary could also build without its required encoder and then refuse to start.

Approach

Apply the approved API audit boundaries, migrate the conferencing demo to direct imports, and keep working transport and gateway paths intact. Validate feature combinations separately so dependency unification cannot hide missing gates.

Impact

Breaking. How to migrate each change:

  • @moq/p2p is private with no release script; use the workspace source for the test/p2p harness. Rust moq-e2ee and moq-room set publish = false; use the workspace source (the published room implementation is @moq/room).
  • @moq/room drops its Hang, Net, Publish, Signals, and Watch namespace re-exports. Import from @moq/hang, @moq/net, @moq/publish, @moq/signals, and @moq/watch directly and declare them in your application's dependencies. The Clock re-export from main stays, since the room's own signatures take its time units.
  • moq-boy: Cargo refuses to build or install the binary without openh264. Install with cargo install moq-boy --features openh264; the Nix package already enables it.
  • moq-cli: default features no longer enable moq_tokio::webrtc native data channels. Enable webrtc explicitly in a source build that integrates that transport. moq import rtc / moq export rtc still include the WHIP/WHEP gateway with str0m and moq-ice.
  • moq-tokio: the feature-gated webrtc module is hidden from public docs while it has no application consumer; source integrations still enable the webrtc feature.
  • moq-relay: STUN (moq_relay::stun, Config::stun, --stun-bind / MOQ_STUN_BIND / [stun]) needs the non-default stun Cargo feature, for example cargo install moq-relay --features stun. Default builds have no STUN listener or settings and refuse the flag, environment variable, or TOML table.
  • moq-rtc: Client::publish and Client::subscribe return Result<()> again (reverting the unreleased Result<wire::Source> from feat(rtc)!: expose per-peer UDP wire sources #5632); successful negotiation starts the background media session. Remove reads of the returned wire source, Response::wire, and moq_rtc::wire. Response::run still drives an accepted server session until it ends. The stale feat(rtc)!: expose per-peer UDP wire sources #5632 entry in rs/moq-rtc/MIGRATE.md should be dropped at the cut.
  • moq-ice: stays published for moq-tokio and moq-rtc as internal infrastructure with no stability promise. Replace Socket struct literals with Socket::new(udp, locals, inbound)?, which refuses empty locals with std::io::ErrorKind::InvalidInput; fields are private, so read candidates through socket.locals().
  • Add the missing qmux package README. No package versions or wire formats change; no registry publication or deployment is performed.

Validation

  • Baseline metadata reproduced the unrestricted publication/default-feature shape and ungated Game Boy binary. Final metadata/package checks confirm private packages, feature defaults, the required encoder, the qmux README, no normal default relay stun-types dependency, and no P2P JSR publish manifest.
  • Final selected Rust tests: 9,005 passed, 76 skipped. Selected JS tests: 4,796 passed. Scoped JS/Rust compile, lint, declaration, documentation, WASM, and io_uring checks passed; Markdown, shell, TOML, Nix, Justfile, and workflow checks passed.
  • Feature checks passed: relay default tests (443 across ICE/RTC/relay), opt-in STUN tests (382), minimal relay library/binary builds with and without STUN, RTC without defaults, the full tokio feature matrix, opt-in WebRTC rustdoc, and the Game Boy encoder tests (4). Building the Game Boy binary without its encoder is refused by Cargo.
  • just test interop --all: all 164 checks passed. just test p2p: real browser peers completed SETUP and transferred a frame. quest check --base origin/main: 605 documents passed.
  • just ci reached the known host restriction while building github-runner: unshare: write failed /proc/self/uid_map: Operation not permitted during systemd-repart. Flake evaluation passed; unaffected package-source-assets and runner-VM configuration checks passed separately, as did all remaining selected test/lint phases.
  • An extra relay --no-default-features --all-targets probe fails in existing tests that assume optional WebSocket/unix configuration fields. The supported minimal library/binary feature checks above pass; no unrelated test or host workaround is included.
  • Re-merge of main (after refactor(net)!: trim moq-net and @moq/net exports to those with a consumer #6470, refactor(net)!: remove Error::SessionClosed #6482, docs: write MIGRATE.md at the breaking cut, not per PR #6610): MIGRATE.md hunks moved here per docs: write MIGRATE.md at the breaking cut, not per PR #6610; main's new stun_binding_merges_the_environment test gated behind stun. After the merge: just check js, rs, quest, and drill passed (flake stops on the known unshare uid_map sandbox limit); changed-crate Rust tests 5,056 + 524 + 239 passed; relay with stun 389 passed; changed-package JS tests 4,896 passed; Markdown, TOML, gh tooling, and ts-paths checks passed. Interop was not rerun since no wire, FFI, or binding code changed in the merge.

Alternatives

Leaving unused surfaces public creates compatibility obligations without a current application. Existing used transports, the RTC gateway, and workspace test consumers remain available within their intended scope.

Follow-ups

The existing P2P, E2EE CLI, UDP demux, and wire-stats quests own introducing their application consumers. No new API decision is needed for these approved audit choices.

(Written by GPT-6)
(Re-merge and Impact edit written by Claude Opus 5.5)

@kixelated kixelated changed the title Unpublish what nothing uses refactor: stop shipping unused API surface Oct 23, 2026
Apply the approved publication and feature boundaries, preserve real workspace consumers, and validate ICE sockets at construction.

Co-Authored-By: GPT-6 <noreply@openai.com>

Copy link
Copy Markdown
Collaborator Author

Completed the approved unpublish audit in f692d9bfc59c67c1046609d4df66f08bd364acd7. The quest and its parent link are removed; existing P2P, E2EE CLI, UDP-demux, and wire-stats plans now describe what must acquire a real consumer before publication or exposure.

Final validation passed 9,005 selected Rust tests, 4,796 selected JS tests, 164 full interop checks, the real browser P2P transfer, feature/packaging probes, and all unaffected selected checks. Full just ci remains limited by the host's runner-image /proc/self/uid_map restriction, documented in the description; no source workaround was added. The extra minimal all-targets relay test probe also exposes existing optional-feature test assumptions; supported minimal shipping targets pass.

Public API removals and migration guidance are recorded for every affected package. Wire formats and package versions are unchanged. No open design decision remains; marking ready for review without merging.

(Written by GPT-6)

@kixelated
kixelated marked this pull request as ready for review October 23, 2026 04:02
@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 32 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

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: 49d7eda5-57ca-40c4-ad9c-7965f1608425
Commits

Reviewing files that changed from the base of the PR and between ea4a644 and 4229b0a.

Files ignored due to path filters: 1
  • bun.lock is excluded by !**/*.lock
Files selected for processing: 47
  • demo/web/package.json
  • demo/web/src/meet.ts
  • doc/bin/relay/config.md
  • doc/bin/rtc.md
  • doc/concept/transport.md
  • doc/lib/rs/index.md
  • doc/lib/rs/moq-room.md
  • js/p2p/README.md
  • js/p2p/package.json
  • js/room/src/index.ts
  • quest/m1/api-audit/README.md
  • quest/m1/api-audit/unpublish.md
  • quest/m2/e2ee/cli.md
  • quest/m2/p2p/udp-demux.md
  • quest/m2/p2p/watch.md
  • quest/m2/wire-stats/README.md
  • rs/moq-boy/Cargo.toml
  • rs/moq-boy/README.md
  • rs/moq-boy/src/main.rs
  • rs/moq-cli/Cargo.toml
  • rs/moq-e2ee/Cargo.toml
  • rs/moq-e2ee/README.md
  • rs/moq-ice/README.md
  • rs/moq-ice/src/agent.rs
  • rs/moq-ice/src/lib.rs
  • rs/moq-ice/src/wire.rs
  • rs/moq-relay/Cargo.toml
  • rs/moq-relay/src/config.rs
  • rs/moq-relay/src/internal.rs
  • rs/moq-relay/src/lib.rs
  • rs/moq-relay/src/relay.rs
  • rs/moq-relay/src/settings.rs
  • rs/moq-relay/src/stun.rs
  • rs/moq-room/Cargo.toml
  • rs/moq-room/README.md
  • rs/moq-rtc/src/client/mod.rs
  • rs/moq-rtc/src/client/whep.rs
  • rs/moq-rtc/src/client/whip.rs
  • rs/moq-rtc/src/lib.rs
  • rs/moq-rtc/src/server/mod.rs
  • rs/moq-rtc/src/server/whep.rs
  • rs/moq-rtc/src/server/whip.rs
  • rs/moq-rtc/src/session.rs
  • rs/moq-rtc/src/wire.rs
  • rs/moq-tokio/src/lib.rs
  • rs/moq-tokio/src/webrtc.rs
  • rs/qmux/README.md
  • 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

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-24T15:01:51.685824Z 4229b0a New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@kixelated

Copy link
Copy Markdown
Collaborator Author

Merging. Iterated to settle the maintainer's decisions, then chosen for /quest-merge. CI is green, the current head has a non-Grok review, and quest check passes against main.

(Written by Claude Opus 5.5)

@kixelated
kixelated enabled auto-merge October 23, 2026 21:06
kixelated and others added 3 commits October 24, 2026 07:48
# Conflicts:
#	js/room/src/index.ts
#	quest/m1/api-audit/README.md
#	rs/moq-cli/MIGRATE.md
#	rs/moq-relay/Cargo.toml
#	rs/moq-relay/MIGRATE.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated kixelated changed the title refactor: stop shipping unused API surface refactor!: stop shipping unused API surface Oct 24, 2026
@kixelated
kixelated added this pull request to the merge queue Oct 24, 2026
Merged via the queue into main with commit 5369b91 Oct 24, 2026
11 checks passed
@kixelated
kixelated deleted the quest/m1/api-audit/unpublish branch October 24, 2026 16:00
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