mirror of
https://github.com/openai/codex.git
synced 2026-11-22 23:16:05 +00:00
Validate step settings against proposed permissions (#40647)
## Why Model requirements must be evaluated against the permissions that will apply after a settings update. Validating against the current profile can reject a valid model-and-permission update or allow a later permission-only update to invalidate the selected model. ## What changed - Group model, reasoning, service-tier, personality, and approval inputs into `StepSettings`, with a single apply-and-validate path. - Apply permission and environment changes before validating step settings, so auto-review requirements use the proposed effective permissions. - Revalidate existing step settings when permission or environment changes alter their constraints, and commit the update only when the complete candidate is valid. ## Testing Added unit and integration coverage for atomic model/permission updates, permission-only revalidation, environment-derived constraints, and both standalone and turn-start settings operations. GitOrigin-RevId: f50dfbd300484a09acc51ee4607278f300ca1cd9
This commit is contained in:
1 parent
4e883ce36e
commit
1d64085e67
15 files changed
+932
-236
No files matched your search
@@ -6,6 +6,7 @@ use crate::session::SessionIo;
|
||||
use crate::session::SessionSettingsUpdate;
|
||||
use crate::session::new_submission_id;
|
||||
use crate::session::session::Session;
|
||||
use crate::session::step_settings::StepSettingsUpdate;
|
||||
use codex_diagnostics::Gauge;
|
||||
use codex_diagnostics::GaugeGuard;
|
||||
use codex_exec_server::SelectedCapabilityRootsStatus;
|
||||
@@ -567,18 +568,20 @@ impl CodexThread {
|
||||
};
|
||||
|
||||
SessionSettingsUpdate {
|
||||
step_settings: StepSettingsUpdate {
|
||||
collaboration_mode: Some(collaboration_mode),
|
||||
reasoning_summary: summary,
|
||||
service_tier,
|
||||
personality,
|
||||
approval_policy,
|
||||
approvals_reviewer,
|
||||
},
|
||||
environments,
|
||||
profile_workspace_roots,
|
||||
approval_policy,
|
||||
approvals_reviewer,
|
||||
sandbox_policy,
|
||||
permission_profile,
|
||||
active_permission_profile,
|
||||
windows_sandbox_level,
|
||||
collaboration_mode: Some(collaboration_mode),
|
||||
reasoning_summary: summary,
|
||||
service_tier,
|
||||
personality,
|
||||
..Default::default()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user