Skip to content

feat!: socket endpoints leave every package for Kixel - #9029

Merged
kixelated merged 4 commits into
mainfrom
quest/m2/sockets/remove
Nov 17, 2026
Merged

kixelated merged 4 commits into
mainfrom
quest/m2/sockets/remove

Conversation

@kixelated

@kixelated kixelated commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

Socket endpoints leave this repository for Kixel, as the sockets epic decided on 2026-11-16. No package this repository publishes has a socket endpoint after this PR.

Kixel ports from this PR's parent commit, 2dcb5f8994, which still has rs/moq-net/src/model/socket.rs.

Summary

Deleted:

  • Rust: moq_net::socket (model/socket.rs, 1,150 lines), its integration tests, and moq-relay's socket_auth tests.
  • JS: @moq/net's Socket (socket.ts, its tests, its bench), the export, and the API report entry.
  • Bindings: moq-ffi's socket.rs and MoqSocketEndpoint, moq-c's moq_socket_*, and the Python, Swift, Kotlin, Dart, and Go wrappers, with their tests and README sections.
  • Interop: test/interop/socket.sh, the --sockets lane, run_sockets, the JS sockets plan, four clients, and the interop-socket and interop-socket-js examples.
  • Docs: doc/concept/socket.md, its sidebar and index entries, and socket sections in doc/lib/{rs,js,py}, py/moq-rs/docs, bench/README.md, and rs/moq-net/CHANGELOG.md.
  • Nightly: the JS socket bench in sh/gh/nightly.sh.

Removed because nothing else used them:

  • moq-net: origin::Consumer::hidden_withheld, HiddenWithheld/HiddenWithholding, the hold a pre-lite-07 client session took on them, lite::Version::has_hidden, broadcast::Producer::poll_closed, TrackWeak::abort, and the withheld field of the fuzz Footprint.
  • @moq/net: hooks.hiddenWithheld, hooks.withholdHidden, the origin's withheld counter, and hasHidden(). hooks.requestWanted stays, since util/demand.ts and the lite subscriber use it.
  • moq-ffi: MoqTrackProducer::from_socket. A track's family is now a plain Children.
  • moq-c: Consume::socket_read, Publish::socket_track/socket_close, Children::unkept, and Children::counts.
  • Go: the bridge.OriginProducer, WrapTrackProducer, WrapTrackConsumer, and TrackInfo hooks.

Added for Kixel's port:

  • broadcast::Producer::reserve_unlisted_track is now pub, as decided on 2026-11-16. Its doc says unlisted controls discovery, not authorization. A new test shows an accepted reservation can be read by name and never appears in a track listing.
  • track::Producer::abort_handle() returns a track::AbortHandle with abort(err) and is_closed(). It holds only a std::sync::Weak to the track's Alive guard, so it never keeps a track open. Its abort unlists the track first, as Producer::abort does. Tests pin that it unlists a listed track and frees its name, and that a held handle keeps no dropped track alive. To support it, kio::Producer gains is_closed(). TrackWeak stays pub(super).

Ported rather than deleted: moq-relay's quic_sim bulk-transfer test (a_socket_session_carries_a_bulk_transfer_losslessly) tests relay pacing, not sockets. It is now a_group_carries_a_bulk_transfer_losslessly: a plain broadcast's 40 MB group crosses a relay to a slow reader without loss. The lite-07-only serve_versions helper went with the socket version of the test.

Impact

Public API: breaking, but only for API that exists on main alone. origin/release never had sockets, and just api-diff against the published releases shows no socket item anywhere. Migration: none for released users. A main user of moq_net::socket, @moq/net's Socket, or a binding's socket handle must move to Kixel's copy.

Additive: broadcast::Producer::reserve_unlisted_track, track::Producer::abort_handle, track::AbortHandle, and kio::Producer::is_closed.

Behavior: a pre-lite-07 moq-lite client session no longer registers with its publish origin while it withholds hidden broadcasts. Only socket dials read that registration. Hidden broadcasts themselves are unchanged.

Wire: none. Sockets were only a path and track naming convention.

For the release cut: the socket entries in these MIGRATE.md files describe API that never shipped, so the cut should drop them rather than carry them into a version section: rs/moq-ffi, rs/moq-net ("Socket readers start at the beginning"; keep its IETF explicit-start paragraph), js/net, py/moq-rs, kt/moq, swift, dart/moq, go/wrapper, c/moq, and cpp/moq. Several of those sections also describe the non-socket GroupProducer.ready(size) change, which stays.

