Use snapshot session sources for MCP projection (#40368)

## What changed

Pass the session source associated with each MCP configuration snapshot into
selected-environment server projection. This keeps Guardian reviewer isolation
decisions aligned with the snapshot being projected instead of rereading the
session's mutable configuration.

GitOrigin-RevId: 61fd891fec13f62cfea9886d13e2f94f6f60922f
This commit is contained in:
jif authored and copyberry committed 2026-08-24 09:14:32 +00:00
1 parent 40b7560169
commit 339751715c
2 files changed
+10 -4

No files matched your search

+7 -1
View File
@@ -137,7 +137,12 @@ impl Session {
)
.await;
let mcp_config = self
.project_selected_environment_mcp_servers(config, &environments, mcp_projection)
.project_selected_environment_mcp_servers(
&session_source,
config,
&environments,
mcp_projection,
)
.await
.config;
let local_process_cwd = environments
@@ -281,6 +286,7 @@ impl Session {
.await;
let mcp_projection = self
.project_selected_environment_mcp_servers(
&desired.session_source,
&desired.config,
&desired.environments,
mcp_projection,