Merged
Conversation
Hotfix for the Windows long-running-MCP-tool hang that v2.2.4 only partially fixed. - #46 / #136 — converted 5 heavy MCP tools to async + asyncio.to_thread so the stdio event loop stays responsive during full builds, postprocessing, embeddings, change detection, and wiki generation. @dev-limucc's v2.2.4 test on #136 showed read-only tools worked but long-running ones still hung. Root cause: FastMCP 2.x dispatches sync handlers inline on the only event-loop thread; a 10-second handler freezes stdin/stdout for 10 seconds. Fix: wrap the work in asyncio.to_thread so the loop keeps pumping. Verified locally on Python 3.11 / macOS: ruff clean, mypy clean, bandit clean, 737 tests (+2 new lock-in tests), coverage 74.63%. Windows verification post-release — will ping @dev-limucc on #136 once 2.3.1 is live on PyPI. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
5 tasks
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
Patch-level release for the Windows long-running-MCP-tool hang. v2.2.4 shipped the event-loop policy fix but Limucc's test on #136 showed that was necessary but not sufficient — read-only tools worked, but
build_or_update_graph_toolandembed_graph_toolstill hung indefinitely. #231 fixed the remaining problem by converting 5 heavy tools toasync def+asyncio.to_thread.What's in this release
build_or_update_graph_tool,run_postprocess_tool,embed_graph_tool,detect_changes_tool,generate_wiki_tool). The other 19 fast-path tools stay sync.That's it. No other changes from v2.3.0.
Test plan
uv run pytest --cov-fail-under=65→ 737 passed, 1 skipped, 2 xpassed, 74.63% coverageasyncio.to_threadAfter merge
Tag, publish to PyPI, comment on #46 and #136 asking Limucc to re-test with
uvx code-review-graph@2.3.1.🤖 Generated with Claude Code