refactor(mcp): judge stale overlays from the same config the digest was resolved from

The stale-overlay loop re-derived each name's config by hand
(`servers` first, else the profile config) right next to `resolved_ids`,
which is keyed off `judged`. Two copies of one precedence rule means an
edit to either lets the static config and the resolved digest compared
in `_same_server_route` come from different sources. Read both from
`judged`.
This commit is contained in:
kshitijk4poor
2026-09-26 19:54:43 +05:30
committed by kshitij
parent 4102718a21
commit e2e504d12b

View File

@@ -517,10 +517,10 @@ def _register_connected_into_current_scope(servers: dict) -> int:
if scope not in scopes:
continue
name = _key_name(key)
if name not in servers and name not in omitted:
if name not in judged:
continue # attached after the config read; the next pass judges it
server = _core._servers.get(key)
config = servers[name] if name in servers else profile_servers.get(name)
config = judged[name]
cross_profile = _key_scope(key) != scope
if (config is None or not mcp_server_enabled(config) or server is None
or getattr(server, "session", None) is None