Commit Graph

12616 Commits

Author SHA1 Message Date
Michael Bolin
aef50ebe16 merge commit for archive created by Sapling 2026-04-22 16:41:20 -07:00
Michael Bolin
a3acf5d517 tests: isolate approval fixtures from host rules 2026-04-22 16:37:12 -07:00
Michael Bolin
7f899ebaa0 shell-escalation: carry resolved permission profiles 2026-04-22 16:37:12 -07:00
Michael Bolin
864c0ca198 mcp: include permission profiles in sandbox state 2026-04-22 16:37:12 -07:00
Michael Bolin
e24bd31a63 tui: carry permission profiles on user turns 2026-04-22 16:37:12 -07:00
Michael Bolin
a5332b3967 tui: sync session permission profiles 2026-04-22 16:37:12 -07:00
Michael Bolin
75dc7b710a app-server: accept command permission profiles 2026-04-22 16:37:12 -07:00
Michael Bolin
40efdc08d6 protocol: report session permission profiles 2026-04-22 16:37:12 -07:00
Michael Bolin
c701334a5f Merge e520e3e256 into sapling-pr-archive-bolinfest 2026-04-22 16:34:56 -07:00
Michael Bolin
76e4a7f099 rollout: persist turn permission profiles 2026-04-22 16:34:38 -07:00
Michael Bolin
e520e3e256 tests: isolate approval fixtures from host rules 2026-04-22 16:34:38 -07:00
Michael Bolin
3a19a19ba5 shell-escalation: carry resolved permission profiles 2026-04-22 16:34:38 -07:00
Michael Bolin
ab910de459 mcp: include permission profiles in sandbox state 2026-04-22 16:34:38 -07:00
Michael Bolin
f20bcb789c tui: carry permission profiles on user turns 2026-04-22 16:34:38 -07:00
Michael Bolin
29df5663ba tui: sync session permission profiles 2026-04-22 16:34:38 -07:00
Michael Bolin
12bba8943b app-server: accept command permission profiles 2026-04-22 16:34:38 -07:00
Michael Bolin
8ff85aaee8 protocol: report session permission profiles 2026-04-22 16:34:38 -07:00
Michael Bolin
bc083e4713 clients: send permission profiles to app-server (#18280)
## Why

After app-server can accept `PermissionProfile`, first-party clients
should stop preferring legacy sandbox fields when canonical permission
information is available. This keeps the migration moving without
removing legacy compatibility yet.

The client side still has mixed surfaces during the stack: embedded
thread start/resume/fork and exec initial turns can derive a profile
directly from local config, while TUI remote sessions and some
turn-start paths only have a legacy/server-context-safe sandbox
projection. Those paths keep sending legacy sandbox fields rather than
synthesizing or sending lossy/local-only profiles.

## What changed

- Sends `permissionProfile` from exec and embedded TUI thread
start/resume/fork requests when config has a representable profile.
- Keeps legacy sandbox fallback for external sandbox policies, TUI
remote thread lifecycle requests, and TUI turn-start requests that do
not yet carry the active profile.
- Sends the actual config-derived `permissionProfile` for exec initial
turns instead of rebuilding one from the legacy sandbox projection.
- Stores response `permissionProfile` as optional in TUI session state
so external sandbox responses and compatibility payloads preserve
`null`.
- Updates tests for request construction and response mapping.

## Verification

- `cargo check --tests -p codex-tui -p codex-exec`
- `cargo test -p codex-tui app_server_session -- --nocapture`
- `cargo test -p codex-exec thread_start_params -- --nocapture`
- `cargo test -p codex-tui
app_server_session::tests::thread_lifecycle_params -- --nocapture`
- `just fix -p codex-tui -p codex-exec`
- `just fix -p codex-tui`












---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/18280).
* #18288
* #18287
* #18286
* #18285
* #18284
* #18283
* #18282
* #18281
* __->__ #18280
2026-04-22 16:34:13 -07:00
Michael Bolin
99ba81d053 Merge 8874b88e07 into sapling-pr-archive-bolinfest 2026-04-22 16:05:59 -07:00
Michael Bolin
8874b88e07 tests: isolate approval fixtures from host rules 2026-04-22 16:05:42 -07:00
Michael Bolin
938a78cd8d shell-escalation: carry resolved permission profiles 2026-04-22 16:05:42 -07:00
Michael Bolin
c18c0978bc mcp: include permission profiles in sandbox state 2026-04-22 16:05:42 -07:00
Michael Bolin
86943c912d tui: carry permission profiles on user turns 2026-04-22 16:05:42 -07:00
Michael Bolin
d34a7d650e tui: sync session permission profiles 2026-04-22 16:05:42 -07:00
Michael Bolin
07ce48f669 app-server: accept command permission profiles 2026-04-22 16:05:42 -07:00
Michael Bolin
dc8fa55a5f protocol: report session permission profiles 2026-04-22 16:05:42 -07:00
Michael Bolin
2ce54a351d rollout: persist turn permission profiles 2026-04-22 16:05:42 -07:00
Michael Bolin
41a32d7f5c clients: send permission profiles to app-server 2026-04-22 16:05:42 -07:00
Michael Bolin
44dbd9e48a exec-server: require explicit filesystem sandbox cwd (#19046)
## Why

This is a cleanup PR for the `PermissionProfile` migration stack. #19016
fixed remote exec-server sandbox contexts so Docker-backed filesystem
requests use a request/container `cwd` instead of leaking the local test
runner `cwd`. That exposed the broader API problem:
`FileSystemSandboxContext::new(SandboxPolicy)` could still reconstruct
filesystem permissions by reading the exec-server process cwd with
`AbsolutePathBuf::current_dir()`.

That made `cwd`-dependent legacy entries, such as `:cwd`,
`:project_roots`, and relative deny globs, depend on ambient process
state instead of the request sandbox `cwd`. As later PRs make
`PermissionProfile` the primary permissions abstraction, sandbox
contexts should be explicit about whether they carry a request `cwd` or
are profile-only. Removing the implicit constructor prevents new call
sites from accidentally rebuilding permissions against the wrong `cwd`.

## What changed

- Removed `FileSystemSandboxContext::new(SandboxPolicy)`.
- Kept production callers on explicit constructors:
`from_legacy_sandbox_policy(..., cwd)`, `from_permission_profile(...)`,
and `from_permission_profile_with_cwd(...)`.
- Updated exec-server test helpers to construct `PermissionProfile`
values directly instead of routing through legacy `SandboxPolicy`
projections.
- Updated the environment regression test to use an explicit restricted
profile with no synthetic `cwd`.

## Verification

- `cargo test -p codex-exec-server`
- `just fix -p codex-exec-server`


---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/19046).
* #18288
* #18287
* #18286
* #18285
* #18284
* #18283
* #18282
* #18281
* #18280
* __->__ #19046
2026-04-22 23:05:12 +00:00
Won Park
46142c3cb0 Rebrand approvals reviewer config to auto-review (#18504)
### Why

Auto-review is the user-facing name for the approvals reviewer, but the
config/API value still exposed the old `guardian_subagent` name. That
made new configs and generated schemas point users at Guardian
terminology even though the intended product surface is Auto-review.

This PR updates the external `approvals_reviewer` value while preserving
compatibility for existing configs and clients.

### What changed

- Makes `auto_review` the canonical serialized value for
`approvals_reviewer`.
- Keeps `guardian_subagent` accepted as a legacy alias.
- Keeps `user` accepted and serialized as `user`.
- Updates generated config and app-server schemas so
`approvals_reviewer` includes:
  - `user`
  - `auto_review`
  - `guardian_subagent`
- Updates app-server README docs for the reviewer value.
- Updates analytics and config requirements tests for the canonical
auto_review value.


### Compatibility

Existing configs and API payloads using:

```toml
approvals_reviewer = "guardian_subagent"
```

continue to load and map to the Auto-review reviewer behavior. 

New serialization emits: 
```toml
approvals_reviewer = "auto_review" 
```

This PR intentionally does not rename the [features].guardian_approval
key or broad internal Guardian symbols. Those are split out for a
follow-up PR to keep this migration small and avoid touching large
TUI/internal surfaces.

**Verification**
cargo test -p codex-protocol
approvals_reviewer_serializes_auto_review_and_accepts_legacy_guardian_subagent
cargo test -p codex-app-server-protocol
approvals_reviewer_serializes_auto_review_and_accepts_legacy_guardian_subagent
2026-04-22 15:45:35 -07:00
Michael Bolin
a4e703b89b merge commit for archive created by Sapling 2026-04-22 15:31:16 -07:00
Konstantine Kahadze
0e25c5ff42 Update bundled OpenAI Docs skill freshness check (#19043)
## Summary

Sync the bundled `openai-docs` system skill with the already-merged
`openai/skills` update from https://github.com/openai/skills/pull/360.

Codex bundles system skills from `codex-rs/skills/src/assets/samples`,
so this PR copies the same GPT-5.4 OpenAI Docs skill update into the
Codex app/CLI bundle path.

## Changes

- Add the latest-model resolver script to the bundled `openai-docs`
skill.
- Route model upgrade and prompt-upgrade requests through remote
latest-model metadata when current guidance is needed.
- Rename bundled fallback references to `upgrade-guide.md` and
`prompting-guide.md`.
- Keep the bundled fallback guidance GPT-5.4-only.

## Validation

- Verified this bundled skill is byte-for-byte identical to
`openai/skills@origin/main` `skills/.system/openai-docs`.
- Ran the resolver locally and confirmed it returns `gpt-5.4` /
`gpt-5p4`.
2026-04-22 22:31:04 +00: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
khoi
568cdacc7e [Codex] Register browser requirements feature keys (#18956)
## Summary
- register `in_app_browser` and `browser_use` as stable feature keys
- allow requirements/MDM feature requirements to pin those desktop
browser controls
- add coverage for browser requirements being accepted by config loading

## Testing
- `cargo fmt --all` (`just fmt` unavailable locally; rustfmt warned
about nightly-only `imports_granularity` config)
- `cargo test -p codex-features`
- `cargo test -p codex-core browser_feature_requirements_are_valid`
- Tested manually by setting in `requirements.toml` and seeing after app
restart state to reflect the setting was correct (at the time hiding the
`Browser Use` setting when the enterprise setting was set to false
2026-04-22 15:27:15 -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