-
Notifications
You must be signed in to change notification settings - Fork 645
fix(transport): stop keeping a session and GET stream at 2026-07-28 #1256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
LizunovSergey
wants to merge
6
commits into
modelcontextprotocol:main
Choose a base branch
from
LizunovSergey:fix/1108-sessionless-at-modern-version
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+711
−47
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
06b54aa
fix(transport): stop keeping a session and GET stream at 2026-07-28
LizunovSergey ac58bf5
test(sep-2260): drive enforcement from a stream that survives the fix
LizunovSergey 7566a73
fix(transport): drop the session before the recovery handshake completes
LizunovSergey d36ce25
test(sep-2567): pin the replacement handshake and its teardown
LizunovSergey ce40fb8
fix(transport): gate the session id on a per-request protocol version
LizunovSergey 04fd607
test(sep-2567): cover the fallback handshake and a per-request version
LizunovSergey File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Starting the client in
ClientLifecycleMode::Autowith the existing recorder takes the fallback path and fails once this line is removed. Would you parameterize the startup tests by lifecycle mode, or add a dedicated pair of fallback tests?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a dedicated pair, and parameterized the helper to get them:
start_clientnow takes the lifecycle mode, the two assertion bodies moved intoassert_session_dropped/assert_session_kept, and the four startup tests are named per shape so a failure says which path broke.fallback_handshake_at_a_modern_version_drops_the_session_tooandfallback_handshake_at_a_legacy_version_keeps_its_sessiongo throughAuto; the scripted server already 404sserver/discover, so startup falls through to the in-loopinitialize— a different gate from the startup one, adopted at a different place in the worker.They pin that gate rather than doubling up on the one already covered: removing only the fallback gate fails exactly
fallback_handshake_at_a_modern_version_drops_the_session_toowhilemodern_version_drops_the_session_and_opens_no_streamstill passes (it fails on the GET stream —left: [("GET", "-", Some("session-the-server-should-not-have-issued"))]).One small harness change came with it:
session_headers_after_handshakenow also skipsserver/discover, since that probe precedes the handshake and carries no id either way, so it is not evidence in either direction.In 04fd607.