Repository navigation
fix(cli): reject missing mcp add option values - #7996
Conversation
[Medium impact] The PR appears safe to merge; no new actionable defect was established. SummaryAdds early checks for missing
Reviews (3) · Last reviewed commit: "chore: keep main formatting out of merge..." · Reviewed by Greptile |
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. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Summary
Fixes #7609. Reject missing values for
--agent,--command, and-cbefore Incur can silently proceed with default registration.Problem and expected behavior
Incur 0.6.1 ignores a trailing valued option and can consume the next option token as its value. Calls such as
mcp add --agent,mcp add --command, andmcp add --command --agent ampcan therefore report success without the requested selector or launcher. Empty equals forms, including-c=, must also fail validation.Change and scope
Adds a CLI-boundary check for absent values, option-shaped tokens in value positions, and empty equals forms. The guard returns a structured validation error before registration. A valid Amp registration control remains covered. This is an ordinary CLI parser fix; no maintainer scope decision is applicable.
PR #7453 handles surplus positional arguments, and the closed #7919 handles discovery requests reaching registration; neither addresses missing option values.
Contract and boundary impact
mcp addparser.VALIDATION_ERRORonagentorcommand; no MCP schema or catalog change.Expected effects:
Evidence and regression coverage
tests/boundary/cli/mcpAddOptionValidation.test.tscovers trailing long and short options, empty--agent=and-c=, an option swallowed as a value, and valid Amp registration in an isolated home.VALIDATION_ERRORand identify the missing field; no runtime output captured in this task.Validation performed
git diff --check origin/main...fix/7609-mcp-add-missing-option-value— passed.Compatibility, safety, and release
Author readiness
Human owner: @STDquantum
Before merge
type(scope): outcome.