Skip to content

windows-sandbox: pass workspace roots to runner#24108

Open
bolinfest wants to merge 1 commit into
pr23813from
pr24108
Open

windows-sandbox: pass workspace roots to runner#24108
bolinfest wants to merge 1 commit into
pr23813from
pr24108

Conversation

@bolinfest
Copy link
Copy Markdown
Collaborator

@bolinfest bolinfest commented May 22, 2026

Why

#23813 switches the Windows sandbox runner path to PermissionProfile, but it still left one runtime anchor for resolving symbolic :workspace_roots entries. That is not enough once a turn has multiple effective workspace roots: exact entries and deny globs under :workspace_roots need to be materialized for every runtime root before the command runner chooses token mode or builds ACL plans.

What Changed

  • Replaces the Windows runner/setup permission_profile_cwd plumbing with workspace_roots: Vec<AbsolutePathBuf>.
  • Resolves Windows-local PermissionProfile data with materialize_project_roots_with_workspace_roots(...) instead of the single-cwd helper.
  • Threads Config::effective_workspace_roots() through core execution, unified exec, TUI setup/read-grant flows, app-server setup, and debug sandbox on Windows.
  • Updates elevated runner IPC SpawnRequest to send workspace_roots and bumps the framed IPC protocol version to 3 for the payload shape change.
  • Adds Windows-local resolver coverage for expanding exact and glob :workspace_roots entries across multiple roots.

Verification

  • cargo check -p codex-windows-sandbox -p codex-core -p codex-tui -p codex-cli -p codex-app-server
  • cargo test -p codex-windows-sandbox
  • cargo test -p codex-core windows_sandbox
  • cargo test -p codex-app-server windows_sandbox
  • cargo test -p codex-tui windows_sandbox
  • cargo test -p codex-cli debug_sandbox
  • just fix -p codex-windows-sandbox -p codex-core -p codex-tui -p codex-cli -p codex-app-server
  • just fix -p codex-windows-sandbox

A local macOS cross-check with cargo check --target x86_64-pc-windows-msvc ... did not reach crate Rust code because native dependencies require Windows SDK headers (windows.h / assert.h) in this environment; Windows CI remains the real target validation.


Stack created with Sapling. Best reviewed with ReviewStack.

@bolinfest bolinfest requested a review from a team as a code owner May 22, 2026 17:40
@bolinfest bolinfest changed the base branch from main to pr23813 May 22, 2026 17:40
@chatgpt-codex-connector
Copy link
Copy Markdown
Contributor

💡 Codex Review

command_cwd.as_path(),
command_cwd.as_path(),

P1 Badge Pass workspace-roots slice to setup refresh helper

run_setup_refresh now takes workspace_roots: &[AbsolutePathBuf], but this test still passes command_cwd.as_path() as the second argument. On Windows test builds, that is a type mismatch and prevents codex-windows-sandbox tests from compiling at all, so CI for this crate will fail before running any tests. The same argument mismatch appears again in the run_setup_refresh_with_extra_read_roots call immediately below.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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