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:
jif authored and copyberry committed 2026-09-16 14:56:47 +00:00
1 parent 6500c1f844
commit 7275afc5c7
14 files changed
+388 -241

No files matched your search

+1
View File
@@ -3595,6 +3595,7 @@ dependencies = [
"anyhow",
"codex-analytics",
"codex-api",
"codex-config",
"codex-core",
"codex-extension-api",
"codex-features",