Skip to content

fix(media): keep failure markers visible in audio-only processing - #130869

Merged
steipete merged 1 commit into
mainfrom
steipete/media-audio-only-markers
Aug 27, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/media-audio-only-markers

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

In audio-only media processing (locked model selection on a native harness, inbound audio, explicit audio-understanding config), an audio attachment that failed STT — provider error, maxBytes, timeout, blocked — produced no output, no placeholder, and no marker: applyMediaUnderstanding suppressed ALL attachment markers in that mode. The runner had already recorded the failed disposition; the only trace was a process-level log line not tied to the message. The agent then tried to answer a voice note it never heard, with no record why.

Why This Change Was Made

The blanket suppression (added by #122098) was redundant with the renderer's own contract: renderMediaAttachmentMarkers only renders capabilities that have decisions, and audio-only execution produces only an audio decision — so removing the special case cannot introduce image/video/document markers for attachments still owned by the native harness (#108714's design, preserved; file extraction stays disabled in this mode). The fix deletes the branch and adds the invariant comment (net −1 production line). buildSyntheticSkippedAudioOutputs deliberately stays limited to the too-small-audio transcript contract — extending it to failures would turn errors into transcription outputs and bypass the shared marker budget; the marker is the single canonical mechanism. Docs sentence updated. Sibling #130846 (native-vision dispositions) verified as an ancestor and untouched.

User Impact

A failed voice-note transcription now leaves a visible failure marker in the agent-facing body instead of vanishing — the agent can say "your audio couldn't be processed (reason)" rather than answering blind.

Evidence

  • Pre-fix proof: 3 failed / 4 passed — audio-only maxBytes, provider-failure, and scope-denied cases expected a marker, got an empty body; normal-mode and success/too-small controls passed.
  • Post-fix: full src/media-understanding suite 521 tests green; focused regressions re-run green after rebase onto latest origin/main. Mixed-attachment fixtures assert the exact agent-visible body across image/video/audio/document combinations.
  • Full changed-file gate exit 0 (typechecks, lint, dead exports, sidecar loaders, import cycles) after documented worktree-only dependency links.
  • Fresh isolated Codex autoreview: clean. Sibling Codex source inspected (../codex user_input.rs:15, v2/turn.rs:330, models.rs:1745): this changes only OpenClaw text construction, not Codex transport.

@clawsweeper

clawsweeper Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added the docs Improvements or additions to documentation label Aug 27, 2026
@steipete
steipete marked this pull request as ready for review August 27, 2026 10:13
@openclaw-barnacle openclaw-barnacle Bot added size: S maintainer Maintainer-authored PR labels Aug 27, 2026
@steipete
steipete merged commit 2abc76d into main Aug 27, 2026
267 checks passed
@steipete
steipete deleted the steipete/media-audio-only-markers branch August 27, 2026 10:34
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation maintainer Maintainer-authored PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant