Title: Widen the stdio round-trip test's termination grace and overall timeout by maxisbey · Pull Request #2880 · modelcontextprotocol/python-sdk · GitHub
Open Graph Title: Widen the stdio round-trip test's termination grace and overall timeout by maxisbey · Pull Request #2880 · modelcontextprotocol/python-sdk
X Title: Widen the stdio round-trip test's termination grace and overall timeout by maxisbey · Pull Request #2880 · modelcontextprotocol/python-sdk
Description: Widens the stdio round-trip test's termination grace (10s → 20s) and its outer fail_after (20s → 30s) so a badly starved CI runner can't kill the child server before it writes the clean-exit line. Motivation and Context test_tool_call_and_notification_round_trip_over_a_stdio_subprocess patches PROCESS_TERMINATION_TIMEOUT so the spawned server has time, after stdin closes, to unwind, save its subprocess coverage data, and print stdio-echo: clean exit (the ordering #2840 established so a kill can't silently lose the coverage data). On one heavily contended run (3.13, lowest-direct, windows-latest, 2026-06-15) the runner stalled the child past the 10s grace; it was killed before printing and the test failed with an empty stderr capture. Measurements on a loaded windows-latest runner with the same configuration (Python 3.13, lowest-direct, subprocess coverage, background pytest + CPU load) put the post-stdin-close tail at ~0.2s median / ~0.4s max — dominated by the coverage save — so the failure needed an extreme machine-level stall rather than anything systematic. Doubling the grace keeps that class of runner pathology from failing the leg, and costs nothing on healthy runs because the wait returns as soon as the child exits. A genuinely hung child still fails, just after 20s instead of 10s. How Has This Been Tested? The test file passes locally; ruff, pyright, and the targeted coverage check (100%, strict-no-cover clean) all pass. The previous values' failure mode and the new margins are based on the CI log of the failing job and on timing runs on a windows-latest runner mirroring that leg. Breaking Changes None — test-only change; the production PROCESS_TERMINATION_TIMEOUT default (2.0s) is untouched. Types of changes Bug fix (non-breaking change which fixes an issue) New feature (non-breaking change which adds functionality) Breaking change (fix or feature that would cause existing functionality to change) Documentation update Checklist I have read the MCP Documentation My code follows the repository's style guidelines New and existing tests pass locally I have added appropriate error handling I have added or updated documentation as needed Additional context Since #2773 and #2840 this is the only stdio test failure observed in CI (once across all runs and matrix legs since June 12), so this is a belt-and-braces margin bump rather than a fix for an active problem. AI Disclaimer
Open Graph Description: Widens the stdio round-trip test's termination grace (10s → 20s) and its outer fail_after (20s → 30s) so a badly starved CI runner can't kill the child server before it writes the clean-exi...
X Description: Widens the stdio round-trip test's termination grace (10s → 20s) and its outer fail_after (20s → 30s) so a badly starved CI runner can't kill the child server before it writes the c...
Opengraph URL: https://github.com/modelcontextprotocol/python-sdk/pull/2880
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:82abdadf-ba21-90ea-0829-9f15a2319502 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 8E9E:2BAB8C:21C8E74:2D62A68:6A59A4AC |
| html-safe-nonce | 18be77d5bcf1bf43c2297ca6220534e2b23c602665e46a9100ccd128c04cc333 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RTlFOjJCQUI4QzoyMUM4RTc0OjJENjJBNjg6NkE1OUE0QUMiLCJ2aXNpdG9yX2lkIjoiNjE2MjMzNTI5OTMzMTQ1MjYwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 7006c71b9c1747267ab8214b73342916af5341ac59485d10b19f1914ec7b496c |
| hovercard-subject-tag | pull_request:3869544220 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/modelcontextprotocol/python-sdk/pull/2880/files |
| twitter:image | https://avatars.githubusercontent.com/u/224885523?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/224885523?s=400&v=4 |
| og:image:alt | Widens the stdio round-trip test's termination grace (10s → 20s) and its outer fail_after (20s → 30s) so a badly starved CI runner can't kill the child server before it writes the clean-exi... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | a540949572872b935b393b36db38922db390ae71c859537d741b8f3eb7e545b5 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/modelcontextprotocol/python-sdk git https://github.com/modelcontextprotocol/python-sdk.git |
| octolytics-dimension-user_id | 182288589 |
| octolytics-dimension-user_login | modelcontextprotocol |
| octolytics-dimension-repository_id | 862584018 |
| octolytics-dimension-repository_nwo | modelcontextprotocol/python-sdk |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 862584018 |
| octolytics-dimension-repository_network_root_nwo | modelcontextprotocol/python-sdk |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 0b971869dd75eec26500a9de7e85b8137c6bf0f6 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width