Repository navigation
fix(mcp): expect the server-named crash error in the installer MCP harness - #5405
Conversation
…rness The custom-agent MCP harness failed on main on Windows and Ubuntu: amd#5346 made a crashed stdio server's error name the server and its program ("MCP server 'dummy (python)' process died (exit code: 17)"), and the harness still expected the old unnamed text. The message got better, so the expectation is updated rather than the product. The harness now also checks that the error shows the program by file name only, without its directory or arguments, and accepts both wrappers a crash can arrive in: a slow interpreter outlives the 0.1 s startup check and dies during initialize instead, which made the test fail locally.
|
Verdict: Approve This test-only fix brings the installer's MCP harness back in line with the clearer crash message added in #5346. That message now names the server and the program it ran. The new expectation matches what the product code actually produces, and the test gained a useful extra guarantee: the error never leaks the interpreter's directory or its launch arguments. Nothing blocks merge. Real-world evidenceN/A: this PR only changes a test, so no evidence bundle was produced. The verdict rests on static review. I checked the expected strings against the MCP client and stdio transport source. The pytest run couldn't execute on this runner (pytest isn't installed in its Python), so the Build Installers checks on Windows and Ubuntu are the proof to wait for. 🔍 Technical detailsIssues found: none blocking. Verification
Strengths
|
Build Installers has been red on main since #5346. Its custom-agent MCP harness fails on both Windows and Ubuntu. That PR made a crashed MCP server's error name the server and the program it ran, but the harness still expected the old message, which didn't name either. The new message is easier to diagnose, so this updates the test instead of reverting the product change. The test now also checks that the error shows only the program's file name, not its directory or launch arguments.
🔍 Technical details
os.path.basename(sys.executable)(python/python.exe), so it holds on every runner.initializeinstead, so the same diagnostic arrives asError during initialization: …rather thanTransport error for 'dummy': …. That race predates fix(mcp): stop a hung MCP stdio server from freezing the turn #5346 (CI wins it, a slower dev box doesn't). The test accepts either wrapper and still pins the diagnostic exactly.Test plan
python -m pytest tests/installer/test_custom_agent_mcp_harness.pypasses locally (Windows)python util/lint.py --black --isort