Conversation
… rejects everything Against a server that answers every request with -32000 "Server not initialized", two scenarios in the 2026-07-28 requirement set scored fully green on main (modelcontextprotocol#451): - input-required-result-validate-input: both checks accept any JSON-RPC error as proof that inputResponses were validated. - input-required-result-unsupported-methods: the MUST NOT is never exercised when tools/list and prompts/list are both rejected. validate-input now first calls the same tool without inputResponses, as A1 does, and requires an InputRequiredResult. unsupported-methods now requires at least one probe to return a result. Otherwise the checks are reported through untestableCheck ("Not testable:"), per the modelcontextprotocol#248 policy, at their existing severity (WARNING and FAILURE), instead of SUCCESS. validate-input's catch path also emits both check ids, so a throw no longer drops sep-2322-error-on-protocol-error from the emitted set. Refs modelcontextprotocol#451 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
commit: |
This branch has not been deployed
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
Against a server that answers every request with
-32000 Bad Request: Server not initialized, two scenarios in the 2026-07-28 requirement set score fully green onmain(#451):input-required-result-validate-input, 3/3: both checks accept any JSON-RPC error as proof thatinputResponseswere validated.input-required-result-unsupported-methods, 2/2: its MUST NOT is never exercised whentools/listandprompts/listare both rejected.This PR adds a control to each, following the #248 policy:
validate-inputfirst callstest_input_required_result_elicitationwithoutinputResponsesand requires anInputRequiredResult, as A1 already does. If that fails, both checks are reported withuntestableCheckat their existing WARNING severity.unsupported-methodsrequires at least one probe to return a result. A server without prompts can still rejectprompts/list. If neither returns a result, the check is reported withuntestableCheckat FAILURE.The reason names what the server returned, for example
JSON-RPC error -32000: .... Thecatchpath ofvalidate-inputnow emits both check ids, so a throw no longer dropssep-2322-error-on-protocol-error.Scope
This does not add the expected-vs-emitted count that #451 stays open for, nor the
checks.jsonpersistence on throw that @mohammedmessaoudene is taking.Tests
input-required-result-reject-all.test.ts: a local HTTP server that returns-32000for every request. Both tests fail onmain(expected 'SUCCESS' to be 'WARNING',expected 'SUCCESS' to be 'FAILURE') and pass here. It is a separate file so it does not collide with fix(scenarios): stop MRTR retries when no input is requested #498 innegative-mrtr.test.ts.--requirements 2026-07-28against that server: 2 fully green scenarios onmain, 0 on this branch.main.npm run typecheck,npm run lintandvitest runare green (48 files, 624 tests).Refs #451
AI disclosure
Per
AI_POLICY.md: this change, its tests and this description were written primarily by Claude Code under my direction, and I reviewed the measurements. Review replies may be AI-assisted as well.🤖 Generated with Claude Code