From 8c16eadaf29522db0688a97f718776f5c15a7a79 Mon Sep 17 00:00:00 2001 From: viyatb-oai Date: Mon, 4 May 2026 11:41:47 -0700 Subject: [PATCH] test: fix rebased sandbox expectations Co-authored-by: Codex noreply@openai.com --- codex-rs/linux-sandbox/src/bwrap.rs | 4 +++- codex-rs/sandboxing/src/seatbelt_tests.rs | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/codex-rs/linux-sandbox/src/bwrap.rs b/codex-rs/linux-sandbox/src/bwrap.rs index dafe72dd39..5ac09e29dd 100644 --- a/codex-rs/linux-sandbox/src/bwrap.rs +++ b/codex-rs/linux-sandbox/src/bwrap.rs @@ -2245,7 +2245,9 @@ mod tests { access: FileSystemAccessMode::Write, }]); - let args = create_filesystem_args(&policy, temp_dir.path()).expect("filesystem args"); + let args = + create_filesystem_args(&policy, temp_dir.path(), NO_UNREADABLE_GLOB_SCAN_MAX_DEPTH) + .expect("filesystem args"); assert!( args.args diff --git a/codex-rs/sandboxing/src/seatbelt_tests.rs b/codex-rs/sandboxing/src/seatbelt_tests.rs index a8f14fc26a..582963057a 100644 --- a/codex-rs/sandboxing/src/seatbelt_tests.rs +++ b/codex-rs/sandboxing/src/seatbelt_tests.rs @@ -865,7 +865,8 @@ fn create_seatbelt_args_with_read_only_git_and_codex_subpaths() { ); assert!( policy_text.contains("WRITABLE_ROOT_1_EXCLUDED_0") - && policy_text.contains("WRITABLE_ROOT_1_EXCLUDED_1"), + && policy_text.contains("WRITABLE_ROOT_1_EXCLUDED_1") + && policy_text.contains("WRITABLE_ROOT_1_EXCLUDED_2"), "expected explicit writable root .git/.codex carveouts in policy:\n{policy_text}", ); assert!( @@ -927,6 +928,10 @@ fn create_seatbelt_args_with_read_only_git_and_codex_subpaths() { "-DWRITABLE_ROOT_1_EXCLUDED_1={}", dot_codex_canonical.to_string_lossy() ), + format!( + "-DWRITABLE_ROOT_1_EXCLUDED_2={}", + dot_codex_canonical.join("config.toml").display() + ), format!( "-DWRITABLE_ROOT_2={}", empty_root_canonical.to_string_lossy()