Repository navigation
fix(cli): preserve audio transcription provider and model output - #147170
Conversation
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.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 13, 2026, 12:11 PM ET / 16:11 UTC. ClawSweeper reviewWhat this changesPreserves 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 Review scores
Verification
How this fits togetherThe 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]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource 0, Tests +50. Total +50 across 2 files. View PR surface stats
Review metricsNone. Technical reviewBest 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. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
…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.
What Problem This Solves
Fixes missing provider and model attribution after successful
openclaw infer audio transcribeand itscapabilityalias.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.