Skip to content

exec tests: launch sandbox cases from permission profiles#20372

Closed
bolinfest wants to merge 1 commit into
pr20370from
pr20372
Closed

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

Conversation

@bolinfest

@bolinfest bolinfest commented Apr 30, 2026

Copy link
Copy Markdown
Collaborator

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
@github-actions

Copy link
Copy Markdown
Contributor

Closing this pull request because it has had no updates for more than 14 days. If you plan to continue working on it, feel free to reopen or open a new PR.

@github-actions github-actions Bot closed this May 15, 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