mirror of
https://github.com/openai/codex.git
synced 2026-11-25 23:30:49 +00:00
Add extra policy configuration for Guardian reviews (#47125)
## What changed
- Add `auto_review.extra_policy` and the managed `guardian_extra_policy` requirement to supply policy text alongside the resolved tenant policy. Nonblank managed values take precedence; blank values are ignored.
- Render the additional text through `{{ extra_policy }}` in Guardian reviewer templates and append it to the tenant policy for Guardian v2 classification before truncation.
- Preserve placeholder-like text inside supplied policies literally.
## Testing
Add coverage for configuration precedence, blank values, template substitution, and classifier prompts, plus a scenario verifying that managed tenant and extra policies reach the Guardian reviewer together.
GitOrigin-RevId: 180d8d716c63fe96a92ec5bfbd22db4ddccd4f1f
This commit is contained in:
@@ -977,6 +977,7 @@ interrupt_message = false
|
||||
}),
|
||||
additional_developer_instructions: None,
|
||||
guardian_policy_config: Some("Use the managed guardian policy.".to_string()),
|
||||
guardian_extra_policy: None,
|
||||
feature_requirements: Some(FeatureRequirementsToml {
|
||||
entries: BTreeMap::from([("guardian_approval".to_string(), true)]),
|
||||
}),
|
||||
@@ -1347,6 +1348,7 @@ approval_policy = "never"
|
||||
computer_use: None,
|
||||
windows: None,
|
||||
guardian_policy_config: None,
|
||||
guardian_extra_policy: None,
|
||||
feature_requirements: None,
|
||||
hooks: None,
|
||||
mcp_servers: None,
|
||||
|
||||
Reference in New Issue
Block a user