fix(media): surface OpenAI audio transcription failures#65096
Conversation
Greptile SummaryThis PR fixes a bug where all-provider audio transcription failures were demoted to a top-level Confidence Score: 5/5This PR is safe to merge — it correctly promotes audio transcription failures to a top-level "failed" decision and propagates the underlying error reason through the full stack. No P0 or P1 findings. The outcome ternary logic is sound (only promotes to "failed" when all attachments produce no output and at least one attempt explicitly failed), cleanup is still called via the finally block verified by the runtime test, and the reason-extraction helpers compose cleanly. All changed surfaces are well-covered by new tests. No files require special attention. Reviews (1): Last reviewed commit: "fix(media): surface audio transcription ..." | Re-trigger Greptile |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 21ecd706d5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
21ecd70 to
4794cf8
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4794cf8d1d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
bd825ca to
c0024b8
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c0024b89f3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| - Gateway/plugins: always send a non-empty `idempotencyKey` for plugin subagent runs, so dreaming narrative jobs stop failing gateway schema validation. (#65354) Thanks @CodeForgeNet and @vincentkoc. | ||
| - Cron/isolated sessions: persist the right transcript path for each isolated run, including fresh session rollovers, so cron runs stop appending to stale session files. Thanks @samrusani and @vincentkoc. | ||
| - Dreaming/cron: wake managed dreaming jobs immediately instead of waiting for the next heartbeat, so scheduled dreaming runs start when the cron fires. (#65053) Thanks @l0cka and @vincentkoc. | ||
| <<<<<<< HEAD |
There was a problem hiding this comment.
Remove unresolved merge marker in changelog
<<<<<<< HEAD is an unresolved merge-conflict marker, which means this commit leaves the changelog in an invalid state; this can leak conflict text into published release notes and can break tooling that parses changelog sections. Remove the conflict marker (and ensure no companion conflict markers remain) so the Unreleased/Fixes section is valid Markdown again.
Useful? React with 👍 / 👎.
* fix(media): surface audio transcription provider failures * fix(media): prefer failed reasons in surfaced errors * fix(media): import attempt outcome type * fix(media): guard malformed decision arrays --------- Co-authored-by: Vincent Koc <[email protected]>
* fix(media): surface audio transcription provider failures * fix(media): prefer failed reasons in surfaced errors * fix(media): import attempt outcome type * fix(media): guard malformed decision arrays --------- Co-authored-by: Vincent Koc <[email protected]>
* fix(media): surface audio transcription provider failures * fix(media): prefer failed reasons in surfaced errors * fix(media): import attempt outcome type * fix(media): guard malformed decision arrays --------- Co-authored-by: Vincent Koc <[email protected]>
* fix(media): surface audio transcription provider failures * fix(media): prefer failed reasons in surfaced errors * fix(media): import attempt outcome type * fix(media): guard malformed decision arrays --------- Co-authored-by: Vincent Koc <[email protected]>
* fix(media): surface audio transcription provider failures * fix(media): prefer failed reasons in surfaced errors * fix(media): import attempt outcome type * fix(media): guard malformed decision arrays --------- Co-authored-by: Vincent Koc <[email protected]>
* fix(media): surface audio transcription provider failures * fix(media): prefer failed reasons in surfaced errors * fix(media): import attempt outcome type * fix(media): guard malformed decision arrays --------- Co-authored-by: Vincent Koc <[email protected]>
What changed
failedmedia-understanding decision instead of downgrading them toskippedWhy
The audio runner already recorded provider exceptions as failed attempts, but if no output was produced it still returned a top-level
skippeddecision. That erased the actual OpenAI failure reason, which is why a valid OGG/Opus transcription failure could degrade into the genericNo transcript returned for audiomessage with no normal-severity media failure signal.Validation
pnpm vitest run src/cli/capability-cli.test.ts src/media-understanding/runner.skip-tiny-audio.test.ts src/media-understanding/runtime.test.ts src/auto-reply/status.test.tspnpm lint src/cli/capability-cli.test.ts src/media-understanding/types.ts src/media-understanding/runner.entries.ts src/media-understanding/runner.ts src/media-understanding/runtime.ts src/media-understanding/runner.skip-tiny-audio.test.ts src/media-understanding/runtime.test.ts src/auto-reply/status.ts src/auto-reply/status.test.tspnpm check, full lint, policy checks)Fixes #65076