Skip to content

fix(tasks): validate cancelled terminal status - #487

Open
1fanwang wants to merge 1 commit into
modelcontextprotocol:mainfrom
1fanwang:1fannnw/fix-tasks-lifecycle-cancelled-status
Open

fix(tasks): validate cancelled terminal status#487
1fanwang wants to merge 1 commit into
modelcontextprotocol:mainfrom
1fanwang:1fannnw/fix-tasks-lifecycle-cancelled-status

Conversation

@1fanwang

@1fanwang 1fanwang commented Sep 3, 2026

Copy link
Copy Markdown

The tasks-lifecycle scenario could pass when its deterministic cancellable fixture settled to completed. The scenario waited for the terminal response but treated the observed status as diagnostic data.

This emits the existing sep-2663-tasks-get-status-cancelled check and fails it unless slow_compute settles to cancelled. The cancellation acknowledgement remains a separate check.

Closes #485

Testing

The focused test was run on 74edef34d674f563537be8c6587cebaa58e830ca with only the regression applied, then rerun with the implementation.

npm test -- --run src/scenarios/server/tasks/lifecycle.test.ts
npm run check
npm run build
npm test
Raw results
# Current main with regression only
AssertionError: expected undefined to match object
Test Files  1 failed (1)
Tests       1 failed | 1 passed (2)
exit_code=1

# With the implementation
Test Files  1 passed (1)
Tests       2 passed (2)
exit_code=0

# Full suite
Test Files  44 passed (44)
Tests       525 passed (525)
exit_code=0

# Typecheck, lint, and format
All matched files use Prettier code style!
exit_code=0

# Build
Build complete
exit_code=0

A live SDK run is not available because the TypeScript and Python SDKs do not implement SEP-2663:

AI assistance disclosure: GitHub Copilot CLI was used for repository research, implementation, test generation, ownership checks, and verification. I reviewed and understand the final diff, reproduced the failure before the fix, and verified the corrected behavior locally.

Signed-off-by: 1fanwang <1fannnw@gmail.com>
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.

tasks-lifecycle accepts completed status from its cancellable fixture

1 participant