feat(moq-net,js/net): moq-lite-06-wip announce ids#2160
Open
kixelated wants to merge 4 commits into
Open
Conversation
Each active ANNOUNCE_BROADCAST implicitly assigns the next per-stream ordinal; ended and restart reference that id instead of repeating the broadcast path. Restarts get their own explicit status instead of the duplicate-active idiom, and an unknown or retired id is a protocol violation. Announces that were filtered (loops, exclude_hop) never assign an id, so their retraction sends nothing. Negotiated via the new moq-lite-06-wip ALPN (wire code 0xff0dad06), preferred by default like previous wip drafts on dev. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Mirror of the Rust change: AnnounceBroadcast becomes a discriminated union (active / ended / endedId / restart), the publisher assigns and retracts by ordinal on lite-06, and the subscriber resolves ids back to paths (an unknown or retired id is a protocol violation). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Sorry @kixelated, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
…cement-compression-0cc276 # Conflicts: # js/net/src/lite/announce.ts
Mirror the spec change into the in-repo drafts/ (moved here by #2159): each active ANNOUNCE_BROADCAST implicitly assigns the next per-stream ordinal, and ended/restart reference that id instead of repeating the broadcast path. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Summary
Implements announce ids for moq-lite-06 (negotiated as
moq-lite-06-wip, wire code0xff0dad06), so retracting or restarting an announcement no longer repeats the broadcast path.activeANNOUNCE_BROADCAST implicitly assigns the next per-stream ordinal (a counter starting at 0). Both sides derive it from message order on the ordered stream, so the id costs zero bytes on the announce itself.ended(status 0) now carries only the Announce ID (~3 bytes total instead of3 + len(path) + hops).restartgets its own explicit status (2) carrying the Announce ID + the replacement hop list, replacing the lite-05 duplicate-activeidiom. A duplicateactivefor an already-active path is now a protocol violation on 06.exclude_hop) never assign an id, so their later retraction sends nothing, which the peer can't distinguish from never-announced (previously a danglingendedwas sent).Pre-06 wire behavior is unchanged; all message forms are version-gated at encode/decode.
Like previous wip drafts on dev,
moq-lite-06-wipis the preferred default ALPN so the demo/tests exercise it; revisit before promoting to main.Cross-package sync
rs/moq-net: wire format, publisher/subscriber id bookkeeping,Version::Lite06Wipplumbing (client/server ALPN arms,Handshake::Lite05generalized toLiteSetup).js/net: mirrored (Version.DRAFT_06,ALPN_06_WIP, union-shapedAnnounceBroadcast, publisher/subscriber loops, connect/accept dispatch).doc/concept: no change needed; it documents theannounced(prefix)API surface, which is unchanged.drafts/draft-lcurley-moq-lite.mdupdated in-repo (the drafts moved into the monorepo via drafts: move IETF drafts into the monorepo with nix + just #2159). Reworked ANNOUNCE_BROADCAST section (per-status bodies), protocol-violation rules, and a lite-06 changelog entry;just drafts checkpasses.Public API changes
rs/moq-net:lite::VersiongainsLite06Wip;lite::Version::has_announce_id()added;lite::AnnounceBroadcastgainsEndedId { id }andRestart { id, hops }variants (breaking for exhaustive matches, hence dev).js/net:AnnounceBroadcastreshaped from a class into a discriminated union withencodeAnnounceBroadcast/decodeAnnounceBroadcast[Maybe]functions (breaking);Version.DRAFT_06,ALPN_06_WIP,hasAnnounceIdadded.Testing
endedsize check).rs/moq-native/tests/broadcast.rsandjs/net/src/integration.test.ts, pinned tomoq-lite-06-wip.NEWEST_LITEregression guards bumped, so the default-negotiation matrix (QUIC, WebTransport, WebSocket/qmux) now runs on 06-wip.just checkpasses.🤖 Generated with Claude Code