fix(mcp): isolate runtime ownership by profile - #80746
Open
franksong2702 wants to merge 3 commits into
Open
Conversation
franksong2702
force-pushed
the
franksong2702/mcp-profile-ownership-metadata
branch
from
August 7, 2026 10:50
d0d0afc to
98b4e34
Compare
franksong2702
force-pushed
the
franksong2702/mcp-profile-ownership-metadata
branch
from
August 8, 2026 01:27
98b4e34 to
7ecac2e
Compare
Author
|
Rebased this PR onto current Post-rebase review found one remaining ownership leak introduced by the newer trust-tier gate: trust/read-only metadata was still keyed only by raw server name, so two profiles using the same MCP server name could overwrite each other's approval policy. The new head keys that metadata with the same Regression proof:
The PR diff remains limited to the original six MCP runtime/registry test and implementation files. |
19 tasks
This was referenced Aug 15, 2026
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.
What does this PR do?
Hermes' MCP runtime and central tool registry were process-global by server/tool name. In a multiplex process, two profiles configuring the same MCP server name could overwrite or observe each other's status, schema, handler, lazy state, and reconnect bookkeeping.
This PR makes canonical
(profile_home, server_name)the runtime owner and scopes MCP registry entries by canonical profile home.Changes made
(profile_home, server_name).This is the Agent-side contract consumed by Hermes WebUI #6114 at WebUI head
c93c50874f57d5f13fa93ff34494d2dfe4021338.Related issue
Type of change
Verification
Fail-before: the new profile-scoped registry regressions initially reported 4 failures because the API did not accept an owner dimension and an unscoped lookup could select another profile's entry.
Head verification:
Cross-repository consumer verification:
HERMES_WEBUI_AGENT_DIR=/path/to/this/worktree ./scripts/test.sh tests/test_issue5619_profile_config_isolation.py tests/test_issue697_mcp_tool_inventory.py # 47 passedThe repository-wide test command was also attempted locally. Its non-green nodes are outside the changed MCP/registry files and include missing optional
acp/anthropicSDKs; no green full-suite claim is made.Scope
No config keys, dependencies, visual surfaces, deployment behavior, or WebUI code are changed here. Built-in and plugin tool behavior remains global.