Skip to content

fix(cli): render models refresh JSON failures - #128981

Merged
steipete merged 1 commit into
mainfrom
autoqa30-models-refresh-json-recovered
Aug 25, 2026
Merged

steipete merged 1 commit into
mainfrom
autoqa30-models-refresh-json-recovered

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

openclaw models refresh --json returned the internal remote-catalog error union and exit code 1 instead of the documented canonical CLI failure envelope.

Fixes #128979.

Why This Change Was Made

The CLI presentation owner now converts only status: "error" results into ExpectedCliError, allowing the existing root renderer to own human/JSON failure output and terminal finalization. The remote-catalog union, SQLite behavior, and successful updated, unchanged, fresh, and disabled payloads remain unchanged.

Production delta: +5/-8, net -3 lines. Tests: +222/-21, net +201 lines.

User Impact

Failed model-catalog refreshes produce one canonical cli_error document. Successful JSON payloads, provider/model counts, disabled behavior, and human restart guidance remain unchanged.

Evidence

  • Pre-fix owner and built-process regressions reproduced the legacy error result instead of the canonical envelope.
  • Focused owner/sibling proof covers model refresh, list, registration, and failure rendering.
  • Built-process proof covers leaf/parent JSON, human output, forced Commander, dual TTY, successful updated/unchanged results, disabled behavior, SQLite persistence, and failure no-mutation.
  • CLI startup build and complete changed-file gates passed.
  • Fresh final P1 autoreview: no actionable findings, correctness 0.97.
  • git diff --check: passed.

@clawsweeper

clawsweeper Bot commented Aug 25, 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 commands Command implementations size: M maintainer Maintainer-authored PR labels Aug 25, 2026
@steipete
steipete marked this pull request as ready for review August 25, 2026 03:04
@steipete steipete self-assigned this Aug 25, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready proof for head bd58741c05a062cc2674c4a17f8c8146b743fd79:

  • Root cause: models refresh serialized its internal error union and exited before the canonical root JSON renderer.
  • Canonical repair: only status: error becomes ExpectedCliError; updated/unchanged/fresh/disabled payloads and human success/restart guidance remain unchanged.
  • Production: +5/-8, net -3 lines. Tests: +222/-21.
  • Focused owner/sibling proof: 127 tests passed.
  • Built-process proof: six leaf/parent JSON, human, forced-Commander, dual-TTY, persistence, and no-mutation scenarios passed.
  • CLI startup build and complete changed-file gates passed.
  • Final recovered P1 autoreview: no actionable findings, correctness 0.97.
  • Exact-head CI: https://github.com/openclaw/openclaw/actions/runs/32803774267 — green.
  • Native review artifacts: validated with zero findings and READY FOR /prepare-pr.

Deterministic network isolation proves failed and disabled refreshes do not alter persisted catalog rows; no live provider credentials are involved.

@steipete
steipete merged commit 0022cd2 into main Aug 25, 2026
233 checks passed
@steipete
steipete deleted the autoqa30-models-refresh-json-recovered branch August 25, 2026 03:18
@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

commands Command implementations maintainer Maintainer-authored PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

models refresh JSON failures use a noncanonical domain payload

1 participant