Skip to content

Cancel stateless SSE requests on client close#199

Closed
leehack wants to merge 1 commit into
spec/2026-ignore-session-headerfrom
spec/2026-sse-close-cancels-request
Closed

Cancel stateless SSE requests on client close#199
leehack wants to merge 1 commit into
spec/2026-ignore-session-headerfrom
spec/2026-sse-close-cancels-request

Conversation

@leehack
Copy link
Copy Markdown
Owner

@leehack leehack commented May 31, 2026

Summary

  • Align 2026 stateless Streamable HTTP request-specific SSE response streams with the draft requirement that closing the response stream cancels the in-flight request.
  • Track detached stateless response sockets so client closure is observable and pending request IDs are converted into notifications/cancelled.
  • Keep stateless response streams out of EventStore replay and add regression coverage.

Spec Source

Validation

  • dart format .
  • dart analyze
  • dart test test/server/streamable_https_test.dart --name "2026 stateless HTTP cancels pending request when SSE response closes"
  • dart test test/server/streamable_https_test.dart
  • dart test
  • dart pub global run coverage:test_with_coverage
  • git diff --check

@codecov
Copy link
Copy Markdown

codecov Bot commented May 31, 2026

Codecov Report

❌ Patch coverage is 87.20930% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.69%. Comparing base (596459f) to head (3812440).

Files with missing lines Patch % Lines
lib/src/server/streamable_https.dart 87.20% 11 Missing ⚠️
Additional details and impacted files
@@                         Coverage Diff                         @@
##           spec/2026-ignore-session-header     #199      +/-   ##
===================================================================
- Coverage                            86.70%   86.69%   -0.01%     
===================================================================
  Files                                   46       46              
  Lines                                 8656     8727      +71     
===================================================================
+ Hits                                  7505     7566      +61     
- Misses                                1151     1161      +10     
Flag Coverage Δ
unittests 86.69% <87.20%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@leehack leehack force-pushed the spec/2026-sse-close-cancels-request branch from 131df70 to 3812440 Compare May 31, 2026 20:53
@leehack
Copy link
Copy Markdown
Owner Author

leehack commented Jun 1, 2026

Closing this draft micro PR because the RC spec work has been consolidated into a smaller reviewable stack. This change is preserved in #268 (MCP 2026 transport enforcement); the consolidated tip is tree-identical to the previous micro-stack tip.

@leehack leehack closed this Jun 1, 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.

1 participant