Commit Graph

15843 Commits

Author SHA1 Message Date
Michael Bolin
f11f3e4ef8 merge commit for archive created by Sapling 2026-05-15 17:03:29 -07:00
Michael Bolin
de5a796e9a windows-sandbox: drive write roots from resolved permissions 2026-05-15 17:03:11 -07:00
Michael Bolin
b90513496b merge commit for archive created by Sapling 2026-05-15 16:54:07 -07:00
Michael Bolin
70a7dcacd4 app-server-protocol: use active permission profile for command exec 2026-05-15 16:53:59 -07:00
Michael Bolin
89a88a9982 merge commit for archive created by Sapling 2026-05-15 16:43:44 -07:00
Michael Bolin
07b7e3c426 app-server-protocol: use active permission profile for command exec 2026-05-15 16:43:35 -07:00
Michael Bolin
62fb720137 merge commit for archive created by Sapling 2026-05-15 16:39:11 -07:00
Michael Bolin
78674c0f52 app-server-protocol: use active permission profile for command exec 2026-05-15 16:39:02 -07:00
Michael Bolin
f39835bb73 merge commit for archive created by Sapling 2026-05-15 16:37:35 -07:00
Michael Bolin
21f3ede082 windows-sandbox: drive write roots from resolved permissions 2026-05-15 16:37:19 -07:00
Michael Bolin
f1c9aaa637 Merge 72d41e5db2 into sapling-pr-archive-bolinfest 2026-05-15 16:33:04 -07:00
Michael Bolin
72d41e5db2 core: set permission profiles from snapshots 2026-05-15 16:32:55 -07:00
Michael Bolin
c264a97c85 merge commit for archive created by Sapling 2026-05-15 16:25:58 -07:00
Michael Bolin
f4ff44e042 app-server-protocol: use active permission profile for command exec 2026-05-15 16:25:49 -07:00
Michael Bolin
bfd6054051 merge commit for archive created by Sapling 2026-05-15 16:21:44 -07:00
Michael Bolin
5e076c4a3a windows-sandbox: drive write roots from resolved permissions 2026-05-15 16:21:24 -07:00
Michael Bolin
2c409f53c4 merge commit for archive created by Sapling 2026-05-15 16:20:04 -07:00
Michael Bolin
a850df1e1e app-server-protocol: use active permission profile for command exec 2026-05-15 16:19:44 -07:00
Michael Bolin
6349e1ba5c merge commit for archive created by Sapling 2026-05-15 16:14:08 -07:00
Michael Bolin
a4be788173 windows-sandbox: drive write roots from resolved permissions 2026-05-15 16:13:43 -07:00
Michael Bolin
b10098c496 Merge b2d0a5a785 into sapling-pr-archive-bolinfest 2026-05-15 15:58:24 -07:00
Michael Bolin
b2d0a5a785 core: set permission profiles from snapshots 2026-05-15 15:58:13 -07:00
Michael Bolin
8ce09d64e1 merge commit for archive created by Sapling 2026-05-15 15:57:49 -07:00
Michael Bolin
dce80187ae core: set permission profiles from snapshots 2026-05-15 15:57:25 -07:00
Michael Bolin
eb7790a7b7 merge commit for archive created by Sapling 2026-05-15 15:50:50 -07:00
Michael Bolin
56238d2fa2 windows-sandbox: send permission profiles to elevated runner 2026-05-15 15:50:23 -07:00
Michael Bolin
86e11d7697 windows-sandbox: add resolved permissions helper 2026-05-15 15:50:23 -07:00
Michael Bolin
f1e0e5cea8 Merge 7fbefbb0e1 into sapling-pr-archive-bolinfest 2026-05-15 15:43:06 -07:00
Michael Bolin
7fbefbb0e1 windows-sandbox: send permission profiles to elevated runner 2026-05-15 15:42:49 -07:00
Michael Bolin
bbb5c2811d tui: pass active permission profiles through app commands (#22891)
## Why

This continues the permissions migration by keeping the TUI command
boundary aligned with the app-server protocol direction from #22795:
callers should select a permission profile by id instead of passing a
concrete `PermissionProfile` value around as the turn configuration.

`AppCommand` is internal to the TUI, but it is the path that eventually
becomes `thread/turn/start`, so carrying concrete profile details there
made it too easy for UI code to keep relying on the old whole-profile
replacement model.

## What changed

- `AppCommand::UserTurn` and `AppCommand::OverrideTurnContext` now carry
`Option<ActivePermissionProfile>` instead of `PermissionProfile`.
- Composer submissions copy the active permission profile id from the
current session snapshot; legacy snapshots intentionally submit no
active profile id.
- Permission preset UI events now carry only the active built-in profile
id. The app derives the concrete built-in `PermissionProfile` internally
only when updating its local config/status snapshot.
- Permission presets expose their built-in active profile id, and preset
selection preserves that id in both the immediate turn override and the
local TUI config snapshot.
- Turn routing sends `TurnPermissionsOverride::ActiveProfile` when an
active id is present, and only falls back to the legacy sandbox
projection for the remaining runtime override path.

## How to review

Start with `codex-rs/tui/src/app_command.rs` to verify the command shape
no longer exposes `PermissionProfile`.

Then read `codex-rs/tui/src/app/thread_routing.rs` to verify the
app-server turn-start conversion: active ids go through as ids, while
the legacy sandbox fallback is still constrained to the existing runtime
override case.

Finally, check `codex-rs/tui/src/chatwidget/permission_popups.rs`,
`codex-rs/tui/src/app/event_dispatch.rs`,
`codex-rs/tui/src/app/config_persistence.rs`, and
`codex-rs/utils/approval-presets/src/lib.rs` to see how preset
selections stay id-only across TUI events while the local display/config
mirror still gets a concrete built-in profile.

## Verification

Latest local verification after the id-only `AppEvent` cleanup:

- `cargo check -p codex-tui --tests`
- `cargo test -p codex-tui
permissions_selection_sends_approvals_reviewer_in_override_turn_context`
- `cargo test -p codex-tui update_feature_flags_enabling_guardian`
- `cargo test -p codex-utils-approval-presets`
- `just fmt`
- `just fix -p codex-tui -p codex-utils-approval-presets`

Earlier in the same PR, before the final event-shape cleanup:

- `cargo test -p codex-tui turn_permissions_`
- `cargo test -p codex-tui submission_`
- `cargo test -p codex-tui
session_configured_syncs_widget_config_permissions_and_cwd`
- `RUST_MIN_STACK=16777216 cargo test -p codex-tui`
2026-05-15 22:42:35 +00:00
Michael Bolin
c563ba6b18 Merge e0c614b2da into sapling-pr-archive-bolinfest 2026-05-15 15:38:51 -07:00
Michael Bolin
e0c614b2da windows-sandbox: add resolved permissions helper 2026-05-15 15:38:42 -07:00
Michael Bolin
6b372f029d merge commit for archive created by Sapling 2026-05-15 15:29:44 -07:00
Michael Bolin
b791569492 tui: pass active permission profiles through app commands 2026-05-15 15:29:24 -07:00
Curtis 'Fjord' Hawthorne
8543e39885 Preserve image detail in app-server inputs (#20693)
## Summary

- Add optional image detail to user image inputs across core, app-server
v2, thread history/event mapping, and the generated app-server
schemas/types.
- Preserve requested detail when serializing Responses image inputs:
omitted detail stays on the existing `high` default, while explicit
`original` keeps local images on the original-resolution path.
- Support `high`/`original` consistently for tool image outputs,
including MCP `codex/imageDetail`, code-mode image helpers, and
`view_image`.
2026-05-15 15:04:04 -07:00
Tom
249d50aafc [codex] Soften SQLite metadata sync failures (#22899)
## Summary
- keep transcript-derived local thread metadata SQLite failures
best-effort
- preserve hard failures for explicit git-only metadata updates that
still require SQLite state
- add regression coverage for the soft-vs-hard metadata update policy

## Root cause
The live thread metadata sync introduced after v0.131.0-alpha.8 moved
append-derived metadata writes above the rollout writer. Those SQLite
writes now propagated through the live thread flush path, so a corrupted
optional state DB could surface as a transcript persistence warning even
when JSONL writes still succeeded.

The hard failures were introduced in #22236
2026-05-15 21:37:27 +00:00
Owen Lin
6a331a66eb feat(app-server): update remote control APIs for better UX (#22877)
## Why
To help improve `codex remote-control` CLI UX which I plan to do in a
followup, this PR adds `server-name` to the various remote control APIs:
- `remoteControl/enable`
- `remoteControl/disable`
- `remoteControl/status/changed`

Also, add a `remoteControl/status/read` API. This will be helpful in the
Codex App.
2026-05-15 14:33:24 -07:00
Shijie Rao
98129fb9c5 Disable DMG staging for signed macOS promotion (#22900)
## Why
`promote_signed` is now used to finish a release from an externally
signed macOS handoff, but this release path (temporarily) no longer
distributes DMGs. Keeping DMG staging enabled made the handoff
unnecessarily require DMG assets and notarization/stapling validation
even though the promoted release only needs the signed macOS binaries.

## What changed
- Set every `stage-signed-macos` matrix entry to `build_dmg: "false"`,
including the primary macOS bundles.
- Kept the existing DMG staging branch in place behind
`matrix.build_dmg` so it can be re-enabled deliberately later.
- Updated the workflow header comment so the signed handoff contract
asks for signed binaries, not signed DMGs.

The regular signed build path that creates, signs, notarizes, and stages
DMGs is unchanged; this only affects the `promote_signed` handoff path.
2026-05-15 14:19:06 -07:00
Michael Bolin
9adb4a68be Merge b17302eda8 into sapling-pr-archive-bolinfest 2026-05-15 14:11:10 -07:00
Michael Bolin
b17302eda8 windows-sandbox: add resolved permissions helper 2026-05-15 14:10:59 -07:00
Michael Bolin
4023b31484 merge commit for archive created by Sapling 2026-05-15 13:52:39 -07:00
Michael Bolin
237245ad11 tui: pass active permission profiles through app commands 2026-05-15 13:52:21 -07:00
Michael Bolin
3e358a7ae1 Merge c0ed87b84a into sapling-pr-archive-bolinfest 2026-05-15 13:42:05 -07:00
Michael Bolin
c0ed87b84a windows-sandbox: add resolved permissions helper 2026-05-15 13:41:52 -07:00
Michael Bolin
bbfdde44df merge commit for archive created by Sapling 2026-05-15 13:31:47 -07:00
Michael Bolin
3bb7ddd4b5 tui: pass active permission profiles through app commands 2026-05-15 13:31:36 -07:00
Michael Bolin
001b6cd74e merge commit for archive created by Sapling 2026-05-15 13:14:30 -07:00
Michael Bolin
26894330f4 tui: pass active permission profiles through app commands 2026-05-15 13:14:12 -07:00
Michael Bolin
8df2d96860 core: construct test permission profiles directly (#22795)
## Why

The core migration is trying to make `PermissionProfile` the shape tests
and runtime code reason about, leaving `SandboxPolicy` only where legacy
behavior is explicitly under test. The local
`permission_profile_for_sandbox_policy()` test helpers kept new
permission-profile tests mentally tied to the old sandbox model even
when the equivalent profile is straightforward.

## What Changed

- Removed the `permission_profile_for_sandbox_policy()` helper from the
network proxy spec tests and session tests.
- Replaced legacy conversions for read-only, workspace-write, and
full-access cases with `PermissionProfile::read_only()`,
`PermissionProfile::workspace_write()`, and
`PermissionProfile::Disabled`.
- Constructed the external-sandbox session test's
`PermissionProfile::External` directly, while preserving the legacy
`SandboxPolicy` only where the test still exercises legacy config update
behavior.

## How To Review

This PR is intentionally test-only. Review the two touched files and
check that each replacement preserves the old legacy mapping:

- `SandboxPolicy::new_read_only_policy()` ->
`PermissionProfile::read_only()`
- `SandboxPolicy::new_workspace_write_policy()` ->
`PermissionProfile::workspace_write()`
- `SandboxPolicy::DangerFullAccess` -> `PermissionProfile::Disabled`
- `SandboxPolicy::ExternalSandbox { network_access: Restricted }` ->
`PermissionProfile::External { network: Restricted }`

## Verification

- `cargo test -p codex-core
requirements_allowed_domains_are_a_baseline_for_user_allowlist`
- `cargo test -p codex-core
start_managed_network_proxy_applies_execpolicy_network_rules`
- `cargo test -p codex-core
session_configured_reports_permission_profile_for_external_sandbox`
- `cargo test -p codex-core
managed_network_proxy_decider_survives_full_access_start`
- `just fix -p codex-core`








---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/22795).
* #22891
* __->__ #22795
2026-05-15 13:09:25 -07:00
Michael Bolin
e3a572e209 Merge aa5fa65f85 into sapling-pr-archive-bolinfest 2026-05-15 13:08:52 -07:00