fix: validate successful request-state completion - #534
Open
YS-OH-CORE wants to merge 1 commit into
Open
YS-OH-CORE wants to merge 1 commit into
YS-OH-CORE wants to merge 1 commit into
Conversation
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.
Reject unsuccessful round-2 results in the existing request-state diagnostic.
Motivation and Context
Closes #505.
sep-2322-request-state-completecurrently accepts a tool-error result or a completion without the fixture's documentedstate-okmarker. The check can therefore report successful state validation when the diagnostic did not report success.This patch rejects
isError: trueand requires a text content block containingstate-ok. It keeps the existing check ID and protocol-levelisCompleteResulthelper, and extends the existing broken-server fixture and negative-test file. The marker is this fixture's existing contract, not a new requirement for arbitrary MCP tools.How Has This Been Tested?
The linked executions were completed on 16 September 2026 KST (15 September UTC) against
7169291ec0b68eb370fddcd9947313ab0d5e4156. Current upstream main is still that exact commit. This branch applies the same published patch, SHA-2566b54c4129d72691775a01c911515dee4bc59036262a957e3f9bf61c0bac7faa9.npm testsuiteFull-suite/build execution used Node 22.16.0, npm 10.9.2 and the upstream lockfile. Builds, typecheck, touched-file ESLint and diff checks passed. The 630 tests include the 12 focused cases.
A separate Go SDK execution used
go-sdk@fbd36cb7870176bfc3e8e423df697cf110d0f927, Go 1.25.0, its native Streamable HTTP handler and the built conformance CLI. Across 12 before/after invocations, the unchanged request-state, multi-round and tampered-state controls stayed successful; three deliberately bad completion modes changed from false success to failure. The same raw target responses and successful round-1/wire checks were preserved.These are controlled diagnostic cases, not defects claimed in the unmodified SDK. The marker does not itself prove state integrity; the separate tampered-state check remains necessary. Complete execution details and scope.
For this submission, source blobs, patch hash, clean application and resulting file bytes were rechecked. The executions above are prior evidence on the unchanged base and patch, not new runtime runs today.
Breaking Changes
No API or configuration change. This diagnostic now fails completions that violate its already documented successful-completion contract.
Types of changes
Checklist
Additional context
This complements #498: its focus is round-1 prerequisite availability; this PR validates round-2 completion. Both modify the same diagnostic check and broken fixture, so both fixture behaviors will need to be retained when rebasing after either PR merges.
AI assistance: Zero used ChatGPT for the analysis, implementation, tests and this PR description.
Zero × Youngseok Oh