Repository navigation
fix(mux): finish accepted MKV tracks after truncated input - #7608
Conversation
Quest-Claim: 1e8dd0984a5d1698
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit: e794239
No actionable bugs found. Keeping the EOF error while releasing the catalog reservation and finishing every track fixes the lifecycle problem at its source. The eager Result::and call still visits every track, and aborting only the cut-short frame preserves completed groups without adding a second teardown mechanism. The held-importer tests cover payload truncation, trailing metadata, and empty tracks.
Verification limits: static inspection of the importer, producer lifecycle, and tests only. I did not run tests or builds, or independently reproduce the validation reported in the PR.
(Written by OpenAI)
|
No actionable comments were generated in the recent review.
|
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
finish()ends tracks after truncated input:Import::finishkeepsdrain_eof's result, aborts the cut-short frame's group, releasesinitial_reservation, and finishes every track before returning the first error, so a refused truncation no longer leaves subscribers waiting while the importer is held (rs/moq-mux/src/container/mkv/import.rs:838).- Return value preserved:
drain_eof's error wins, otherwise the first track-finish error; the change only alters side effects, so no caller sees a different result. - Tests:
truncation_fails_the_frame_cut_shortnow asserts the cut-short frame fails synchronously withStreamError::Internal; two paused-time tests cover truncation inside an Opus packet and its trailingBlockGroupmetadata across four chunk sizes, and empty tracks releasing the catalog reservation before ending. - Quest completion: removes
quest/m1/mkv-truncated-finish.mdand itsquest/m1/README.mdentry.
I built and ran the MKV import module (cargo test -p moq-mux --lib container::mkv::import::tests): 14 passed, 0 failed.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

Problem
When
finish()refused truncated MKV input, it returned before ending tracks. Subscribers could wait indefinitely while the importer remained held.Approach
Keep EOF draining's result, fail the cut-short frame with its reason, release the initial catalog reservation, and finish every track before returning the first error. Completed groups stay readable. Completes and removes
quest/m1/mkv-truncated-finish.mdand its milestone link.Impact
finish()now ends accepted content even when it returnsMkv(Truncated).Alternatives
Aborting all tracks was rejected by the settled quest plan because it would discard accepted groups and differ from a refused
decode().Choices made without asking
Validation
quest gate just rs test -p moq-mux: 1,957 passed, 3 skipped. Includes the new lifecycle tests and the cut-short frame'sStreamError::Internalreason.quest check --base origin/main: 624 documents OK.quest gate just ci origin/main: failed. mbx could not spawn cargo (E2BIG) in Rust docs and the lint-enforcement fixture. Other selected checks passed. This run did not reach a namespace-denial failure; no bypass was used.Follow-ups
No new follow-ups. The validation limit is already tracked by moq-dev/moq#7594.
Review
Claude Code through T3 delegation, Claude Opus 5.5 (
claude-opus-5-5), medium configured (reviewer self-reported low effort). Reviewed heade7942391c0f158e957a5f82355dcf9c591f86875againstorigin/main: no findings. The reviewer confirmed the source fix preserves the EOF error, accepted groups, and the cut-short frame failure.(Written by GPT-6.1 Sol)