Conversation
937f1e0 to
1709179
Compare
owenlin0
approved these changes
Feb 12, 2026
codex-rs/core/src/config/mod.rs
Outdated
|
|
||
| /// Application configuration loaded from disk and merged with overrides. | ||
| #[derive(Debug, Clone, PartialEq)] | ||
| pub struct EffectivePermissions { |
Collaborator
There was a problem hiding this comment.
naming nit: should we just call this Permissions? is the Effective part necessary?
viyatb-oai
approved these changes
Feb 12, 2026
5032154 to
d913a7a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
We currently carry multiple permission-related concepts directly on
Configfor shell/unified-exec behavior (approval_policy,sandbox_policy,network,shell_environment_policy,windows_sandbox_mode).Consolidating these into one in-memory struct makes permission handling easier to reason about and sets up the next step: supporting named permission profiles (
[permissions.PROFILE_NAME]) without changing behavior now.This change is mostly mechanical: it updates existing callsites to go through
config.permissions, but it does not yet refactor those callsites to take a singlePermissionsvalue in places where multiple permission fields are still threaded separately.This PR intentionally does not change the on-disk
config.tomlformat yet and keeps compatibility with legacy config keys.What Changed
Permissionsincore/src/config/mod.rs.Config::permissionsand moved effective runtime permission fields under it:approval_policysandbox_policynetworkshell_environment_policywindows_sandbox_modepermissions.config.permissions.*.EffectivePermissions/effective_permissionstoPermissions/permissionsand aligned variable naming accordingly.Verification
just fix -p codex-core -p codex-tui -p codex-cli -p codex-app-server -p codex-exec -p codex-utils-sandbox-summarycargo build -p codex-core -p codex-tui -p codex-cli -p codex-app-server -p codex-exec -p codex-utils-sandbox-summary