Skip to content

test: move moq-cli's TS verbatim coverage into moq-mux#1879

Merged
kixelated merged 1 commit into
mainfrom
claude/loving-williams-1dd1bc
Jun 22, 2026
Merged

test: move moq-cli's TS verbatim coverage into moq-mux#1879
kixelated merged 1 commit into
mainfrom
claude/loving-williams-1dd1bc

Conversation

@kixelated

Copy link
Copy Markdown
Collaborator

Problem

The moq-dev/smoke interop CI's nix channel has been red since ~2026-06-21: nix build .#moq-cli fails to compile because moq-cli's test embedded a sibling crate's fixture across the crate boundary:

const BBB: &[u8] = include_bytes!("../../moq-mux/src/container/ts/test_data/bbb.ts");

crane's cleanCargoSource filters non-Rust files out of the nix build sandbox, so bbb.ts goes missing and the compile-time include_bytes! fails. (The plain cargo channel passes because it has the whole monorepo on disk.)

Change

The moq-cli test (ts_verbatim_streams_round_trip_through_cli) was almost entirely redundant with moq-mux's own coverage, which lives where the fixture lives:

  • export_scte35_roundtrip — section-framed SCTE-35, full export round-trip.
  • private_pes_carried_verbatim — PES-framed verbatim capture (same stream_id and payload).

The one path only the moq-cli test exercised, a PES-framed verbatim stream surviving a full export round-trip, moves to moq-mux as export_pes_verbatim_roundtrip, using the in-crate test_data/bbb.ts (no cross-crate reach). Net -110 lines.

Public API

None. Both changes are to #[cfg(test)] code; no pub items touched, so this targets main.

Test plan

  • cargo test -p moq-mux → 250 passed (incl. the new export_pes_verbatim_roundtrip)
  • cargo test -p moq-cli → compiles with --tests, 0 tests, exit 0 (nothing dangling after the removal)
  • cargo fmt + clippy clean via the nix devshell (pinned toolchain)
  • No include_bytes! left anywhere in moq-cli, so the nix build .#moq-cli compile failure is resolved (CI's nix channel confirms end to end)

(Written by Claude)

🤖 Generated with Claude Code

moq-cli's publish.rs test embedded a sibling crate's fixture via include_bytes!("../../moq-mux/src/container/ts/test_data/bbb.ts"). crane's cleanCargoSource drops non-Rust files from the nix build sandbox, so the fixture went missing and `nix build .#moq-cli` failed to compile the test, turning the moq-dev/smoke nix channel red.

The test was almost entirely redundant with moq-mux's own coverage (export_scte35_roundtrip for section-framed verbatim, private_pes_carried_verbatim for PES capture). The one path unique to it, a PES-framed verbatim stream surviving a full export round-trip, moves to moq-mux as export_pes_verbatim_roundtrip using the in-crate fixture.

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

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 647b017c-5f9c-42a9-9e39-71c171a4c3bd

📥 Commits

Reviewing files that changed from the base of the PR and between 994323c and 8b962e3.

📒 Files selected for processing (2)
  • rs/moq-cli/src/publish.rs
  • rs/moq-mux/src/container/ts/export_test.rs
💤 Files with no reviewable changes (1)
  • rs/moq-cli/src/publish.rs

Walkthrough

The pull request relocates the MPEG-TS verbatim payload round-trip test from rs/moq-cli/src/publish.rs to rs/moq-mux/src/container/ts/export_test.rs. The entire #[cfg(test)] mod tests block is deleted from the CLI publish module. A new async Tokio test, export_pes_verbatim_roundtrip, is added to the mux export test file; it constructs a synthetic MoQ broadcast with a retained private PES verbatim track (custom PID, stream_id, and fixed payload) alongside real bbb.ts media to drive the clock, exports to TS, re-imports, and asserts that PID, tscat::Framing::Pes, stream_id, and payload bytes are preserved exactly.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: moving a test from moq-cli to moq-mux to resolve a cross-crate fixture dependency issue.
Description check ✅ Passed The description is directly related to the changeset, clearly explaining the problem (nix build failure), the solution (test relocation), and test validation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch claude/loving-williams-1dd1bc

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.

@kixelated kixelated enabled auto-merge (squash) June 22, 2026 21:14
@kixelated kixelated merged commit f3e1079 into main Jun 22, 2026
1 check passed
@kixelated kixelated deleted the claude/loving-williams-1dd1bc branch June 22, 2026 21:25
This was referenced Jun 22, 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