Repository navigation
Conversation
|
🦞👀 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. What this changesThis PR makes plugin initialization display specific input-rejection reasons instead of a generic CLI failure. Example: Run
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: current main still hides these input errors, and this PR provides a focused, proven fix with no actionable findings. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe plugin-authoring CLI validates initialization arguments before creating scaffold files; rejected inputs propagate to the shared root failure renderer. flowchart LR
A[Plugin init command] --> B[Authoring validation]
B --> C[Expected CLI error]
C --> D[Root failure renderer]
D --> E[Specific diagnostic and exit 1]
B --> F[Valid scaffold creation]
Technical reviewBest possible solution: Use the existing expected-error helper at the validation producers while preserving accepted inputs, overwrite protection, scaffold output, and exit codes. Do we have a high-confidence way to reproduce the issue? Current-main validation, command registration, and root-renderer source establish the failure path, corroborated by the contributor's built-CLI traces; no target code was executed during this read-only review. Is this the best way to solve the issue? This is the smallest complete fix: classify expected input failures at their existing producer and reuse the shared renderer without adding policy or another output path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 352e51e78c69. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +1, Tests +34, Other +2. Total +37 across 3 files. Added test files: 0. View PR surface stats
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed November 4, 2026, 9:40 AM ET / 14:40 UTC (Revision 2). |
6083c13 to
f14fbe1
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
fix(plugins): show existing errors from plugin init, build and validate `openclaw plugins init`, `build` and `validate` threw plain errors for their existing guards (for example init into a non-empty directory, or an invalid or missing manifest), so the specific message was hidden behind a generic failure. They now use the existing expected-CLI-error path, so the existing message is shown. Messages, exit codes and the no-write behavior are unchanged; successful runs are unchanged. Sweep of #191979 and #191986; both contributor commits are kept. #191991 (pack) is related but not included, because it adds new wording. Evidence: built CLI, twice per ref. All 26 rejected commands kept exit 1 and left the project unchanged; main printed generic errors and this change prints the existing specific messages. Successful init, build and validate output is identical. Details: #192857. Thanks @yxshee. Co-authored-by: yxshee <[email protected]> Co-authored-by: Ayaan Zaidi <[email protected]>
fix(plugins): show existing errors from plugin init, build and validate `openclaw plugins init`, `build` and `validate` threw plain errors for their existing guards (for example init into a non-empty directory, or an invalid or missing manifest), so the specific message was hidden behind a generic failure. They now use the existing expected-CLI-error path, so the existing message is shown. Messages, exit codes and the no-write behavior are unchanged; successful runs are unchanged. Sweep of openclaw#191979 and openclaw#191986; both contributor commits are kept. openclaw#191991 (pack) is related but not included, because it adds new wording. Evidence: built CLI, twice per ref. All 26 rejected commands kept exit 1 and left the project unchanged; main printed generic errors and this change prints the existing specific messages. Successful init, build and validate output is identical. Details: openclaw#192857. Thanks @yxshee. Co-authored-by: yxshee <[email protected]> Co-authored-by: Ayaan Zaidi <[email protected]>
What Problem This Solves
Fixes:
openclaw plugins initprints only "The CLI command failed. For help, runopenclaw doctor." when the target directory already exists, when--typeisn't one of tool/provider/feature, or when the id or--nameis blank. These are the most likely mistakes when starting a plugin, and none of them is a broken install.User Impact
User impact: the command now prints the reason, for example
Refusing to overwrite existing path: <dir>orUnsupported plugin scaffold type "bogus". Supported types: tool, provider, feature.Exit code is unchanged and nothing is written.Why This Change Was Made
The three input checks threw plain
Error, which the root failure renderer replaces with the generic line. They now use the existingthrowExpectedCliErrorhelper. Messages are unchanged.Evidence
Built from
mainat b018452 on Linux, Node 24.22.2, fresh state directory (paths shortened).Before:
After:
All exit 1, as before.
Tests:
pnpm test src/cli/plugins-authoring-command.test.ts --maxWorkers=1: 31 passed.New test "explains rejected init input instead of failing generically" covers the three cases, checks for
ExpectedCliErrorand theformatCliFailureLinesoutput, and checks nothing was written. It fails onmainand passes with the fix.oxfmt --checkandoxlint --type-awareon both files: clean.Test-line budget: the regression tests add 34 net lines, recorded in
config/test-lines-allocations/plugins-init-reason.txt. Rebased on currentmain.