Repository navigation
feat(net)!: a live join with no lag limit says so instead of a huge Min Age - #9490
Conversation
Quest-Claim: 3e28769745ae5bb1
…in Age
Start::Live { min } is Option<Duration> in Rust and Duration | null in
@moq/net. lite-07-wip carries Min Age plus one, 0 for no lag limit, as Max
Age already is. PAST_EVERY_GROUP is gone; a pre-07 subscription maps onto
Live { min: None, max: Some(X) }.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
✅ No new issues found.
Approach: The approach is sound. "No lag limit" becomes a typed None/null instead of the 2^53−1 ms PAST_EVERY_GROUP sentinel, which is what AGENTS.md asks for. The lite-07-wip Live anchor's Min Age now uses the same ms+1 encoding (0 = none) that Max Age already uses.
Reviewed changes. I read the full diff: the model, wire, placement and consumer changes in Rust and JS, plus the mechanical call-site updates.
- Typed lag: Rust
Start::Live.min,lite::Anchor::Live.minandJoinAsk.minbecomeOption<Duration>. Every join key becomes(Option<Duration>, Option<u64>). JS mirrors this withLive.min: Duration | null,WireLive.min: number | nullandliveMillisreturningnullfor no limit andundefinedfor a range that isn't a live join. - Wire (lite-07-wip): Rust
wire_anchor/varint_optand JSwireAnchor/Duration.decodeOptionalboth write Min Age as ms+1, so the two languages agree byte for byte. The draft's anchor text, start rule and changelog are updated to match. - Pre-07 mapping:
Start::withinand JSlegacyStartnow producemin: None/null. Rustwire_spangets this throughStart::withinunchanged. - Placement:
TrackState::joinand JS#joinnow take the "reaches back past every group" branch whenminisNone/null. The zero-lag fast path inWindow::place_rangebehaves as before for a set lag and is skipped for no limit. - Ordering and collapse:
Nonesorts first in Rust'sOptionorder, and JS matches it with?? -1incompareand the demandjoins()sort. Bothfit::collapseimplementations merge toNonewhen either side has no limit. - Key parity: the JS
joinKey,joinOfandretainJoinsround-trip through a"null"string, which fixes the previousNumber("null")→NaNdrop. - Consumers: the moq-mux
stated()playout delay ignores a join with no limit. The audioreplay_budget(Rust and JS) keeps full retention when the join has neither a lag nor a max.
claude-opus-5-5 | 𝕏
|
Warning Review limit reachedYou'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 4 minutes. View limit details
No actionable comments were generated in the recent review. WalkthroughLive-range minimum age can now be absent to represent an unlimited lookback. The change updates model and API types, join placement and aggregation, and lite-07 live-anchor encoding and decoding. Rust subscription call sites and tests now represent finite minima as optional values, with unlimited minima represented explicitly. Merge Risk:
|
|
quest land watch: the merge queue removed this pull request at f6f7710 because its The land fixer works on it in the background, and the watcher re-enqueues it at the back of the queue once it is fixed or judged flaky, or hands it back here with what it needs.
…p moq-json moq-loc moq-mux moq-net moq-net-tests moq-relay moq-rtmp moq-rtsp moq-srt moq-stats moq-tokio moq-transcode moq-uring moq-video moq-webrtc qmux
Checking ....
Checking bench-harness...
Checking hang...
Checking kio...
Checking macros...
Checking test-env...
Checking moq-json...
Checking moq-net...
Checking moq-pattern...
Checking moq-mux...
Checking moq-loc...
Checking moq-msf...
Checking moq-tokio...
Checking moq-congestion...
Checking moq-crypto...
Checking moq-quic...
Checking moq-sock...
Checking qmux...
Checking moq-shaper...
Checking libmoq...
Checking moq-audio...
Checking moq-hls...
Checking moq-archive...
Checking moq-video...
Checking moq-nvenc...
Checking moq-v4l...
Checking moq-vaapi...
Checking moq-auth...
Checking moq-bench...
Checking moq-boy...
Checking moq-cli...
Checking moq-relay...
Checking moq-stats...
Checking moq-uring...
Checking moq-rtmp...
Checking moq-rtsp...
Checking moq-srt...
Checking moq-transcode...
Checking moq-webrtc...
Checking moq-e2ee...
Checking moq-ffi...
Checking moq-gst...
Checking moq-interop...
Checking moq-net-tests...
Checking uniffi-bindgen...
Checking fuzz...
Checking fuzz...
Checking fuzz...
Checking fuzz...
Checking fuzz...
Checking fuzz...
Checking fuzz...
Checking fuzz...
Blocking waiting for file lock on package cache
Blocking waiting for file lock on package cache
Blocking waiting for file lock on package cache
Blocking waiting for file lock on package cache
Blocking waiting for file lock on package cache
Blocking waiting for file lock on package cache
mbx[savings]: 497973 compilations, and the box has forgotten none of them.
mbx[savings]: 497973 compilations, and the box has forgotten none of them.
Checking moq-net v0.3.10 (/var/cache/github-runner-work/moq/moq/rs/moq-net)
Compiling moq-video v0.1.10 (/var/cache/github-runner-work/moq/moq/rs/moq-video)
Compiling moq-relay v0.17.2 (/var/cache/github-runner-work/moq/moq/rs/moq-relay)
Compiling moq-gst v0.4.12 (/var/cache/github-runner-work/moq/moq/rs/moq-gst)
Compiling libmoq v0.7.0 (/var/cache/github-runner-work/moq/moq/rs/libmoq)
Documenting moq-net v0.3.10 (/var/cache/github-runner-work/moq/moq/rs/moq-net)
no C crypto on 12 targets: aarch64-apple-darwin aarch64-apple-ios aarch64-apple-ios-sim aarch64-linux-android aarch64-unknown-linux-gnu armv7-linux-androideabi armv7-unknown-linux-gnueabihf x86_64-apple-darwin x86_64-apple-ios x86_64-linux-android x86_64-pc-windows-msvc x86_64-unknown-linux-gnu
Checking moq-json v0.5.8 (/var/cache/github-runner-work/moq/moq/rs/moq-json)
Checking moq-loc v0.2.19 (/var/cache/github-runner-work/moq/moq/rs/moq-loc)
Checking qmux v0.7.0 (/var/cache/github-runner-work/moq/moq/rs/qmux)
Checking moq-uring v0.0.12 (/var/cache/github-runner-work/moq/moq/rs/moq-uring)
Documenting moq-e2ee v0.0.26 (/var/cache/github-runner-work/moq/moq/rs/moq-e2ee)
Documenting moq-archive v0.0.11 (/var/cache/github-runner-work/moq/moq/rs/moq-archive)
Documenting moq-json v0.5.8 (/var/cache/github-runner-work/moq/moq/rs/moq-json)
Documenting moq-loc v0.2.19 (/var/cache/github-runner-work/moq/moq/rs/moq-loc)
Checking hang v0.21.11 (/var/cache/github-runner-work/moq/moq/rs/hang)
Checking moq-tokio v0.19.23 (/var/cache/github-runner-work/moq/moq/rs/moq-tokio)
Checking moq-stats v0.2.12 (/var/cache/github-runner-work/moq/moq/rs/moq-stats)
Documenting moq-tokio v0.19.23 (/var/cache/github-runner-work/moq/moq/rs/moq-tokio)
Documenting hang v0.21.11 (/var/cache/github-runner-work/moq/moq/rs/hang)
Checking moq-mux v0.10.11 (/var/cache/github-runner-work/moq/moq/rs/moq-mux)
Documenting moq-mux v0.10.11 (/var/cache/github-runner-work/moq/moq/rs/moq-mux)
Documenting moq-stats v0.2.12 (/var/cache/github-runner-work/moq/moq/rs/moq-stats)
Documenting moq-uring v0.0.12 (/var/cache/github-runner-work/moq/moq/rs/moq-uring)
Documenting qmux v0.7.0 (/var/cache/github-runner-work/moq/moq/rs/qmux)
Documenting moq-relay v0.17.2 (/var/cache/github-runner-work/moq/moq/rs/moq-relay)
Checking moq-audio v0.1.10 (/var/cache/github-runner-work/moq/moq/rs/moq-audio)
Documenting moq-rtsp v0.0.1 (/var/cache/github-runner-work/moq/moq/rs/moq-rtsp)
Documenting moq-video v0.1.10 (/var/cache/github-runner-work/moq/moq/rs/moq-video)
Documenting moq-gst v0.4.12 (/var/cache/github-runner-work/moq/moq/rs/moq-gst)
Documenting moq-interop v0.0.0 (/var/cache/github-runner-work/moq/moq/rs/moq-interop)
Documenting moq-ffi v0.4.12 (/var/cache/github-runner-work/moq/moq/rs/moq-ffi)
Documenting libmoq v0.7.0 (/var/cache/github-runner-work/moq/moq/rs/libmoq)
Documenting moq-transcode v0.1.10 (/var/cache/github-runner-work/moq/moq/rs/moq-transcode)
Documenting moq-hls v0.5.11 (/var/cache/github-runner-work/moq/moq/rs/moq-hls)
Documenting moq-audio v0.1.10 (/var/cache/github-runner-work/moq/moq/rs/moq-audio)
Documenting moq-webrtc v0.3.12 (/var/cache/github-runner-work/moq/moq/rs/moq-webrtc)
Documenting moq-rtmp v0.3.11 (/var/cache/github-runner-work/moq/moq/rs/moq-rtmp)
Documenting moq-srt v0.3.11 (/var/cache/github-runner-work/moq/moq/rs/moq-srt)
Finished `dev` profile [unoptimized] target(s) in 1m 11s
Generated /var/cache/github-runner-work/moq/moq/target/doc/hang/index.html and 30 other files
mbx[cache]: object cache: 0 hits, 15 misses, 31 bypassed; 0 B downloaded, 0 B uploaded, 31.4 MiB stored locally
mbx[cache]: 1m 14s session; 0s estimated compiler time avoided (summed across compilations)
mbx[cache]: bypass reasons: 31 rustdoc
mbx[cache]: Cargo artifact reuse and CI cache archive transfers are not included above
mbx[savings]: linked 1.1 TiB into place. copying is for people with disk to spare.
bash sh/local.sh cargo clippy --locked -p moq-audio -p moq-video --tests -- -D warnings
Checking moq-net v0.3.10 (/var/cache/github-runner-work/moq/moq/rs/moq-net)
Compiling moq-video v0.1.10 (/var/cache/github-runner-work/moq/moq/rs/moq-video)
mbx[progress]: 15s elapsed; 0 hits, 1 misses, 0 bypassed, 0 not looked up; ~0s compiler work saved
Checking moq-json v0.5.8 (/var/cache/github-runner-work/moq/moq/rs/moq-json)
Checking moq-loc v0.2.19 (/var/cache/github-runner-work/moq/moq/rs/moq-loc)
Checking hang v0.21.11 (/var/cache/github-runner-work/moq/moq/rs/hang)
mbx[progress]: 30s elapsed; 0 hits, 4 misses, 0 bypassed, 0 not looked up; ~0s compiler work saved
mbx[progress]: 45s elapsed; 0 hits, 4 misses, 0 bypassed, 0 not looked up; ~0s compiler work saved
mbx[progress]: 1m elapsed; 0 hits, 4 misses, 0 bypassed, 0 not looked up; ~0s compiler work saved
Checking moq-mux v0.10.11 (/var/cache/github-runner-work/moq/moq/rs/moq-mux)
Checking moq-hls v0.5.11 (/var/cache/github-runner-work/moq/moq/rs/moq-hls)
Checking moq-audio v0.1.10 (/var/cache/github-runner-work/moq/moq/rs/moq-audio)
Finished `dev` profile [unoptimized] target(s) in 1m 11s
mbx[cache]: object cache: 0 hits, 11 misses; 0 B downloaded, 0 B uploaded, 22.2 MiB stored locally
mbx[cache]: 1m 13s session; 0s estimated compiler time avoided (summed across compilations)
mbx[cache]: Cargo artifact reuse and CI cache archive transfers are not included above
mbx[savings]: 4.8 TiB logical of build debris binned so far. cargo clean remains unemployed.
bash sh/local.sh cargo clippy --locked -p moq-net --no-default-features --lib --tests -- -D warnings
Checking moq-net v0.3.10 (/var/cache/github-runner-work/moq/moq/rs/moq-net)
mbx[progress]: 15s elapsed; 0 hits, 4 misses, 0 bypassed, 0 not looked up; ~0s compiler work saved
Finished `dev` profile [unoptimized] target(s) in 22.67s
mbx[cache]: object cache: 0 hits, 5 misses; 0 B downloaded, 0 B uploaded, 6.9 MiB stored locally
mbx[cache]: 23.78s session; 0s estimated compiler time avoided (summed across compilations)
mbx[cache]: Cargo artifact reuse and CI cache archive transfers are not included above
mbx[savings]: 498468 compilations, each compiled once and served warm ever since
RUSTDOCFLAGS="-D warnings" bash sh/local.sh cargo doc --locked -p moq-net --no-default-features --no-deps
Documenting moq-net v0.3.10 (/var/cache/github-runner-work/moq/moq/rs/moq-net)
##[endgroup]
error: recipe `no-async` was terminated on line 192 by signal 15
##[error]ci: check rs_cross failed
error: recipe `ci` failed on line 121 with exit code 101
##[error]Process completed with exit code 101.
##[group]Run actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9
with:
name: cargo-timings
path: target/cargo-timings/cargo-timing-*.html
if-no-files-found: ignore
retention-days: 14
compression-level: 6
overwrite: false
include-hidden-files: false
archive: true
env:
BASE: 888de61a12b6c92248eee6271cac6f6a17687997
CHECK_FAIL_FAST: 1
NEXTEST_TEST_THREADS: 24
MBX_CACHE_LINKS: 1
MBX_REMOTE_URL:
##[endgroup]
With the provided path, there will be 4 files uploaded
Artifact name is valid!
Root directory input is valid!
Uploading artifact: cargo-timings.zip
Beginning upload of artifact content to blob storage
Uploaded bytes 228484
Finished uploading artifact content to blob storage!
SHA256 digest of uploaded artifact is 9130dd331c77c00e093bb5d92a9eef104f0ca667899c4f219b340675db14abd5
Finalizing artifact upload
Artifact cargo-timings successfully finalized. Artifact ID 14876085984
Artifact cargo-timings has been successfully uploaded! Final size is 228484 bytes. Artifact ID is 14876085984
Artifact download URL: https://github.com/moq-dev/moq/actions/runs/45293479475/artifacts/14876085984
Post job cleanup.
##[start-action display=Run jdx/mr-boxington-action@88acf2bb50552c7c508cbac13e5f8c576b95b1de;id=__a13c1284-bba4-4d03-b179-83b867e6b711.mbx]
##[end-action id=__a13c1284-bba4-4d03-b179-83b867e6b711.mbx;outcome=skipped;conclusion=skipped;duration_ms=0]
Post job cleanup.
[command]/nix/store/i2m3w4ly2w6grrmk1j59rb7zp09bssia-git-2.56.0/bin/git version
git version 2.56.0
Temporarily overriding HOME='/var/cache/github-runner-work/_temp/292d0256-c6ec-407f-91be-6e2ea2ffd16c' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
[command]/nix/store/i2m3w4ly2w6grrmk1j59rb7zp09bssia-git-2.56.0/bin/git config --global --add safe.directory /var/cache/github-runner-work/moq/moq
Removing SSH command configuration
[command]/nix/store/i2m3w4ly2w6grrmk1j59rb7zp09bssia-git-2.56.0/bin/git config --local --name-only --get-regexp core\.sshCommand
[command]/nix/store/i2m3w4ly2w6grrmk1j59rb7zp09bssia-git-2.56.0/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
Removing HTTP extra header
[command]/nix/store/i2m3w4ly2w6grrmk1j59rb7zp09bssia-git-2.56.0/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader
[command]/nix/store/i2m3w4ly2w6grrmk1j59rb7zp09bssia-git-2.56.0/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
Removing includeIf entries pointing to credentials config files
[command]/nix/store/i2m3w4ly2w6grrmk1j59rb7zp09bssia-git-2.56.0/bin/git config --local --name-only --get-regexp ^includeIf\.gitdir:
[command]/nix/store/i2m3w4ly2w6grrmk1j59rb7zp09bssia-git-2.56.0/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url
A job completed hook has been configured by the self-hosted runner administrator
##[group]Run '/nix/store/qrn6ds64bzvwbm5nwf245ifz2c6jb9xw-ci-cache-gc.sh/bin/ci-cache-gc.sh'
shell: /nix/store/lfm00fnq66xfgbn099vqckabyl5jllz6-bash-interactive-5.3p20/bin/bash --noprofile --norc -e -o pipefail {0}
##[endgroup]
evicted 14 objects and 1 action results (543.6 MiB logical); 50.0 GiB logical remain
dropped 15 session event streams
evicted 0 objects and 0 action results (0 B logical); 50.0 GiB logical remain
Cleaning up orphan processes
(written by quest land watch) |
|
codex, gpt-6.1-sol, medium effort land fixer note:
(written by codex, gpt-6.1-sol, medium effort) |
|
quest land watch: armed auto-merge on this pull request at f07577d, so it joins the back of the merge queue once its required checks pass, with the land fixer's fix ( (written by quest land watch) |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes. Since the last review, main was merged in and two test references it brought used the removed sentinel. Both now use the typed "no lag limit".
- JS test migration: in
js/net/src/track.test.ts, the "a forgotten kept-out run is judged by each range's budget" test now passesmin: nullwhere it passedPAST_EVERY_GROUP. - Rust test migration: the matching test in
rs/moq-net/src/model/track.rsnow usesmin: Nonewhere it usedsubscription::PAST_EVERY_GROUP.
No PAST_EVERY_GROUP reference remains anywhere in the tree at f07577d.
claude-opus-5-5 | 𝕏
#9490 deleted quest/m2/time-addressing/live-min-age-none.md, which this branch only unlinked, so it stays deleted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Problem
A lite-07 Live range with no lag limit (what a lite-05/06 peer's "oldest group plus max X" becomes) carried
min: PAST_EVERY_GROUP, a 2^53−1 ms sentinel, and placement compared against it (min >= PAST_EVERY_GROUP). AGENTS.md rules out marking a special case inside a value.Approach
track::Start::Live { min: Option<Duration>, .. }and@moq/netLive.min: Duration | null:None/nullis no lag limit.PAST_EVERY_GROUPis gone in both languages, along with each test helper's copy of the sentinel.0meaning no lag limit, as Max Age already does. lite-05/06 and moq-transport keep their encoding: a pre-07 "oldest + max X" maps toLive { min: None, max: Some(X) }(Start::within, JSlegacyStart).TrackState::join, JS#join) keys the existing "reaches back past every group" branch onmin.is_none(), so a copy still places such a join without waiting on its upstream's live edge. The diff there is kept small because moq-dev/moq#9491 (per-range-start) rewrites the same code.fit::collapse(Rust and JS) merges toNonewhen either side has no limit, and the JS sort orders mirror Rust'sOption(Nonefirst).Startof 0 would"), and the existing lite-07 changelog bullet.Impact
moq_net::track::Start::Live::minisOption<Duration>. Migration:min: d→min: Some(d). UseNonefor a join that reaches back past every group (what a huge lag meant before).@moq/netTrack.Live.minisDuration | null. Migration: callers that readminhandlenull. Callers that construct it are unchanged unless they used a huge lag to mean "no limit", which becomesnull.0= no lag limit. lite-05/06 and moq-transport are unchanged. Release's lite-07-wip has no Live anchor at all, so mixed release/main relays lose nothing they had.moq-ffi: no change.MoqDelay.minwas already optional and is mapped by moq-mux.Consumertakes no playout delay from a no-limit join (before, it would have stated 2^53 ms). The audio encoders' replay budget (Rustmoq-audio, JS@moq/publish) keeps full retention for a join with neither a lag nor a max limit.retainJoinsparsed its string key withNumber(...), which would have dropped a no-limit join's answer (NaN). The lite-07 widened/drop-record relay tests caught it.Alternatives
The quest's Plan settled the shape (rejected: a separate "live from oldest" anchor type, an explicit Range Type tag). In JS,
minstays required and takesnull(rather than becoming optional) so it mirrorsmax'snulland an omitted field can't silently mean "no limit".Validation
cargo test -p moq-net --all-features: 3704 lib + 649 integration tests pass. The property tests now draw no-limit joins too: window settling vs. trying every start (settling_by_steps_matches_trying_every_start), the incremental union vs. a full fold, and the demand aggregate. A byte-level check pins the Live anchor to[3, 251, 0]for 250 ms and[3, 0, 0]for no limit.nextestover moq-mux, moq-audio, moq-transcode, moq-cli, moq-relay, moq-net-tests, moq-interop, moq-hls, libmoq, moq-ffi, moq-tokio: 4861 passed.bun test:@moq/net3799,@moq/hang807,@moq/publish447, all pass. The JS window property test draws no-limit joins. The lite-07 relay suites (widened_max_age,drop_record) caught theretainJoinsNaN bug described above.just check: everything passed excepttest rs, which hit a 60 s timeout inmoq-video ...openh264::output_order::tests::a_high_sps_changes_its_profile_alone. That code isn't touched here and the test passes alone. An earlier run timed out 3moq-muxTS recovery tests; they pass alone, under 5×--stress-count, and in the full moq-mux run.just test interop --all(real relay, Rust/JS/Python/Go/C/C++/GStreamer clients across every lite version): all cells passed except onejs -> rustwithaudio gap after 0 samples. That is the intermittent audio gap tracked inquest/m0/interop-green(moq-dev/moq#8633).interop.sh --publishers js --subscribers rustthen passed 3 of 3 runs.Follow-ups
None.
Models
Size: S
Implementer: Claude Code, claude-opus-5-5, high effort
Review
mechanical fix by codex, gpt-6.1-sol, medium effort:
Merged base and mechanically migrated two newly merged test references from removed PAST_EVERY_GROUP to None/null; passed nix develop --command just ci base, nix develop --command just test interop --all, and git diff --check.(head f07577d)Rewritten by
quest reviewafter each round.Head: f6f7710
Base: origin/main at 8d8195b
Risk: high,
The public net API changes: the JS `Track.Live.min` type widens to `Clock.Duration | null` (js/net/api/index.api.md), and the Rust live-join `min` becomes an `Option`, with the commit marked `feat(net)!`, so consumers that read or build a live range's `min` can break and a revert of the code reverses it cleanly, but a published API break is high under RISK.md.Classified: high by Claude Code, claude-haiku-5-5, low effort, session
4c6299aa-ed5a-4740-a741-f4d718313d0cReviewer: Codex, gpt-6.1-sol, medium effort
Session:
01a20a98-01cf-73e2-9d64-eb2c12e0bed5, round 1Score: 9/10,
The contracts appear coherent across Rust, JS, and their consumers, with no actionable defects found by source inspection, pending build and test validation.Rounds: 1; first round 0; findings 0: fixed 0, refuted 0, open 0
Findings: none
🤖 Generated with Claude Code
(Written by Claude Opus 5.5 with high)