mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Centralize Guardian policy resolution in config and protocol (#45957)
## What changed - Extend `GuardianModelPolicy` with controls for uncategorized tools, unscored actions, the initial computer-use call allowance, and sandboxed command coverage. - Add `GuardianPolicyLoader` in `codex-config` to translate legacy settings, preserve catalog policy precedence, and enforce reviewer requirements. Apply live model review requirements through `ConfigRequirements::constrain_guardian_policy`. - Use the shared model policy for Guardian scoring and approval, replacing the extension-local policy wrapper while retaining legacy defaults. ## Testing Add configuration tests for catalog precedence, legacy scope fallback, required-model constraints, and legacy computer-use opt-in and feature gating. Adapt existing extension tests to consume the shared policy. GitOrigin-RevId: 6fed1c3a831964ad28ea7de5cb19e74e323c1204
This commit is contained in:
1 parent
6500c1f844
commit
7275afc5c7
14 files changed
+388
-241
No files matched your search
@@ -14,6 +14,7 @@ mod constraint;
|
||||
mod diagnostics;
|
||||
mod filesystem_constraints;
|
||||
mod fingerprint;
|
||||
mod guardian;
|
||||
mod hook_config;
|
||||
mod host_name;
|
||||
mod in_app_browser_requirements;
|
||||
@@ -141,6 +142,7 @@ pub use diagnostics::format_config_error;
|
||||
pub use diagnostics::format_config_error_with_source;
|
||||
pub use diagnostics::io_error_from_config_error;
|
||||
pub use fingerprint::version_for_toml;
|
||||
pub use guardian::GuardianPolicyLoader;
|
||||
pub use hook_config::HookEventsToml;
|
||||
pub use hook_config::HookHandlerConfig;
|
||||
pub use hook_config::HookStateToml;
|
||||
|
||||
Reference in new issue
Block a user