Commit Graph
13494 Commits
Author SHA1 Message Date
Michael Bolin 8805d44a1a merge commit for archive created by Sapling 2026-04-26 20:36:41 -07:00
Michael Bolin b573755286 permissions: derive legacy exec policies at boundaries 2026-04-26 20:36:21 -07:00
Michael Bolin c60897dfc7 permissions: constrain requirements as profiles 2026-04-26 20:36:21 -07:00
Michael Bolin cd052cb7dc Merge 1d634bff11 into sapling-pr-archive-bolinfest 2026-04-26 20:34:53 -07:00
Michael Bolin 1d634bff11 permissions: derive legacy exec policies at boundaries 2026-04-26 20:32:45 -07:00
Michael Bolin bc68363d49 permissions: constrain requirements as profiles 2026-04-26 20:32:45 -07:00
Michael Bolin 20ba4bf492 permissions: store only constrained permission profiles 2026-04-26 20:31:32 -07:00
Michael Bolin 0d8cdc0510 permissions: centralize legacy sandbox projection (#19734)
## Why

The remaining migration work still needs `SandboxPolicy` at a few
compatibility boundaries, but those projections should come from one
canonical path. Keeping ad hoc legacy projections scattered through
app-server, CLI, and config code makes it easy for behavior to drift as
`PermissionProfile` gains fidelity that the legacy enum cannot
represent.

## What Changed

- Adds `Permissions::legacy_sandbox_policy(cwd)` and
`Config::legacy_sandbox_policy()` as the compatibility projection from
the canonical `PermissionProfile`.
- Adds `Permissions::can_set_legacy_sandbox_policy()` so legacy inputs
are checked after they are converted into profile semantics.
- Updates app-server command handling, Windows sandbox setup, session
configuration, and sandbox summaries to use the centralized projection
helper.
- Leaves `SandboxPolicy` in place only for boundary inputs/outputs that
still speak the legacy abstraction.

## Verification

- `cargo check -p codex-config -p codex-core -p codex-sandboxing -p
codex-app-server -p codex-cli -p codex-tui`
- `cargo test -p codex-tui
permissions_selection_history_snapshot_full_access_to_default --
--nocapture`
- `cargo test -p codex-tui
permissions_selection_sends_approvals_reviewer_in_override_turn_context
-- --nocapture`
- `bazel test //codex-rs/tui:tui-unit-tests-bin
--test_arg=permissions_selection_history_snapshot_full_access_to_default
--test_output=errors`
- `bazel test //codex-rs/tui:tui-unit-tests-bin
--test_arg=permissions_selection_sends_approvals_reviewer_in_override_turn_context
--test_output=errors`


---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/19734).
* #19737
* #19736
* #19735
* __->__ #19734
2026-04-26 20:31:23 -07:00
Abhinav c3e60849e5 inline hostname resolution for remote sandbox config (#19739)
# Why

Requirements support host-specific
`remote_sandbox_config.hostname_patterns`, but config loading previously
resolved and passed the system hostname through every config-loading
path even when no requirements layer used `remote_sandbox_config`. On
machines where hostname lookup is slow, startup and app-server config
reads paid for a feature that was not active.

We only need the hostname when a requirements layer actually declares
`remote_sandbox_config`, so this moves hostname resolution to the single
requirements merge point and keeps all other config callers unaware of
hostname matching.

# What

- Removed the eager `host_name` plumbing from
`load_config_layers_state`, `load_requirements_toml`, `ConfigBuilder`,
app-server `ConfigManager`, network proxy loading, and related call
sites.
- Resolve the hostname inside
`merge_requirements_with_remote_sandbox_config` only when the incoming
requirements contain `remote_sandbox_config`.
2026-04-27 03:18:57 +00:00
Michael Bolin 2066615892 Merge b562b5f808 into sapling-pr-archive-bolinfest 2026-04-26 20:01:22 -07:00
Michael Bolin b562b5f808 permissions: derive legacy exec policies at boundaries 2026-04-26 20:00:50 -07:00
Michael Bolin 5db75d6f00 permissions: constrain requirements as profiles 2026-04-26 20:00:50 -07:00
Michael Bolin 19884cb6a6 permissions: store only constrained permission profiles 2026-04-26 20:00:50 -07:00
Michael Bolin f20558cadc permissions: centralize legacy sandbox projection 2026-04-26 20:00:50 -07:00
Michael Bolin ad57a3fee2 permissions: finish profile-backed app surfaces (#19395) 2026-04-26 19:42:39 -07:00
Michael Bolin af95cc896c Merge 14009b1a3b into sapling-pr-archive-bolinfest 2026-04-26 19:30:37 -07:00
Michael Bolin 14009b1a3b permissions: derive legacy exec policies at boundaries 2026-04-26 19:27:31 -07:00
Michael Bolin fc3c6bf4fb permissions: constrain requirements as profiles 2026-04-26 19:27:31 -07:00
Michael Bolin be50c0360a permissions: store only constrained permission profiles 2026-04-26 19:27:31 -07:00
Michael Bolin b80c55b5e0 permissions: centralize legacy sandbox projection 2026-04-26 19:25:42 -07:00
Michael Bolin 322b5d00e8 Merge a4da71c2ae into sapling-pr-archive-bolinfest 2026-04-26 19:14:37 -07:00
Michael Bolin a4da71c2ae permissions: derive legacy exec policies at boundaries 2026-04-26 19:11:28 -07:00
Michael Bolin 95ba6f80bf permissions: constrain requirements as profiles 2026-04-26 19:11:28 -07:00
Michael Bolin b28678aceb permissions: store only constrained permission profiles 2026-04-26 19:11:28 -07:00
Michael Bolin 23d87902ac permissions: centralize legacy sandbox projection 2026-04-26 19:10:15 -07:00
Michael Bolin 97d0afd264 merge commit for archive created by Sapling 2026-04-26 18:54:22 -07:00
Michael Bolin 59eda9a97a permissions: derive legacy exec policies at boundaries 2026-04-26 18:53:02 -07:00
Michael Bolin 4a813f19e6 permissions: constrain requirements as profiles 2026-04-26 18:53:02 -07:00
Michael Bolin de48120cd0 permissions: store only constrained permission profiles 2026-04-26 18:53:02 -07:00
Michael Bolin 874f927816 permissions: centralize legacy sandbox projection 2026-04-26 18:53:02 -07:00
Michael Bolin 58308358bc permissions: finish profile-backed app surfaces 2026-04-26 18:53:01 -07:00
Michael Bolin 8dc53c09a5 Merge 9080a1cbac into sapling-pr-archive-bolinfest 2026-04-26 18:49:00 -07:00
Michael Bolin 9080a1cbac permissions: derive legacy exec policies at boundaries 2026-04-26 18:47:25 -07:00
Michael Bolin d3d674b34a permissions: constrain requirements as profiles 2026-04-26 18:47:25 -07:00
Michael Bolin 099d7e599f permissions: store only constrained permission profiles 2026-04-26 18:47:25 -07:00
Michael Bolin efa5c7960b permissions: centralize legacy sandbox projection 2026-04-26 18:47:25 -07:00
Michael Bolin f045e121c5 Merge 78f9b24805 into sapling-pr-archive-bolinfest 2026-04-26 18:32:55 -07:00
Michael Bolin 78f9b24805 permissions: derive legacy exec policies at boundaries 2026-04-26 18:31:35 -07:00
Michael Bolin 59915e61f0 permissions: constrain requirements as profiles 2026-04-26 18:31:35 -07:00
Michael Bolin e6b716a031 permissions: store only constrained permission profiles 2026-04-26 18:31:35 -07:00
Michael Bolin d9f12bf889 permissions: centralize legacy sandbox projection 2026-04-26 18:30:54 -07:00
Andrey Mishchenko 1f304dd1f2 Allow agents.max_threads to work with multi_agent_v2 (#19733) 2026-04-26 17:56:05 -07:00
Michael Bolin 2b931eb1fe Merge e1f966b3ba into sapling-pr-archive-bolinfest 2026-04-26 17:44:11 -07:00
Michael Bolin 85a247f7ef permissions: finish profile-backed app surfaces 2026-04-26 17:43:45 -07:00
Michael Bolin e1f966b3ba permissions: derive legacy exec policies at boundaries 2026-04-26 17:43:45 -07:00
Michael Bolin 434fcb6fd7 permissions: constrain requirements as profiles 2026-04-26 17:43:45 -07:00
Michael Bolin 4937cc02d1 permissions: store only constrained permission profiles 2026-04-26 17:43:45 -07:00
Michael Bolin 294d2a8fcb permissions: centralize legacy sandbox projection 2026-04-26 17:43:45 -07:00
Michael Bolin 2cb8746457 permissions: remove core legacy policy round trips (#19394)
## Why

Several execution paths still converted profile-backed permissions into
`SandboxPolicy` and then rebuilt runtime permissions from that legacy
shape. Those round trips are unnecessary after the preceding PRs and can
lose split filesystem semantics. Core approval and escalation should
carry the resolved profile directly.

## What Changed

- Removes `sandbox_policy` from `ResolvedPermissionProfile`; the
resolved permission object now carries the canonical `PermissionProfile`
directly.
- Updates exec-policy fallback, shell/unified-exec interception,
escalation reruns, and related tests to pass profiles instead of legacy
policies.
- Removes legacy additional-permission merge helpers that built an
effective `SandboxPolicy` before rebuilding runtime permissions.
- Keeps legacy projections only at compatibility boundaries that still
require `SandboxPolicy`, not in core permission computation.

## Verification

- `cargo test -p codex-core direct_write_roots`
- `cargo test -p codex-core runtime_roots_to_legacy_projection`
- `cargo test -p codex-app-server
requested_permissions_trust_project_uses_permission_profile_intent`







































































---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/19394).
* #19737
* #19736
* #19735
* #19734
* #19395
* __->__ #19394
2026-04-26 17:43:32 -07:00
Michael Bolin 775cd91def merge commit for archive created by Sapling 2026-04-26 17:40:29 -07:00