feat: add cancellation and progress notification conformance scenarios - #436
Open
elang2 wants to merge 1 commit into
Open
feat: add cancellation and progress notification conformance scenarios#436elang2 wants to merge 1 commit into
elang2 wants to merge 1 commit into
Conversation
Add two new server conformance test scenarios covering utilities that previously had no test coverage: Cancellation (notifications/cancelled): - Server stability after cancellation of unknown request IDs - Cancellation of in-progress requests without server degradation - Rapid burst cancellation tolerance Progress notifications (notifications/progress): - Non-decreasing progress values with consistent totals - Token matching between request _meta and notifications - No spurious notifications when progressToken is absent - Cessation of notifications after request completion Everything-server additions: - test_tool_slow: configurable sleep duration for cancellation testing - test_tool_fast: immediate response for health-check verification - Fixed test_tool_with_progress to not send notifications when no progressToken is provided (was using ?? 0 fallback) Both scenarios are registered in pendingClientScenariosList until the everything-server tools are merged upstream. Tested against everything-server (spec 2025-06-18): cancellation: 4/4 checks passed (24 wire messages validated) progress-notifications: 5/5 checks passed (29 wire messages validated) Closes modelcontextprotocol#433, closes modelcontextprotocol#434
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
notifications/cancelled(unknown request, in-progress request, rapid burst)test_tool_slowandtest_tool_fastto everything-server for cancellation testingtest_tool_with_progressto not send notifications when noprogressTokenis providedBoth scenarios are registered in
pendingClientScenariosListuntil the everything-server tools are merged.Spec coverage
These features were introduced in
2025-06-18and remain in all subsequent versions (2025-11-25,2026-07-28draft). The scenarios usesource.introducedIn: '2025-06-18'so they run at any spec version from that point forward.Test plan
Tested against the everything-server (Streamable HTTP transport):
Wire-schema validation confirmed 53 JSON-RPC messages with 0 violations across both scenarios.
Full unit test suite: 504/504 passed, 43/43 test files.
Spec references
Closes #433, closes #434