Decisions

Recorded from the maintainer decision of 2026-11-17:

  1. ✅ track::AbortHandle (abort, is_closed) is Kixel's cleanup handle (rejected: publishing TrackWeak, whose methods are the broadcast cache's own invariants; no handle). TrackWeak stays private; a method such as is_wanted is added only when a consumer needs it.
  2. ✅ The stale socket entries in each MIGRATE.md stay for the release cut to drop, as listed in Impact (rejected: a deletion exemption in sh/migrate.sh). The quest asked to delete them, but sh/migrate.sh (moq-dev/moq#8424) fails just check on any MIGRATE.md edit outside the cut.
  3. ✅ Keep the follow-up quest/m0/test-flakes-3/py-client-body-error.md (rejected: drop it), recorded in its Plan.
  4. ✅ reserve_unlisted_track is public in Rust only; JS hooks.reserveUnlistedTrack stays internal (rejected: publishing it in JS too). The sockets epic's plan of 2026-11-16 has Kixel port only the Rust endpoint and no JS, so no JS consumer exists. Answers Pullfrog's finding.

Choices made without asking

  • The sockets epic is deleted with its last child. Its own work, moving MoQ Boy and CARLA off sockets, has landed. Kixel's port is tracked in Kixel. The five quest links to the epic now point at this PR.

Validation

  • just check on 0a10b1c70d: passes. An earlier run failed in three places. The MIGRATE.md edits and the nightly socket bench entry are fixed. The third was two load-dependent flakes in tests this PR does not touch: moq-c server_accepts_a_session passed 5 of 5 alone, is known to fail on main, and is owned by quest/m0/test-flakes-3/c-server-accepts-session.md from moq-dev/moq#8964. Python test_client_context_keeps_the_body_error passed 6 of 6 alone and gets a new follow-up below.
  • just test interop --all: all checks pass, 204 PASS and 1 SKIP. The skip is the existing Chromium route-key case.
  • cargo test -p moq-relay --features test-support --test integration quic_sim: a_group_carries_a_bulk_transfer_losslessly, one_relay, and two_relays pass.
  • cargo test -p moq-net --lib listing::: 35 pass, including an_unlisted_track_is_read_by_name_but_never_listed, an_abort_handle_unlists_the_track_it_ends, and an_abort_handle_keeps_no_dropped_track_alive. As an independent check, the unlist test only passes because AbortHandle::abort unlists first: without that, -a arrives only when the producer drops.
  • cargo clippy -p moq-net -p kio -p moq-relay --all-targets --all-features: clean after removing the dead code above.
  • JS: bun run check and bun run test in js/net (3347 pass), and the API report was regenerated.
  • just api-diff: no socket items against any published release.
  • Local review: quest review --harness codex (gpt-6.1-sol high), 0 findings.
  • Not run: Swift, Kotlin, and Dart builds beyond just check's own checks, and go vet, since the generated moq.dev/moq-ffi module was unavailable. moq.h and the Dart bindings are generated and untracked, so the next generation drops their socket entries.

Follow-ups

Related: moq-dev/moq#8941 renames rs/moq-c to rs/libmoq. Whichever lands second resolves the delete/rename conflict on rs/moq-c/src/socket.rs.

Models

Size: M
Implementer: Claude, claude-opus-5-5, unknown effort (arm A)
Implementer: Claude Code, claude-opus-5-5, low effort (iterate, S, arm A)
Implementer: Claude Code, claude-opus-5-5, low effort (iterate, XS, arm A)

(Written by Claude Opus 5.5)

🤖 Generated with Claude Code

Review

Rewritten by quest review after each round.

  • Head: 128fce9

  • Base: origin/main at 9a4ed22

  • Risk: high, Removing socket APIs across language bindings can break downstream callers until the removals are reverted or callers migrate.

  • Classified: medium by default

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

  • Session: 01a1eb30-9094-7b22-af9f-4ff0e8cac9b4, round 3

  • Score: 10/10, The branch’s patch is unchanged apart from a correctly resolved planning-document merge, with no actionable findings; builds and tests were not run, as instructed.

  • Raised the risk to high: Removing socket APIs across language bindings can break downstream callers until the removals are reverted or callers migrate.

  • Rounds: 3; first round 0; findings 0: fixed 0, refuted 0, open 0

  • Findings: none

kixelated and others added 2 commits November 17, 2026 11:38
Quest-Claim: 003da3a7b62bc08b
Deletes moq_net::socket, @moq/net's Socket, the moq-ffi and moq-c socket
handles, the Python, Swift, Kotlin, Dart, and Go wrappers, the interop
sockets lane, and the concept page. What existed only for sockets goes
with them (origin hidden_withheld and its pre-lite-07 session hold, the
JS hiddenWithheld hook). reserve_unlisted_track becomes public, and
track::Producer::abort_handle adds a non-owning AbortHandle, both for
Kixel's port.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated kixelated changed the title moq-net, @moq/net, and the bindings have no socket endpoints feat!: socket endpoints leave every package for Kixel Nov 17, 2026
@kixelated

Copy link
Copy Markdown
Collaborator Author

Maintainer decision (2026-11-17, asked in the /quest-run m0/m1/m2 coordinating session). Pick: /quest-merge once these are applied.

  1. ✅ track::AbortHandle (abort, is_closed) is Kixel's cleanup handle (rejected: publishing TrackWeak, whose methods are the broadcast cache's own invariants; no handle). TrackWeak stays private: its other uses are covered by AbortHandle or by subscribing by name. Add a method such as is_wanted only when a consumer needs it.
  2. ✅ The stale socket entries in each MIGRATE.md stay for the release cut to drop, listed in Impact (rejected: a deletion exemption in sh/migrate.sh).
  3. ✅ Keep the follow-up quest/m0/test-flakes-3/py-client-body-error.md (rejected: drop it).

