Repository navigation
feat(net): relays forward metadata subscriptions upstream as metadata - #9758
Merged
Merged
Conversation
Quest-Claim: a9882f98706c4202
…e quest Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A lite-07 session broadcast and an origin front keep a header-only metadata copy per track apart from the payload copy, filled by a metadata SUBSCRIBE, mirroring Rust. The interop read mode goes through the JS ingest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ll mutation Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ayload copy A metadata copy now stores each header's object ID and properties, so a relay forwards sparse IETF object records from it. Tests pin that over a hop that cannot carry the mode, payload and metadata readers share one payload subscription. The draft states it as a MUST, the quest records the decision, and quest/m3/meta-reuse.md plans reuse on lite-07. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
Design change: the maintainer settled this PR's open decisions on 2026-11-27. They are recorded under
The earlier review rounds counted against this branch include those for moq-dev/moq#9733. This head is reviewed in new sessions. (Written by Claude Opus 5.5) |
Metadata headers pass the receive pacing gate before they commit, charged at what they store, so a stalled reader pauses the stream instead of losing headers to shedding. The Rust front records a track's properties per name, as JS does, and the JS front asks a metadata copy's source too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A metadata group dropped while its ingest waits to admit a header skipped the header's declared size, which no payload backs, and could swallow the buffered GROUP_END. Also returns front property records to per copy, which cross-mode checks across mixed versions would refuse. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated
marked this pull request as ready for review
November 27, 2026 16:39
Contributor
|
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 5 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. |
…ta-wire # Conflicts: # drafts/draft-lcurley-moq-lite.md
This was referenced Nov 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes the quest
quest/m2/subscribe-meta-wire.md(deleted here), whose first half landed in moq-dev/moq#9733.Problem
moq-dev/moq#9733 put metadata subscriptions on the lite-07 wire and taught both publishers to serve them, but a relay still answered a metadata subscription by pulling the full payload upstream and stripping it on egress. Payload crossed every hop above the reader even though no reader on that path needed it, which defeats the point of the mode for route-health standbys and
moq-hlsindexing.Approach
A relay keeps a separate metadata copy of a track beside its payload copy, filled by its own metadata SUBSCRIBE upstream. The two copies never splice or switch mode in place.
rs/moq-net:track::Key { name, meta }(crate-private). It never uses a reserved name.metaflag is set only where its handler can fill a metadata copy: lite-07 session sources and origin fronts. Anywhere else, a metadata lookup resolves to the payload copy, and the publisher strips its payloads as before.metaon SUBSCRIBE and on fills, and ingests the payload-less FRAME as a header.msg.meta.js/netmirrors this:ConsumeBroadcastand every front expose a metadata view.metaand decodes the metadata FRAME.msg.meta.ietfextension on lite, so it has no object records to keep.subscribe-meta.mdrecords the decision below.quest/m3/meta-reuse.mdplans reusing the payload copy on lite-07 too.Decisions
quest/m3/meta-reuse.md).quest/m3/meta-reuse.mdfor reusing the payload copy on lite-07 hops, with its cost, rationale, and the moq-dev/moq#8882 splice concern (rejected: building the splice here).write_header; andTrack.Request.metais marked@internal(rejected: accepting the finding; dropping the PR).Impact
track::Key,track_meta,Track.Request.meta, and the JSmetaWireOf/trackMetaOfare crate-private or@internal.Metabyte and metadata FRAME.Alternatives
quest/m3/meta-reuse.md.Follow-ups
quest/m3/meta-reuse.md(new): serve metadata readers from the payload copy on lite-07 hops too, removing duplicate header bytes under mixed demand. It has no open decisions; measure the cost first.quest/m2/subscribe-meta.md: the public metadata subscription API in Rust, JS, and the bindings. It builds on this PR.just test interop --allrun, everyfinish go -> *row failed with "error: no health group". Thejs-native-bunfinish reader's subscription to the.healthlivetrack ended with no group. It passed 3 of 3 targeted reruns. It looks tied to health publishing returning in moq-dev/moq#9752, not to this change, but it is unproven and worth a quest.Validation
rs/moq-net:--features async, clippy included.lite::meta_testsrun publisher to relay to reader on simulated time, measuring each hop by its publisher session's billing:metadata_headers_keep_their_object_fields: a metadata copy keeps a sparse object ID and marks its wire state sparse, and the egress read returns them.metadata_ingest_waits_for_its_reader: metadata headers pass the receive pacing gate, charged at what they store, so 400,000 headers into a group with an idle reader pause the stream instead of shedding the reader's next header. It fails without the gate.a_paused_metadata_frame_drains_to_its_group_end: a metadata group dropped while a header waits to be admitted still finds its buffered GROUP_END, since no payload follows the header. It fails without the fix.js/net:lite/meta.test.tsnow has 11 tests.lite07_meta_interopreads the JS-served metadata stream through the Rust ingest, andtest/interop/meta.ts readreads it through the JS ingest. Both plain and deflate tracks agree.just checkpasses on the head. This includes the drill sensitivity check: therelay-withdraws-lost-publishermutation was retargeted at the moved context.just test interop --allran on the previous head,979dbfca78. Every row passed except the flake under Follow-ups, and those rows passed on 3 of 3 targeted reruns. The commit since changes no wire bytes./verify-subscribewas not run. None of the functions its model covers changed. The only subscription-accounting code touched isFrameIngest::try_drain_end, which the skill lists as not covered.Models
Size: L
Implementer: Claude Code, claude-opus-5-5, unknown (arm A)
Implementer: Claude Code, claude-opus-5-5, unknown (iterate, L, arm A)
🤖 Generated with Claude Code
(Written by Claude Opus 5.5)
Review
Rewritten by
quest reviewafter each round.Head: 05e5ece
Base: origin/main at eca170c
Risk: high,
A mistake in the lite-07 wire changes (the SUBSCRIBE Meta byte, payload-less FRAME ingest, and the relay's per-mode upstream subscriptions in rs/moq-net and js/net) would reach relays and peers that speak moq-lite-07-wip, and since that is an unpublished -wip version the next cut publishes it, so it breaks deployed peers and published Rust and JS consumers who rely on the wire, and it is hard to undo once a cut ships it.Classified: high by Claude Code, claude-haiku-5-5, low effort, session
d132b366-f26b-4ad9-93b6-44f63782f16eRisk file: bb7b1c0de60b
Reviewer: Codex, gpt-6.2-sol, xhigh effort
Session:
01a21db7-38c3-7181-b010-5477de6aebc2, round 4Score: 10/10,
The rebase preserves the earlier fixes, and the incremental review found no new issues attributable to the branch.Rounds: 10; first round 2 (medium 2); findings 7 (medium 7): fixed 6, refuted 1, open 0
Findings: none
Reviewer: Claude Code, claude-opus-5-5, high effort, second
Session:
68b61d59-d888-4544-92a1-2a87b1e62b05, round 4Score: 9/10,
Every change since the last round comes from rebasing onto the new main (WebTransport reset wording in the draft, join-budget retention, route-lost recovery, the m2 plan entry, CI and tooling), with no metadata-subscription code touched, so the branch's own change stands as already reviewed and has no open blocking findings.Rounds: 10; first round 1 (medium 1); findings 2 (medium 2): fixed 2, refuted 0, open 0
Findings: none