Skip to content

fix(media): surface OpenAI audio transcription failures#65096

Merged
vincentkoc merged 4 commits into
openclaw:mainfrom
l0cka:codex/fix-openai-audio-transcript-surfacing
Apr 12, 2026
Merged

fix(media): surface OpenAI audio transcription failures#65096
vincentkoc merged 4 commits into
openclaw:mainfrom
l0cka:codex/fix-openai-audio-transcript-surfacing

Conversation

@l0cka

@l0cka l0cka commented Apr 12, 2026

Copy link
Copy Markdown
Contributor

What changed

  • keep all-provider audio transcription failures as a top-level failed media-understanding decision instead of downgrading them to skipped
  • propagate the underlying failure from file-based audio transcription so the CLI reports the real provider error
  • surface failed media reasons in status output and cover the regression at the runner, runtime, status, and CLI layers

Why

The audio runner already recorded provider exceptions as failed attempts, but if no output was produced it still returned a top-level skipped decision. That erased the actual OpenAI failure reason, which is why a valid OGG/Opus transcription failure could degrade into the generic No transcript returned for audio message 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.ts
  • pnpm 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.ts
  • local commit hook suite (pnpm check, full lint, policy checks)

Fixes #65076

@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes size: S labels Apr 12, 2026
@l0cka l0cka changed the title [codex] fix media transcription failure surfacing [codex] fix OpenAI audio transcription error surfacing Apr 12, 2026
@l0cka
l0cka marked this pull request as ready for review April 12, 2026 02:10
@l0cka l0cka changed the title [codex] fix OpenAI audio transcription error surfacing fix(media): surface OpenAI audio transcription failures Apr 12, 2026
@greptile-apps

greptile-apps Bot commented Apr 12, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes a bug where all-provider audio transcription failures were demoted to a top-level "skipped" decision, silently erasing the actual provider error reason. The fix adds "failed" to MediaUnderstandingDecisionOutcome, promotes the runner's outcome to "failed" when no output is produced but at least one attempt failed, propagates the underlying error through runMediaUnderstandingFile so the CLI surfaces the real message, and updates the status formatter to display failed media decisions with their reason. Test coverage spans runner, runtime, status, and CLI layers.

Confidence Score: 5/5

This 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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/auto-reply/status.ts Outdated
@vincentkoc vincentkoc self-assigned this Apr 12, 2026
@vincentkoc
vincentkoc force-pushed the codex/fix-openai-audio-transcript-surfacing branch from 21ecd70 to 4794cf8 Compare April 12, 2026 15:47

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/media-understanding/runner.entries.ts Outdated
@vincentkoc
vincentkoc force-pushed the codex/fix-openai-audio-transcript-surfacing branch from bd825ca to c0024b8 Compare April 12, 2026 16:04
@vincentkoc
vincentkoc merged commit 1f0431c into openclaw:main Apr 12, 2026
3 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread CHANGELOG.md
- 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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

lovewanwan pushed a commit to lovewanwan/openclaw that referenced this pull request Apr 28, 2026
* 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]>
ogt-redknie pushed a commit to ogt-redknie/OPENX that referenced this pull request May 2, 2026
* 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]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 9, 2026
* 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]>
globalcaos pushed a commit to globalcaos/tinkerclaw that referenced this pull request May 13, 2026
* 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]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 24, 2026
* 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]>
jameslcowan pushed a commit to jameslcowan/openclaw that referenced this pull request Jun 2, 2026
* 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Audio understanding: OpenAI provider returns no transcript and no surfaced error on valid OGG/Opus

2 participants