Commit Graph

12583 Commits

Author SHA1 Message Date
Michael Bolin
a4e703b89b merge commit for archive created by Sapling 2026-04-22 15:31:16 -07:00
Michael Bolin
20e0c2cf35 tests: isolate approval fixtures from host rules 2026-04-22 15:30:58 -07:00
Michael Bolin
a7c621c8c5 shell-escalation: carry resolved permission profiles 2026-04-22 15:30:58 -07:00
Michael Bolin
21bdcd4f5a mcp: include permission profiles in sandbox state 2026-04-22 15:30:58 -07:00
Michael Bolin
acb18427e4 tui: carry permission profiles on user turns 2026-04-22 15:30:58 -07:00
Michael Bolin
de67eee159 tui: sync session permission profiles 2026-04-22 15:30:58 -07:00
Michael Bolin
7662f6f4a6 app-server: accept command permission profiles 2026-04-22 15:30:58 -07:00
Michael Bolin
57f74a254e protocol: report session permission profiles 2026-04-22 15:30:58 -07:00
Michael Bolin
bad6da2798 rollout: persist turn permission profiles 2026-04-22 15:30:58 -07:00
Michael Bolin
a68433a363 clients: send permission profiles to app-server 2026-04-22 15:30:58 -07:00
Michael Bolin
1f50c135df exec-server: require explicit filesystem sandbox cwd 2026-04-22 15:30:58 -07:00
Michael Bolin
3f4fe759fd merge commit for archive created by Sapling 2026-04-22 15:21:07 -07:00
Michael Bolin
f8dec04ab8 tests: isolate approval fixtures from host rules 2026-04-22 15:20:46 -07:00
Michael Bolin
b8b04f2df2 shell-escalation: carry resolved permission profiles 2026-04-22 15:20:46 -07:00
Michael Bolin
a1a28dd8f9 mcp: include permission profiles in sandbox state 2026-04-22 15:20:46 -07:00
Michael Bolin
b9ea5751b1 tui: carry permission profiles on user turns 2026-04-22 15:20:46 -07:00
Michael Bolin
b9ff80b631 tui: sync session permission profiles 2026-04-22 15:20:38 -07:00
Michael Bolin
f8168fb526 app-server: accept command permission profiles 2026-04-22 15:20:38 -07:00
Michael Bolin
aec03f26d2 protocol: report session permission profiles 2026-04-22 15:20:38 -07:00
Michael Bolin
f501b9ad99 rollout: persist turn permission profiles 2026-04-22 15:20:38 -07:00
Michael Bolin
add328d677 clients: send permission profiles to app-server 2026-04-22 15:20:37 -07:00
Michael Bolin
0e199dd9ae exec-server: require explicit filesystem sandbox cwd 2026-04-22 15:20:37 -07:00
Michael Bolin
3b439e1f5f merge commit for archive created by Sapling 2026-04-22 15:08:10 -07:00
Michael Bolin
d3d911ca2e tests: isolate approval fixtures from host rules 2026-04-22 15:06:21 -07:00
Michael Bolin
8fce002112 shell-escalation: carry resolved permission profiles 2026-04-22 15:06:20 -07:00
Michael Bolin
26aafff003 mcp: include permission profiles in sandbox state 2026-04-22 15:06:20 -07:00
Michael Bolin
b9d98d0aa3 tui: carry permission profiles on user turns 2026-04-22 15:06:20 -07:00
Michael Bolin
fa29623cc7 tui: sync session permission profiles 2026-04-22 15:04:58 -07:00
Michael Bolin
579eb371d4 app-server: accept command permission profiles 2026-04-22 15:04:58 -07:00
Michael Bolin
543972c703 protocol: report session permission profiles 2026-04-22 15:04:58 -07:00
Michael Bolin
f372e24c08 rollout: persist turn permission profiles 2026-04-22 15:04:58 -07:00
Michael Bolin
6665c299e6 clients: send permission profiles to app-server 2026-04-22 15:04:58 -07:00
Michael Bolin
6f5539bae8 exec-server: require explicit filesystem sandbox cwd 2026-04-22 15:00:13 -07:00
Michael Bolin
e0b423c1c7 merge commit for archive created by Sapling 2026-04-22 14:49:30 -07:00
Michael Bolin
d9211b8740 tests: isolate approval fixtures from host rules 2026-04-22 14:46:53 -07:00
Michael Bolin
f677a22f3e shell-escalation: carry resolved permission profiles 2026-04-22 14:46:53 -07:00
Michael Bolin
92d040d850 mcp: include permission profiles in sandbox state 2026-04-22 14:46:53 -07:00
Michael Bolin
ed509deaf5 tui: carry permission profiles on user turns 2026-04-22 14:46:53 -07:00
Michael Bolin
50fffd01d2 tui: sync session permission profiles 2026-04-22 14:46:53 -07:00
Michael Bolin
4cbff80b72 app-server: accept command permission profiles 2026-04-22 14:46:53 -07:00
Michael Bolin
33269edfdc protocol: report session permission profiles 2026-04-22 14:46:53 -07:00
Michael Bolin
582316c408 rollout: persist turn permission profiles 2026-04-22 14:42:26 -07:00
Michael Bolin
5b9c978857 clients: send permission profiles to app-server 2026-04-22 14:42:26 -07:00
Michael Bolin
d3dd0d759b exec-server: expose arg0 alias root to fs sandbox (#19016)
## Why

The post-merge `rust-ci-full` run for #18999 still failed the Ubuntu
remote `suite::remote_env` sandboxed filesystem tests. That run checked
out merge commit `ddde50c611e4800cb805f243ed3c50bbafe7d011`, so the arg0
guard lifetime fix was present.

The Docker-backed failure had two remaining pieces:

- The sandboxed filesystem helper needs to execute Codex through the
`codex-linux-sandbox` arg0 alias path. The helper sandbox was only
granting read access to the real Codex executable parent, so the alias
parent also has to be visible inside the helper sandbox.
- The remote-env tests were building sandbox contexts with
`FileSystemSandboxContext::new()`, which captures the local test runner
cwd. In the Docker remote exec-server, that host checkout path does not
exist, so spawning the filesystem helper failed with `No such file or
directory` before the helper could process the request.

## What Changed

- Track all helper runtime read roots instead of a single root.
- Add both the real Codex executable parent and the
`codex-linux-sandbox` alias parent to sandbox readable roots.
- Avoid sending an unused local cwd in remote filesystem sandbox
contexts when the permission profile has no cwd-dependent entries.
- Build the Docker remote-env test sandbox contexts with a cwd path that
exists inside the container.
- Add unit coverage for the alias-parent root and remote sandbox cwd
handling.

## Verification

- `cargo test -p codex-exec-server`
- `cargo test -p codex-core
remote_test_env_sandboxed_read_allows_readable_root`
- `just fix -p codex-exec-server`
- `just fix -p codex-core`
2026-04-22 21:34:22 +00:00
Leo Shimonaka
16eeeb534a Fix MCP permission policy sync (#19033)
###### Why/Context/Summary

Repro: start a session outside Full Access, switch permissions to Full
Access, then submit a new turn that triggers MCP/CUA permission
handling.

The turn used the live Full Access `SessionConfiguration`, but the MCP
coordinator was still synced from the stale `original_config_do_not_use`
/ per-turn config copy. That left the coordinator with an old sandbox
policy, so empty MCP permission elicitations could be denied instead of
auto-accepted.

Fix: update/rebuild the MCP connection manager from the live
turn/session approval and sandbox policy fields.

###### Test plan

```sh
just fmt
cargo test -p codex-core --lib
cargo test -p codex-core --lib mcp_tool_call::tests
```
2026-04-22 14:30:29 -07:00
Michael Bolin
60d260dd5a merge commit for archive created by Sapling 2026-04-22 14:23:14 -07:00
Michael Bolin
013c20f225 tests: isolate approval fixtures from host rules 2026-04-22 14:19:53 -07:00
Michael Bolin
5de9a66ad8 shell-escalation: carry resolved permission profiles 2026-04-22 14:19:53 -07:00
Michael Bolin
a11ace780b mcp: include permission profiles in sandbox state 2026-04-22 14:19:53 -07:00
Michael Bolin
903074ab6e tui: carry permission profiles on user turns 2026-04-22 14:19:53 -07:00