feat(tasks): align scenarios with the Final-merged SEP-2663 spec#2
Merged
panyam merged 1 commit intoMay 18, 2026
Merged
Conversation
SEP-2663 merged Final on 2026-05-15. Four normative wire changes baked in at merge time. This commit updates the tasks server-conformance scenarios so the suite validates each one as a MUST rather than tolerating divergence as INFO/MAY. 1. notifications/tasks/status renamed to notifications/tasks. The status-notifications scenario now FAILs on observing the legacy method on the v2 surface, and validates the new name's payload shape when emitted. 2. notifications/progress and notifications/message MUST NOT be sent for tasks. Two new absence-asserts on the status-notifications scenario, reusing the existing SSE-observation harness. 3. requestState removed from the tasks-v2 wire. The previous request-state scenario tested the deleted "Request State Management" section; replaced with absence-asserts on CreateTaskResult, DetailedTask, and notifications/tasks payloads. SEP-2322's InputRequiredResult on the MRTR surface still carries requestState and is unchanged. 4. -32003 (Missing Required Client Capability) for required-task tools when the client did not negotiate the extension. New scenario TasksRequiredTaskErrorScenario initializes without declaring the extension, calls a TaskSupport=required tool, and asserts the rejection code plus the structured requiredCapabilities payload. Documents `failing_job` as a fixture requirement. Verified locally against panyam/mcpkit examples/tasks-v2: 8/9 scenarios pass; the request-state-removal scenario intentionally FAILs against the current mcpkit main because the implementation still emits requestState on DetailedTask. That gap is the next item on the mcpkit catch-up plan.
934532f to
28c0ff1
Compare
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.
What changes
SEP-2663 merged Final on 2026-05-15. Four normative wire changes baked in at merge time were not yet covered by the tasks scenarios in this branch (
feat/tasks-mrtr-extension, the source ofmodelcontextprotocol/conformancePR 262). This PR adds FAIL-on-divergence assertions for each, so the suite validates the merged spec rather than tolerating divergence as INFO/MAY.The four spec changes:
notifications/tasks/status→notifications/tasks.notifications/progressandnotifications/messageMUST NOT be sent for tasks.requestStateremoved from the tasks-v2 wire. SEP-2322'sInputRequiredResulton the MRTR surface still carries it and is unchanged.-32003(Missing Required Client Capability) for tools whose task support isrequiredwhen the client did not negotiate the extension.Reviewer's guide
Read in this order:
notifications/progressandnotifications/messageon task streams; the existing shape check on the new method's payloads; and an absence-assert forrequestStateon notification payloads (reuses the SSE-observation buffer so the harness isn't duplicated inrequest-state.ts).CreateTaskResultand thetasks/getDetailedTaskresponse. Scenario class renamedTasksRequestStateScenario→TasksRequestStateRemovalScenario.TasksRequiredTaskErrorScenarioinitializes a client without declaring the tasks extension, calls a TaskSupport=required tool, and asserts the rejection code is-32003plus the structuredrequiredCapabilities.extensions[...]shape. Documentsfailing_jobas a fixture requirement.Skim or skip: nothing — every file is load-bearing for the alignment.
Decision log
requestStateabsence-assert on notification payloads. Duplicating the raw fetch + SSE parsing inrequest-state.tswould have made future SSE-harness changes a 2-file edit; the absence-assert is a few lines once the buffer exists.failing_jobas fixture name, matchingpanyam/mcpkit'sexamples/tasks-v2. Other implementations adopting the suite need to expose a tool registered with task supportrequired; the name is documented in the scenario file's JSDoc fixture block.Risk
feat/tasks-mrtr-extension(the source ofmodelcontextprotocol/conformancePR 262). Merging here updates PR 262's diff to include these scenarios.panyam/mcpkitmain. Specifically:panyam/mcpkitstill emitsrequestStateon thetasks/getDetailedTaskresponse. The next mcpkit catch-up PR (requestStateremoval from the v2 wire) closes that gap.Verification
Ran locally against
panyam/mcpkit'sexamples/tasks-v2fixture (post-rename and post-progress-filter catch-up) viamake testconf-tasks-v2: 8 of 9 scenarios pass; onlytasks-request-state-removalfails, and only on thetasks-get-detailed-no-request-statecheck (mcpkit still emits the field onDetailedTask). The notification absence-asserts pass (mcpkit already filters progress/message on tasks); the rename check passes (mcpkit already emits the new method name); the-32003checks pass (mcpkit already returns the structured error).Out of scope
panyam/mcpkitrequestState-removal PR — a follow-up on mcpkit, which will close the deliberate failing window opened by this PR.modelcontextprotocol/conformancePR 262 — once this stack merges intofeat/tasks-mrtr-extension, a comment on PR 262 noting the Final-merged alignment is the natural next step.Test plan
npm run lint:fix && git diff --exit-code+vitest runover 118 tests) greenmake testconf-tasks-v2(mcpkit side) shows 8 of 9 scenarios pass; the failing one is the requestState-removal scenario, by design