Repository navigation
fix(streamable-http): reduce stateless termination log noise - #2357
BlocksecPHD wants to merge 3 commits into
Conversation
|
@claude review |
|
The change is focused and correct. A few observations: Code change: The conditional log level is the right approach — Test: Well-structured and mirrors the existing One minor nit: the For context: #1696 / #1697 is a docs PR covering stateless mode semantics more broadly — this fix and that documentation would complement each other well for users trying to understand what stateless mode does and doesn't do. |
|
Thanks for the PR, and sorry it sat here without a proper review. We're closing most of the open PR backlog. v2 is out and changed a lot of the SDK, so many older PRs no longer apply as written, and we're a small team that realistically doesn't have the capacity to work through the rest. If this still matters to you on v2, the most useful thing you can do is open an issue (or comment on the existing one) with your use case and a repro. Hearing why it matters to you is what we use to decide what to prioritise. |
Summary
This PR adjusts termination logging in
StreamableHTTPServerTransportfor stateless mode.INFOlog for stateful session termination (session id exists)DEBUGlog for stateless transport cleanup (mcp_session_id is None)This addresses confusion reported in #2329 where users interpret
Terminating session: Noneas an error condition.Changes
src/mcp/server/streamable_http.pyterminate()tests/server/test_streamable_http_manager.pyTerminating session: Nonemessage is not emittedValidation
Ran targeted tests locally:
python -m pytest tests/server/test_streamable_http_manager.py \ -k 'stateless_requests_memory_cleanup or stateless_termination_logs_debug_not_info'Result:
2 passed