refactor(mcp): make analysis states unrepresentable - #468
Merged
Conversation
morluto
marked this pull request as ready for review
August 9, 2026 17:40
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
Owner
Author
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 410569f02a
ℹ️ 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".
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.
Description
Replace permissive intermediate states with boundary-parsed, discriminated values across configuration, provider selection, binary targets, replay/process outcomes, managed workflows, browser capture, and native API evidence. Contradictory states are rejected as inputs instead of surviving into application logic.
MCP registration now gives the canonical Zod input and output contracts directly to the 2.0 SDK. The SDK owns request parsing, output validation, registered-tool advertisement, per-request client metadata, connection lifetime, and list-change behavior. The generated catalog is captured through a real SDK client/server connection, so it cannot drift from
tools/list. This removes the parallel input parser, manual JSON Schema override layer, server-global metadata fallbacks, and transport-level live-server bookkeeping.The contract cleanup also closes three concrete invalid states found while reviewing the SDK projection:
No tool names or provider authorities are added or removed. Setup behavior and provider mutation boundaries are unchanged.
Suggested review order:
79cc9df3,63b0b1c1).21501091).ade56a6e,04c198e7,410569f0).ba7327d9,20dba840,85d27fb7,7b00579e).33a0f627).Type of Change
Testing Performed
npm run typecheck)npm run lint)npm test)npm run verify:hopper)npm run verify:hopper:linux) or unavailability explainednpm run verify:browser) or unavailability explainednpm run verify:package)Validation performed on the final local tree:
npm run check:pr— 329 test files and 1,697 tests passed; typecheck, lint, formatting, Knip, metadata, SDK-derived catalog, generated docs, documentation facts, and error-schema checks passed.Real Hopper, Linux Hopper, Ghidra, browser, and package verification were not run locally. Provider execution and bridge semantics are unchanged; the PR workflows remain the source of cross-platform and real-provider evidence.
Tool Contract Impact
The canonical 116-tool inventory remains complete and stable. Tool schemas now come from the same registered SDK contracts that parse calls and validate successful structured output. The caller-visible changes reject incomplete browser comparison pairs, unapproved browser source capture, invalid Node characterization effects, and mismatched native ABI roles.
Generated product, skill, Evidence manifest, and MCP catalog metadata were regenerated and verified.
Related Issues
No linked issue.