From 230cb2e3e2e1a4fb882fb289617b5d44aa8c067f Mon Sep 17 00:00:00 2001 From: kevin zhao Date: Mon, 10 Nov 2025 18:56:27 -0800 Subject: [PATCH] best -> strictest --- codex-rs/execpolicy2/src/policy.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/codex-rs/execpolicy2/src/policy.rs b/codex-rs/execpolicy2/src/policy.rs index 73764ffbc4..e76f0b0dd1 100644 --- a/codex-rs/execpolicy2/src/policy.rs +++ b/codex-rs/execpolicy2/src/policy.rs @@ -37,18 +37,18 @@ impl Policy { None => return Evaluation::NoMatch, }; let mut matched_rules: Vec = Vec::new(); - let mut best_decision: Option = None; + let mut strictest_decision: Option = None; for rule in rules { if let Some(matched) = rule.matches(cmd) { - let decision = match best_decision { + let decision = match strictest_decision { None => matched.decision, Some(current) => std::cmp::max(matched.decision, current), }; - best_decision = Some(decision); + strictest_decision = Some(decision); matched_rules.push(matched); } } - match best_decision { + match strictest_decision { Some(decision) => Evaluation::Match { decision, matched_rules,