Skip to content

fix(cli): print inference results alongside input paths - #128523

Merged
steipete merged 1 commit into
mainfrom
codex/infer-human-output-owner-20260824
Aug 24, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/infer-human-output-owner-20260824

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Makes ordinary inference commands actually print their requested results: audio transcripts, image descriptions, multiple-image descriptions, and video descriptions.

Root Cause and Repair

The shared human-readable capability envelope formatter treated an input path and generated result text as mutually exclusive. Every media-understanding producer intentionally supplies both, so the default CLI printed the filename and silently discarded the transcript or description. Preserve both meaningful fields at their shared formatting owner while retaining path-only, text-only, JSON, and unknown-output behavior.

Evidence

  • Authentic pre-fix regressions independently failed for audio transcribe, image describe, image describe-many, and video describe: each output contained its source path but omitted the requested text.
  • node scripts/run-vitest.mjs src/cli/capability-cli.test.ts: all 186 capability CLI tests pass, including all four real-parser regressions.
  • Independent read-only local review inspected the complete shared formatter plus audio, image, video, model, embedding, speech, and web consumers; no actionable findings.
  • Focused formatter and git diff --check passed.
  • Production +2/-4, net minus two lines; regression tests +16.
  • Ordinary display-only fix: no provider, credentials, configuration, protocol, or persistence changes.

@clawsweeper

clawsweeper Bot commented Aug 24, 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 cli CLI command changes size: XS maintainer Maintainer-authored PR labels Aug 24, 2026
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. 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 Aug 24, 2026
@clawsweeper

clawsweeper Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 24, 2026, 1:40 AM ET / 05:40 UTC.

ClawSweeper review

What this changes

The PR changes human-readable media inference output to print both the input path and generated transcript or description.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

No blocking findings: current main’s shared formatter suppresses generated text whenever an output also has a path, and this PR repairs that owner boundary. Keep this maintainer-authored, maintainer-labeled PR open for normal exact-head CI and merge handling.

Priority: P1
Reviewed head: fff7ea935ee636cc69ecc1b2b16116a7d9574139

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A small shared-owner repair with focused parser-level coverage and no concrete correctness or security finding.
Proof confidence 🌊 off-meta tidepool Not applicable: Not applicable: this is a maintainer-authored PR; its body also records an after-fix focused CLI test run.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Not applicable: this is a maintainer-authored PR; its body also records an after-fix focused CLI test run.
Evidence reviewed 6 items Current-main failure path: Current main emits a truthy path and skips the simultaneously present text through an else if, which directly causes the reported default-output loss.
Affected producer contract: Audio transcription supplies both a resolved file path and transcript text, then invokes the shared formatter from its command action.
Sibling producer coverage: Image descriptions and video descriptions also produce both fields, so the shared change covers the same invariant without provider-specific branches.
Findings None None.
Security None None.

Live Verification

Command: pnpm openclaw capability audio transcribe --help

Result: PASS (completed)

pnpm openclaw capability audio transcribe --helprunner@runnervm76f27:/tmp/clawsweeper-live-proof-128523-t1xOuf/target$ pnpm openclaw capability audio transcribe
 --help
pnpm openclaw capability audio transcribe --help
$ node scripts/run-node.mjs capability audio transcribe --help
[openclaw] Building TypeScript (dist is stale: missing_build_stamp - build stamp missing).
[openclaw] Building bundled plugin assets.
[canvas] build: node scripts/bundle-a2ui.mjs
[log] ‹DIR›/a2ui.bundle.js  chunk │ size: 399.96 kB
[log] ‹DIR›/a2ui-v0.9.bundle.js  chunk │ size: 615.66 kB
[log]
[success] rolldown v1.2.0 Finished in 64.26 ms
[diffs] build: node --import tsx ../../scripts/build-diffs-viewer-runtime.mts curated
[diffs-language-pack] build: node --import tsx ../../scripts/build-diffs-viewer-runtime.mts full
[discord] build: node --import tsx ../../scripts/build-discord-activity-sdk.mts
[tsdown-build] invocation 1/2 finished in 0.4s
node_modules/playwright-core/lib/coreBundle.js (65821:28) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
       ╭─[ node_modules/playwright-core/lib/coreBundle.js:65821:29 ]
       │
 65821 │               const value = eval(ˋ(${expr})ˋ);
       │                             ──┬─
       │                               ╰─── Use of direct ˋevalˋ here.
       │
       │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
