Repository navigation
feat(lite): carry refresh demand through relays - #6030
Conversation
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>
Co-Authored-By: GPT-6.1-Sol <noreply@openai.com>
Co-Authored-By: GPT-6.1-Sol <noreply@openai.com>
|
Draft checkpoint: Implementation/default-native/interop tested head: Validation outcomes:
No new public model API; only unpublished lite-07-wip wire fields. Legacy receives no ratio and forwards no wanted requests. Whether the Goal also forbids origin-local refresh on a new legacy SUBSCRIBE remains an unresolved maintainer interpretation; existing core behavior is preserved. JS endpoint/manual-clock coverage and Rust actual two-relay coverage are distinct. Cross-language JS-publisher/two-Rust-relay refresh acceptance and working browser coverage remain gaps. The original quest is retained. All owned commands formally ended; the exact-owned child audit was empty. Keeping this PR draft with no ready, auto-merge, merge, or CI/review polling, as requested. (written by GPT-6.1-Sol) |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add has_refresh/hasRefresh in the existing default-forward form and use it for TRACK_INFO Refresh, SUBSCRIBE_UPDATE Wanted Group and the relay's upstream driver, which previously only matched lite-07 exactly. Add a unit test that concurrent joins send one SUBSCRIBE_UPDATE and the arrival of the requested group re-arms the next. Fix a doc comment the new codec test split from its test, simplify the JS refresh test setup, and retire the finished lite wire quest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
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 11 minutes. View limit details
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. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 220e48cebf
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
A SUBSCRIBE_UPDATE arriving before the subscription starts replaced any earlier one, so a later parameter update dropped a Wanted Group that the relay sends only once. Fold pending updates through Request::coalesce, keeping the highest Wanted Group, and say so in the draft. The pre-start update test now subscribes from a cached group, as a relay does, so the SUBSCRIBE is not itself a live-edge join and the lost request shows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7c0577c7ae
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The dynamic-groups note still said moq-lite hops carry no requests. lite-07 now carries the ratio in TRACK_INFO and the wanted group in SUBSCRIBE_UPDATE; earlier versions carry neither. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Per the maintainer: a relay restates its current wanted group in every SUBSCRIBE_UPDATE, indefinitely, and sends a new update only when a new group past its largest is wanted. Receivers keep the latest update and ignore a value at or below their largest, so restating it is harmless and no update needs folding. Drop Request::coalesce and the draft's keep-the-highest MUST, store the wanted group on the upstream SubStream in Rust, and mirror the send rule in js/net. Tests now prove a parameter update restates the wanted group, a restated value still joins before its group exists, and a stale one is ignored. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Holding the wanted group on SubStream tipped Sub past clippy's variant-size threshold. There is one per track copy and it holds a live stream while anyone reads, so boxing would add an allocation per upstream subscription without saving memory; same reasoning as TrackRunState. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Lite TRACK_INFO has no refresh yet, so the hop compared a sealed DYNAMIC_GROUPS with false and refused real moq-transport tracks crossing a cluster. The hop now forwards it as it arrived; direct moq-transport ingress still compares it. #6030 restores the check. The concept doc no longer claims default settings never carry the extension's state: moq-relay offers it on moq-lite-07. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TRACK_INFO now ends Refresh (#6030) then Compression on lite-07, in Rust, JS, and the draft. Both lite-07 quests drop out of lite07-finalize. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Lite TRACK_INFO now carries Refresh (#6030), so the hop restates DYNAMIC_GROUPS like the other understood properties and drops its exception. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resolve against refresh demand (#6030), announce SYNCED (#6029) and the ietf extension (#6058): TRACKS_ADD now carries TRACK_INFO's Refresh, the draft shares one SYNCED section between the Announce and Tracks streams, and the ietf draft keeps the Track Stream for listed tracks since TRACKS_ADD has no TRACK_PROPERTIES. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Problem
Refresh ratios and wanted groups stop at a lite session, so a late join behind a relay cluster cannot request fresh content from the origin.
Approach
Carry
Refreshin TRACK_INFO andWanted Groupin SUBSCRIBE_UPDATE on lite-07. Each hop judges joins against its own cache.Wanted Groupis plain subscription state, like the other SUBSCRIBE_UPDATE fields:Demand::wantedasks for a new group past its largest. It restates that value in every later update, indefinitely, including after the group arrives. Joins asking for the same group coalesce into one update.Rust and JS gate both fields on a default-forward
has_refresh/hasRefreshversion helper, matching the other lite-07 features. A nightly benchmark sweeps retained groups x unrelated tracks x joined readers.This completes the lite wire quest, so the PR deletes it and its references in the refresh epic, the lite-07 finalize quest, and the IETF extension quest.
Impact
track::Info::refreshandDemand::wanted. The newVersion::has_refreshispub(crate); JShasRefreshis internal tolite/version.ts.Refresh(0 = none, else ratio + 1) and SUBSCRIBE_UPDATEWanted Group(0 = none, else sequence + 1), appended after the existing fields. lite-03 to lite-06 layouts are unchanged; those peers receive no ratio and forward no wanted requests. No enum or version allocation; moq-dev/moq#6029 has since landed and only collided textually (changelog,version.rs, a JS import).draft-lcurley-moq-lite.mddocuments both fields, the restated-state rule, and the lite-07 changelog entry.doc/concept/standard.mdno longer says moq-lite hops carry no refresh requests.Decisions
Wanted Groupbe an event sent once or state restated in every update? (Maintainer's call: "Yes, make it state".)Request::coalescehook and the draft's keep-the-highest MUST are gone.has_epoch, so lite-08 keeps the behavior.matches!per site.Validation
refresh_joins_coalesce_upstream(Rust relay): eight concurrent joins write one SUBSCRIBE_UPDATE, the next wanted group sends the next, and a later parameter update restates the latest instead of clearing it. JSrefresh.test.tschecks the same coalescing and restatement through one hop. Both fail if the restatement is removed.a_subscribe_update_is_not_a_close(Rust publisher): two updates restating the same wanted group before the subscription starts still join under the ratio once it runs; after the asked-for group exists, a restated value is ignored (fails withSome(3)if the stale check is removed).3fd4249a86:just ciexits 0 (7,734 Rust tests plus lints),just drafts checkpasses,just test interop --allexits 0 (74 cells, 0 fail, browser included), and the JS@moq/netcheck plus its dependents' tests pass (net: 2,403 tests).just cirun hitmoq-cliredundant_importers_switch_through_bufferbloat_on_lite_07("stitching export exited"); the rerun passed it. Main already tracks that flake asquest/m1/test-flakes-2/redundant-failover-drift.md(3 of 10 failures on main), and the refresh paths are inert there since TS imports set no ratio.Follow-ups
doc/conceptRefresh section, after its json and video children land.(Written by Claude Opus 5.5)
🤖 Generated with Claude Code