REANNOUNCE via duplicate ANNOUNCE; announced() returns (path, Announced)#1530
Merged
Conversation
597e49b to
51c36db
Compare
kixelated
commented
May 29, 2026
68c53e6 to
bfea208
Compare
bfea208 to
f782ce7
Compare
kixelated
commented
May 30, 2026
| _ => {} | ||
| } | ||
| stream.writer.finish().ok(); | ||
| crate::Announced::Reannounce(_) => { |
Collaborator
Author
There was a problem hiding this comment.
Maybe rename this to Announced::Restart? Or ::Retry?
Collaborator
Author
There was a problem hiding this comment.
Renamed to Announced::Restart (and the internal restart-coalescing path) across moq-net + consumers. Went with Restart over Retry since restart is the status name in the draft (and "retry" reads like a failed attempt being re-sent, whereas this is a clean replacement). Happy to switch to Retry if you'd prefer. (Written by Claude)
Generated by Claude Code
36f5b5e to
402055f
Compare
…, Announced)
REANNOUNCE is an atomic broadcast replacement (relay failover, upstream restart,
shorter hop path). On the wire it's a duplicate ANNOUNCE: an active announcement
for a path that is already announced, with no intervening unannounce. No new
status byte and no version gating.
AnnounceConsumer::{next,try_next,poll_next} now yield (PathOwned, Announced)
instead of (PathOwned, Option<BroadcastConsumer>). The `Announced` enum is
Active/Restart/Ended; `.broadcast()` gives the legacy Option<BroadcastConsumer>
view. The origin coalesces atomic replacements (backup promotion, shorter hop
path) into a single Announced::Restart delivery.
Lite publisher sends a restart as a duplicate Announce::Active. Lite subscriber
treats an Active for an already-announced path as an atomic replacement instead
of a Duplicate error. The lite decoder also tolerates the draft's explicit
`restart` status (2), surfacing it as an Active. IETF moq-transport has no
restart, so it splits into namespace_done + namespace.
Examples use `.context`/`event.broadcast()` for ergonomics.
402055f to
37741d2
Compare
kixelated
added a commit
that referenced
this pull request
May 31, 2026
Rebasing onto dev picked up the moq-ffi API where MoqOriginProducer.Publish was renamed to Announce (the announce-based origin reshaping in #1530/#1536). The wrapper's public OriginProducer.Publish stays; only the underlying ffi call changes. Everything else (announced, broadcast, producers/consumers) is unchanged, and just go check passes against dev's bindings. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
4 tasks
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.
Implements REANNOUNCE (per moq-dev/drafts#23). Rebased onto current
dev.REANNOUNCE is an atomic broadcast replacement: the broadcast at a path is swapped for a new one without an interruption in availability (relay failover, upstream restart, a shorter hop path arriving).
Wire design: duplicate ANNOUNCE = REANNOUNCE
Rather than an explicit status byte, a reannounce is a duplicate ANNOUNCE — an active announcement for a path that is already announced, with no intervening unannounce. This means:
lite/announce.rsis untouched), no new status, and no version gating — every version that speaks ANNOUNCE gets it.@moq/net's set-based announce consumers (reconnect republish,@moq/boy), so they keep working unchanged.API change (Rust)
AnnounceConsumer::next()/try_next()/poll_next()now yield(PathOwned, Announced)instead of(PathOwned, Option<BroadcastConsumer>):.broadcast()gives the legacyOption<BroadcastConsumer>view (Some for both Active and Reannounce, None for Ended), so callers that don't care about the distinction stay simple.Behavior
Announced::Reannouncedelivery instead of an Ended-then-Active pair. A genuine unannounce+announce is still preserved as two deliveries.Reannounceis sent as a duplicateAnnounce::Active(keeping the stats guard for continuity).Activefor an already-announced path is applied as an atomic replacement (publish the replacement so the origin demotes the old broadcast to a backup, then retire it) instead of returning aDuplicateerror.Reannounceintonamespace_done+namespace.Drive-by
Adds the missing
compressfield (..Default::default()) to libmoq'sTrackinitializers, which fails to compile after dev's compression feature landed (this was theerror[E0063]: missing field compressCI failure).Tests
model::origin: reannounce after the consumer drained is delivered as a singleReannounce; an undrained reannounce staysActive;test_duplicatebackup-promotion asserts a single reannounce.moq-net/moq-relay/moq-native/moq-ffi/libmoq/hangbuild clean with no clippy-D warnings;cargo fmt --all --checkclean (verified on rust 1.96, the nix-pinned toolchain).(Written by Claude)