Repository navigation
fix(cli): reject unexpected list arguments - #492
remote-controlled-man wants to merge 1 commit into
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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
Codex review: needs real behavior proof before merge. What this changesReject unexpected list arguments before preparing or contacting a server while preserving configured hyphen-prefixed names and selectors. Example: Run mcporter list xhs --no-oauht with xhs configured.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 2 items remain This PR addresses a current argument-validation bug with a focused change; the new diagnostic needs a recovery instruction. Priority: P2 Before merge
Findings
Tests
Agent review detailsHow this fits togetherThe list command consumes CLI flags and a server selector, resolves configured or ad-hoc targets, and returns server status or tool descriptions. flowchart TD
A[CLI arguments] --> B[Global parsing and routing]
B --> C[List flag extraction]
C --> D[Argument validation]
D --> E[Target preparation and resolution]
E --> F[MCP discovery]
F --> G[CLI output]
Technical reviewBest possible solution: Keep validation in handleList using the existing selector resolver and usage-error class, and add an actionable help hint to the rejection message. Do we have a high-confidence way to reproduce the issue? Source establishes both paths: leftover arguments are ignored on main, and normalization removes the hyphens from --xhs before matching xhs; no reproduction was executed during this read-only review. Is this the best way to solve the issue? Validating residual arguments before target preparation is the smallest complete fix and preserves ordinary server correction and configured tool selectors. Full review comments:
Overall correctness: patch is correct AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8babbc8458bf. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
Review metrics
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
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, 3:23 AM ET / 08:23 UTC. |
Integrate the daemon-help regression fix with the related CLI correctness contributions so parser and generator interactions are validated together. Preserve coerced schema strings and empty command arguments, accept UTF-8 BOM configs, restore bare bundle destinations, reserve raw JSON flags, propagate generated tool error exit codes, reject unexpected list arguments, and report usage errors without duplicate stack traces. Refs openclaw#477, openclaw#478, openclaw#479, openclaw#481, openclaw#482, openclaw#484, openclaw#486, openclaw#487, openclaw#492. Fixes openclaw#480. Fixes openclaw#483. Co-authored-by: jaeminbird <jaeminbird@gmail.com> Co-authored-by: Krasimir Kralev <263465593+KrasimirKralev@users.noreply.github.com> Co-authored-by: goutamadwant <workwithgoutam@gmail.com> Co-authored-by: Steven Huang <134844631+remote-controlled-man@users.noreply.github.com>
Preserve daemon help purity, schema-aware argument values, empty stdio argv, BOM configuration, generated raw flags and tool-error exits, bare bundle paths, list argument validation, and concise usage errors. Includes the verified contributions from #477, #478, #479, #481, #482, #486, #487 and #492. Fixes #480 and #483. Validation: all targeted baseline regressions reproduced; isolated Linux check/test/docs/package gates passed with pinned Node and Bun runtimes; independent review found no actionable P0-P2 defects. Co-authored-by: HengYang <hengyang.2003@tsinghua.org.cn> Co-authored-by: jaeminbird <jaeminbird@gmail.com> Co-authored-by: Krasimir Kralev <263465593+KrasimirKralev@users.noreply.github.com> Co-authored-by: goutamadwant <workwithgoutam@gmail.com> Co-authored-by: Steven Huang <134844631+remote-controlled-man@users.noreply.github.com>
|
Thanks for the contribution. The list argument validation before server discovery fix and its regression coverage are included in the merged CLI correctness integration, #484. That integration validates the overlapping parser and generator changes together. Your co-author credit and changelog acknowledgment are preserved. Closing this PR as superseded by #484. |
mcporter listcould ignore an extra target or a misspelled option such as--no-oauht. When a misspelled option was the only positional token, name correction could treat it as a server and connect anyway.Reject unexpected arguments before preparing a server target. Exact configured server names and tool selectors still work when they begin with a hyphen.
Loopback CLI checks reproduced successful tool discovery on the base and confirmed exit status 1 with zero HTTP requests after the fix. Compiled CLI regressions cover both argument positions, an extra target, and a valid configured name beginning with hyphens.
Validation
pnpm checkFIRECRAWL_API_KEY=test LINEAR_API_KEY=test pnpm test(2,309 passed, 27 skipped)pnpm test:packagepnpm docs:siteAI-assisted implementation and testing.