mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
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:
1 parent
40b7560169
commit
339751715c
2 files changed
+10
-4
No files matched your search
@@ -144,14 +144,13 @@ impl Session {
|
||||
/// Adds effective executor-owned configuration from this exact thread snapshot.
|
||||
pub(super) fn project_selected_environment_mcp_servers<'a>(
|
||||
&'a self,
|
||||
session_source: &'a SessionSource,
|
||||
config: &'a Config,
|
||||
environments: &'a TurnEnvironmentSnapshot,
|
||||
mut projection: McpRuntimeProjection,
|
||||
) -> BoxFuture<'a, McpRuntimeProjection> {
|
||||
Box::pin(async move {
|
||||
if crate::guardian::is_guardian_reviewer_source(
|
||||
&self.state.lock().await.session_configuration.session_source,
|
||||
) {
|
||||
if crate::guardian::is_guardian_reviewer_source(session_source) {
|
||||
return projection;
|
||||
}
|
||||
|
||||
@@ -286,6 +285,7 @@ impl Session {
|
||||
) {
|
||||
let mcp_projection = self
|
||||
.project_selected_environment_mcp_servers(
|
||||
&desired.session_source,
|
||||
&desired.config,
|
||||
&desired.environments,
|
||||
mcp_projection,
|
||||
|
||||
Reference in new issue
Block a user