Repository navigation
Conversation
Quest-Claim: f2b2fc070b295856
…d live group skips A rung's fill now resolves a reader's time start against the source's own starts, accepting the group containing the time instead of dropping the key (which skipped that group). A descending gap is placed from the source group containing the miss rather than by reading the fill's history from its first group. The live path mirrors the starts its source declared skipped, so a lite-07 reader of a rung never waits on a pause between groups. moq-net's Subscriber::is_skipped (and JS Subscriber.isSkipped) become public so the shared feed can ask its arrival-order read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t group A skip travels apart from the group above it, so the feed asks a run that was not yet known skipped again when the next group arrives. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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/m1/transcode-lite07-spans.md(deleted here).Problem
Three lite-07 gaps in
moq-transcode's rungs, left after zero-timer accounting landed:rung::fetchfetched a reader's time starttas an exact key. Whentfalls inside source group[g, end), the source has no group att, so the rung droppedt, which tells moq-net no group starts from the floor throught: the reader skippedgentirely.drop_gapplaced the gap below a miss by reading the source in key order from the fill's first group, walking (and pulling from upstream) every source group below the miss just to find the newest one.claim_groupand never declared skipped starts, so the pause between two source groups stayed owed on the rung's track: a lite-07 reader of a rung waited on it for good (or paid a fill round trip that reported it as a lost gap).Approach
fetchresolves a time start against the source the way any reader would: a one-group read fromStart::Time(t)throughtreturns the group containingt. A group from the fill's floor throughtis accepted under its own key (and transcoded from that read); otherwise the key is dropped. A retired rung's drain refuses a placement that can't answer at once, asdrop_gapalready does.drop_gap, filling newest first, reads only the source group containing the miss: it is the newest group below it. Only when no group contains the miss (the one below ended whole before it) does it fall back to the read from the fill's first group.Item::Skip(range)ahead of each group whose run below the source declared skipped (from one past the previous group, since a whole group's span holds no starts), and asks a run again at the next group, since a skip travels apart from its group and may land after it. The rung mirrors each withskip_groups. Only source-declared skips are mirrored: a run the feed passed (stale, lost in transit) may hold real source groups, which stay fillable.Tests use media-timescale keys (microseconds, groups seconds apart):
rung::a_time_start_inside_a_group_serves_the_group_containing_it: an unaccepted mid-group time-start fill throughspawn_fillgets the whole containing group (fails without the fix).rung::a_descending_gap_is_placed_from_the_miss: the source's handler is asked to place the miss (floor just past its 2 s group), never time 1 from the fill's start (fails with the old lookup).rung::a_descending_fill_drops_a_gap_past_a_paused_group_at_once: covers the fallback.feed::the_source_skips_reach_the_listeners: skips past afinish_atpause, past a lost group, none for an unproven run, and a trailing skip named at the next group.a_rung_skips_what_its_source_skips(end to end throughTranscoder::run): the rung's track records the source's skips across a pause and a lost group, keeps the lost group unskipped, and ends its group at the source group's End (finish_at).Impact
moq-net:track::Subscriber::is_skippedis now public (it was crate-private;Ordered::is_skippedalready was). Additive.@moq/net:Track.Subscriber.isSkipped(start, end)is now public, mirroring Rust;Ordered.isSkippedcalls it. Additive.moq-transcode: behavior only (time-start fills, descending gap lookups, mirrored skips). No wire change.Alternatives
Orderedread, whose gaps say which runs are skips: rejected, since a key-order read holds newer groups behind a hole for up to the superseded budget, adding live latency.Decisions
Taken while the maintainer was away; each is open to revisit.
Subscriber::is_skippedpublic in Rust and JS (see Impact).a_group_nobody_reads_releases_its_fill, the drain tests,fill_across) keep doing so: there it is setup for the range fill under test, and routing it through a real transcode in those paused-clock tests would add codec-thread timing. The time-start path has its own test throughspawn_fillinstead.Caused by
TrackState::miss_gracewithout the live path declaring its source's skips, so pauses stay owed (found by reviewer).Validation
cargo nextest run -p moq-transcode: 105 passed; the new tests also 30/30 under--stress-count 30.just check: passed (rs, js incl. API report, lint, docs).a_rung_skips_what_its_source_skipsdrivesTranscoder::runwith real OpenH264 encode and decode; no relay deployment was exercised.Follow-ups
None.
Models
Size: M
Implementer: Claude Code, claude-opus-5-5, unknown (arm A)
(Written by Claude Opus 5.5)
Review
Rewritten by
quest reviewafter each round.Head: d74d8dc, named in full once no reviewer reports a finding
Base: origin/main at 7297210
Risk: medium,
If the new skip declarations in moq-transcode's feed and rung code are wrong, lite-07 subscribers of transcoded rungs could skip groups that exist or stall on ones that never arrive, and the change reaches them with the next release cut; it is a fix plus an additive `is_skipped` API in moq-net and js/net that keeps the existing API and wire format, and a revert fully undoes it, so it is medium rather than high, with the quest plan deletion being low.Classified: medium by Claude Code, claude-haiku-5-5, low effort, session
a2f136ec-2d96-4284-a4cf-3b855ea39baeRisk file: bb7b1c0de60b
Reviewer: Codex, gpt-6.2-sol, high effort
Session:
01a21b7c-d8e9-71f1-aca2-06c423a9ca6e, round 1Score: 6/10,
The additive Rust and JS skip queries preserve the ordered-reader API, but seeks into pauses can replay earlier media and late source skips can leave ordered viewers waiting or reporting loss.Rounds: 1; first round 2 (medium 2); findings 2 (medium 2): fixed 0, refuted 0, open 2
Findings, open until the next round settles them:
rs/moq-transcode/src/rung.rs:778:Preserve the source GOP’s end when a seek lands in a pausers/moq-transcode/src/feed.rs:236:Forward late source skips without waiting for another GOP