Force single worker when MCP is mounted - #1076
Closed
wayyoungboy wants to merge 1 commit into
Closed
Conversation
wayyoungboy
marked this pull request as ready for review
June 26, 2026 03:55
Collaborator
|
Prefer longer-term stateless MCP mentioned in #1056 after discuss. |
Member
Author
|
Self-review status for the current head: I reviewed the single-worker guard for MCP-mounted server runs. The change matches the current mount condition: when I did not find a blocking issue in this static review. I am not marking this LGTM because this PR is authored from the |
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.
Refs #1056
Note: this PR implements the short-term single-worker guard from #1056. The longer-term stateless MCP session handling needed for true multi-worker support remains tracked there.
Summary:
Validation:
python -m pytest tests/unit/server/test_server_cli.py tests/unit/server/test_main_mcp_optional.py -q(31 passed, 1 warning from an existing dependency deprecation).python -m py_compile src/server/cli/server.py tests/unit/server/test_server_cli.py.git diff --check.powermem-server --host <loopback host> --port <local test port> --workers 2 --no-open-browser; startup printed the MCP single-worker guard and forcedworkers=1before server initialization. The process was stopped after the guard was observed.