Conversation
This branch has not been deployed
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_paper_infoRoot cause
Pi has no
requestTimeoutMsoverride for paper-intelligence, so pi-mcp-adapter uses its MCP client SDK default: 60,000 ms (DEFAULT_REQUEST_TIMEOUT_MSEC). The canonical 2026-09-22 call failed at exactly 60 seconds.The v0.5.0 background-thread fix still imported
paper_intelligence.tools.convertsynchronously merely to derive the output directory; that module imported Torch at import time. It then ran Marker/Torch/embedding work in a thread inside the MCP server process, allowing heavy initialization to keep both the original response and subsequent status requests from being serviced before the client deadline.The local library currently has 107 indexed paper directories. The old RAG loop constructed a new
RAGClient(and therefore a new HuggingFace embedding model) for every directory, so whole-library hybrid search was also unbounded.Verification
python -m pytest tests/ -q --ignore=tests/test_integration.py— 19 passedpython -m pytest -qbefore the final import-path-only refinement — 43 passedpaper_intelligence/processing_worker.py