mirror of
https://github.com/openai/codex.git
synced 2026-11-13 14:46:14 +00:00
Include auto-review state in turn metadata (#38046)
## What changed - Add `auto_review_enabled` to serialized turn metadata for regular and review turns. - Derive the value from approval-policy routing and reserve the metadata key so client-provided metadata cannot override it. ## Testing - Cover enabled metadata, reserved-key handling, Guardian review requests, and updated compaction request snapshots. GitOrigin-RevId: 52773e2bf7d4be251f8466332de9f9c9869dd084
This commit is contained in:
1 parent
99915080b6
commit
f2a6f2585c
8 files changed
+47
-2
No files matched your search
@@ -571,6 +571,10 @@ impl Session {
|
||||
&model_info,
|
||||
);
|
||||
let permission_profile = per_turn_config.permissions.effective_permission_profile();
|
||||
let auto_review_enabled = crate::guardian::routes_approval_policy_to_guardian(
|
||||
per_turn_config.permissions.approval_policy.value(),
|
||||
per_turn_config.approvals_reviewer,
|
||||
);
|
||||
let per_turn_config = Arc::new(per_turn_config);
|
||||
let turn_metadata_state = Arc::new(TurnMetadataState::new(
|
||||
session_id.to_string(),
|
||||
@@ -584,6 +588,7 @@ impl Session {
|
||||
&permission_profile,
|
||||
session_configuration.windows_sandbox_level,
|
||||
network.is_some(),
|
||||
auto_review_enabled,
|
||||
));
|
||||
turn_metadata_state
|
||||
.set_responses_api_metadata(per_turn_config.responses_api_metadata.clone());
|
||||
|
||||
Reference in new issue
Block a user