From 498ca9ee04ddce8911fdc91e28afc600b38649dc Mon Sep 17 00:00:00 2001 From: Chris Bookholt Date: Thu, 2 Jul 2026 22:41:16 -0700 Subject: [PATCH] fix(core): bound interim one-shot dead-code expectation --- codex-rs/core/src/tools/sandboxing.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/codex-rs/core/src/tools/sandboxing.rs b/codex-rs/core/src/tools/sandboxing.rs index 0a22aa2995..27a9d8aaed 100644 --- a/codex-rs/core/src/tools/sandboxing.rs +++ b/codex-rs/core/src/tools/sandboxing.rs @@ -196,6 +196,13 @@ pub(crate) enum ExecApprovalRequirement { /// Approval is required for this invocation, but the decision must not be /// reused from or written to the session approval cache. #[cfg_attr(not(windows), allow(dead_code))] + #[cfg_attr( + all(windows, not(test)), + expect( + dead_code, + reason = "constructed by the later stacked Windows policy layer" + ) + )] NeedsOneShotApproval { reason: Option }, /// Execution forbidden for this tool call. Forbidden { reason: String },