Commit Graph
12029 Commits
Author SHA1 Message Date
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 IbrahimandCodex 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
Michael Bolin afc163c7e7 merge commit for archive created by Sapling 2026-04-20 17:47:46 -07:00
canvrno-oai 9a2b34213b /statusline & /title - Shared preview values (#18435)
This PR makes the `/statusline` and `/title` setup UIs share one
preview-value source instead of each surface using its own examples.
Both pickers now render consistent live values when available, and
stable placeholders when they are not. It also resolves live preview
values at the shared preview-item layer, so `/title` preview can use
real runtime values for title-specific cases like status text, task
progress, and project-name fallback behavior.

- Adds a shared preview data model for status surfaces
- Maps status-line items and terminal-title items onto that shared
preview list
- Feeds both setup views from the same chatwidget-derived preview data,
with terminal-title-specific formatting applied before `/title` preview
renders
- Keeps project-root preview aligned with status-line behavior while
project in /title keeps its title fallback/truncation behavior
- Adds snapshot coverage for live-only, hardcoded-only, and mixed cases

Test Steps
- Open Codex TUI and launch `/statusline`.
- Toggle and reorder items, then verify the preview uses current session
values when possible, and placeholder values for missing values (ex: no
thread ID).
- Open `/title` and verify it shows the same normalized values,
including live status/task-progress values when available.
2026-04-20 17:46:11 -07:00
Michael Bolin 5472f2e990 tests: isolate approval fixtures from host rules 2026-04-20 17:45:14 -07:00
Michael Bolin b0cd19827e shell-escalation: carry resolved permission profiles 2026-04-20 17:45:14 -07:00
Michael Bolin 1ea6640b61 mcp: include permission profiles in sandbox state 2026-04-20 17:45:14 -07:00
Michael Bolin 2079bad07b tui: carry permission profiles on user turns 2026-04-20 17:45:14 -07:00
Michael Bolin 10b0e3965f tui: sync session permission profiles 2026-04-20 17:45:14 -07:00
Michael Bolin d67b64c786 app-server: accept command permission profiles 2026-04-20 17:45:14 -07:00
Michael Bolin 5c0452e89a protocol: report session permission profiles 2026-04-20 17:45:14 -07:00
Michael Bolin 1cb17ad6c9 rollout: persist turn permission profiles 2026-04-20 17:45:14 -07:00
Michael Bolin a56ac61533 clients: send permission profiles to app-server 2026-04-20 17:45:14 -07:00
Michael Bolin 929878c46e app-server: accept permission profile overrides 2026-04-20 17:45:14 -07:00
Michael Bolin 11e76d0702 app-server: expose thread permission profiles 2026-04-20 17:45:14 -07:00
Michael Bolin cf6fca3302 merge commit for archive created by Sapling 2026-04-20 17:44:55 -07:00
Michael Bolin 9d670e966a app-server: expose thread permission profiles 2026-04-20 17:43:40 -07:00
Michael Bolin b7cccc8df9 core: derive active permission profiles 2026-04-20 17:42:15 -07:00
Michael Bolin af7da1ee10 exec-server: carry filesystem sandbox profiles 2026-04-20 17:42:15 -07:00
Michael Bolin e6518e015e sandboxing: intersect permission profiles semantically 2026-04-20 17:42:14 -07:00
Michael Bolin f69daeaa02 merge commit for archive created by Sapling 2026-04-20 17:25:37 -07:00