Skip to content

Resolve permission requests in the executor context - #42146

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/730a2aacd391262e92a6314f3a5b6c262e3dca10
Sep 1, 2026
Merged

Resolve permission requests in the executor context#42146
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/730a2aacd391262e92a6314f3a5b6c262e3dca10

Conversation

@copyberry

@copyberry copyberry Bot commented Sep 1, 2026

Copy link
Copy Markdown

Resolve permission requests in the executor context

Why

request_permissions paths and grants need to be evaluated against the selected executor environment, including its path convention, home directory, workspace roots, and temporary directories.

What changed

  • Resolve relative and home-relative permission paths using the executor context, reject mismatched path conventions and lossy paths, and support legacy read and write path lists.
  • Move grant intersection into core so requested and granted permissions use the originating environment's sandbox context. Preserve deny entries conservatively when a special path cannot be resolved.
  • Keep the full originating environment with pending permission requests so delayed responses are normalized against the same context.

Testing

  • Cover POSIX, Windows, UNC, relative, and home-relative path resolution and invalid path contexts.
  • Verify end-to-end app-server grants are limited to the requested workspace scope and unresolved temporary-directory denies are preserved.

## Why

`request_permissions` paths and grants need to be evaluated against the selected executor environment, including its path convention, home directory, workspace roots, and temporary directories.

## What changed

- Resolve relative and home-relative permission paths using the executor context, reject mismatched path conventions and lossy paths, and support legacy `read` and `write` path lists.
- Move grant intersection into core so requested and granted permissions use the originating environment's sandbox context. Preserve deny entries conservatively when a special path cannot be resolved.
- Keep the full originating environment with pending permission requests so delayed responses are normalized against the same context.

## Testing

- Cover POSIX, Windows, UNC, relative, and home-relative path resolution and invalid path contexts.
- Verify end-to-end app-server grants are limited to the requested workspace scope and unresolved temporary-directory denies are preserved.

GitOrigin-RevId: 730a2aacd391262e92a6314f3a5b6c262e3dca10
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/730a2aacd391262e92a6314f3a5b6c262e3dca10 branch from 6de92e9 to cd8bd62 Compare September 1, 2026 22:08
@copyberry
copyberry Bot merged commit cd8bd62 into main Sep 1, 2026
24 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/730a2aacd391262e92a6314f3a5b6c262e3dca10 branch September 1, 2026 22:09
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant