Commit Graph

12048 Commits

Author SHA1 Message Date
Michael Bolin
7166be1480 merge commit for archive created by Sapling 2026-04-20 20:13:08 -07:00
Michael Bolin
bb8f4b8bf3 sandboxing: intersect permission profiles semantically 2026-04-20 20:12:47 -07:00
Michael Bolin
7c4e862d2c Merge d9b343612d into sapling-pr-archive-bolinfest 2026-04-20 19:45:06 -07:00
Michael Bolin
d9b343612d tests: isolate approval fixtures from host rules 2026-04-20 19:42:55 -07:00
Michael Bolin
0f8b8aed8e shell-escalation: carry resolved permission profiles 2026-04-20 19:42:55 -07:00
Michael Bolin
71636e4ea7 mcp: include permission profiles in sandbox state 2026-04-20 19:42:55 -07:00
Michael Bolin
2f70f509b5 tui: carry permission profiles on user turns 2026-04-20 19:42:55 -07:00
Michael Bolin
6d8ce0b430 tui: sync session permission profiles 2026-04-20 19:42:55 -07:00
Michael Bolin
4937fa7d26 app-server: accept command permission profiles 2026-04-20 19:42:55 -07:00
Michael Bolin
eb2cbf577f protocol: report session permission profiles 2026-04-20 19:42:55 -07:00
Michael Bolin
299778060d rollout: persist turn permission profiles 2026-04-20 19:42:55 -07:00
Michael Bolin
fac89b19c7 clients: send permission profiles to app-server 2026-04-20 19:42:55 -07:00
Michael Bolin
68b5f9d41f app-server: accept permission profile overrides 2026-04-20 19:42:55 -07:00
Michael Bolin
47010046fd app-server: expose thread permission profiles 2026-04-20 19:42:55 -07:00
Michael Bolin
31d1b49a15 core: derive active permission profiles 2026-04-20 19:42:55 -07:00
Michael Bolin
26a7cc7ea6 exec-server: carry filesystem sandbox profiles 2026-04-20 19:42:55 -07:00
Michael Bolin
8aa3a11ada sandboxing: intersect permission profiles semantically 2026-04-20 19:42:55 -07:00
Michael Bolin
3d2f123895 protocol: preserve glob scan depth in permission profiles (#18713)
## Why

#18274 made `PermissionProfile` the canonical file-system permissions
shape, but the round-trip from `FileSystemSandboxPolicy` to
`PermissionProfile` still dropped one piece of policy metadata:
`glob_scan_max_depth`.

That field is security-relevant for deny-read globs such as `**/*.env`.
On Linux, bubblewrap sandbox construction uses it to bound unreadable
glob expansion. If a profile copied from active runtime permissions
loses this value and is submitted back as an override, the resulting
`FileSystemSandboxPolicy` can behave differently even though the visible
permission entries look equivalent.

## What changed

- Add `glob_scan_max_depth` to protocol `FileSystemPermissions` and
preserve it when converting to/from `FileSystemSandboxPolicy`.
- Keep legacy `read`/`write` JSON for simple path-only permissions, but
force canonical JSON when glob scan depth is present so the metadata is
not silently dropped.
- Carry `globScanMaxDepth` through app-server
`AdditionalFileSystemPermissions`, generated JSON/TypeScript schemas,
and app-server/TUI conversion call sites.
- Preserve the metadata through sandboxing permission normalization,
merging, and intersection.
- Carry the merged scan depth into the effective
`FileSystemSandboxPolicy` used for command execution, so bounded
deny-read globs reach Linux bubblewrap materialization.

## Verification

- `cargo test -p codex-sandboxing glob_scan -- --nocapture`
- `cargo test -p codex-sandboxing policy_transforms -- --nocapture`
- `just fix -p codex-sandboxing`





---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/18713).
* #18288
* #18287
* #18286
* #18285
* #18284
* #18283
* #18282
* #18281
* #18280
* #18279
* #18278
* #18277
* #18276
* #18275
* __->__ #18713
2026-04-20 19:42:45 -07:00
xl-openai
6e9e2c2eef feat: Support more plugin MCP file shapes. (#18780)
Update core-plugins MCP loading to accept either an mcpServers object or
a top-level server map in .mcp.json
2026-04-20 19:42:01 -07:00
Michael Bolin
97745db729 Merge 86529cae16 into sapling-pr-archive-bolinfest 2026-04-20 19:31:10 -07:00
Michael Bolin
86529cae16 chore: enable await-holding clippy lints
Follow-up to https://github.com/openai/codex/pull/18178, where we said the await-holding clippy rule would be enabled separately.

Enable `await_holding_lock` and `await_holding_invalid_type` after the preceding commits fixed or explicitly documented the current offenders.
2026-04-20 19:30:59 -07:00
Michael Bolin
48830448e9 chore: document intentional await-holding cases 2026-04-20 19:30:59 -07:00
Michael Bolin
b8fa5e7789 Merge 2a33df043c into sapling-pr-archive-bolinfest 2026-04-20 19:24:34 -07:00
Michael Bolin
2a33df043c chore: enable await-holding clippy lints
Follow-up to https://github.com/openai/codex/pull/18178, where we said the await-holding clippy rule would be enabled separately.

Enable `await_holding_lock` and `await_holding_invalid_type` after the preceding commits fixed or explicitly documented the current offenders.
2026-04-20 19:24:26 -07:00
Michael Bolin
aca6ccc4ee chore: document intentional await-holding cases 2026-04-20 19:24:25 -07:00
Michael Bolin
ff05532723 refactor: narrow async lock scopes (#18418)
## Why

This is part of the follow-up work from #18178 to make Codex ready for
Clippy's
[`await_holding_lock`](https://rust-lang.github.io/rust-clippy/master/index.html#await_holding_lock)
/
[`await_holding_invalid_type`](https://rust-lang.github.io/rust-clippy/master/index.html#await_holding_invalid_type)
lints.

This bottom PR keeps the scope intentionally small:
`NetworkProxyState::record_blocked()` only needs the state write lock
while it mutates the blocked-request ring buffer and counters. The debug
log payload and `BlockedRequestObserver` callback can be produced after
that lock is released.

## What changed

- Copies the blocked-request snapshot values needed for logging while
updating the state.
- Releases the `RwLockWriteGuard` before logging or notifying the
observer.

## Verification

- `cargo test -p codex-network-proxy`


---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/18418).
* #18698
* #18423
* __->__ #18418
2026-04-21 02:23:30 +00:00
Ahmed Ibrahim
d6af7a6c03 [1/4] Add executor HTTP request protocol (#18581)
### Why
Remote streamable HTTP MCP needs a transport-shaped executor primitive
before the MCP client can move network I/O to the executor. This layer
keeps the executor unaware of MCP and gives later PRs an ordered
streaming surface for response bodies.

### What
- Add typed `http/request` and `http/request/bodyDelta` protocol
payloads.
- Add executor client helpers for buffered and streamed HTTP responses.
- Route body-delta notifications to request-scoped streams with sequence
validation and cleanup when a stream finishes or is dropped.
- Document the new protocol constants, transport structs, public client
methods, body-stream lifecycle, and request-scoped routing helpers.
- Add in-memory JSON-RPC client coverage for streamed HTTP response-body
notifications, with comments spelling out what the test proves and each
setup/exercise/assert phase.

### Stack
1. #18581 protocol
2. #18582 runner
3. #18583 RMCP client
4. #18584 manager wiring and local/remote coverage

### Verification
- `just fmt`
- `cargo check -p codex-exec-server -p codex-rmcp-client --tests`
- `cargo check -p codex-core --test all` compile-only
- `git diff --check`
- Online full CI is running from the `full-ci` branch, including the
remote Rust test job.

Co-authored-by: Codex <noreply@openai.com>

---------

Co-authored-by: Codex <noreply@openai.com>
2026-04-21 02:21:08 +00:00
Michael Bolin
1a8cf4dca5 Merge 80d50c7a32 into sapling-pr-archive-bolinfest 2026-04-20 19:03:18 -07:00
Michael Bolin
80d50c7a32 chore: document intentional await-holding cases 2026-04-20 19:03:11 -07:00
Michael Bolin
f1411baed7 merge commit for archive created by Sapling 2026-04-20 18:59:27 -07:00
Michael Bolin
22734d6562 tests: isolate approval fixtures from host rules 2026-04-20 18:57:11 -07:00
Michael Bolin
dd4b06d9c4 shell-escalation: carry resolved permission profiles 2026-04-20 18:57:11 -07:00
Michael Bolin
0d93db7f8b mcp: include permission profiles in sandbox state 2026-04-20 18:57:11 -07:00
Michael Bolin
1517281a72 tui: carry permission profiles on user turns 2026-04-20 18:57:10 -07:00
Michael Bolin
4dd62d897d tui: sync session permission profiles 2026-04-20 18:56:47 -07:00
Michael Bolin
3392b2b47f app-server: accept command permission profiles 2026-04-20 18:56:47 -07:00
Michael Bolin
0193553d89 protocol: report session permission profiles 2026-04-20 18:56:46 -07:00
Michael Bolin
37279b67be rollout: persist turn permission profiles 2026-04-20 18:56:15 -07:00
Michael Bolin
b852bd9aa2 clients: send permission profiles to app-server 2026-04-20 18:55:54 -07:00
Michael Bolin
1fdd10da00 Merge b2c2770a78 into sapling-pr-archive-bolinfest 2026-04-20 18:54:36 -07:00
Michael Bolin
69ab9ebcc8 app-server: accept permission profile overrides 2026-04-20 18:54:32 -07:00
Michael Bolin
880130c24a app-server: expose thread permission profiles 2026-04-20 18:54:01 -07:00
Michael Bolin
6395d1a830 core: derive active permission profiles 2026-04-20 18:54:01 -07:00
Michael Bolin
a53690c31e exec-server: carry filesystem sandbox profiles 2026-04-20 18:54:01 -07:00
Michael Bolin
f9163e8780 sandboxing: intersect permission profiles semantically 2026-04-20 18:54:00 -07:00
Michael Bolin
5620995b4e protocol: preserve glob scan depth in permission profiles 2026-04-20 18:54:00 -07:00
Michael Bolin
b2c2770a78 chore: enable await-holding clippy lints
Follow-up to https://github.com/openai/codex/pull/18178, where we said the await-holding clippy rule would be enabled separately.

Enable `await_holding_lock` and `await_holding_invalid_type` after the preceding commits fixed or explicitly documented the current offenders.
2026-04-20 18:51:10 -07:00
Michael Bolin
793639ee74 chore: document intentional await-holding cases 2026-04-20 18:51:10 -07:00
Michael Bolin
17162a9db6 refactor: drop data locks before async work 2026-04-20 18:50:43 -07:00
Celia Chen
cefcfe43b9 feat: add a built-in Amazon Bedrock model provider (#18744)
## Why

Codex needs a first-class `amazon-bedrock` model provider so users can
select Bedrock without copying a full provider definition into
`config.toml`. The provider has Codex-owned defaults for the pieces that
should stay consistent across users: the display `name`, Bedrock
`base_url`, and `wire_api`.

At the same time, users still need a way to choose the AWS credential
profile used by their local environment. This change makes
`amazon-bedrock` a partially modifiable built-in provider: code owns the
provider identity and endpoint defaults, while user config can set
`model_providers.amazon-bedrock.aws.profile`.

For example:

```toml
model_provider = "amazon-bedrock"

[model_providers.amazon-bedrock.aws]
profile = "codex-bedrock"
```

## What Changed

- Added `amazon-bedrock` to the built-in model provider map with:
  - `name = "Amazon Bedrock"`
  - `base_url = "https://bedrock-mantle.us-east-1.api.aws/v1"`
  - `wire_api = "responses"`
- Added AWS provider auth config with a profile-only shape:
`model_providers.<id>.aws.profile`.
- Kept AWS auth config restricted to `amazon-bedrock`; custom providers
that set `aws` are rejected.
- Allowed `model_providers.amazon-bedrock` through reserved-provider
validation so it can act as a partial override.
- During config loading, only `aws.profile` is copied from the
user-provided `amazon-bedrock` entry onto the built-in provider. Other
Bedrock provider fields remain hard-coded by the built-in definition.
- Updated the generated config schema for the new provider AWS profile
config.
2026-04-21 00:54:05 +00:00