Uh oh!
There was an error while loading. Please reload this page.
Add regression test for issue #1027 - #1069
Merged
bhosmer-ant merged 1 commit intoJul 8, 2025
Merged
Conversation
felixweinberger
changed the base branch from
main
to
fweinberger/stream-cleanup-only-approachJuly 1, 2025 20:29
felixweinbergerforce-pushed
the
fweinberger/issue-1027
branch
from
July 1, 2025 20:30
0e4626a to
c032dbcCompare2 tasks
felixweinberger
marked this pull request as ready for review
July 1, 2025 20:35
felixweinbergerforce-pushed
the
fweinberger/issue-1027
branch
4 times, most recently
from
July 1, 2025 20:48
1224de0 to
3c8eabeComparefelixweinbergerforce-pushed
the
fweinberger/stream-cleanup-only-approach
branch
12 times, most recently
from
July 7, 2025 13:59
7af9e65 to
c9b43bcComparefelixweinbergerforce-pushed
the
fweinberger/issue-1027
branch
from
July 7, 2025 15:03
3c8eabe to
72cfecaComparefelixweinberger
marked this pull request as draft
July 7, 2025 15:03
felixweinbergerforce-pushed
the
fweinberger/issue-1027
branch
from
July 8, 2025 16:39
72cfeca to
526d276Comparefelixweinberger
changed the base branch from
main
to
fweinberger/align-shutdown-with-specJuly 8, 2025 16:39
felixweinbergerforce-pushed
the
fweinberger/issue-1027
branch
5 times, most recently
from
July 8, 2025 19:35
79ebf22 to
34643bdCompareThis test shows that MCP server cleanup code in lifespan doesn't run when the process is terminated, but does run when stdin is closed first (as implemented in PR #1044). The test includes: - Demonstration of current broken behavior (cleanup doesn't run) - Verification that stdin closure allows graceful shutdown - Windows-specific ResourceWarning handling - Detailed documentation of the issue and solution Github-Issue:#1027
felixweinbergerforce-pushed
the
fweinberger/issue-1027
branch
from
July 8, 2025 19:44
34643bd to
26e1e49Comparefelixweinberger
marked this pull request as ready for review
July 8, 2025 19:48
bhosmer-ant
merged commit Jul 8, 2025
96b4059
into
fweinberger/align-shutdown-with-spec
10 checks passed
Uh oh!
There was an error while loading. Please reload this page.
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
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation and Context
Issue #1027 reports that MCP server cleanup code (after yield in lifespan) is unreachable when the process is terminated. This PR adds tests that:
How Has This Been Tested?
Added two tests in
test_1027_win_unreachable_cleanup.py:test_lifespan_cleanup_executed- Shows cleanup doesn't run with current termination (xfails)test_stdin_close_triggers_cleanup- Shows cleanup works when stdin is closed first (passes)Tested on both macOS and Windows.
When run with PR #1091's changes, both tests pass.
Breaking Changes
None. Tests only.
Types of changes
Checklist
Additional context