mirror of
https://github.com/openai/codex.git
synced 2026-10-31 19:28:49 +00:00
fixes
This commit is contained in:
@@ -135,6 +135,7 @@ async fn auto_compaction_remote_emits_started_and_completed_items() -> Result<()
|
||||
},
|
||||
ResponseItem::Compaction {
|
||||
encrypted_content: "ENCRYPTED_COMPACTION_SUMMARY".to_string(),
|
||||
metadata: None,
|
||||
},
|
||||
];
|
||||
let compact_mock = responses::mount_compact_json_once(
|
||||
|
||||
@@ -330,7 +330,6 @@ use codex_protocol::config_types::ServiceTier;
|
||||
use codex_protocol::config_types::WindowsSandboxLevel;
|
||||
use codex_protocol::models::ContentItem;
|
||||
use codex_protocol::models::DeveloperInstructions;
|
||||
use codex_protocol::models::ReviewDecisionMetadata;
|
||||
use codex_protocol::models::ResponseInputItem;
|
||||
use codex_protocol::models::ResponseItem;
|
||||
use codex_protocol::models::ResponseItemMetadata;
|
||||
@@ -1140,28 +1139,6 @@ fn response_item_metadata_or_default(item: &ResponseItem) -> Option<ResponseItem
|
||||
}
|
||||
}
|
||||
|
||||
fn review_decision_to_metadata(decision: &ReviewDecision) -> ReviewDecisionMetadata {
|
||||
match decision {
|
||||
ReviewDecision::Approved => ReviewDecisionMetadata::Approved,
|
||||
ReviewDecision::ApprovedExecpolicyAmendment { .. } => {
|
||||
ReviewDecisionMetadata::ApprovedWithAmendment
|
||||
}
|
||||
ReviewDecision::ApprovedForSession => ReviewDecisionMetadata::ApprovedForSession,
|
||||
ReviewDecision::NetworkPolicyAmendment {
|
||||
network_policy_amendment,
|
||||
} => match network_policy_amendment.action {
|
||||
codex_protocol::protocol::NetworkPolicyRuleAction::Allow => {
|
||||
ReviewDecisionMetadata::ApprovedWithNetworkPolicyAllow
|
||||
}
|
||||
codex_protocol::protocol::NetworkPolicyRuleAction::Deny => {
|
||||
ReviewDecisionMetadata::DeniedWithNetworkPolicyDeny
|
||||
}
|
||||
},
|
||||
ReviewDecision::Denied => ReviewDecisionMetadata::Denied,
|
||||
ReviewDecision::Abort => ReviewDecisionMetadata::Abort,
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default)]
|
||||
struct ToolApprovalMetadataSnapshot {
|
||||
approval_outcomes_by_call_id: HashMap<String, ApprovalOutcomeMetadata>,
|
||||
|
||||
@@ -4486,6 +4486,7 @@ async fn record_response_item_stamps_session_source_on_all_supported_variants()
|
||||
},
|
||||
ResponseItem::CustomToolCallOutput {
|
||||
call_id: "custom-output-1".to_string(),
|
||||
name: None,
|
||||
output: FunctionCallOutputPayload {
|
||||
body: FunctionCallOutputBody::Text("done".to_string()),
|
||||
success: None,
|
||||
@@ -5032,7 +5033,8 @@ async fn steer_input_returns_active_turn_id() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn record_into_history_generates_metadata_uuid_for_metadata_bearing_items_when_item_metadata_enabled() {
|
||||
async fn record_into_history_generates_metadata_uuid_for_metadata_bearing_items_when_item_metadata_enabled()
|
||||
{
|
||||
let (mut sess, tc) = make_session_and_context().await;
|
||||
let _ = sess.features.enable(crate::features::Feature::ItemMetadata);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user