You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up pushed for the remaining CI coverage gate. The failed matrix jobs were passing tests but reporting two uncovered lines (src/mcp/cli/cli.py:126 and tests/server/mcpserver/test_server.py:54), so I added coverage for the invalid log-level fallback and replaced the local no-op callback with a MagicMock assertion that does not create an uncovered function body.
Local validation on the updated branch:
uv run pytest tests/cli/test_utils.py tests/server/mcpserver/test_server.py tests/server/mcpserver/utilities/test_logging.py -q
uv run ruff format --check tests/cli/test_utils.py tests/server/mcpserver/test_server.py tests/server/mcpserver/utilities/test_logging.py
uv run ruff check src/mcp/cli/cli.py src/mcp/server/mcpserver/utilities/logging.py tests/cli/test_utils.py tests/server/mcpserver/test_server.py tests/server/mcpserver/utilities/test_logging.py
uv run pyright src/mcp/cli/cli.py src/mcp/server/mcpserver/utilities/logging.py tests/cli/test_utils.py tests/server/mcpserver/test_server.py tests/server/mcpserver/utilities/test_logging.py
One more narrow follow-up pushed: the next Ubuntu run reached 100% coverage, then strict-no-cover correctly reported that the run() pragma was now stale because the CLI path is covered by the new test. I narrowed the pragma to the exception path only.
Additional local validation:
uv run pytest tests/cli/test_utils.py tests/server/mcpserver/test_server.py tests/server/mcpserver/utilities/test_logging.py -q
uv run ruff format --check src/mcp/cli/cli.py tests/cli/test_utils.py tests/server/mcpserver/test_server.py tests/server/mcpserver/utilities/test_logging.py
uv run ruff check src/mcp/cli/cli.py src/mcp/server/mcpserver/utilities/logging.py tests/cli/test_utils.py tests/server/mcpserver/test_server.py tests/server/mcpserver/utilities/test_logging.py
uv run pyright src/mcp/cli/cli.py src/mcp/server/mcpserver/utilities/logging.py tests/cli/test_utils.py tests/server/mcpserver/test_server.py tests/server/mcpserver/utilities/test_logging.py
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
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.
Fixes #1656.
Summary
MCPServer.__init__mcp runCLI entrypoint instead, where the process is owned by the SDK CLIValidation
uv run ruff format --check src/mcp/cli/cli.py src/mcp/server/mcpserver/server.py tests/cli/test_utils.py tests/server/mcpserver/test_server.pyuv run ruff check src/mcp/cli/cli.py src/mcp/server/mcpserver/server.py tests/cli/test_utils.py tests/server/mcpserver/test_server.pyuv run pyright src/mcp/cli/cli.py tests/cli/test_utils.py tests/server/mcpserver/test_server.pyuv run pytest tests/cli/test_utils.py tests/server/mcpserver/test_server.py -qgit diff --check