Commit Graph

15655 Commits

Author SHA1 Message Date
Michael Bolin
e881e8d77c merge commit for archive created by Sapling 2026-05-14 18:06:56 -07:00
Michael Bolin
0fdd4e5332 tui/exec: show effective workspace roots in summaries 2026-05-14 18:06:33 -07:00
Michael Bolin
d46638770b app-server: use permission ids and runtime workspace roots 2026-05-14 18:06:33 -07:00
Michael Bolin
033e494dd4 permissions: resolve profile identity with constraints 2026-05-14 18:06:33 -07:00
Michael Bolin
262721a7be Merge 0fc198c303 into sapling-pr-archive-bolinfest 2026-05-14 18:00:30 -07:00
Michael Bolin
0fc198c303 tui/exec: show effective workspace roots in summaries 2026-05-14 18:00:20 -07:00
Michael Bolin
16361cc5af app-server: use permission ids and runtime workspace roots 2026-05-14 18:00:20 -07:00
Michael Bolin
8caaadd2ab permissions: resolve profile identity with constraints 2026-05-14 18:00:20 -07:00
Michael Bolin
2794fbd985 Merge 5212bac2dc into sapling-pr-archive-bolinfest 2026-05-14 17:52:22 -07:00
Michael Bolin
5212bac2dc tui/exec: show effective workspace roots in summaries 2026-05-14 17:52:10 -07:00
Michael Bolin
233a4eda8a app-server: use permission ids and runtime workspace roots 2026-05-14 17:52:10 -07:00
Michael Bolin
cccf53efa4 permissions: resolve profile identity with constraints 2026-05-14 17:52:09 -07:00
Michael Bolin
f986e7462f merge commit for archive created by Sapling 2026-05-14 17:50:38 -07:00
Michael Bolin
b494ab8fee tui/exec: show effective workspace roots in summaries 2026-05-14 17:50:22 -07:00
Michael Bolin
ad66cc48be app-server: use permission ids and runtime workspace roots 2026-05-14 17:50:22 -07:00
Michael Bolin
396a7e84a5 permissions: resolve profile identity with constraints 2026-05-14 17:50:22 -07:00
Michael Bolin
0f91c8f2a1 merge commit for archive created by Sapling 2026-05-14 17:25:17 -07:00
Michael Bolin
0c8d6488f6 tui/exec: show effective workspace roots in summaries 2026-05-14 17:24:46 -07:00
Michael Bolin
ff536f5ab8 app-server: use permission ids and runtime workspace roots 2026-05-14 17:24:46 -07:00
Michael Bolin
46737cedf0 permissions: resolve profile identity with constraints 2026-05-14 17:24:45 -07:00
Michael Bolin
4b39a27508 permissions: support workspace roots in profiles 2026-05-14 17:24:22 -07:00
Michael Bolin
b6df2aa5dc merge commit for archive created by Sapling 2026-05-14 17:18:15 -07:00
Michael Bolin
79d302ac1f tui/exec: show effective workspace roots in summaries 2026-05-14 17:17:40 -07:00
Michael Bolin
31f2bc6511 app-server: use permission ids and runtime workspace roots 2026-05-14 17:17:40 -07:00
Michael Bolin
149b0e978d permissions: resolve profile identity with constraints 2026-05-14 17:17:10 -07:00
Michael Bolin
149cf98553 permissions: support workspace roots in profiles 2026-05-14 17:17:10 -07:00
Eric Traut
3dc278b68e Trim TUI legacy core helper usage (#22695)
## Why

The TUI still had a few low-risk dependencies flowing through the
transitional `legacy_core` namespace after the app-server migration.
These helpers either already have clearer non-core owners or are
presentation logic that does not belong in `codex-core`, so moving them
out reduces the compatibility surface without changing product behavior.

## What changed

This is a low-risk change, almost completely mechanical in nature.

- Route TUI Codex-home lookup through `codex-utils-home-dir`, use
`Config::log_dir` directly, and call
`codex-sandboxing::system_bwrap_warning` without going through
`legacy_core`.
- Move shared `codex resume` hint formatting from `codex-core` into
`codex-utils-cli`.
- Update CLI and TUI call sites to use the shared CLI utility, and keep
the resume-command behavior covered by tests in its new home.

## Verification

- `cargo test -p codex-utils-cli`
- `cargo test -p codex-utils-cli resume_command`
2026-05-14 16:54:59 -07:00
Dylan Hurd
85915a2a21 chore(config) rm windows_wsl_setup_acknowledged (#22717)
## Summary
Remove dead code from a notice that no longer exists.

## Testing
- [x] Unit tests pass.
2026-05-14 23:25:15 +00:00
Dylan Hurd
51b0e94105 chore(features) rm Feature::ApplyPatchFreeform (#22711)
## Summary
Removes the feature since this is effectively on by default in all cases
where we should use it, or can be configured via models.json.

## Testing
- [x] unit tests pass
2026-05-14 16:15:56 -07:00
Michael Bolin
0a0613e0fb Merge bf36d8cac1 into sapling-pr-archive-bolinfest 2026-05-14 16:05:59 -07:00
starr-openai
7c11c14efc Fix Windows sandbox clippy clones (#22687)
## Summary
- remove two redundant `PathBuf` clones in Windows sandbox setup tests
- fix current `rust-ci-full` Windows clippy failures on `main`

## Validation
- `just fmt`
- attempted on `dev`: `cargo clippy --target x86_64-pc-windows-msvc
--tests --profile dev --timings -- -D warnings`
- blocked by missing MSVC cross toolchain on the Linux devbox (`lib.exe`
/ MSVC C toolchain unavailable)
- live failure evidence: main `rust-ci-full` runs 25880209898 and
25879137967 failed on `windows-sandbox-rs/src/bin/setup_main/win.rs`
with `clippy::redundant_clone` at the two edited callsites
2026-05-14 15:54:18 -07:00
Michael Bolin
7a1dcaee2b Merge 797dbb40f7 into sapling-pr-archive-bolinfest 2026-05-14 15:45:28 -07:00
Michael Bolin
bf36d8cac1 tui/exec: show effective workspace roots in summaries 2026-05-14 15:35:46 -07:00
Michael Bolin
aac1dd5661 app-server: use permission ids and runtime workspace roots 2026-05-14 15:35:46 -07:00
Michael Bolin
797dbb40f7 permissions: support workspace roots in profiles 2026-05-14 15:18:44 -07:00
Michael Bolin
552c4bc723 permissions: resolve profile identity with constraints 2026-05-14 15:18:44 -07:00
xli-oai
8c7a176b55 Unqueue plugin list and read requests (#22703)
## Summary
- remove the app-server `plugin-read` serialization queue from
`plugin/list` and `plugin/read`
- allow plugin read/list requests to start immediately instead of
waiting behind other plugin read/list requests

## Test plan
- `just fmt`
- `cargo test -p codex-app-server-protocol`
2026-05-14 15:07:20 -07:00
Michael Bolin
fd8a381d36 merge commit for archive created by Sapling 2026-05-14 15:00:25 -07:00
Michael Bolin
28c51e6899 permissions: support workspace roots in profiles 2026-05-14 15:00:15 -07:00
Michael Bolin
ef1cafd52e merge commit for archive created by Sapling 2026-05-14 14:51:37 -07:00
sayan-oai
d346957288 make rust-release-prepare use env secret (#22702)
made a `rust-release-prepare` environment with the necessary API key as
an environment secret. use this in the workflow rather than the action
secret.

once this merges and i confirm it works as intended, ill rm the action
secret.
2026-05-14 21:45:53 +00:00
Michael Bolin
f92f2c3963 permissions: support workspace roots in profiles 2026-05-14 14:36:49 -07:00
rreichel3-oai
02a7205250 [codex] Support multiple forced ChatGPT workspaces (#18161)
## Summary

This change lets `forced_chatgpt_workspace_id` accept multiple workspace
IDs instead of a single value.

It keeps the existing config key name, adds backward-compatible parsing
for a single string in `config.toml`, and normalizes the setting into an
allowed workspace list across login enforcement, app-server config
surfaces, and local ChatGPT auth helpers.

## Why

Workspace-restricted deployments may need to allow more than one ChatGPT
workspace without dropping the guardrail entirely.

## Server-side impact

Codex's local server and app-server protocol needed changes because they
previously assumed a single workspace ID. The local login flow now
matches the auth backend interface by sending the allowed workspace list
as a single comma-separated `allowed_workspace_id` query parameter.

## Validation

This was tested with:

- A single workspace config
- With multi-workspace configs
- With multiple workspaces in the config
- The user only being a part of a subset of them

All were successful.

Automated coverage:

- `cargo test -p codex-login`
- `cargo test -p codex-app-server-protocol`
- `cargo test -p codex-tui local_chatgpt_auth`
- `cargo test --locked -p codex-app-server
login_account_chatgpt_includes_forced_workspace_allowlist_query_param`
2026-05-14 17:11:36 -04:00
Michael Bolin
56ace7478f merge commit for archive created by Sapling 2026-05-14 13:25:25 -07:00
Michael Bolin
8fc5565912 permissions: support workspace roots in profiles 2026-05-14 13:24:24 -07:00
starr-openai
32b45a43e2 tests: isolate codex home for live cli (#22563)
## Why

Some core integration-test paths were creating Codex state under ambient
`~/.codex`. In environments where `HOME=/tmp`, that showed up as
`/tmp/.codex`, which is host-level shared state and makes these tests
environment/order sensitive.

The affected paths were:

- `core/tests/suite/live_cli.rs`: `run_live()` spawned the real CLI with
a temp cwd, but without an isolated home, so the child resolved Codex
home from ambient `HOME`.
- core / exec-server integration test binaries using
`configure_test_binary_dispatch(...)`: their startup ctor installs arg0
helper aliases like `apply_patch` and `codex-linux-sandbox`. Full
`arg0_dispatch()` also installs aliases from ambient Codex-home
resolution, so test-binary startup could create `CODEX_HOME/tmp/arg0`;
with `HOME=/tmp`, that became `/tmp/.codex/tmp/arg0/...`.

## What changed

- `live_cli` now gives the spawned CLI a temp `HOME` and temp
`CODEX_HOME`.
- arg0 alias setup now has an explicit-home form,
`prepend_path_entry_for_codex_aliases_in(...)`, so test helpers can
place alias state under a temp directory without relying on ambient
`CODEX_HOME`.
- helper re-entry behavior is preserved with
`dispatch_arg0_if_needed()`, so aliases like `apply_patch` and
`codex-linux-sandbox` still dispatch correctly before test alias
installation.
- core test support keeps the temp Codex home alive for the lifetime of
the test binary, matching the alias lifetime.

## Verification

Verified on `dev2` with `HOME=/tmp` that the focused core test-binary
startup path no longer recreates `/tmp/.codex`.

Also checked the exact `live_cli` test path under `HOME=/tmp`; on `dev2`
it still hits the existing remote-only `cargo_bin("codex-rs")`
resolution failure before spawning the child, but `/tmp/.codex` remains
absent after the run.
2026-05-14 12:59:56 -07:00
Michael Bolin
292856b339 merge commit for archive created by Sapling 2026-05-14 12:45:43 -07:00
starr-openai
255748638c Fix remote environment test fixtures (#22572)
## Why
The Docker remote-env coverage was failing before it reached the
behavior those tests are meant to exercise. The remote-aware test
fixture only registered the remote environment, so tests that
intentionally select both `local` and `remote` could not start a turn.
After that was fixed, two tests exposed stale fixtures: the approval
test was auto-approving under workspace-write, and the remote
`view_image` test was writing invalid PNG bytes.

## What Changed
- Added `EnvironmentManager::create_for_tests_with_local(...)` so tests
can keep the provider default while also selecting `local` explicitly.
- Updated `build_remote_aware()` to use that test-only manager when a
remote exec-server URL is present.
- Changed the remote apply-patch approval helper to use
`SandboxPolicy::new_read_only_policy()` so the test actually exercises
approval caching per environment.
- Replaced the hardcoded remote `view_image` PNG blob with the existing
`png_bytes(...)` helper so the test uses a valid image fixture.

## Validation
Ran these isolated Docker remote-env tests on the devbox with
`$remote-tests` setup:
-
`suite::remote_env::apply_patch_freeform_routes_to_selected_remote_environment`
-
`suite::remote_env::apply_patch_approvals_are_remembered_per_environment`
-
`suite::remote_env::apply_patch_intercepted_exec_command_routes_to_selected_remote_environment`
-
`suite::remote_env::exec_command_routes_to_selected_remote_environment`
- `suite::view_image::view_image_routes_to_selected_remote_environment`

All five pass.
2026-05-14 12:40:01 -07:00
Michael Bolin
1230fb5107 tui/exec: show effective workspace roots in summaries 2026-05-14 12:33:16 -07:00
Michael Bolin
fefc579cca app-server: use permission ids and runtime workspace roots 2026-05-14 12:33:16 -07:00