mirror of
https://github.com/openai/codex.git
synced 2026-11-26 23:40:43 +00:00
Configure Guardian V3 shadow reviews from the root thread (#64187)
## Why Shadow reviews used default routing and retrieval instructions even when the root thread supplied Guardian V3 settings. ## What changed - Replace `features.guardianv3_shadow` with `features.guardianv3.shadow_enabled` to opt into shadow reviews alongside Guardian V2. Project config cannot set the toggle, and feature requirements can override it. - Use the root thread's routing instructions, retrieval instructions, and board size limit for its shadow board. Child reviewers share the root's board and retrieval instructions. - Keep shadow boards in memory and skip shadow reviews when `features.guardianv3.message_board_in_memory` is explicitly false. ## Testing Add coverage for shadow-only opt-in, config precedence, in-memory enrollment, and root routing and retrieval instructions. GitOrigin-RevId: 085089d70a66c535a86d31906ff59a449ffcb61f
This commit is contained in:
@@ -1135,9 +1135,6 @@
|
||||
"guardianv3": {
|
||||
"$ref": "#/definitions/FeatureToml_for_GuardianV3ConfigToml"
|
||||
},
|
||||
"guardianv3_shadow": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"hooks": {
|
||||
"type": "boolean"
|
||||
},
|
||||
@@ -2553,7 +2550,7 @@
|
||||
"type": "integer"
|
||||
},
|
||||
"message_board_in_memory": {
|
||||
"description": "Keep each fresh root's Guardian board in memory until the runtime closes. Defaults to false.",
|
||||
"description": "Defaults to true for shadow boards and false for live boards. False disables shadow reviews.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"reviewer": {
|
||||
@@ -2564,6 +2561,10 @@
|
||||
"format": "uint32",
|
||||
"minimum": 1.0,
|
||||
"type": "integer"
|
||||
},
|
||||
"shadow_enabled": {
|
||||
"description": "Run shadow reviews alongside Guardian V2 without changing approval decisions. Ignored in project config.",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
@@ -8534,9 +8535,6 @@
|
||||
"guardianv3": {
|
||||
"$ref": "#/definitions/FeatureToml_for_GuardianV3ConfigToml"
|
||||
},
|
||||
"guardianv3_shadow": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"hooks": {
|
||||
"type": "boolean"
|
||||
},
|
||||
|
||||
@@ -12648,6 +12648,7 @@ async fn explicit_feature_config_is_normalized_by_requirements() -> std::io::Res
|
||||
[features]
|
||||
view_image = false
|
||||
shell_tool = true
|
||||
guardianv3.shadow_enabled = true
|
||||
"#,
|
||||
)?;
|
||||
|
||||
@@ -12660,6 +12661,7 @@ shell_tool = true
|
||||
[features]
|
||||
view_image = true
|
||||
shell_tool = false
|
||||
"guardianv3.shadow_enabled" = false
|
||||
"#,
|
||||
),
|
||||
)
|
||||
@@ -12668,6 +12670,7 @@ shell_tool = false
|
||||
|
||||
assert!(config.features.enabled(Feature::ViewImage));
|
||||
assert!(!config.features.enabled(Feature::ShellTool));
|
||||
assert!(!config.features.enabled(Feature::GuardianV3Shadow));
|
||||
assert!(
|
||||
!config
|
||||
.startup_warnings
|
||||
|
||||
Reference in New Issue
Block a user