Skip to content

exec-server: preserve empty workspace roots - #31919

Closed
pakrym-oai wants to merge 11 commits into
mainfrom
pakrym/full-ci-explicit-empty-workspace-roots
Closed

exec-server: preserve empty workspace roots#31919
pakrym-oai wants to merge 11 commits into
mainfrom
pakrym/full-ci-explicit-empty-workspace-roots

Conversation

@pakrym-oai

@pakrym-oai pakrym-oai commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Depends on #31892.

Why

Exec-server sandbox contexts carry the concrete roots that define symbolic :workspace_roots authority. Both process and filesystem sandboxing treated an empty root list as if it were missing and rebound it to the sandbox cwd. A caller that intentionally selected no workspace roots could therefore still access cwd files.

What changed

  • Stop substituting sandbox cwd when process or filesystem workspace roots are empty.
  • Keep the existing from_permission_profile_with_cwd convenience behavior by carrying cwd as an explicit workspace root.
  • Add remote exec-server integration coverage proving both fs/readFile and a sandboxed process cannot read a cwd file after workspace roots are explicitly cleared.

Testing

  • just test -p codex-exec-server --test file_system_unix remote_read_file_preserves_empty_workspace_roots
  • just test -p codex-exec-server --test exec_process remote_process_preserves_empty_workspace_roots

@pakrym-oai
pakrym-oai force-pushed the pakrym/full-ci-explicit-empty-workspace-roots branch from 344ff06 to 013e186 Compare July 9, 2026 22:04
@pakrym-oai
pakrym-oai changed the base branch from main to pakrym/full-ci-fs-workspace-roots July 9, 2026 22:04
@pakrym-oai
pakrym-oai marked this pull request as ready for review July 9, 2026 22:06
@pakrym-oai
pakrym-oai requested a review from a team as a code owner July 9, 2026 22:06

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 013e18645e

ℹ️ 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".

Comment thread codex-rs/exec-server/src/process_sandbox.rs
Base automatically changed from pakrym/full-ci-fs-workspace-roots to main July 9, 2026 23:20
@pakrym-oai
pakrym-oai force-pushed the pakrym/full-ci-explicit-empty-workspace-roots branch 2 times, most recently from a412f49 to 38c2321 Compare July 9, 2026 23:37
@pakrym-oai
pakrym-oai changed the base branch from main to pakrym/full-ci-linux-sandbox-helper-visibility July 9, 2026 23:37
@pakrym-oai
pakrym-oai force-pushed the pakrym/full-ci-linux-sandbox-helper-visibility branch from 0322c9c to 4b4cac2 Compare July 10, 2026 00:06
@pakrym-oai
pakrym-oai force-pushed the pakrym/full-ci-explicit-empty-workspace-roots branch from 38c2321 to 0a886b7 Compare July 10, 2026 00:19
@pakrym-oai
pakrym-oai force-pushed the pakrym/full-ci-linux-sandbox-helper-visibility branch from 4b4cac2 to aef7aac Compare July 10, 2026 00:23
@pakrym-oai
pakrym-oai force-pushed the pakrym/full-ci-explicit-empty-workspace-roots branch 4 times, most recently from 5e14525 to de6e0a2 Compare July 10, 2026 01:22
Base automatically changed from pakrym/full-ci-linux-sandbox-helper-visibility to main July 10, 2026 01:28
@pakrym-oai
pakrym-oai force-pushed the pakrym/full-ci-explicit-empty-workspace-roots branch 2 times, most recently from 1233dec to 936ab8b Compare July 10, 2026 02:01
@pakrym-oai
pakrym-oai force-pushed the pakrym/full-ci-explicit-empty-workspace-roots branch from 936ab8b to dd51887 Compare July 10, 2026 02:08
@pakrym-oai pakrym-oai closed this Jul 10, 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