───────╯

node_modules/playwright-core/lib/coreBundle.js (65828:28) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
       ╭─[ node_modules/playwright-core/lib/coreBundle.js:65828:29 ]
       │
 65828 │               const value = eval(ˋ(${expr})ˋ);
       │                             ──┬─
       │                               ╰─── Use of direct ˋevalˋ here.
       │
       │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
───────╯

node_modules/web-tree-sitter/web-tree-sitter.js (2343:30) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
      ╭─[ node_modules/web-tree-sitter/web-tree-sitter.js:2343:31 ]
      │
 2343 │           ASM_CONSTS[start] = eval(func);
      │                               ──┬─
      │                                 ╰─── Use of direct ˋevalˋ here.
      │
      │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
──────╯

node_modules/web-tree-sitter/web-tree-sitter.js (2366:32) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
      ╭─[ node_modules/web-tree-sitter/web-tree-sitter.js:2366:33 ]
      │
 2366 │           moduleExports[name] = eval(func);
      │                                 ──┬─
      │                                   ╰─── Use of direct ˋevalˋ here.
      │
      │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
──────╯

[tsdown-build] invocation 2/2 finished in 9.8s
[plugin-control-plane-loads] verified 35 built modules with native require and checked doctor closures
runtime-postbuild: 11 phases completed in 2772ms (slowest: built plugin control-plane loads 2004ms)
│
◇

OpenClaw 2026.8.1 (fff7ea9) — All your chats, one OpenClaw.

Usage: openclaw infer audio transcribe [options]

Transcribe one audio file

Options:
  --agent ‹id›              Agent whose model and auth state should be used
  --file ‹path›             Audio file
  -h, --help                Display help for command
  --json                    Output JSON (default: false)
 
… output truncated …

Assertions:

  • PASS expect_output: Transcribe one audio file

How this fits together

Media CLI commands create output envelopes from audio, image, and video inference. The shared text formatter renders those envelopes for terminal users while JSON output bypasses it.

flowchart LR
  A[CLI media command] --> B[Media inference]
  B --> C[Output envelope]
  C --> D[Shared text formatter]
  D --> E[Terminal output]
Loading

Before merge

  • Complete next step (P2) - No mechanical repair is needed; await normal exact-head CI and maintainer merge handling.
Agent review details

Security

None.

PR surface

Source -2, Tests +16. Total +14 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 2 4 -2
Tests 1 16 0 +16
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 18 4 +14

Review metrics

Metric Value Why it matters
Production versus tests production +2/-4 (net -2); tests +16 The repair reduces production code while adding four parser-level regression cases at the CLI boundary.

Technical review

Best possible solution:

Merge the shared formatter repair after exact-head checks complete, retaining JSON behavior and the command-level regressions.

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

Yes, from source: current main prioritizes a path over text, while audio, image, and video inference outputs intentionally provide both fields.

Is this the best way to solve the issue?

Yes; the shared formatter is the canonical owner used by all affected commands, making this a narrower and more maintainable repair than per-command handling.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 1ece62a4d807.

Labels

Label changes:

  • add P1: Default media inference commands suppress their requested transcript or description despite successful inference.
  • 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: Not applicable: this is a maintainer-authored PR; its body also records an after-fix focused CLI test run.

Label justifications:

  • P1: Default media inference commands suppress their requested transcript or description despite successful inference.
  • 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: Not applicable: this is a maintainer-authored PR; its body also records an after-fix focused CLI test run.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Current-main blame and history attribute the path-priority formatter branch to this recent shared CLI change. (role: introduced current formatter behavior; confidence: high; commits: c8514ed20a3b; files: src/cli/capability-cli/shared.ts)

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 cc2993c into main Aug 24, 2026
176 checks passed
@steipete
steipete deleted the codex/infer-human-output-owner-20260824 branch August 24, 2026 05:56
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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 P1 High-priority user-facing bug, regression, or broken workflow. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS 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