Commit Graph
12741 Commits
Author SHA1 Message Date
Michael Bolin b27ebccf9f Merge 8506fff5e8 into sapling-pr-archive-bolinfest 2026-04-23 01:10:12 -07:00
Michael Bolin 8506fff5e8 tests: isolate approval fixtures from host rules 2026-04-23 01:09:59 -07:00
Michael Bolin ae072de78a shell-escalation: carry resolved permission profiles 2026-04-23 01:09:59 -07:00
Michael Bolin 1820a6026b mcp: include permission profiles in sandbox state 2026-04-23 01:09:59 -07:00
Michael Bolin f5e7182b96 tui: carry permission profiles on user turns 2026-04-23 01:09:59 -07:00
Michael Bolin 824410ccf1 merge commit for archive created by Sapling 2026-04-23 00:38:51 -07:00
Michael Bolin 9afc4e9eec tui: sync session permission profiles 2026-04-23 00:38:33 -07:00
Michael Bolin 126b36e8db tests: isolate approval fixtures from host rules 2026-04-23 00:38:33 -07:00
Michael Bolin 15afab96c8 shell-escalation: carry resolved permission profiles 2026-04-23 00:38:33 -07:00
Michael Bolin e61c714358 mcp: include permission profiles in sandbox state 2026-04-23 00:38:33 -07:00
Michael Bolin 9b45169f9a tui: carry permission profiles on user turns 2026-04-23 00:38:33 -07:00
Michael Bolin d3e4eb9ba5 merge commit for archive created by Sapling 2026-04-23 00:28:59 -07:00
Michael Bolin 7c4c5a0e6c tests: isolate approval fixtures from host rules 2026-04-23 00:27:37 -07:00
Michael Bolin fe347f473b shell-escalation: carry resolved permission profiles 2026-04-23 00:27:37 -07:00
Michael Bolin d91d263c11 mcp: include permission profiles in sandbox state 2026-04-23 00:27:37 -07:00
Michael Bolin d4784842f7 tui: carry permission profiles on user turns 2026-04-23 00:27:37 -07:00
Michael Bolin a11b0a3e95 tui: sync session permission profiles 2026-04-23 00:27:37 -07:00
Michael Bolin 3345efcd9c merge commit for archive created by Sapling 2026-04-23 00:26:37 -07:00
Michael Bolin b9f3035801 tui: sync session permission profiles 2026-04-23 00:24:41 -07:00
Michael Bolin 8bc667b07b app-server: include filesystem entries in permission requests (#19086)
## Why

`item/permissions/requestApproval` sends a requested permission profile
to app-server clients. The core profile already stores filesystem
permissions as `entries`, but the v2 compatibility conversion used the
legacy `read`/`write` projection whenever possible and left `entries`
unset.

That made the request ambiguous for clients that consume the canonical
v2 shape: `permissions.fileSystem.entries` was missing even though
filesystem access was being requested. A client that rendered or echoed
grants from `entries` could treat the request as having no filesystem
permission entries, then return an empty or incomplete grant. The
app-server intersects responses with the original request, so omitted
filesystem permissions are denied.

## What Changed

- Populate `AdditionalFileSystemPermissions.entries` when converting
legacy read/write roots for request permission payloads, while
preserving `read` and `write` for compatibility.
- Mark `read` and `write` as transitional schema fields in the generated
app-server schema.
- Add regression coverage for the v2 conversion, the app-server
`item/permissions/requestApproval` round trip, and TUI app-server
approval conversion expectations.
- Refresh generated JSON and TypeScript schema fixtures.

## Verification

- `just fmt`
- `cargo test -p codex-app-server-protocol`
- `cargo test -p codex-app-server request_permissions_round_trip`
- `cargo test -p codex-tui
converts_request_permissions_into_granted_permissions`
- `cargo test -p codex-tui
resolves_permissions_and_user_input_through_app_server_request_id`
2026-04-23 00:21:59 -07:00
Michael Bolin 1dad810719 Merge d01ecbfa32 into sapling-pr-archive-bolinfest 2026-04-23 00:05:53 -07:00
Michael Bolin d01ecbfa32 tests: isolate approval fixtures from host rules 2026-04-23 00:04:00 -07:00
Michael Bolin cace7abb86 shell-escalation: carry resolved permission profiles 2026-04-23 00:03:59 -07:00
Michael Bolin 9e570af5d5 mcp: include permission profiles in sandbox state 2026-04-23 00:03:59 -07:00
Michael Bolin 7173ed7d31 tui: carry permission profiles on user turns 2026-04-23 00:03:59 -07:00
Michael Bolin a10f86b2e7 tui: sync session permission profiles 2026-04-23 00:03:58 -07:00
Michael Bolin 4de7e963c7 merge commit for archive created by Sapling 2026-04-23 00:01:56 -07:00
Michael Bolin a29e38d929 tui: sync session permission profiles 2026-04-23 00:01:27 -07:00
Michael Bolin b8576ebdb8 Merge 4ed92c2192 into sapling-pr-archive-bolinfest 2026-04-22 23:38:28 -07:00
Shijie Rao 993e3f407e Persist target default reasoning on model upgrade (#19085)
## Why

When the TUI upgrade flow moves a user to a newer model, the accepted
migration should also persist the target model's default reasoning
effort. That keeps the upgraded model and reasoning setting aligned
instead of carrying forward a stale previously saved effort from the old
model.

## What changed

- The accepted model migration path now updates in-memory config, TUI
state, and persisted model selection with the target preset's
`default_reasoning_effort`.
- The upgrade destructuring keeps `reasoning_effort_mapping` explicitly
unused because mappings are no longer consulted on accepted migrations.
- Added a catalog test that starts with a pre-existing saved reasoning
effort and verifies the accepted upgrade overwrites it with the target
model default and emits the expected persistence events.
- Rebasing onto current `main` also updates a TUI thread-session test
helper for the latest `permission_profile` field and
`ApprovalsReviewer::AutoReview` rename so CI compiles on the new base.

## Verification

- `cargo test -p codex-tui model_catalog`
- `cargo test -p codex-tui
permission_settings_sync_updates_active_snapshot_without_rewriting_side_thread`
2026-04-22 23:36:15 -07:00
Michael Bolin 4ed92c2192 app-server: include filesystem entries in permission requests
item/permissions/requestApproval sends a requested permission profile to app-server clients. Populate AdditionalFileSystemPermissions.entries when converting legacy read/write roots so clients that consume the canonical v2 shape see the requested filesystem entries.

Keep read/write fields for compatibility, mark them as transitional in the generated schema, and update app-server/TUI regression coverage plus generated fixtures.
2026-04-22 23:33:57 -07:00
Michael Bolin 4f63342d72 fix(tui): update permission sync test helpers
Commit 08b5e96678 added the permission sync regression test before ThreadSessionState grew permission_profile and before the reviewer enum settled on AutoReview. Update the fixture so codex-tui builds against current main.
2026-04-22 23:33:57 -07:00
Michael Bolin 4a427f399e merge commit for archive created by Sapling 2026-04-22 23:23:51 -07:00
Michael Bolin 877d0fbe4d ensure AdditionalFileSystemPermissions is created with entries field set 2026-04-22 23:23:35 -07:00
Michael Bolin 16464b9073 Merge 1b2298ff88 into sapling-pr-archive-bolinfest 2026-04-22 23:20:30 -07:00
Michael Bolin d75207dec4 Merge 731b2ed1a0 into sapling-pr-archive-bolinfest 2026-04-22 23:19:12 -07:00
Michael Bolin cf4848b4a4 Merge 85fa5c059b into sapling-pr-archive-bolinfest 2026-04-22 23:15:01 -07:00
Michael Bolin 85fa5c059b ensure AdditionalFileSystemPermissions is created with entries field set 2026-04-22 23:14:53 -07:00
Michael Bolin 1b2298ff88 tests: isolate approval fixtures from host rules 2026-04-22 23:13:51 -07:00
Michael Bolin 731b2ed1a0 tui: sync session permission profiles 2026-04-22 23:13:51 -07:00
Michael Bolin bcccab7ad7 shell-escalation: carry resolved permission profiles 2026-04-22 23:13:51 -07:00
Michael Bolin 24e5f89cd0 mcp: include permission profiles in sandbox state 2026-04-22 23:13:51 -07:00
Michael Bolin 9d5b125ddd tui: carry permission profiles on user turns 2026-04-22 23:13:51 -07:00
Gav Verma 2ef2d675d6 Clarify cloud requirements error messages (#19078)
## Why
The current cloud-requirements failures say `workspace-managed config`,
which is ambiguous and can read like it refers to local managed config
such as `managed_config.toml`.

This code path only applies to cloud requirements, so the user-facing
message should name that source directly.

## What changed
- Updated the load failure in
[`codex-rs/cloud-requirements/src/lib.rs`](https://github.com/openai/codex/blob/46e704d1f93054daa9a3b5a9100333c540c81d50/codex-rs/cloud-requirements/src/lib.rs)
to say `failed to load cloud requirements (workspace-managed policies)`.
- Updated the parse failure in the same file to use the same `cloud
requirements (workspace-managed policies)` terminology.
- Kept `workspace-managed` hyphenated because it is used as a compound
modifier.
- Updated the matching assertion in
[`codex-rs/app-server/src/codex_message_processor.rs`](https://github.com/openai/codex/blob/46e704d1f93054daa9a3b5a9100333c540c81d50/codex-rs/app-server/src/codex_message_processor.rs).
- Reused `CLOUD_REQUIREMENTS_LOAD_FAILED_MESSAGE` in the
`codex-cloud-requirements` test where the test is asserting that
crate-local contract directly.

## Testing
`cargo test -p codex-cloud-requirements`
2026-04-22 23:07:08 -07:00
Michael Bolin 9f3158defe Merge b53ebc2774 into sapling-pr-archive-bolinfest 2026-04-22 23:02:29 -07:00
Michael Bolin b53ebc2774 ensure AdditionalFileSystemPermissions is created with entries field set 2026-04-22 23:02:19 -07:00
Michael Bolin c91196f343 Merge 73b88f95ee into sapling-pr-archive-bolinfest 2026-04-22 22:57:57 -07:00
Michael Bolin 923084d81c Merge 08df3a31f3 into sapling-pr-archive-bolinfest 2026-04-22 22:55:08 -07:00
Michael Bolin 73b88f95ee tests: isolate approval fixtures from host rules 2026-04-22 22:54:41 -07:00
Michael Bolin 9c6bee159d shell-escalation: carry resolved permission profiles 2026-04-22 22:54:41 -07:00