Repository navigation
[release/17.0] Fix MCP doctor timeout on Windows - #22213
Conversation
## Description On Windows, the MCP `doctor` tool can time out while checking Aspire skills. Git inherits the MCP server's standard input pipe and can hang while the server is already reading from that pipe. Git discovery commands now receive a null input handle instead of inheriting MCP's input. Output capture, cancellation, and existing fallback behavior remain unchanged. No new dependencies are required. ### Testing Added one Windows regression test that calls Git through a real stdio MCP server in an isolated child process. - **Regression red/green:** the new test times out without the fix and passes with it. It also passed three additional runs. - **Git tests:** all five tests passed with this command: - **Actual MCP doctor:** before the fix, the skills check hit its 30-second timeout. After the fix, it completed without that timeout. Direct JSON doctor also completed with exit code 0. Fixes #21877 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 22213Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 22213" |
There was a problem hiding this comment.
🟢 Approval recommended
There are no active review issues for the Windows MCP timeout-fix backport.
No open issues 🎉
What changed in this PR
Backports the Windows MCP doctor timeout fix to release/17.0, preventing Git discovery commands from inheriting the MCP server’s standard input pipe.
Changes:
- Gives Git a null standard input handle while preserving output capture and cancellation.
- Adds a Windows regression test that invokes Git through a real stdio MCP server in an isolated child process.
| File | Description |
|---|---|
tests/Aspire.Cli.Tests/Git/GitRepositoryTests.cs |
Adds regression coverage for Git execution while MCP reads standard input. |
src/Aspire.Cli/Git/GitRepository.cs |
Supplies a null input handle to prevent Git from blocking on MCP’s input pipe. |
Review effort: Balanced
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
Tests selector2 / 101 PR test projects · 4 PR jobs, from 2 changed files. Selected PR test projects (2 / 101)
Selected PR jobs (4)
How these were chosen — grouped by what changed📦 affected project 🧪 Job reasons
Selection computed for commit |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
ade8549
into
release/17.0
|
✅ No documentation update needed. excluded → base_branch_is_release, title_release_prefix. This is a backport (base |
Description
Backport of ##21882 to release/17.0
On Windows, the MCP
doctortool can time out while checking Aspire skills. Git inherits the MCP server's standard input pipe and can hang while the server is already reading from that pipe.Git discovery commands now receive a null input handle instead of inheriting MCP's input. Output capture, cancellation, and existing fallback behavior remain unchanged. No new dependencies are required.
Testing
Added one Windows regression test that calls Git through a real stdio MCP server in an isolated child process.