fix(cli): classify invalid option values as usage errors - #615
Conversation
🦋 Changeset detectedLatest commit: 9d6c83a The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c01c611724
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
ScriptedAlchemy
left a comment
There was a problem hiding this comment.
This looks merge-ready after the existing changeset comment is fixed. The behavior change is correct: invalid option/argument values are parser usage errors and should exit 2 rather than surface as AB5000 runtime failures. No architecture concerns from #592/#600.
Only required follow-up I see is the open review thread asking the changeset to explicitly name the AB5000 behavior change; after that, re-run the focused CLI integration test if the head moves.
Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
What
InvalidArgumentErrorfor invalid--port,--trials,dev --install-host, and install/uninstall<host>,--mode, and--scopevalues.--input/--input-filedocuments under exit code 1.Why
Invalid CLI argument values are usage errors and should follow the same Commander path as invalid
serve-app --profile,serve-app --allow, anddoctor --hostvalues instead of becoming genericAB5000diagnostics.Closes #598
Self-review
Reviewer: Claude Fable 5.1 Thinking High (
claude-fable-5-1-thinking-high), concrete merge risks only againstorigin/main.First pass:
install/uninstall <host>parser. Fixed by assertinginstall windsurfexits 2 with Commander's command-argument message;uninstallshares the same parser.agent-bundleCLI.Second pass after fixes:
install/uninstall <host>argument. Fixed by naming<host>explicitly.Verification
After merging
origin/mainat62b69c068f9cccf4fcad3700287760b7fe44842d(#578):pnpm buildpnpm typecheckpnpm lintpnpm test:unit(3,951 tests; 3,945 passed, 6 skipped)pnpm docs:site:buildcli.test.tsintegration run (24/24 passed before the added positional-host assertion; 24/24 passed after it)