Skip to content

Activate mrtr-tasks-composition (mrtr-08)#7

Closed
panyam wants to merge 1 commit into
feat/tasks-mrtr-extensionfrom
feat/sep-2663-mrtr-08-composition
Closed

Activate mrtr-tasks-composition (mrtr-08)#7
panyam wants to merge 1 commit into
feat/tasks-mrtr-extensionfrom
feat/sep-2663-mrtr-08-composition

Conversation

@panyam

@panyam panyam commented May 28, 2026

Copy link
Copy Markdown
Owner

What changes

Replaces the long-standing SKIPPED placeholder for SEP-2663 composition with a real end-to-end conformance check (mrtr-tasks-composition, the 8th MRTR scenario). The scenario drives a fixture tool that:

  1. returns InputRequiredResult on round 1 (no inputResponses) to gather user_name via elicitation/create,
  2. on round 2 (with the elicit response echoed back) returns CreateTaskResult — escalating to async,
  3. completes the task in a continuation goroutine; the final tasks/get result reflects the answer gathered during the MRTR phase.

Stacked on PR 6 (feat/raw-session-cleanup-and-mcp-param) so the new check uses the hoisted _shared/raw-session.ts import paths cleanly.

Spec separation kept observable

Per SEP-2663:

  • Round 1 (MRTR) MUST carry inputRequests (+ optional requestState) and MUST NOT carry taskId.
  • Round 2 (CreateTaskResult) MUST carry taskId + status and MUST NOT carry requestState or inputRequests — the merged SEP-2663 removed requestState from the v2 wire shape, so the MRTR phase's token does not leak into the task envelope and clients do not deduplicate across the two flows.
  • Final task result reflects the MRTR-phase answer end-to-end.

All three are asserted in the new check.

Wire matrix

  • Legacy wire — passes. Tested against panyam/mcpkit feat/sep-2663-mrtr-tasks-composition (the matching mcpkit PR — adds the GoAsync sentinel + test_tool_with_task fixture). 8/8 MRTR scenarios green.
  • Stateless wire — still fails 7/8 (MRTR-over-stateless gap). mcpkit's stateless callToolForStateless doesn't parse inputResponses/requestState or reshape IsInputRequired into wire-shape InputRequiredResult. Tracked at panyam/mcpkit issue 452 (now unblocked since 444 closed). Not introduced by this PR — same gap surfaces today on PR 6 HEAD without this PR.

Reviewer's guide

  • src/scenarios/server/mrtr/ephemeral-flow.ts — only the bottom (check 8) block changed materially; the rest is import additions for TASKS_EXTENSION_ID and waitForTerminal plus plumbing opts?.stateless into the dedicated session the check opens (it needs to declare the tasks extension in _meta.clientCapabilities, distinct from the elicitation/sampling/roots session checks 1-7 use).

Test plan

  • npm run typecheck clean.
  • MCP_WIRE_MODES=legacy make testconf-mrtr (run from the mcpkit repo against the matching fixture) → 8/8.
  • Reviewer: re-run with both wires after the mcpkit stateless MRTR follow-up lands (panyam/mcpkit issue 452).

Base automatically changed from feat/raw-session-cleanup-and-mcp-param to feat/tasks-mrtr-extension May 28, 2026 23:26
Replaces the long-standing SKIPPED placeholder for the SEP-2663
composition flow with a real end-to-end check. The scenario drives a
fixture tool that:

  1. returns InputRequiredResult on round 1 (no inputResponses) to
     gather user_name via elicitation/create;
  2. on round 2 (with the elicit response echoed back) returns
     CreateTaskResult, escalating to async;
  3. completes the task in a continuation; the final result reflects the
     answer gathered during the MRTR phase.

Spec-separation assertions kept observable per SEP-2663:
- round 1 (MRTR) MUST NOT carry taskId;
- round 2 (CreateTaskResult) MUST NOT carry requestState or
  inputRequests (those belong on DetailedTask returned by tasks/get) —
  the MRTR phase's requestState does not leak into the task envelope,
  so clients do not deduplicate across the two flows;
- final tasks/get result reflects the MRTR-phase answer end-to-end.

The fixture used is panyam/mcpkit examples/mrtr — see test_tool_with_task
(TaskSupport=required). Tracking issue panyam/mcpkit 347 locked in the
Option-2 design (GoAsync sentinel) that makes this composition possible
on a reference server.

Wire matrix: passes on legacy. Stateless wire still surfaces the
MRTR-over-stateless gap (callToolForStateless does not parse
inputResponses / requestState or reshape IsInputRequired) — tracked in
panyam/mcpkit issue 452.
@panyam panyam force-pushed the feat/sep-2663-mrtr-08-composition branch from 0ea286e to ad4f267 Compare May 28, 2026 23:30
Comment on lines +535 to +538
{
id: 'SEP-2663',
url: 'https://github.com/modelcontextprotocol/specification/pull/2663'
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: we should pull this to a shared value as well, since we need it in all the other 2663 tests

panyam added a commit that referenced this pull request May 30, 2026
Folds PR 7 (panyam/mcpconformance) into PR 262:

- Cherry-picks the mrtr-tasks-composition activation from
  feat/sep-2663-mrtr-08-composition (ad4f267 upstream): real end-to-end
  check driving the SEP-2663 commit 451f5e1 promotion flow
  (InputRequiredResult rounds gather user_name via elicitation/create,
  then CreateTaskResult on the final round escalates to async; the
  final tasks/get result reflects the answer gathered during MRTR).

- Addresses LucaButBoring's PR 7 nit: replaces the inline SEP-2663
  reference literal with the shared SEP_2663_REF constant (now also
  pointing at the rendered SEP page).

- Renames the scenario's emitted check ID from `mrtr-tasks-composition`
  to `sep-2663-mrtr-synchronous-before-task-creation` to match the
  corresponding row in sep-2663.yaml — closes the gap between
  declared requirement and implementing check.

- Updates mrtr/README.md: refreshes the Specs-covered table and the
  per-check description table for the new slug, and drops the "Open
  issues" section (both blockers are resolved — discriminator value
  aligned upstream; mcpkit middleware refactored per panyam/mcpkit#347).

- Updates the sep-2663.yaml flow-gate comment block to note that
  the ephemeral mrtr-* flow gates also fall into the untracked
  category for the same reason as the tasks-* flow gates.

One fewer skipped check on PR 262. Verified 123/123 server-suite
tests pass against mcpkit's tasks-v2 + mrtr fixtures (post
panyam/mcpkit#499 + #501).

Closes #7.
@panyam

panyam commented May 30, 2026

Copy link
Copy Markdown
Owner Author

Folded into PR 262 — see commit 62b41cf.

Includes your nit (inline SEP-2663 literal replaced with the shared SEP_2663_REF constant) plus alignment with the new sep-2663.yaml that landed on PR 262:

  • Scenario check ID renamed from mrtr-tasks-composition to sep-2663-mrtr-synchronous-before-task-creation to match the yaml row for the SHOULD requirement on §"Task Creation"
  • mrtr/README.md refreshed (Specs-covered table + per-check description; "Open issues" section dropped — both blockers resolved upstream)
  • sep-2663.yaml flow-gate comment block notes the ephemeral mrtr-* flow gates alongside the existing tasks-* flow gates

Verified 123/123 server-suite tests pass against mcpkit's tasks-v2 + mrtr fixtures (post panyam/mcpkit#499 + #501).

Closing this PR — the work continues as part of PR 262.

@panyam panyam closed this May 30, 2026
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.

2 participants