Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions quest/m1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ folded into Dropped sources.
- [Dropped sources](/quest/m1/dropped-sources.md) - track consumers see the producer's real error on every end path, never `Dropped`; a dead route ends Unroutable, and the TS follower lingers on announcements instead of matching errors
- [Release warm FETCH](/quest/m1/release-warm-fetch.md) - on the 0.17 line, a FETCH of a group a subscription delivered in part gets every frame instead of stalling on a parked open group
- [Malformed moq-lite input](/quest/m1/lite-malformed-close.md) - a lite peer that breaks a control-stream rule, including SETUP's client-only parameters, gets PROTOCOL_VIOLATION, and a Report-level publisher answers PROBE targets, in Rust and js/net
- [Own-range codes on MoQT](/quest/m1/own-range-bridge.md) - a MoQT close never carries a moq-lite own-range session code
- [Client settings parity](/quest/m1/obs-client-config.md) - moq-ffi offers moq-c's client knobs, and the OBS Advanced settings get back the ones the C++ migration dropped
- [Session report parity](/quest/m1/obs-session-report.md) - a session reports its negotiated draft and reconnect failures, so the OBS dock shows them again
- [Generated C++ shape](/quest/m1/cpp-generated-shape.md) - `moq::Client` is the generated type itself and `moq::expected` is one type at every C++ standard
Expand Down Expand Up @@ -129,6 +130,7 @@ folded into Dropped sources.
- [Catalog rendition IDs](/quest/m1/catalog-track-id.md) - catalog rendition keys become IDs unique across video and audio, with an optional `track` name, so one catalog lists renditions from several broadcasts
- [Media stats](/quest/m1/stats/README.md) - publishers announce a stats track in the catalog, viewers answer a soliciting catalog through a per-catalog `.echo` broadcast, and one model turns both into a health verdict and a preflight report
- [JS track handover](/quest/m1/js-group-handover.md) - a JS track subscription resumes across a route swap from the first frame it lacks, so `test/drain` passes at zero latency budget
- [Drain web connections from accept](/quest/m1/drain-web-accept.md) - a relay drain never exits under an HTTP/1.1 WebSocket client still in TLS or header parsing
- [Transport upgrade](/quest/m1/transport-upgrade/README.md) - a session that came up over WebSocket moves to QUIC once the QUIC dial lands, handing over without dropping a group
- [Scope track priority](/quest/m1/track-priority-scope.md) - priority orders one owner's streams, and a shared cluster session is fair across tenants
- [BBR ACK cleanup](/quest/m1/bbr-ack-cleanup.md) - packet bookkeeping scales with completed entries instead of scanning the flight on every ACK
Expand Down
42 changes: 42 additions & 0 deletions quest/m1/drain-web-accept.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# [S] A relay drain counts web connections from accept

## Goal

A relay drain never exits under an HTTP/1.1 WebSocket client that is still
in TLS or HTTP header parsing. HTTP/1.1 web connections hold the drain from
TCP accept until their first request shows they are not a WebSocket upgrade.
h2 connections release at ALPN, since h2 can't carry a WebSocket today.

## Plan

`serve_ws` (`rs/moq-relay/src/websocket.rs`) takes `activity.enter()` in the
axum handler, so a connection before that point isn't counted and
`Activity::close()` can see zero (the Codex follow-up on #5286).
`doc/bin/relay/config.md` already claims accepted connections hold the
drain, so it is wrong for this case today.

`listener/idle.rs` already sees accept, each request's headers and the
upgrade flag, and its deadline covers TLS. Hold the `Active` there and hand
it to `serve_ws` through a request extension. h2 extended CONNECT isn't
enabled, so an h2 connection releases its guard once ALPN picks h2.
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved

Decided 2026-10-12:

- On HTTP/1.1, release at the first request's headers unless it is an
upgrade. A later upgrade on the same keep-alive connection is counted from
the handler only, as today.
- A connection that arrives after the drain commits (`enter()` returns
None) is accepted without a guard: `serve_ws` refuses the upgrade with 503
as today, and plain HTTP is served until the listener stops.

Plain HTTP/1.1 on the public listeners (HLS, API, health checks) now holds the
drain from accept through its first request's headers, bounded by
`listen.timeout` and the drain deadline. Say so in `config.md`. The internal
listener doesn't use the web acceptor and is unaffected.

Tests (paused time): start the drain while one HTTP/1.1 client is mid-TLS or
mid-headers; `Relay::run` doesn't return until it upgrades and gets a
GOAWAY, or the deadline passes. A plain HTTP/1.1 GET releases the guard so the drain
exits. `Relay::with_web` (embedders) goes through the same acceptor.

Public API: none. Wire: none.
37 changes: 37 additions & 0 deletions quest/m1/own-range-bridge.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# [XS] MoQT never sends moq-lite's own session codes

## Goal

An IETF (MoQT) session close never carries a moq-lite own-range code
(0x30-0x3f). An unmapped own-range `SessionError::Unknown` becomes an
unspecified error (0x1) on MoQT, as the moq-lite draft requires at a bridge.

## Plan

Today Rust IETF closes pass `SessionError::Unknown(0x30..=0x3f)` through
unchanged: `Version::session_code` and the direct `to_code()` calls in
`ietf/session.rs` and `ietf/publisher.rs`. Stream resets are already safe,
since IETF `to_stream_code` maps unknown codes to INTERNAL_ERROR. The relay
never forwards one session's close code onto another, so this is latent and
reachable through `Session::abort(Error::Session(Unknown(0x3x)))`.

Decided 2026-10-12: map it in the IETF session-code encoder, mirroring
`lite::error::to_session_code`, and route `Version::session_code` and the
direct IETF close sites through it. Not in the shared
`SessionError::to_code`: moq-ffi and moq-c expose that value verbatim
(`from_session`), so a received Lite `Unknown(0x31)` would reach every
binding as 0x1. Lite keeps its own arm. Rust only: JS was checked and can't
emit these codes (`abort()` takes no code, IETF closes use fixed codes, and
auth rejections send UNAUTHORIZED or NOT_SUPPORTED).

Tests: an IETF close with `Unknown(0x31)` sends 0x1, a Lite close and
`to_code()` are unchanged, and `Unknown(0x20)` (the reserved range) still passes through on
both.

Public API: none; `SessionError::to_code` is unchanged. Wire: encoding and
negotiated versions are unchanged, but the close code value changes: a MoQT
close carrying `Unknown(0x30..=0x3f)` sends 0x1 instead of that code.

## Related

- [Malformed moq-lite input](/quest/m1/lite-malformed-close.md) - the neighbouring Lite close-code rules
Loading