Skip to content

feat: add cancellation and progress notification conformance scenarios - #450

Open
elang2 wants to merge 1 commit into
modelcontextprotocol:mainfrom
elang2:feat/cancellation-progress-scenarios
Open

feat: add cancellation and progress notification conformance scenarios#450
elang2 wants to merge 1 commit into
modelcontextprotocol:mainfrom
elang2:feat/cancellation-progress-scenarios

Conversation

@elang2

@elang2 elang2 commented Aug 9, 2026

Copy link
Copy Markdown

Summary

Adds two new server conformance 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

Also adds test_tool_slow and test_tool_fast to the everything-server for cancellation testing, and fixes test_tool_with_progress to not send notifications when no progressToken is provided.

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 #433, closes #434

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
@elang2

elang2 commented Aug 9, 2026

Copy link
Copy Markdown
Author

@joy7758 if you have time, would love your thoughts on this one too. This is the cancellation/progress work I mentioned in #435.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add conformance scenario: progress notification edge cases Add conformance scenario: notifications/cancelled

1 participant