Skip to content

fix(cli): preserve audio transcription provider and model output - #147170

Merged
steipete merged 1 commit into
mainfrom
codex/qa-audio-attribution-unit-20260913
Sep 13, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/qa-audio-attribution-unit-20260913

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes missing provider and model attribution after successful openclaw infer audio transcribe and its capability alias.

User Impact

JSON and human-readable output now identify the provider and model that actually produced the transcript. Transcripts, file paths, and existing failure behavior are preserved; no configuration changes are required.

Why This Change Was Made

The media runtime already returns attribution, but the audio CLI discarded it when constructing the shared result envelope. Preserve those existing fields at that projection boundary, consistent with image and video inference. Two single-use request values are inlined in the same function with their evaluation order preserved: production +4/−4 (net zero), regression coverage +50.

Evidence

Four new registered-CLI cases fail before the fix and pass after it, covering both command aliases and JSON/text output with returned attribution differing from the requested model. All 11 selected audio cases pass, including metadata-free, empty-result, and failure controls.

Installed-package proof built and packed each phase normally, installed each tarball into a fresh npm prefix, and invoked the installed binary from a neutral directory. All 12 CLI cases per phase and four finite output-drain controls matched the expected outcomes. All 25,567 installed dependency entries were identical across phases; only rebuilt OpenClaw artifacts differed.

This exercises a real configured local transcription command using synthetic audio; it does not claim external speech-provider quality or authenticated API coverage. The proof used Linux Node 24.19.0; focused local tests used Node 24.21.0. One nonfatal artifact-portal sync timeout occurred after successful execution; the complete archive was subsequently downloaded and verified, and the Testbox was stopped.

All 29 selected changed-file checks passed, including core and test typechecking, lint, dependency/boundary checks, and static guards. Independent P0–P2 review found no actionable defects; a separate completed-proof audit verified the raw cases, installed dependencies, artifact hashes, and cleanup.

Keep actual runtime attribution in the existing audio result envelope for infer and capability, in JSON and text. Inline same-owner single-use request values in evaluation order so production LOC stays net neutral. Existing transcript and failure behavior is preserved.
@clawsweeper

clawsweeper Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes size: S maintainer Maintainer-authored PR labels Sep 13, 2026
@steipete
steipete marked this pull request as ready for review September 13, 2026 16:04
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 13, 2026
@clawsweeper

clawsweeper Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 13, 2026, 12:11 PM ET / 16:11 UTC.

ClawSweeper review

What this changes

Preserves the transcription runtime’s actual provider and model in JSON and text CLI output, with regression coverage for both command aliases.

Merge readiness

✅ Ready for maintainer review

The fix remains necessary: current main and the latest release omit audio attribution. No actionable correctness or security defects were found, and this maintainer-authored PR is protected from cleanup closure.

Priority: P2
Reviewed head: ccf08d8cda083c1331b704d608c50917c007180a

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair using the existing output contract, with meaningful registered-command regression coverage and no blocking findings.
Proof confidence 🌊 off-meta tidepool Not applicable: The maintainer-authored exemption applies. The body reports installed-CLI before/after proof of audio attribution through a configured local command; raw Testbox logs could not be inspected because the reviewer network blocked their host.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer-authored exemption applies. The body reports installed-CLI before/after proof of audio attribution through a configured local command; raw Testbox logs could not be inspected because the reviewer network blocked their host.
Evidence reviewed 6 items Current main still omits attribution: The successful audio result includes the transcript but discards provider and model returned by the runtime.
Latest release has the same omission: Reading audio.ts at the supplied v2026.9.4 release commit confirms its success envelope also omits provider and model.
Existing attribution owner and output contract: The media runtime obtains attribution from the selected transcription output; audio transcription returns that result unchanged. The shared formatter already renders optional provider/model fields, and docs/cli/infer.md lists them as stable envelope fields. No Codex dependency contract is involved in this projection.
Findings None None.
Security None None.

How this fits together

