Skip to content

fix(mux): LOC video groups end with the duration marker - #4450

Merged
kixelated merged 2 commits into
mainfrom
quest/m1/loc-duration-marker
Sep 29, 2026
Merged

kixelated merged 2 commits into
mainfrom
quest/m1/loc-duration-marker

Conversation

@kixelated

@kixelated kixelated commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Legacy video groups end with an empty frame that closes the last frame's duration, but the LOC producer never wrote it, so LOC groups could not close immediately.

Approach

container::loc::Wire implements Container::finish_group like the Legacy wire: for Kind::Video with a known end, it writes an empty-payload LOC frame at that timestamp. Producer already calls finish_group at cut and finish, and the catalog's Container::Loc already dispatches to it. Audio and data tracks write nothing.

Tests replace loc_cut_writes_no_duration_marker with LOC video (marker at the cut bound and at finish), audio, and data cases. Stale comments and docs (doc/concept/hang.md, doc/lib/rs/moq-mux.md) are updated, and the quest is deleted along with its quest/m1/README.md entry.

Impact

  • Public API: none.
  • Wire: Rust LOC video groups now end with an empty-payload LOC frame. The hang draft's loc section already gives empty video payloads the Legacy duration meaning, so no draft change (just drafts check passes).

Reader floor

Older LOC readers see the duration marker as an empty video frame. Readers skip it from moq-mux 0.10.0 (the skip landed in #3575) and @moq/loc 0.2.3.

Alternatives

None considered; this mirrors the Legacy contract.

Follow-ups

(Written by Claude Sonnet 5.5, edited by Claude Opus 5.5)

🤖 Generated with Claude Code

kixelated and others added 2 commits September 28, 2026 19:36
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@kixelated

Copy link
Copy Markdown
Collaborator Author

Outcome: implemented and left as a draft. cargo test -p moq-mux (871 unit + 12 doc tests), cargo fmt, and cargo clippy -p moq-mux --all-targets are clean. I did not run just check (nix is off limits here).

Open decisions:

  • JS @moq/loc producer: it has no media kind, cut, or finish, so it writes no marker. Recommend a follow-up quest once it does.
  • Release note: older LOC consumers (before moq-mux 0.10.3 / @moq/loc 0.2.3) would see an empty video frame, so ship after those are the floor for LOC deployments.

(Written by Claude Sonnet 5.5)

@kixelated

Copy link
Copy Markdown
Collaborator Author

Decision: merge now. Both floors are published: moq-mux 0.10.3 (2026-09-25, now 0.10.8) and @moq/loc 0.2.3 (2026-09-23). Nothing concrete defines a "LOC minimum" to wait on. Before merging, note the reader floor in the PR body: moq-mux 0.10.0 (the skip landed in #3575) and @moq/loc 0.2.3. The JS producer is tracked separately as quest/m2/js-loc-duration-marker.md (#4468).

(written by Claude Opus 5.5)

@kixelated
kixelated marked this pull request as ready for review September 29, 2026 13:21
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-29T13:24:21.008499Z b11aac3 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 4 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: c561abd3-ce93-49c7-9aa2-a59321cb0aa7

📥 Commits

Reviewing files that changed from the base of the PR and between 8e13f46 and b11aac3.

📒 Files selected for processing (7)
  • doc/concept/hang.md
  • doc/lib/rs/moq-mux.md
  • quest/m1/README.md
  • quest/m1/loc-duration-marker.md
  • rs/moq-mux/src/container/consumer.rs
  • rs/moq-mux/src/container/loc/mod.rs
  • rs/moq-mux/src/container/producer.rs

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b11aac3fe9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread rs/moq-mux/src/container/loc/mod.rs
@kixelated

Copy link
Copy Markdown
Collaborator Author

Recommendation: MERGE

Positive alignment fix: Legacy video groups already end with an empty duration-closing frame; LOC producers never wrote it, so LOC groups could not close immediately. Implementing finish_group for LOC video (only, with a known end) matches Legacy and is safe because consumers that skip empty LOC payloads already shipped. Tests cover video marker at cut/finish plus audio/data no-marker cases; docs updated. Low complexity, clear win—no better approach than the same marker Legacy uses.

This is an automated review, not the maintainer's decision
(Written by Grok)

@kixelated

Copy link
Copy Markdown
Collaborator Author

Merging per maintainer decision.

(Written by Claude Opus 5.5)

@kixelated
kixelated merged commit 2e547af into main Sep 29, 2026
8 checks passed
@kixelated
kixelated deleted the quest/m1/loc-duration-marker branch September 29, 2026 17:31
This was referenced Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant