Repository navigation
fix(cli): render plugin search JSON failures - #127679
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 21, 2026, 7:21 PM ET / 23:21 UTC. ClawSweeper reviewWhat this changesThis PR makes Merge readinessKeep open: current main still consumes plugin-search failures before the shared JSON failure renderer, while the patch routes JSON-mode failures to that existing owner. The patch has no blocking correctness finding; exact-head built-process CI remains the material merge gate. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: FAIL (partial) — step 2 Assertions:
How this fits togetherPlugin search accepts a CLI query, calls ClawHub package search, and renders results for people or scripts. JSON-mode failures should leave the command owner and reach the root CLI renderer, which writes the canonical machine-readable error envelope. flowchart LR
A[Plugin search command] --> B[Validate query]
B --> C[Search ClawHub packages]
C --> D{JSON output requested?}
D -->|success| E[Write search results]
D -->|failure| F[Root CLI failure renderer]
F --> G[JSON stdout and human stderr]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +4, Tests +88. Total +92 across 3 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep plugin search as a thin owner that delegates JSON failure rendering to the root CLI contract, then land after the built CLI regressions pass on the PR head. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: current main locally exits on a missing query and locally consumes ClawHub errors before Is this the best way to solve the issue? Yes. Reusing the root failure renderer is the narrow canonical fix; adding a plugin-search-specific JSON envelope would duplicate formatting and drift from the established CLI contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against fb95562e9614. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Land-ready review complete.
Proof:
Known local proof note: the local build runner was repeatedly terminated under concurrent host pressure before producing E2E artifacts; exact-head hosted CI supplies the clean workspace and built-process proof. |
|
Merged via squash.
|
What Problem This Solves
Fixes an issue where
openclaw plugins search --jsonfailures exited with empty stdout and human-only stderr. This affected both a missing search query and ClawHub transport failures, leaving scripts and agents without a parseable result.Why This Change Was Made
The plugin-search owner was consuming failures locally and terminating before the shared CLI failure renderer and finalizers could run. Missing-query failures now use the existing expected CLI error contract, while ClawHub errors escape to the root renderer only in JSON mode. Human-mode ClawHub errors and all success/no-results behavior remain unchanged.
User Impact
Automation can reliably parse plugin-search failures as one canonical JSON document. Human users retain the existing actionable usage and transport diagnostics.
Evidence
__exit__:1instead of propagating the usage or transport error.src/cli/plugins-search-command.test.ts— 5/5 passed, including both propagation regressions, successful JSON, result rendering, and limit validation.git diff --checkpassed.Known local proof boundary: the host repeatedly terminated the repository build runner before it produced E2E runtime artifacts during concurrent owner work. Exact-head CI must run the built-process regressions before landing.
AI-assisted: yes. I reviewed the implementation and validation results.