Repository navigation
fix: retry empty batch ASR on full padded captures - #21920
Merged
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem and change
David's record-lane cohort has 101/335 quarantined units, accounting for 1,793.43/5,609.05 captured seconds (31.97%). Read-only production job metadata joined to closed worker reason events identifies 99
empty_asrunits and twono_owned_wordsunits. All 99 have zero raw ASR words, so ownership math cannot explain their failure. Canonical decode and sample counts exclude a wrong sample rate or gross offset/duration mismatch. The exact acoustic cause remains unproven without replay; metadata does not contain the window intervals needed to separate fragment context from batch padding.Before quarantining an otherwise valid empty unit, retry Parakeet once on its entire capture as a single-item batch, padded with silence on both edges. Restore original clocks and exclude synthetic-padding words. Preserve original VAD accounting, full-capture diarization, privacy/persistence and accepted content identity. Bound padded retry length to 120 seconds and the existing budget. Still-empty and larger units remain held whole for the existing fenced legacy recovery path; no audio is truncated or labeled silence.
Record safe numeric recovery dimensions and the shared fallback metric outside exception scopes. Update the pipeline and runtime contracts.
Validation
cd backend && BACKEND_UNIT_TEST_FILE_LIST=/tmp/omi-empty-asr/tests.list BACKEND_PYTEST_WORKERS=1 nice -n 19 bash test.sh: 61 worker tests + 14 runtime tests passed, serial file processes. Includes both empty reasons, exact full-buffer retention, timestamp restoration, original speech accounting, padded-only words, oversized-unit retention, invalid-clock rejection, sibling isolation and fatal CUDA fencing.git diff --checkpassed.OMI_PR_BODY_FILE=/tmp/omi-empty-asr/pr-body.md BACKEND_PYTEST_WORKERS=1 nice -n 19 make preflight: all 32 selected checks passed (771.50s). The history-dependent 90-day failure-class ratchet explicitly skipped on this shallow checkout. Required Firestore index guard passed its seven selected files; no cloud writes.d8b7be35e47d0816a6fa7497c8734aa53af80fef: 32 selected preflight checks, backend typecheck (0 errors / 34,851 warnings), runtime source closure and 61 worker tests (0.87s). Used the repository's changed-test fallback with cap one after the selector requested 1,936 files; nested workers pinned to one. No hook skips. CI remains the broader test authority.ro-prodFirestore field projections and filtered closed-event Cloud Logging. No audio, transcripts, secrets, product API requests or Firestore writes.Product invariants affected
none
Failure-Class: new
Root cause: valid speech units can return all-blank TDT hypotheses, or only context-owned hypotheses; identical retries reproduce the empty obligation without an independent context recovery. The new shared Parakeet adapter primitive retries a full, padded capture and the worker regression suite guards recovery and retention. This is a bounded fallback, not a claim that metadata establishes the underlying model mechanism.
Why isn't this a shared primitive instead? It is:
ParakeetWords.recover_emptyowns padding/clock restoration, whilePipelineWorkerowns the once-per-empty-unit trigger and failure semantics. No new deploy check or duplicated guard is added.UI-Evidence: none