Skip to content

exec-server: use permission profiles in file system handler tests#20367

Open
bolinfest wants to merge 1 commit intopr20365from
pr20367
Open

exec-server: use permission profiles in file system handler tests#20367
bolinfest wants to merge 1 commit intopr20365from
pr20367

Conversation

@bolinfest
Copy link
Copy Markdown
Collaborator

@bolinfest bolinfest commented Apr 30, 2026

Why

exec-server already has FileSystemSandboxContext::from_permission_profile_with_cwd(...), and the file-system handler test was only using SandboxPolicy to describe the two no-platform-sandbox cases. Keeping that test on the legacy enum adds noise to the remaining migration audit without exercising any legacy-specific behavior.

What Changed

  • Replaced SandboxPolicy::DangerFullAccess with PermissionProfile::Disabled in the no-platform-sandbox handler test.
  • Replaced SandboxPolicy::ExternalSandbox with PermissionProfile::External for the external enforcement case.
  • Built the test sandbox context through FileSystemSandboxContext::from_permission_profile_with_cwd(...), which is the canonical path for the new permissions model.
  • Removed the SandboxPolicy import from exec-server/src/server/file_system_handler.rs.

Verification

cargo test -p codex-exec-server no_platform_sandbox_policies_do_not_require_configured_sandbox_helper

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