Repository navigation
Description
Behavior
A process step that fails because its tool did not run is handled as if the media had failed. With DeleteInvalidFiles on, the abort path in Process.ProcessFile() then deletes the file through DeleteFailedFile(), although nothing showed the media to be bad.
DeleteFailedFile() keeps the file only when the first media stream verify in VerifyAndRepair() returns VerifyResult.ToolError. These sites still read a tool that did not run as a failure:
- A re-verify inside the repair ladder.
TryRemuxRepair(),RepairAndReVerify()andTryLosslessTimestampRepair()accept a re-verify only when it isClean, so aToolErrorthere fails the repair.VerifyAndRepair()orRepairTimestampsAndSetState()then setsVerifyFailedandRepairFailed. The re-verify does not update_lastVerifyResult, soDeleteFailedFile()still reads the first verify'sDecodeErrororTimestampOnlyand deletes the file. - Every other tool step. A media props read through
Refresh()andMediaProps.GetMediaProps(), a remux, and a re-encode each return false when FfProbe, MkvMerge, MediaInfo, FfMpeg or HandBrake fails to launch. The file aborts and is deleted. - A repair tool that does not run. MkvMerge, FfMpeg or HandBrake failing to launch inside the repair ladder fails the repair, which sets
RepairFailedthe same way.
Reproduction shape
- Set
Verify: true,AutoRepair: trueandDeleteInvalidFiles: true. - Process a file whose first verify returns
DecodeError. - Make FfMpeg fail to start before the repair ladder's re-verify, for example because a resource limit blocks process creation.
- The file is marked
VerifyFailedandRepairFailedand is deleted, although the repaired output was never checked.
Expected
A step whose tool did not run fails the file as a tool error. It sets neither VerifyFailed nor RepairFailed, and never leads to a delete. One signal for "a tool did not run" reaching DeleteFailedFile() covers every site, rather than one guard per step.
Found while fixing the first-verify case of this class, ARCHITECTURE.md "Process Command Logic", suspect branch S16.
Activity