(Written by Claude Opus 5.5 with high)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated

Copy link
Copy Markdown
Collaborator Author

Applied the maintainer decision on 4c5d6b7: all three answers are recorded under ## Decisions, ## Waiting is cleared, and the kept follow-up's Plan records the pick. No code changed; Codex reviewed the head with 0 findings.

(Written by Claude Opus 5.5 with low)

@kixelated
kixelated marked this pull request as ready for review November 17, 2026 21:32
@coderabbitai

coderabbitai Bot commented Nov 17, 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 13 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: 2511fff8-4229-4414-8c7f-6e921d5a26b6
Commits

Reviewing files that changed from the base of the PR and between 9a4ed22 and 128fce9.

Files selected for processing: 74

  • bench/README.md
  • dart/moq/lib/socket.dart
  • doc/.vitepress/config.ts
  • doc/concept/index.md
  • doc/concept/socket.md
  • doc/lib/js/net.md
  • doc/lib/py/index.md
  • doc/lib/rs/moq-net.md
  • go/wrapper/bridge.go
  • go/wrapper/internal/bridge/handles.go
  • go/wrapper/socket/socket.go
  • js/net/api/index.api.md
  • js/net/bench/socket.ts
  • js/net/src/index.ts
  • js/net/src/internal.ts
  • js/net/src/lite/connection.ts
  • js/net/src/lite/version.ts
  • js/net/src/origin.ts
  • js/net/src/socket.test.ts
  • js/net/src/socket.ts
  • kt/moq/src/jvmAndAndroidMain/kotlin/dev/moq/socket/Socket.kt
  • py/moq-rs/README.md
  • py/moq-rs/benches/ffi.py
  • py/moq-rs/docs/index.md
  • py/moq-rs/moq/__init__.py
  • py/moq-rs/moq/socket.py
  • py/moq-rs/tests/test_socket.py
  • quest/m0/test-flakes-3/py-client-body-error.md
  • quest/m1/README.md
  • quest/m2/README.md
  • quest/m2/sockets/README.md
  • quest/m2/sockets/remove.md
  • quest/m2/unused-api/README.md
  • quest/m3/README.md
  • quest/m3/release/demos-deploy.md
  • rs/kio/src/producer.rs
  • rs/moq-c/README.md
  • rs/moq-c/src/consume.rs
  • rs/moq-c/src/lib.rs
  • rs/moq-c/src/publish.rs
  • rs/moq-c/src/socket.rs
  • rs/moq-c/src/state.rs
  • rs/moq-c/src/test/parity.rs
  • rs/moq-cli/Cargo.toml
  • rs/moq-ffi/src/lib.rs
  • rs/moq-ffi/src/producer.rs
  • rs/moq-ffi/src/socket.rs
  • rs/moq-ffi/src/test.rs
  • rs/moq-ffi/uniffi.toml
  • rs/moq-net/CHANGELOG.md
  • rs/moq-net/src/ietf/subscriber.rs
  • rs/moq-net/src/lite/session.rs
  • rs/moq-net/src/lite/version.rs
  • rs/moq-net/src/model/broadcast.rs
  • rs/moq-net/src/model/front.rs
  • rs/moq-net/src/model/listing.rs
  • rs/moq-net/src/model/mod.rs
  • rs/moq-net/src/model/origin.rs
  • rs/moq-net/src/model/socket.rs
  • rs/moq-net/src/model/track.rs
  • rs/moq-net/tests/integration/main.rs
  • rs/moq-net/tests/integration/socket.rs
  • rs/moq-relay/tests/integration/main.rs
  • rs/moq-relay/tests/integration/quic_sim.rs
  • rs/moq-relay/tests/integration/socket_auth.rs
  • sh/gh/nightly.sh
  • swift/Sources/Moq/Socket.swift
  • test/interop/README.md
  • test/interop/clients/js-native/socket.ts
  • test/interop/clients/python/sockets.py
  • test/interop/clients/rust/socket-js.rs
  • test/interop/clients/rust/socket.rs
  • test/interop/interop.sh
  • test/interop/socket.sh
  • 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

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ℹ️ No critical issues. One cross-package gap is noted inline.

