Files
Lumotia/docs/issues/decoder-partial-audio-on-error.md
Jake 592b894790 docs(cr-2026-04-22): add release-blocker issue tracker at docs/issues/
Captures the 12 items from docs/code-review-2026-04-22.md that
must land before v0.1 ships. One markdown file per issue with:
severity, path:line, problem description, acceptance criteria,
fix scope, and dependency graph.

Split by severity:
- 3 CRITICAL: live-session race, migration atomicity, transcript-
  profile FK
- 9 MAJOR: monolith refactor, channel-fatality, capture worker
  join, runtime capabilities, macOS App Nap, decoder error prop,
  LLM prompt preflight, keystore thread-safety, hotkey device
  filter

README.md indexes them with a fix-order dependency graph and a
fish-shell script for bulk-converting to GitHub issues once `gh`
CLI is installed and authed. Deferred step by user decision —
markdown tracker is authoritative until then.
2026-04-22 09:46:08 +01:00

1.3 KiB

RB-09 MAJOR: decoder returns partial audio on read/decode errors

Severity: MAJOR Path: crates/audio/src/decode.rs:58-79 Source: 2026-04-22 code review Labels: release-blocker, major, audio, data-integrity

Problem

decode_audio_file:

  • Breaks the read loop on packet-read errors (truncated / corrupt inputs)
  • Counts and skips per-packet decoder errors
  • Still returns Ok if any samples were produced before the break

A corrupt or truncated input file is silently accepted as partial audio. Callers have no way to distinguish "file decoded cleanly" from "file was bad and we handed you half of it".

Acceptance

  • Propagate read and decode errors to the caller (return Err) — match the pattern used in read_wav (fixed in the 2026-04-22 quick-wins batch, commit b665754).
  • Optional: expose a decode_audio_file_best_effort variant if anyone genuinely wants the partial-audio-on-error behaviour. Today no caller needs it.
  • Regression tests: (a) truncated MP3; (b) corrupted FLAC; (c) valid file continues to decode successfully.

Fix scope

Medium. Error-propagation pattern is the same as the read_wav fix, but the symphonia packet-loop has several skip branches to audit.

Dependencies

  • None — standalone fix.