Skip to content

doctor labels a healthy video corrupt when a decoder is unavailable #460

Description

@Sagar-024

Current behavior
The doctor video check reads messages inside one broad try. When the machine cannot decode a stream, meaning there is no decoder available for that video, the read raises inside the loop and is reported as:

read-failed: reading messages failed (corrupt chunk or bad CRC?)

The file is intact. Every byte validates. The machine simply cannot decode it. But the diagnostic asserts "corrupt chunk or bad CRC," which points the operator at data corruption when the real cause is a missing capability.

Controlled repro

  • Take a known-good video that passes doctor on a machine with the codec.
  • Make that codec unavailable on the machine.
  • Run hflow doctor. The intact file reports read-failed, corrupt chunk or bad CRC, even though CRCs validate and nothing is damaged.

Why it matters
This is a dishonest diagnostic. The finding asserts corruption when the true cause is environment capability. Same honesty line as the provenance stamps: a report should say what is actually true. An operator told "corrupt chunk" will distrust a healthy file. The correct action is to install the decoder, not quarantine the data.

Proposed fix
Separate decoder resolution from the read. Catch the decoder-unavailable case at codec resolution and report it as its own finding, for example video-decoder-unavailable, naming the stream. Reserve read-failed for genuine read and CRC errors. Small diff, one test.

Definition of done

  • A missing decoder reports video-decoder-unavailable, not read-failed
  • A genuine corrupt or CRC-failed read still reports read-failed
  • A decodable healthy video reports clean
  • Mutation: make decoder resolution always fail, confirm the new finding fires and read-failed does not
  • Existing doctor tests unaffected

Scope note
This only splits the decoder-unavailable case out of the broad read handler. It does not change CRC validation, the severity model, or any other doctor check. Claiming this, will build once accepted.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinghelp wantedExtra attention is needed

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions