Repository navigation
feat(net)!: add JavaScript socket endpoints and bound track requests by their lifetime - #7884
Conversation
Quest-Claim: 67eba2eda1b1be82
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Fix socket interop planning and refuse known late session queries before the fresh refusal probe. Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Keep refusal independent of data-session queries and preserve the original single rejection assertions in both interop clients. Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
|
Maintainer decisions (2026-11-04, /quest-unblock):
Record both in the quest Plan and remove the items. (Written by Claude Opus 5.5) |
# Conflicts: # quest/m1/socket/js.md
A subscribe, track info, fetch, or fill now waits for its answer until its demand ends, its caller cancels, stream credit fails fast, or the session closes, as in Rust, replacing the ten-second answer budget and the `.socket/<id>` namespace exemption. Lite's first subscribe setup watches demand like its reopen and IETF's, IETF's history setup ends with the info lookup, and `track.Consumer.info()` takes an optional `signal`. Socket dials and accepts fail as unsupported while the endpoint's origin has a moq-lite client session before 07, matching Rust (#7888). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…redit Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
|
Design change: Apply the maintainer's lifecycle-bound track-request decision together with main's later stream-credit scheduler. Track answers have no fixed timer; pending stream opens wait in the cancellable priority queue. Cancellation gives unused credit to the next open. Discovery keeps its consumer lifetime, and IETF advertisements retain their answer budget. This replaces the old namespace exemption and fail-fast-credit assumptions. The generic IETF absolute-start correction remains owned by moq-dev/moq#7883. (Written by GPT-6.1 Sol with xhigh reasoning effort) |
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
…emantics Use Route handles, join TCP halves live, and exercise lite-only track bursts. Preserve the merged IETF whole-group skip behavior and document missing-message delivery. Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Keep the assertions for investigation and retain draft-20/22 TCP burst coverage. Simplify the lite-only socket interop loop for shellcheck. Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
…points-7884 # Conflicts: # quest/m1/socket/js.md # quest/m3/stream/js.md
|
This run was cancelled before it finished. |
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed head 2471c51bd4fcda45e51b9f6c738843f2ca988832 against 37f8305d43d8602de4dbe53808608a3d7d7f8a04.
No actionable findings from this static review. I checked the endpoint handshake and return-routability checks, cancellation and session teardown, TCP FIN/RST and second-group handling, lifecycle-bound track requests, metadata refusal propagation, and the added regression/interop coverage.
The earlier missing-group-as-FIN issue described in the PR is addressed: a missing or dropped TCP group 0 now fails, while an explicitly empty group still ends cleanly. The implementation follows the settled socket convention and cancellable stream-credit model; no additional code change is requested by this review.
Verification limits: GitHub source/diff review only; I did not execute tests or independently reproduce the reported local validation. At posting, Quest passed and the main Check job was still running. IETF early-burst scheduling remains the explicitly documented follow-up outside this iteration's lite-only burst/interop coverage.

Problem
JS lacks Rust's endpoint/session socket API. Its fixed ten-second track-answer budget also prevents applications from holding requests for acceptance.
Approach
socket.Endpoint, separate TCP/track accept queues, and incoming accept/reject handles. Announce one hidden broadcast per endpoint, with unlisted session tracks and a return-routability check before acceptance.info({ signal })provides caller cancellation.Impact
@moq/net.socket:Endpoint,TcpStream,TrackStream,Incoming, and cancellationOptions. JS methods usedialTcp/acceptTcpanddialTrack/acceptTrack. Streams expose existing producer/consumer handles pluspeerandsession.track.InfoOptionsandConsumer.info(options?).info()with existing errors.moq-lite-07-wip) or IETF support. Endpoints fail as unsupported while their origin has a pre-07 lite client session.Decisions
Origin.RouteAPI, retaining hidden setup only where a test must fill before announcement.Alternatives
Reuse the settled Rust convention and group/track handles. The merged moq-dev/moq#7883 supplies the generic IETF fixes; this PR reuses them.
Validation
Pinned Nix shell, expensive commands through
quest gate:just ci origin/main: passed, exit 0 on 2471c51bd4. JS net: 2,998 passed, 3 skipped, 0 failed; selected Rust: 274 passed, 17 existing skips; Python: 125 passed. All selected build, lint, tooling, flake, and quest checks pass.env -u MOQ_QUEST quest gate just test interop --all: passed, exit 0 on 5dea81f9a1. The subsequent main merge changes quest paths and comments only; socket code and tests are identical. All publishers/subscribers, auth, finished media, FETCH/history, late joins, tails, replacement/compression/claims/drop lanes, and Python/Rust sockets pass. All 8 Rust/JS socket pairs pass over lite-07, in both roles and protocols under Node and Bun.Review
Claude Code,
claude-opus-5-5, medium effort, round 3 reviewed2471c51bd4fcda45e51b9f6c738843f2ca988832againstorigin/main(37f8305d43d8602de4dbe53808608a3d7d7f8a04): no findings.Round 1's missing TCP group 0 being reported as clean FIN is fixed in 68bd23a088. Deterministic missing/dropped-group regressions and the valid empty-group FIN case pass. Rounds 2 and 3 report no findings. The final merge preserves completion of the JS socket quest while taking main's moved dependency paths; all 580 quest documents validate.
Follow-ups
[]after a singleclock.advance(Nano.zero)in the full CI batch. It was immediately quarantined, then all IETF socket burst variants were removed to apply the requested lite-only scope. Missing TCP group 0 now fails explicitly, covered by deterministic regressions. Generic joining-FETCH tests stay enabled.BASH_ENVhook:nix develop --command bash -c 'bash sim/python.test.sh'fromdemo/carlafails on this branch and unchanged5480d5109f59f52f1b98668fff5a90be454060f4after initializing each checkout's shell snapshot. The hook restoresPYTHONPATH/compiler search paths inside the fake compiler fixture. An uninitialized base checkout passes. No open fix was found; investigate the shell snapshot's repeated environment restoration separately.(Written by GPT-6.1 Sol with xhigh reasoning effort)