Skip to content

bump main branch to 0.6.0.dev - #26

Merged
dsp-ant merged 1 commit into
mainfrom
bump-main-branch-to-0.6.0.dev
Nov 7, 2024
Merged

bump main branch to 0.6.0.dev#26
dsp-ant merged 1 commit into
mainfrom
bump-main-branch-to-0.6.0.dev

Conversation

@nick-merrill

Copy link
Copy Markdown
Contributor

following RELEASE.md

@dsp-ant
dsp-ant merged commit 14addfb into main Nov 7, 2024
@dsp-ant
dsp-ant deleted the bump-main-branch-to-0.6.0.dev branch November 7, 2024 14:16
ksteiny pushed a commit to ksteiny/python-sdk that referenced this pull request Dec 5, 2025
MrSampson added a commit to MrSampson/python-sdk that referenced this pull request Aug 19, 2026
…ion (#1)

* fix: return a self-describing 404 for an unknown streamable-http session

StreamableHTTPSessionManager answered a request for a missing or
credential-mismatched session with a bare "Session not found" -- the
same misleading-error problem modelcontextprotocol#19/modelcontextprotocol#26 already fixed for
SseServerTransport's equivalent case (a redeploy or expiry invalidating
every connected client's session_id at once), just not ported to this
transport.

Both call sites now share one message via _session_not_found_response(),
built once so the "unknown session" and "credential mismatch" cases
(which must answer identically -- see the comment) can't drift apart.

Verified: full suite 1140 passed / 0 regressions (95 skipped, 1 xfailed,
2 pre-existing collection errors for the unrelated optional `websockets`
extra, not installed in this environment) plus ruff and pyright clean.

* fix: address review -- comment direction, unvalidated input note, expire coverage

- _session_not_found_response's comment said "callers below" / "check
  above" -- true when this sat inline in sse.py, backwards once hoisted
  to a module-level function above both call sites. Converted to a
  docstring, direction fixed.
- session_id here is the raw, client-supplied mcp-session-id header,
  never validated against SESSION_ID_PATTERN (only IDs the server mints
  are) -- unlike sse.py's session_id.hex, which is already
  UUID-validated. Safe (JSON-escaped, application/json, truncated to
  64 chars matching the file's existing convention) but the docstring
  now says so, rather than leaving it to be re-derived later.
- Test now asserts "expire" is covered, not just "restart" -- the one
  genuinely new clause this message adds over the sse-side wording
  (this transport has a session_idle_timeout; sse doesn't), which was
  the one claim the prior substring checks didn't actually verify.

---------

Co-authored-by: oliver <oliver.sampson@gitterdan.ai>
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.

3 participants