The audio CLI passes a file and configured model choices to OpenClaw’s media runtime. It packages the resulting transcript and attribution for scripts or human-readable terminal output.

flowchart LR
  A[Audio file and options] --> B[Infer or capability command]
  B --> C[Configured media runtime]
  C --> D[Transcript and actual attribution]
  D --> E[Shared result envelope]
  E --> F[JSON or terminal text]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source 0, Tests +50. Total +50 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 4 4 0
Tests 1 50 0 +50
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 54 4 +50

Review metrics

None.

Technical review

Best possible solution:

Keep attribution authoritative in the media runtime and preserve it through the existing CLI envelope and formatter.

Do we have a high-confidence way to reproduce the issue?

Yes, from source: a successful transcription with runtime attribution loses those fields when current main constructs the CLI envelope. No runtime reproduction was executed during this review.

Is this the best way to solve the issue?

Yes. Forwarding the existing runtime fields repairs the projection boundary without changing provider selection, credentials, transcript content, or failure behavior.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against ca0746ad8c56.

Labels

Label changes:

  • add P2: This repairs missing diagnostic attribution in an otherwise successful audio transcription workflow.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The maintainer-authored exemption applies. The body reports installed-CLI before/after proof of audio attribution through a configured local command; raw Testbox logs could not be inspected because the reviewer network blocked their host.

Label justifications:

  • P2: This repairs missing diagnostic attribution in an otherwise successful audio transcription workflow.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The maintainer-authored exemption applies. The body reports installed-CLI before/after proof of audio attribution through a configured local command; raw Testbox logs could not be inspected because the reviewer network blocked their host.

Evidence

What I checked:

  • Current main still omits attribution: The successful audio result includes the transcript but discards provider and model returned by the runtime. (src/cli/capability-cli/audio.ts:55, ca0746ad8c56)
  • Latest release has the same omission: Reading audio.ts at the supplied v2026.9.4 release commit confirms its success envelope also omits provider and model. (src/cli/capability-cli/audio.ts, 3a9d69db306c)
  • Existing attribution owner and output contract: The media runtime obtains attribution from the selected transcription output; audio transcription returns that result unchanged. The shared formatter already renders optional provider/model fields, and docs/cli/infer.md lists them as stable envelope fields. No Codex dependency contract is involved in this projection. (src/media-understanding/runtime.ts:248, ccf08d8cda08)
  • Focused registered-command regression coverage: Four added cases exercise infer/capability and JSON/text, deliberately returning attribution different from the requested model. Existing nearby controls cover missing text, missing configuration, failure propagation, and request hints. Tests were inspected, not executed in this read-only review. (src/cli/capability-cli.test.ts:3386, ccf08d8cda08)
  • Reported installed-package proof: The captured PR body reports before/after installed-binary runs using synthetic audio and a configured local transcription command: 12 cases per phase plus four output-drain controls. The linked run https://github.com/openclaw/openclaw/actions/runs/34764283519 is completed/cancelled, consistent with the reported Testbox shutdown; cancellation itself proves neither success nor failure. Its artifact listing was empty and log retrieval was blocked by the reviewer network allowlist, so raw results were not independently inspected.
  • Area history and routing: Current-main history records Peter Steinberger’s domain split and provider-inventory work, and Masato Hoshino’s recent saved-credential repair. GitHub commit metadata confirms masatohoshino for the latter. Local blame could not complete because required historical objects were unavailable; no introduction claim relies on that failed command. (src/cli/capability-cli/audio.ts:36, 2aca3e075006)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit bc183cb into main Sep 13, 2026
169 checks passed
@steipete
steipete deleted the codex/qa-audio-attribution-unit-20260913 branch September 13, 2026 16:27
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 14, 2026
…nclaw#147170)

Keep actual runtime attribution in the existing audio result envelope for infer and capability, in JSON and text. Inline same-owner single-use request values in evaluation order so production LOC stays net neutral. Existing transcript and failure behavior is preserved.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant