fix: make get_minimal_context_tool async via asyncio.to_thread#394
Open
sdeonvacation wants to merge 7 commits intotirth8205:mainfrom
Open
fix: make get_minimal_context_tool async via asyncio.to_thread#394sdeonvacation wants to merge 7 commits intotirth8205:mainfrom
sdeonvacation wants to merge 7 commits intotirth8205:mainfrom
Conversation
Prevents event-loop blocking on large repos by offloading the blocking git-diff + BFS work to a thread. Updates TestLongRunningToolsAreAsync to include get_minimal_context_tool in HEAVY_TOOLS coverage.
…text-async # Conflicts: # code_review_graph/main.py
Revert all parameter reflow, blank line churn, and non-semantic formatting introduced by earlier merge/fix commits. Keep only: - import sort (ruff I001 fix) - async def get_minimal_context_tool - await asyncio.to_thread wrapper + docstring - show_banner=False assertion - get_minimal_context_tool in heavy-tools set
Contributor
Author
|
The failing PR checks fail in upstream as well. |
…x tool-filter compat" This reverts commit 5a6bdec.
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
get_minimal_context_toolto a thread viaasyncio.to_thread, preventing event-loop blocking on large reposget_minimal_context_tooltoHEAVY_TOOLScoverage inTestLongRunningToolsAreAsyncMotivation
get_minimal_context_toolwas the last high-traffic tool missing theasyncio.to_threadwrapper already applied to other blocking tools (see #136, #46). Without this fix, large-repo calls block the MCP stdio event loop.Changes
code_review_graph/main.py: wrapget_minimal_context_toolhandler body inasyncio.to_threadtests/test_main.py: includeget_minimal_context_toolinHEAVY_TOOLSlist