mirror of
https://github.com/openai/codex.git
synced 2026-11-08 20:40:33 +00:00
Make Guardian v2 parent compaction reuse configurable (#39691)
## What changed - Add `features.guardianv2.reuse_parent_compaction`, defaulting to `true` to preserve existing behavior. - When disabled, omit parent compaction items from Guardian v2 contributor requests. - Cover configuration parsing and disabled-reuse request construction. GitOrigin-RevId: 0cf7c0ac7a2567c9f73a3f9724df6f6a6170e995
This commit is contained in:
@@ -139,6 +139,8 @@ pub struct GuardianV2ConfigToml {
|
||||
#[schemars(range(min = 100, max = 100000))]
|
||||
pub max_classifier_instruction_tokens: Option<usize>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub reuse_parent_compaction: Option<bool>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
#[schemars(range(min = 100, max = 100000))]
|
||||
pub max_parent_compaction_tokens: Option<usize>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
|
||||
@@ -160,6 +160,7 @@ max_tool_call_lag = 2
|
||||
reasoning_effort = "minimal"
|
||||
max_action_tokens = 512
|
||||
max_classifier_instruction_tokens = 256
|
||||
reuse_parent_compaction = false
|
||||
max_parent_compaction_tokens = 384
|
||||
|
||||
[guardianv2.review_scope]
|
||||
@@ -187,6 +188,7 @@ max_recent_non_user_entries = 12
|
||||
reasoning_effort: Some(codex_protocol::openai_models::ReasoningEffort::Minimal),
|
||||
max_action_tokens: Some(512),
|
||||
max_classifier_instruction_tokens: Some(256),
|
||||
reuse_parent_compaction: Some(false),
|
||||
max_parent_compaction_tokens: Some(384),
|
||||
review_scope: Some(crate::GuardianV2ReviewScopeConfigToml {
|
||||
sandboxed_exec_commands: Some(true),
|
||||
|
||||
Reference in New Issue
Block a user