Repository navigation
fix(managed): validate CLI type selections with the member contract - #2125
Merged
Merged
Conversation
`inspect-managed-members --type` accepted repeated and empty names that the MCP contract rejects. The provider's contract parse then threw, and the CLI reported execution_failure with advice to run `rea doctor`. Reuse the contract's type_names schema so the CLI rejects them as a validation error on --type. Fixes #2121 Co-Authored-By: Claude Opus 5.5 <[email protected]>
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. |
3 tasks done
12 of 13 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
rea inspect-managed-members --typedeclared its option asz.array(z.string()), so a repeated or empty type name reachedManagedStaticProvider. There,managedMembersInputSchema.parsethrew, and the CLI reportedexecution_failure("Runrea doctor…") for what is a caller input mistake. The option now reuses the contract'stype_namesschema, asbinaryDiagnosticsCommands.tsalready does for its options. The CLI therefore applies the same rules as the MCP tool: at least one name, non-empty names, no repeats.Fixes #2121
Before / after
Valid selections (one or several distinct names, or no
--type) behave as before. I checked against the PSReadLineMicrosoft.PowerShell.Pager.dllshipped in VS Code.Validation
managed CLI rejects repeated or empty type selections as invalid input(tests/acceptance/managedCliOutput.test.ts). It fails on main (execution_failure) and passes with this change; the other 5 tests in the file pass.npm run lintandnpm run docs:checkpass.npm test: 9150 passed, 15 failed in 8 files. These are the same 8 files and 15 tests that fail on cleanorigin/mainc22111e on this host. Most are environmental (no Hopper, Command Line Tools only,hdiutil, inspector target locations).promptCompletion.test.tsis the main regression tracked in [Bug] Main CI fails prompt completion checks since 07b36c148 #2123.No provider behavior is involved.
🤖 Generated with Claude Code