mirror of
https://github.com/openai/codex.git
synced 2026-10-31 19:28:49 +00:00
Support model catalog templates for Guardian policy prompts (#33177)
## What changed - Add an optional `policy_template` field to auto-review model messages. - Build Guardian instructions from the catalog template when present, while preserving the existing precedence for managed and catalog policy content. - Fall back independently to the bundled template and bundled policy, and preserve explicit empty catalog values. ## Testing - Cover missing and empty template deserialization, policy precedence, bundled fallbacks, and Guardian prewarm instructions. GitOrigin-RevId: 93116dadbc9bf40527882844a428caed4159fff6
This commit is contained in:
@@ -528,7 +528,7 @@ async fn guardian_allows_unified_exec_additional_permissions_requests_past_polic
|
||||
#[tokio::test]
|
||||
async fn process_compacted_history_preserves_separate_guardian_developer_message() {
|
||||
let (session, mut turn_context) = make_session_and_context().await;
|
||||
let guardian_policy = crate::guardian::guardian_policy_prompt();
|
||||
let guardian_policy = "guardian policy".to_string();
|
||||
let guardian_source =
|
||||
SessionSource::SubAgent(SubAgentSource::Other(GUARDIAN_REVIEWER_NAME.to_string()));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user