Skip to content

refactor(mux)!: remove export ts --sync - #6554

Merged
kixelated merged 2 commits into
mainfrom
claude/remove-ts-sync
Oct 23, 2026
Merged

kixelated merged 2 commits into
mainfrom
claude/remove-ts-sync

Conversation

@kixelated

@kixelated kixelated commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

moq export ts --sync (moq-dev/moq#5949) rebuilds byte-identical TS legs on a remuxed output, so a downstream SMPTE ST 2022-7 receiver could merge two exports. It costs more than it buys:

  • It can't cover two publishers. Independent importers get distinct epochs (moq-dev/moq#5967), and synced legs only match within one epoch. Failover between two publishers is a --stitch program switch either way.
  • Passthrough already gives identical legs. export ts --passthrough writes the source's packets unchanged, so two exporters emit the same bytes. That's the mode for 2022-7-style output.
  • It forks every TS feature. In four days it produced feat(moq-mux): render identical TS legs with export ts --sync #5949 (+2.9k), moq-dev/moq#6542 (+1.3k, synced PMT revisions), moq-dev/moq#6304 (+1.5k, RTP egress) and three more quests (H.265 anchor, restart tail, PMT). It still has documented gaps (overruns, undeclared reorder depth, SI revisions), and needs about 20% rate headroom.

Demux mode keeps failover with an explicit discontinuity. A same-epoch route failover stays hitless within --delay.

Change

  • Removes Export::with_sync, lane.rs, the synced schedule grid, DecodeClock::pop_counted/discard, Reorder::{fields, pictures, MAX_DEPTH}, and the H.264 buffering-period SEI parser (initial_cpb_removal_delay). The reorder delay stays capped by MAX_REORDER, so MAX_DEPTH was only there for frame counting.
  • Removes the overruns and late export release stats.
  • Keeps the PES/section packetizing helpers feat(moq-mux): render identical TS legs with export ts --sync #5949 factored out, which the plain export uses.
  • Drops the CLI flag, its doc/bin/cli.md section, and the stats rows.
  • Deletes the sync-only quests (ts-hitless, ts-hitless-h265, ts-rtp-egress, ts-sync-restart-tail, ts-restart-gap-burst, pmt-export), and updates decode-order, which cited pop_counted.
  • Deletes two_legs_render_a_skip_the_same_way, an ignored test waiting on the deterministic-legs follow-up, and synced_legs_agree_after_a_move with the sync hunks moq-dev/moq#6276 added to the rendition move.

Public API and wire impact

  • Rust: moq_mux::container::ts::Export::with_sync and stats::Release::{overruns, late} are removed. CLI: moq export ts --sync is removed. None of these were in a crate release, so there are no MIGRATE.md entries.
  • Stats wire: the TS export's release object no longer carries overruns or late (both were --sync only).
  • No moq-lite or hang wire changes.

Follow-ups

Checks

just check: Rust (3674, 518 and 225 tests) and JS pass, along with quest, markdown and shell lint. Interop was not run, since nothing in the wire, ffi or gateways changed.

(Written by Claude Opus 5.5)

🤖 Generated with Claude Code

`--sync` rebuilt byte-identical TS legs on a remuxed output so a
downstream ST 2022-7 receiver could merge two exports. It only held
within one publisher epoch, so it never covered failover between
independent publishers, and `export ts --passthrough` already emits
identical bytes on every leg. Meanwhile every TS feature (PMT
revisions, restarts, H.265, reordered video) needed a second,
leg-identical implementation.

Removes the lanes, the counted decode clock, the H.264 buffering-period
SEI anchor, the `overruns` and `late` release stats, the flag, its docs,
and the sync-only quests (deterministic legs, H.265 anchor, RTP egress,
restart tail, synced PMT revisions).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

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

Next included review available in 23 minutes.

Check out review usage here.

View limit details

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

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2c611c21-f894-4636-8e86-143a6d15372d
📥 Commits

Reviewing files that changed from the base of the PR and between e2002aa and 1b208af.

📒 Files selected for processing: 28
  • doc/bin/cli.md
  • doc/concept/stats.md
  • quest/m1/ts-reliability/README.md
  • quest/m1/ts-reliability/decode-order.md
  • quest/m1/ts-reliability/pat-lifecycle.md
  • quest/m1/ts-reliability/pmt-export.md
  • quest/m2/README.md
  • quest/m2/ts-hitless-h265.md
  • quest/m2/ts-restart-gap-burst.md
  • quest/m2/ts-rtp-egress.md
  • quest/m2/ts-sync-restart-tail.md
  • rs/moq-cli/src/args.rs
  • rs/moq-cli/src/main.rs
  • rs/moq-cli/src/subscribe.rs
  • rs/moq-mux/benches/ts_schedule.rs
  • rs/moq-mux/src/codec/h264/mod.rs
  • rs/moq-mux/src/codec/h265/mod.rs
  • rs/moq-mux/src/codec/video.rs
  • rs/moq-mux/src/container/decode.rs
  • rs/moq-mux/src/container/ts/export.rs
  • rs/moq-mux/src/container/ts/export_test.rs
  • rs/moq-mux/src/container/ts/export_timing_test.rs
  • rs/moq-mux/src/container/ts/lane.rs
  • rs/moq-mux/src/container/ts/mod.rs
  • rs/moq-mux/src/container/ts/revision_test.rs
  • rs/moq-mux/src/container/ts/schedule.rs
  • rs/moq-mux/src/container/ts/stats.rs
  • test/ts/README.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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 commented Oct 23, 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-10-23T20:54:59.957914Z 1b208af New commits
ℹ️ 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.

@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: 20936f19d8

ℹ️ 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-cli/src/args.rs
Drops the sync hunks #6276 added to lane.rs and the TS export's rendition
move, its synced_legs_agree_after_a_move test, and the ts-restart-gap-burst
quest, whose gap slots belong to the removed synced grid.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated

Copy link
Copy Markdown
Collaborator Author

Merge summary:

  • Merged main (no rebase). moq-dev/moq#6276 landed sync hunks in lane.rs and the TS export's rendition move; those are dropped along with synced_legs_agree_after_a_move. The ts-restart-gap-burst quest from moq-dev/moq#6506 is deleted too, since its gap slots belong to the removed synced grid, and the stale "TS over RTP legs" note in quest/m2/README.md goes with it.
  • Declined the Codex MIGRATE.md finding: none of the removed APIs or the --sync flag appear in any release tag or on release. No --sync invocations remain in docs or demo recipes.
  • just check passes; Codex approved the final head.

(Written by Claude Opus 5.5)

@kixelated

Copy link
Copy Markdown
Collaborator Author

Merge triage: head 1b208af is clean, all 10 checks pass, the Codex thumbs-up landed after the last commit, and there are no unresolved threads. quest check against main passes. Enabling auto-merge. This session made no changes.

(Written by Claude Sonnet 5.5)

@kixelated
kixelated added this pull request to the merge queue Oct 23, 2026
Merged via the queue into main with commit a90c7ab Oct 23, 2026
10 checks passed
@kixelated
kixelated deleted the claude/remove-ts-sync branch October 23, 2026 23:14
kixelated added a commit that referenced this pull request Oct 24, 2026
Main removed `export ts --sync` (#6554), so the counted clock, its tests and
the sync docs go; the declared clock and its legs test stay, the latter on a
B-pyramid Live re-added to the timing harness. Drop the inferred-clock-bound
follow-up quest, which #6417 delivers, and unblock encoder-reorder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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