Approach: sound. The PR deletes sockets everywhere, removes the hidden-withholding machinery that only socket dials read, and keeps a small, weak-only track::AbortHandle plus a public reserve_unlisted_track for Kixel's port.

Reviewed changes

This run read the full diff. It focused on the non-deletion hunks and used git grep to check that no removed symbol is still referenced.

  • track::AbortHandle: holds a Weak<Alive>, so it never keeps a track open. Its abort unlists the track and then runs commit_abort, which matches Producer::abort. The new listing tests cover the unlist, freeing the name, and the dropped-track case.
  • broadcast::Producer::reserve_unlisted_track: now pub. Its doc and the new doc/lib/rs/moq-net.md entry say unlisted controls discovery, not authorization.
  • Hidden withholding removed: HiddenWithheld/HiddenWithholding, the lite session's withholding guard, and Version::has_hidden are gone in Rust, along with withholdHidden/hiddenWithheld/hasHidden and the origin's withheld counter in JS. Nothing else read them.
  • Bindings: moq-ffi TrackPhase::Open.family and moq-c Family::Open.kept are no longer Option, since only sockets used the empty variant. The Go bridge hooks are gone, and trackInfoFFI is still used by publish.go.
  • quic_sim port: the bulk-transfer pacing test now sends a plain announced broadcast through the relay instead of a socket session.
  • Leftovers: git grep finds no reference to the removed Rust, JS, or binding symbols, interop examples, or bench entries outside historical quest prose and the MIGRATE.md entries the cut will drop.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using claude-opus-5-5 | 𝕏

Comment thread rs/moq-net/src/model/broadcast.rs Resolved
# Conflicts:
#	quest/m2/README.md

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes

This run reviewed the one commit since the last Pullfrog review: a merge of origin/main into the branch.

  • Merged main: the only change to the PR's own diff is how the merge resolved quest/m2/README.md. main had removed Session codes from the moq-net API line, and the PR's link to #9029 is kept. No other file in the PR's diff changed.
  • Checked the merged code for leftovers: git grep finds no reference to the removed symbols (has_hidden, HiddenWithheld, hiddenWithheld, withholdHidden, hasHidden, moq_net::socket, from_socket, MoqSocket) in the code merged from main. That includes lite/session.rs, model/track.rs, and fuzz.rs, which the merge and this PR both touched.

The earlier finding about JS hooks.reserveUnlistedTrack is settled by decision 4: Kixel ports only Rust, so the JS hook stays internal.

Pullfrog  | View workflow run | Using claude-opus-5-5 | 𝕏

@kixelated
kixelated added this pull request to the merge queue Nov 17, 2026
Merged via the queue into main with commit 74e05dd Nov 17, 2026
9 checks passed
@kixelated
kixelated deleted the quest/m2/sockets/remove branch November 17, 2026 22:32
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