Repository navigation
fix(cli): reject separate empty-string values for mcp add valued options - #8929
mirzasnowy wants to merge 1 commit into
Conversation
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. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
[Low impact] This PR appears safe to merge; no actionable issues were found. SummaryRejects separate empty-string values for
Reviews (1) · Last reviewed commit: "fix(cli): reject separate empty-string v..." · Reviewed by Greptile |
Follow-up to morluto's closing comment on #8003 (#8003 (comment)): a separate empty-string value after --agent, --command, or -c was not rejected yet.
mcp add --agent ""exited 0 and registered with defaults.Change: the mcp add guard in src/cli.ts now treats "" in a value position as a missing value, same as a trailing flag or an empty --flag= form. Covers --agent, --command, and -c, including behind global flags such as --full-output.
Evidence: reproduced on current main (exit 0, settings written for all three flags); after the fix all variants exit 1 with VALIDATION_ERROR and nothing written, and
mcp add --agent ampstill registers. tests/boundary/cli/mcpAddOptionValidation.test.ts passes with the fix and fails without it.I have reviewed every line of this diff.