Repository navigation
fix: stop the protocol gate leaking a server per run on Windows - #1314
Merged
Merged
Conversation
The gate fixture booted the server with `uv run mnemo-mcp`. On Windows Popen.terminate() kills only the direct child (uv.exe); the trampoline, the venv launcher and the real interpreter below it kept running, so every gate run left one live server behind. Those orphans held a lock on .venv\Scripts\mnemo-mcp.exe and the next `uv sync` (including the one the pre-commit pytest hook runs) failed with os error 32. Boot with the test interpreter instead (`sys.executable -m mnemo`), the same way tests/live_http.py already does. `python -m mnemo` and a bare `mnemo-mcp` both land in mnemo.server.main, so the gate still exercises the same entry. Re-ran the gate: 16 passed, zero leftover processes (before the fix: one three-process tree per run). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
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 free
to 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.
Summary
tests/test_protocol_gate.pybooted the server withuv run mnemo-mcp. On WindowsPopen.terminate()kills onlyuv.exe; the trampoline, venv launcher and real interpreter below it survived, so every gate run left one live server..venv\Scripts\mnemo-mcp.exe, so the nextuv sync(including the one the pre-commit pytest hook triggers) fails with os error 32 and commits cannot be made.sys.executable -m mnemo, astests/live_http.pyalready does. Both entries land inmnemo.server.main.Test plan
mnemo-mcp.exe -> python.exe -> python.exetree each time (reproduced twice).uv run pytest tests/test_protocol_gate.py-> 16 passed, 0 leftover processes.🤖 Generated with Claude Code