This commit is contained in:
Roy Han
2026-03-19 21:21:59 -07:00
parent cf70384367
commit cb6ace9d1b
3 changed files with 14 additions and 12 deletions
+6 -3
View File
@@ -4638,7 +4638,10 @@ async fn tool_call_metadata_stamps_policy_source_without_review_decision_when_fe
sess.record_call_approval_outcome(
"call-policy-runtime-1".to_string(),
ApprovalOutcomeMetadata::policy(),
ApprovalOutcomeMetadata {
review_decision: None,
approval_source: codex_protocol::models::ApprovalSourceMetadata::Policy,
},
)
.await;
sess.record_response_item_and_emit_turn_item(
@@ -5070,8 +5073,8 @@ async fn prepend_pending_input_keeps_older_tail_ahead_of_newer_input() {
.map(|(input, metadata)| crate::state::PendingInputItem { input, metadata })
.collect(),
)
.await
.expect("requeue later pending input at the front of the queue");
.await
.expect("requeue later pending input at the front of the queue");
assert_eq!(
sess.get_pending_input_with_metadata().await,
-7
View File
@@ -107,13 +107,6 @@ impl ApprovalOutcomeMetadata {
approval_source,
}
}
pub(crate) fn policy() -> Self {
Self {
review_decision: None,
approval_source: ApprovalSourceMetadata::Policy,
}
}
}
impl ActiveTurn {
@@ -535,7 +535,10 @@ impl CoreShellActionProvider {
self.session
.record_call_approval_outcome(
self.call_id.clone(),
ApprovalOutcomeMetadata::policy(),
ApprovalOutcomeMetadata {
review_decision: None,
approval_source: codex_protocol::models::ApprovalSourceMetadata::Policy,
},
)
.await;
EscalationDecision::deny(Some("Execution forbidden by policy".to_string()))
@@ -547,7 +550,10 @@ impl CoreShellActionProvider {
self.session
.record_call_approval_outcome(
self.call_id.clone(),
ApprovalOutcomeMetadata::policy(),
ApprovalOutcomeMetadata {
review_decision: None,
approval_source: codex_protocol::models::ApprovalSourceMetadata::Policy,
},
)
.await;
EscalationDecision::deny(Some("Execution forbidden by policy".to_string()))