protocol types

This commit is contained in:
Roy Han
2026-03-18 18:14:31 -07:00
parent 25a0837184
commit 862e415229

View File

@@ -4426,7 +4426,9 @@ fn review_decision_metadata_mapping_is_stable() {
assert_eq!(
ApprovalOutcomeMetadata::reviewed(
&ReviewDecision::ApprovedExecpolicyAmendment {
command: vec!["echo".to_string(), "hi".to_string()],
proposed_execpolicy_amendment: codex_protocol::approvals::ExecPolicyAmendment::new(
vec!["echo".to_string(), "hi".to_string()],
),
},
codex_protocol::models::ApprovalSourceMetadata::User,
)
@@ -4436,10 +4438,9 @@ fn review_decision_metadata_mapping_is_stable() {
assert_eq!(
ApprovalOutcomeMetadata::reviewed(
&ReviewDecision::NetworkPolicyAmendment {
network_policy_amendment: codex_protocol::protocol::NetworkPolicyRule {
protocol: codex_execpolicy::NetworkRuleProtocol::Https,
host_pattern: "example.com".to_string(),
action: codex_protocol::protocol::NetworkPolicyRuleAction::Allow,
network_policy_amendment: codex_protocol::approvals::NetworkPolicyAmendment {
host: "example.com".to_string(),
action: NetworkPolicyRuleAction::Allow,
},
},
codex_protocol::models::ApprovalSourceMetadata::User,
@@ -4450,10 +4451,9 @@ fn review_decision_metadata_mapping_is_stable() {
assert_eq!(
ApprovalOutcomeMetadata::reviewed(
&ReviewDecision::NetworkPolicyAmendment {
network_policy_amendment: codex_protocol::protocol::NetworkPolicyRule {
protocol: codex_execpolicy::NetworkRuleProtocol::Https,
host_pattern: "example.com".to_string(),
action: codex_protocol::protocol::NetworkPolicyRuleAction::Deny,
network_policy_amendment: codex_protocol::approvals::NetworkPolicyAmendment {
host: "example.com".to_string(),
action: NetworkPolicyRuleAction::Deny,
},
},
codex_protocol::models::ApprovalSourceMetadata::User,