Recover interrupted transcripts with bounded audio storage

Merged
CO
2mo ago
+4003-454

Summary

Intent: Keep long meetings recoverable when the network disconnects or audio storage fails. Resume live transcription independently and repair missing text during the meeting using compressed audio chunks with bounded memory.

Recovery audio is released after transcript writes succeed. Retained partial chunks survive interrupted recordings, and transient recorder backpressure gets a bounded retry without delaying live audio. Zero retention deletes local audio at stop, including unfinished recovery and derived upload files; positive retention preserves the archive until its configured expiry. Cloud credentials are refreshed before reconnecting.

Failed deletion and retained-audio recovery retry automatically while excluding active recordings. Their statuses remain distinct, survive frontend startup, and are evicted after successful consumption. Replay errors are isolated per session, and serialized cleanup writes prevent an older failure from overwriting a later completion. Recovering audio does not clear an incomplete-transcript warning before text repair succeeds.

Refs ANLG-388 and ANLG-387. The customer's reported cutoff has not been reproduced on their machine or attributed to a confirmed cause.

Demo

No desktop video captured. Automated coverage exercises a simulated 61-minute capture, real SQLite-full failure and retry, refreshed-token reconnects, interrupted partial chunks, and deletion with recovery still pending. Real microphone/provider interruption testing remains outstanding.

Verification

  • UI build, desktop and transcription-plugin typechecks, all 4,580 desktop tests, final focused SQLite/cleanup regressions, whole-PR formatting, desktop Oxlint, changed-file ESLint, and i18n passed.
  • All 163 listener-core tests and 61 transcription-plugin tests passed (one plugin test ignored), including binding generation and recovery/deletion status regressions. Focused all-target Clippy passed with --locked --no-deps -- -D warnings for both crates. Both macOS desktop checks passed with --locked --features direct-distribution and --features app-store.
  • Both license-boundary commands, version checks, and the complete common CI Node test command passed (126 tests).

Remaining verification: the earlier full native workspace run was incomplete. Earlier full listener2-core testing had 103 passes and an unchanged timeout at batch/simple/tests.rs:495 (provider did not receive the request: Elapsed(())); broader all-target Clippy had findings in untouched listener2-core tests and fs-sync-core fixtures. The workflow scan reports 352 existing findings; this PR does not change workflows. Windows/Linux native checks and real-time hardware/provider QA have not been run.