Repository navigation
feat: add in-process execution mode with --no-mcp - #527
Merged
Merged
Conversation
| # event loop starts can hang the loader (also reached by BM25/Milvus). | ||
| # Keep these optional imports outside the MCP event loop. | ||
| try: | ||
| import scipy.linalg # noqa: F401 |
Comment on lines
+1151
to
+1156
| from chonkie import ( # noqa: F401 | ||
| RecursiveChunker, | ||
| RecursiveRules, | ||
| SentenceChunker, | ||
| TokenChunker, | ||
| ) |
| if os.name == "nt": | ||
| # Load optional native libraries before the Windows stdio event loop. | ||
| try: | ||
| import sentence_transformers # noqa: F401 |
| except ImportError: | ||
| pass | ||
| try: | ||
| import sentencepiece # noqa: F401 |
| if _pending_shutdown is not None: | ||
| pending = _pending_shutdown | ||
| _pending_shutdown = None | ||
| await pending |
| if _pending_shutdown is not None: | ||
| pending = _pending_shutdown | ||
| _pending_shutdown = None | ||
| await pending |
| pending = asyncio.create_task(client.call_tool("wait", {})) | ||
| await asyncio.sleep(0.05) | ||
| assert not pending.done() | ||
| await pending |
| assert not task.done() | ||
| release.set() | ||
| with pytest.raises(asyncio.CancelledError): | ||
| await task |
| finally: | ||
| (chat_pipeline.parent / "waiting.release").touch() | ||
| assert await call == {"ans_ls": ["gate|1"]} | ||
| await closing |
|
|
||
| def _process_is_alive(pid: int) -> bool: | ||
| if sys.platform == "win32": | ||
| import ctypes |
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
Add optional in-process execution for local UltraRAG services through
--no-mcponbuild,run, andshow ui, andno_mcp=Falsein the Python API. Existing YAML, parameters, aliases, and UI workflows are preserved; remote MCP services can still participate in mixed pipelines. MCP remains the default execution mode and is installed through the optionalmcpextra.Registration and I/O metadata are shared by local and MCP adapters. Local execution validates arguments, copies JSON inputs/outputs, preserves prompt messages, isolates service-owned imports, and manages lifespans and cleanup. UI requests have independent input files and parameter overrides; API initialization/shutdown and concurrent calls have explicit lifecycle handling.
Maintenance dependency upgrade
corepipeline,vlmKeep FastMCP below 4 and MCP below 2 to preserve the supported adapter API. Remove the unused MinerU Gradio extra, which imposed a conflicting Starlette upper bound, while retaining both parsing backends. Add a certifi security floor, use uv 0.13.7 in CI/Docker and documented installation, and pin the remote bridge's top-level npm package to
[email protected].Regression work also exposed an existing stdio cleanup gap: exiting a single-server FastMCP context could leave its subprocess alive. The client factory now sets
keep_alive=Falseon a copy of stdio configurations. Nested contexts retain their process until the outer exit, and direct HTTP configurations are unchanged. New tests assert actual PID termination and lifespan completion for one and two servers; the new regression fails before the fix and passes afterward.Current validation (2026-11-07)
uv lock --check, environment dependency consistency, changed-code Ruff checks, andgit diff --checkpass. Linux all-extras frozen installation-plan validation passes locally.The current commit is
226bacb. CI Smoke Checks #269 passes all six jobs for this commit: Python 3.11/3.12 regression and dependency resolution, frontend build, and an actual CPU Docker build with both pipeline modes and an HTTP route check. Python and JavaScript/TypeScript CodeQL checks also pass. All commit checks are complete: eight successes and one skipped Mintlify deployment, with no failures or pending checks.Compatibility and coverage limits
ultrarag[mcp].output/mcp-upgrade-20261107/; credentials and runtime artifacts are not committed.