mirror of
https://github.com/openai/codex.git
synced 2026-11-13 14:46:14 +00:00
Apply permission profile updates to future turn environments (#37031)
## What changed - Include the current permission profile in each turn environment's configuration. - Refresh retained environment configurations when session settings change, while preserving the configuration already captured by active turns. - Keep environment connection and shell snapshot resolution reusable across configuration updates. ## Testing - Cover permission profile updates applied through both session settings updates and per-turn updates. - Verify that pending environment resolutions use the configuration captured by their turn and that configuration-only updates do not retry failed environments. GitOrigin-RevId: 923694f0729b87a118d7635ade3a8ca9bcd4e7b1
This commit is contained in:
1 parent
56b82e676c
commit
30d99232f4
15 files changed
+339
-116
No files matched your search
@@ -29,6 +29,7 @@ pub(crate) type ShellSnapshotTask = Shared<BoxFuture<'static, Option<Arc<ShellSn
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub(crate) struct EnvironmentConfig {
|
||||
pub(crate) allow_login_shell: bool,
|
||||
pub(crate) permission_profile: PermissionProfileSnapshot,
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
@@ -611,10 +612,16 @@ impl Session {
|
||||
});
|
||||
let new_config = notify_config_contributors
|
||||
.then(|| Self::build_effective_session_config(&next));
|
||||
let environment_config = next.environment_config();
|
||||
if updates.environments.is_some() {
|
||||
self.services
|
||||
.turn_environments
|
||||
.update_selections(next.environment_selections());
|
||||
.update_selections(next.environment_selections(), &environment_config);
|
||||
} else if state.session_configuration.environment_config() != environment_config
|
||||
{
|
||||
self.services
|
||||
.turn_environments
|
||||
.update_environment_configs(&environment_config);
|
||||
}
|
||||
if mcp_inputs_changed {
|
||||
self.mark_mcp_runtime_dirty();
|
||||
|
||||
Reference in new issue
Block a user