fix(push): advertise a valid Largest for the push-mode catalog - #11
Closed
santi-ferreiro wants to merge 1 commit into
Closed
fix(push): advertise a valid Largest for the push-mode catalog#11santi-ferreiro wants to merge 1 commit into
santi-ferreiro wants to merge 1 commit into
Conversation
Merge retained installs into the track's largest-location history, send the catalog's PUBLISH after its retained group exists, and re-arm the refresh clock on the catalog's no-demand -> demand edge. Fixes MSF-01 §5 catalog bootstrap failing until a reload.
Collaborator
|
Thanks for the contribution. I’ve integrated it into a spec-grounded, rigorously tested fix. |
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.
Problem
In push mode the catalog's PUBLISH advertised
LARGEST_OBJECT = {0,0}while a stale refresh deadline simultaneously replaced the retained group. A first viewer's relative Joining FETCH then resolved against an extent covering nothingretained, so the relay rejected it (0x3) and MSF-01 §5 catalog bootstrap failed with 0x1200 until a page reload.
Latent since moq-playa began enforcing MSF-01 §5 retrieval. Not player-specific — any conforming client
issues the mandated joining FETCH and needs a Largest to compute the range. The publisher was announcing a track without ever saying where its live edge was.
Changes
track_install_retainedmerges the installed group into the track's largest-location history. Installing a retained group asserts those objects exist at those Locations, so history must advance exactly as a live write does; otherwise a later PUBLISH omitsLARGEST_OBJECT.track_hist_mergewas already on all three delivery paths and only missing here.moq_pub_set_retained_group, so it advertises an extent that already exists. Same hook cycle, before the flushingmoq_pub_tick— no added latency.sender_republish_catalogtracks catalog demand across passes and re-arms the refresh clock on a false→true edge. The deadline was armed at install but the refresh gate also required demand, so with no subscriber it went stale and the first cycle bringing demand fired an instantly-overdue refresh in the same cycle that pushed the initial catalog live — replacing retained group 0 with a byte-identical group 1.Behavior change to note in review
The catalog is now the last PUBLISH rather than the first, so derived track aliases shift (catalog 1 → 3 in a two-media-track stream). Aliases are arbitrary identifiers, but it is protocol-visible.
pacing_reset_partial_fanoutassertedthe old order and the old "no PUBLISH carries a Largest" invariant; both expectations are updated, the latter made per-entry since the catalog is now the sole exception.
The other three test changes are unrelated to this behavior: those suites read
pr->track_name(a borrowed span) aftermoq_session_accept_publish, an advancing call that invalidates borrows — always undefined, and only workingwhile the catalog happened to be the first PUBLISH processed. The reorder exposed it rather than caused it.
Verification
148/148 on this base. End-to-end OBS → moqx relay → moq-playa: catalog resolves
on first load, no reload.
This change is