From c8b71f2c6a6ff53aff38e1d0222e2034210202c8 Mon Sep 17 00:00:00 2001 From: kevin zhao Date: Mon, 1 Dec 2025 19:42:05 -0500 Subject: [PATCH] inlining and cleanup tests --- codex-rs/core/src/exec_policy.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/codex-rs/core/src/exec_policy.rs b/codex-rs/core/src/exec_policy.rs index bdd0e00360..b70aff87a8 100644 --- a/codex-rs/core/src/exec_policy.rs +++ b/codex-rs/core/src/exec_policy.rs @@ -207,7 +207,7 @@ pub(crate) async fn create_approval_requirement_for_command( }, } } - + /// Only return PROMPT_REASON when an execpolicy rule drove the prompt decision fn derive_prompt_reason(evaluation: &Evaluation) -> Option { evaluation.matched_rules.iter().find_map(|rule_match| { @@ -514,8 +514,12 @@ prefix_rule(pattern=["rm"], decision="forbidden") AskForApproval::UnlessTrusted, &SandboxPolicy::DangerFullAccess, SandboxPermissions::UseDefault, +<<<<<<< HEAD ) .await, +======= + ), +>>>>>>> 1d14bc51e (inlining and cleanup tests) ApprovalRequirement::NeedsApproval { reason: None, allow_prefix: Some(vec!["orange".to_string()]) @@ -699,8 +703,12 @@ prefix_rule(pattern=["rm"], decision="forbidden") AskForApproval::UnlessTrusted, &SandboxPolicy::ReadOnly, SandboxPermissions::UseDefault, +<<<<<<< HEAD ) .await, +======= + ), +>>>>>>> 1d14bc51e (inlining and cleanup tests) ApprovalRequirement::Skip { bypass_sandbox: true }