Skip to content

fix(aspnetcore): make SEP-2575 status mapping deterministic - #1837

Open
jstar0 wants to merge 1 commit into
modelcontextprotocol:mainfrom
jstar0:fix/1772-deterministic-sep2575-status
Open

fix(aspnetcore): make SEP-2575 status mapping deterministic#1837
jstar0 wants to merge 1 commit into
modelcontextprotocol:mainfrom
jstar0:fix/1772-deterministic-sep2575-status

Conversation

@jstar0

@jstar0 jstar0 commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Closes #1772

For 2026-07-28 requests, Streamable HTTP now keeps response headers uncommitted until the first JSON-RPC message. A delayed handler can therefore return a mapped protocol error without its HTTP status depending on dispatch timing.

Older protocol revisions retain the eager response flush for long-running handlers. The regression coverage exercises a slow missing-capability error on 2026-07-28 and pins the long-running header-flush test to the legacy protocol behavior.

Signed-off-by: King Star <mcxin.y@gmail.com>
@jstar0

jstar0 commented Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

CI note: the only failure on the exact head 4c5ce8f is Windows Release. The .NET 9 ModelContextProtocol.AspNetCore.Tests run reports 30 cascading conformance failures because ConformanceServerFixture.InitializeAsync timed out; its other tests pass. Windows Debug, macOS Debug/Release, Ubuntu Debug/Release, and both CodeQL checks are green. The PR changes transport behavior and targeted tests, not the conformance fixture or its startup path. The same base commit 609499b had a successful Build and Test run (32316397479), so this looks like a runner/startup fluctuation rather than an actionable regression. Please rerun the Windows Release job when convenient; no branch rewrite is needed from the author side.

@halter73 halter73 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks! I like this solution than the one I put together in #1797. Removing the grace period and all its lifecycle code makes the behavior much easier to reason about, and I like that the fast and slow cases have separate regression coverage while legacy clients retain the eager flush. Really nice net reduction in code. Thanks!

@PranavSenthilnathan, would you mind giving this another pair of eyes before we merge?

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.

SEP-2575 HTTP status mapping is timing-sensitive under load

2 participants