Skip to content

fix(audio): preserve causes and use portable padding#2769

Open
jrusso1020 wants to merge 1 commit into
mainfrom
fix/audio-failure-causes-portable-pad
Open

fix(audio): preserve causes and use portable padding#2769
jrusso1020 wants to merge 1 commit into
mainfrom
fix/audio-failure-causes-portable-pad

Conversation

@jrusso1020

@jrusso1020 jrusso1020 commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator

What

  • replace apad=whole_dur=... with the portable, finite apad,atrim=0:<compositionDuration> filter chain
  • preserve bounded typed audio failure causes through engine, in-process producer, and distributed planning
  • emit structured reason/stage/owner/retryability telemetry without logging raw stderr
  • keep warning snapshots isolated by deep-cloning mutable warning fields

Why

Production audio_processing_failed events currently discard the underlying FFmpeg/ffprobe cause. A reproduced Windows failure on the bundled FFmpeg rejects apad=whole_dur with Option 'whole_dur' not found, even though the same composition can render video and be muxed locally.

The missing causes also make deterministic input failures indistinguishable from transient infrastructure failures. This change fixes the known portability bug and makes future failures actionable without weakening the existing fail-closed audio correctness policy.

How

  • pad each delayed audio input indefinitely and trim it to the composition duration before amix, preserving authored clip/delay timing while avoiding the unsupported whole_dur option
  • classify source, download, probe, extract, prepare, mix, timeout, binary, cancellation, and internal failures
  • treat invalid authored media as user-owned only in extract/prepare; producer-generated mix/silence failures stay system-owned
  • redact URLs and absolute paths (including paths with spaces), cap every detail and aggregate error at 2,000 characters, and preserve unknown legacy retryability as unknown
  • aggregate retryability is true only when every typed cause is retryable

This is additive/backward-compatible telemetry and does not change retry or fallback policy. It is safe to canary independently; any later policy change can key off the new bounded taxonomy.

Test plan

  • Unit tests added/updated
  • Focused engine/producer/distributed suites: 76 tests passed
  • Engine and producer typechecks
  • Lint, formatting, tracked-artifact, and fallow gates
  • Manual production canary after merge
  • Documentation updated (not applicable)

Independent review: approved after timing, privacy, propagation, retry, and snapshot-isolation findings were addressed.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant