Skip to content

exec tests: launch sandbox cases from permission profiles#20372

Open
bolinfest wants to merge 1 commit intopr20370from
pr20372
Open

exec tests: launch sandbox cases from permission profiles#20372
bolinfest wants to merge 1 commit intopr20370from
pr20372

Conversation

@bolinfest
Copy link
Copy Markdown
Collaborator

@bolinfest bolinfest commented Apr 30, 2026

Why

The Unix sandbox integration tests were still parameterized by SandboxPolicy and converted each fixture into PermissionProfile immediately before launching the sandboxed command. These tests exercise the runtime sandbox launch paths, not the legacy policy bridge, so they should construct the canonical profile shape directly.

What Changed

  • Changed the Unix sandbox test launcher helpers to accept PermissionProfile directly.
  • Replaced read-only fixtures with PermissionProfile::read_only().
  • Replaced workspace-write fixtures with PermissionProfile::workspace_write_with(...), preserving the existing writable roots, restricted network, and tmpdir exclusion knobs.
  • Removed the SandboxPolicy import from exec/tests/suite/sandbox.rs.

Verification

cargo test -p codex-exec allow_unix_socketpair_recvfrom -- --nocapture

Stack created with Sapling. Best reviewed with ReviewStack.

This was referenced Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant