Skip to content

fix(managed): validate CLI type selections with the member contract - #2125

Merged
morluto merged 2 commits into
mainfrom
fix/issue-2121
Oct 12, 2026
Merged

morluto merged 2 commits into
mainfrom
fix/issue-2121

Conversation

@kaoru0822-kitauji

Copy link
Copy Markdown
Collaborator

Summary

rea inspect-managed-members --type declared its option as z.array(z.string()), so a repeated or empty type name reached ManagedStaticProvider. There, managedMembersInputSchema.parse threw, and the CLI reported execution_failure ("Run rea doctor …") for what is a caller input mistake. The option now reuses the contract's type_names schema, as binaryDiagnosticsCommands.ts already 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

$ rea inspect-managed-members Pager.dll --type A --type A --json
before: {"code":"execution_failure","message":"Analysis could not complete. Run `rea doctor` …"}
after:  {"code":"VALIDATION_ERROR","fieldErrors":[{"path":"type","message":"type_names must not repeat a name"}]}

Valid selections (one or several distinct names, or no --type) behave as before. I checked against the PSReadLine Microsoft.PowerShell.Pager.dll shipped in VS Code.

Validation

  • New acceptance test 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 lint and npm run docs:check pass.
  • npm test: 9150 passed, 15 failed in 8 files. These are the same 8 files and 15 tests that fail on clean origin/main c22111e on this host. Most are environmental (no Hopper, Command Line Tools only, hdiutil, inspector target locations). promptCompletion.test.ts is the main regression tracked in [Bug] Main CI fails prompt completion checks since 07b36c148 #2123.

No provider behavior is involved.

🤖 Generated with Claude Code

`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]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-12T10:43:50.741188Z 34f7005 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@morluto
morluto merged commit 60259a9 into main Oct 12, 2026
60 of 62 checks passed
@morluto
morluto deleted the fix/issue-2121 branch October 12, 2026 11:26
@github-actions github-actions Bot mentioned this pull request Oct 12, 2026
3 tasks done
@morluto morluto added bug Something isn't working area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior labels Oct 14, 2026
@morluto morluto added the area: cli CLI adapter and one-shot commands label Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: cli CLI adapter and one-shot commands area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] inspect-managed-members --type with a repeated or empty name reports execution_failure and recommends rea doctor

2 participants