The concat command's non-MP4 arm has never been built: decide whether a join can produce one #266

Open
opened 2026-09-07 16:51:33 +00:00 by JMR-dev · 0 comments
JMR-dev commented 2026-09-07 16:51:33 +00:00 (Migrated from github.com)

Found by the union coverage read of 2026-09-07 (E9 in docs/e2e-read-findings.md).

FFmpegConcatCommand.kt:95   if (format.container == Container.MP4) {
                                add("-movflags"); add("+faststart")

The false arm — a join whose output container is not MP4 — is never taken by either suite.

The question to answer first

ConcatWorker.DEFAULT_FORMAT is OutputFormat.MP4_H264, and the worker resolves the format by name
out of its input data (ConcatWorker.kt:57). So whether this arm is reachable depends entirely on
what the join UI lets a user choose. Read that before writing anything:

  • If the join flow can only ever produce MP4, the arm is unreachable and this is F4-shaped —
    record it in docs/coverage-read-findings.md beside the others and close.
  • If it can produce MKV or WebM, the arm is live and untested, and the command built for those
    containers has never been asserted.

Acceptance

Whichever the read shows:

  • Reachable: a FFmpegConcatCommandTest case for a non-MP4 join asserting -movflags is
    absent. Mutation: remove the if so +faststart is always added — the test must go red.
    +faststart on a Matroska output is not merely redundant; it is a flag the muxer does not take.
  • Unreachable: an F-entry naming the upstream guard that makes it so, exactly as F4 and F6 do.

Cheap either way, and the answer is worth having written down — this is the only container-specific
branch in the concat command builder.

Found by the union coverage read of 2026-09-07 (E9 in `docs/e2e-read-findings.md`). ``` FFmpegConcatCommand.kt:95 if (format.container == Container.MP4) { add("-movflags"); add("+faststart") ``` The **false** arm — a join whose output container is not MP4 — is never taken by either suite. ## The question to answer first `ConcatWorker.DEFAULT_FORMAT` is `OutputFormat.MP4_H264`, and the worker resolves the format by name out of its input data (`ConcatWorker.kt:57`). So whether this arm is reachable depends entirely on **what the join UI lets a user choose**. Read that before writing anything: - If the join flow can only ever produce MP4, the arm is unreachable and this is **F4-shaped** — record it in `docs/coverage-read-findings.md` beside the others and close. - If it can produce MKV or WebM, the arm is live and untested, and the command built for those containers has never been asserted. ## Acceptance Whichever the read shows: - **Reachable:** a `FFmpegConcatCommandTest` case for a non-MP4 join asserting `-movflags` is *absent*. Mutation: remove the `if` so `+faststart` is always added — the test must go red. `+faststart` on a Matroska output is not merely redundant; it is a flag the muxer does not take. - **Unreachable:** an F-entry naming the upstream guard that makes it so, exactly as F4 and F6 do. Cheap either way, and the answer is worth having written down — this is the only container-specific branch in the concat command builder.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: JMR-dev/LibreMediaConverter#266