Repository navigation
fix(plugins): show existing scaffold input errors - #192857
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Built CLI comparison: main Two independent iterations on each ref, naturally triggering all changed guards:
All 26 rejected commands per ref exit 1. Main shows the generic CLI failure instead of the existing reason. The candidate shows the exact existing reason, with no generic failure. Recursive file/mode/content snapshots are unchanged for every rejected command; no fresh directory appears after rejected init inputs. Example, normalized only for isolated path: Success controls on both refs, twice: scaffold a real tool plugin, build its metadata through the normal module loader, then validate it. All exit 0 with identical stdout/stderr. The fixtures use real generated TypeScript and existing installed dependencies inside the isolated volume, not mocked authoring or output formatting. Initial success setup lacked the generated project's typebox dependency; the dependency link was corrected before the recorded matrix. 62 focused cases across authoring command/UTF-8/validation and root failure-output suites pass (33.70s wrapper). The consolidated existing missing-entry regression fails on main because a plain Error lacks the existing humanOutput contract; it passes on candidate. Changed-file formatting/lint pass. Both yxshee fixes are cherry-picked with contributor authorship preserved: #191979 ( Whole-diff simplification: reuse ExpectedCliError and the current guard owners, preserve all strings and malformed-JSON cause, remove duplicate formatter-echo tests in favor of the existing owner regression and stronger built-CLI matrix. Production +16/-8 (net +8), tests +1/-1 (net 0), docs +5. No allocation, shared ceiling, validation, exit-code, write-policy, permissions or public API changes. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesThis PR makes plugin initialization, build, and validation display their existing input-error messages. Example: Run openclaw plugins build --entry ./dist/index.js before compiling the plugin.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this PR fixes a current-main diagnostic bug with a focused change, sufficient exact-head CLI proof, and no actionable findings; hosted checks remain pending. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherPlugin authoring commands consume project paths, metadata, and entry modules; their existing guards now supply typed errors to the shared root CLI renderer. flowchart LR
A[Plugin author] --> B[Authoring CLI]
B --> C[Existing input guards]
C --> D[Expected CLI error]
D --> E[Root failure renderer]
E --> F[Specific diagnostic]
Technical reviewBest possible solution: Classify known authoring input failures at their existing producers and reuse the shared CLI renderer, as this PR does. Do we have a high-confidence way to reproduce the issue? Current-main guards and the root renderer show the failure path, corroborated by supplied before/after built-CLI output; this read-only review executed no target code. Is this the best way to solve the issue? This is the smallest complete repair: preserve checks, strings, ordering, and parser causes while using the existing expected-error owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ce339781514f. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +8, Tests 0, Docs +5. Total +13 across 4 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel 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 Reviewed November 4, 2026, 10:51 AM ET / 15:51 UTC. |
|
CI classification on exact head Comparison uses the actual CI merge
All comparisons use the actual CI merge/main parent, not the older runtime baseline. The merge diff contains only the intended four CLI/test/docs files. No unrelated UI fixes, hosted reruns, or repushes were made. Product CI cancelled jobs: 0. Exact-head ClawSweeper review: 5/6, no findings. The supplied built CLI guard/success matrix remains valid. |
|
Maintainer override: no red comes from this sweep. (1) Validate provider scaffold failed on a hosted npm archive download timeout; the exact command passes on the CI merge and its main parent, with byte-identical scaffold output. (2) The baseline ratchets (two UI mock-export cases) and (3) check-test-types (browser-panel-render.tsx:149 TS2322) fail identically on the exact main parent. Receipts: #192857 (comment) |
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: openclaw/openclaw#192857. Thanks @yxshee. Co-authored-by: yxshee <[email protected]> Co-authored-by: Ayaan Zaidi <[email protected]>
…en the Gateway is not running (#192943) fix(plugins): show the existing offline error from plugins reload When no Gateway was running, `openclaw plugins reload` threw a plain error, so its existing message was hidden behind a generic CLI failure. It now uses the existing expected-CLI-error path and shows the same message. The exit code, config and JSON output are unchanged; there is no lifecycle or consent change. This completes the plugin CLI fixes in #192857. Evidence: built CLI. Offline, both refs exit 1; main printed the generic failure and this change prints the existing message, with config unchanged and byte-identical JSON stdout. With a running Gateway, reload succeeds the same way on both refs. Details: #192943 (comment). Thanks @yxshee. 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]>
…en the Gateway is not running (openclaw#192943) fix(plugins): show the existing offline error from plugins reload When no Gateway was running, `openclaw plugins reload` threw a plain error, so its existing message was hidden behind a generic CLI failure. It now uses the existing expected-CLI-error path and shows the same message. The exit code, config and JSON output are unchanged; there is no lifecycle or consent change. This completes the plugin CLI fixes in openclaw#192857. Evidence: built CLI. Offline, both refs exit 1; main printed the generic failure and this change prints the existing message, with config unchanged and byte-identical JSON stdout. With a running Gateway, reload succeeds the same way on both refs. Details: openclaw#192943 (comment). Thanks @yxshee. Co-authored-by: Ayaan Zaidi <[email protected]>
… it refuses to pack (#191991) fix(plugins): show existing errors from plugins pack `openclaw plugins pack` guards threw plain errors, so their existing messages were hidden behind a generic CLI failure. They now use the existing expected-CLI-error path, as #192857 did for init, build and validate. Messages, control flow and exit codes are unchanged; no new wording. Evidence: built Linux CLI, twice per ref. With a missing plugin manifest or an invalid output suffix, main printed a generic failure; with this change it prints the existing specific message, with exit 1, project bytes unchanged and no output created. Valid packs produce byte-identical 647-byte archives across refs, and existing-output handling is unchanged. Details: #191991 (comment). Thanks @yxshee. Co-authored-by: Ayaan Zaidi <[email protected]>
…193484) fix(plugins): show the existing install message when esbuild is missing When esbuild was not installed, the plugin authoring loader threw a plain error, so `openclaw plugins pack` hid the existing install instruction behind a generic CLI failure. It now uses the existing expected-CLI-error path with the same message and cause, as #192857 and #191991 did. No compiler lookup, build or install policy changes. Evidence: built Linux CLI with esbuild absent before the first lookup. Main printed a generic failure; with this change it prints the existing install instruction. Both exit 1, create no archive and keep project hashes unchanged. With the compiler installed, pack and Solid compilation produce byte-identical archives, and overwrite and invalid-extension handling are unchanged. Details: #193484 (comment). Thanks @ly85206559. Co-authored-by: Ayaan Zaidi <[email protected]>
… it refuses to pack (openclaw#191991) fix(plugins): show existing errors from plugins pack `openclaw plugins pack` guards threw plain errors, so their existing messages were hidden behind a generic CLI failure. They now use the existing expected-CLI-error path, as openclaw#192857 did for init, build and validate. Messages, control flow and exit codes are unchanged; no new wording. Evidence: built Linux CLI, twice per ref. With a missing plugin manifest or an invalid output suffix, main printed a generic failure; with this change it prints the existing specific message, with exit 1, project bytes unchanged and no output created. Valid packs produce byte-identical 647-byte archives across refs, and existing-output handling is unchanged. Details: openclaw#191991 (comment). Thanks @yxshee. Co-authored-by: Ayaan Zaidi <[email protected]>
…penclaw#193484) fix(plugins): show the existing install message when esbuild is missing When esbuild was not installed, the plugin authoring loader threw a plain error, so `openclaw plugins pack` hid the existing install instruction behind a generic CLI failure. It now uses the existing expected-CLI-error path with the same message and cause, as openclaw#192857 and openclaw#191991 did. No compiler lookup, build or install policy changes. Evidence: built Linux CLI with esbuild absent before the first lookup. Main printed a generic failure; with this change it prints the existing install instruction. Both exit 1, create no archive and keep project hashes unchanged. With the compiler installed, pack and Solid compilation produce byte-identical archives, and overwrite and invalid-extension handling are unchanged. Details: openclaw#193484 (comment). Thanks @ly85206559. Co-authored-by: Ayaan Zaidi <[email protected]>
What Problem This Solves
plugins init,plugins build, andplugins validatehide existing input-error messages behind a generic CLI failure, leaving plugin authors unable to tell what to fix.User Impact
Authors see the existing specific reason for rejected inputs, including a non-empty target directory, unsupported scaffold type, missing entry/package, or malformed metadata. Message strings, exit code 1, guard order and no-write behavior are unchanged.
Why This Change Was Made
Classify these existing guards through the dependency-free
ExpectedCliErrorowner, following #189993. Preserve the malformed-JSON cause and use the existing root failure renderer rather than adding a second presentation path.Combines @yxshee's #191979 and #191986, preserving both authored commits. Related #191991 is credited as adjacent work only; no pack change or new wording from that PR is included.
Evidence
Built CLI in secretless Node 24.22.1 Docker: main twice and exact candidate twice. All 13 changed guard cases per iteration hide their reasons on main and print the existing specific messages on candidate. Every rejected command exits 1 and leaves the complete project file/mode/content snapshot unchanged. Success controls scaffold a real plugin, build metadata, and validate it twice on each ref, with identical output and exit 0.
Exact-head CLI before/after matrix and no-write receipts.
62 authoring/UTF-8/validation/failure-output cases pass in 33.70 seconds wrapper time. Existing missing-entry regression now checks the human-output contract and fails on main. Formatting/lint pass; broad checks run in hosted CI.
Complete-diff simplification reuses existing error/guard owners and consolidates duplicate formatter tests into the existing owner regression plus actual CLI proof: production +16/-8 (net +8), tests +1/-1 (net 0), docs +5. No test allocation or shared-ceiling change.
Merge Danger
Two-way door: reverting restores generic error presentation. No state migration, dependency, configuration, permission or public API change. Blast radius is plugin authoring input-error classification; incorrect classification could expose the wrong error detail, but guard strings and write behavior are unchanged.