Commit Graph
12377 Commits
Author SHA1 Message Date
Michael Bolin d6cbb3cf37 Merge e4889afbd6 into sapling-pr-archive-bolinfest 2026-04-21 22:21:09 -07:00
Michael Bolin e4889afbd6 app-server: expose thread permission profiles 2026-04-21 22:20:58 -07:00
Michael Bolin 9026c3328e merge commit for archive created by Sapling 2026-04-21 22:19:56 -07:00
Michael Bolin a838006c97 fix(exec-server): retain output until streams close 2026-04-21 22:19:41 -07:00
Michael Bolin 42c075308a Merge a708aa4c07 into sapling-pr-archive-bolinfest 2026-04-21 22:15:47 -07:00
Michael Bolin a708aa4c07 tests: isolate approval fixtures from host rules 2026-04-21 22:15:15 -07:00
Michael Bolin d9e23552bf shell-escalation: carry resolved permission profiles 2026-04-21 22:15:15 -07:00
Michael Bolin b88c653165 mcp: include permission profiles in sandbox state 2026-04-21 22:15:15 -07:00
Michael Bolin 1038aae0b5 tui: carry permission profiles on user turns 2026-04-21 22:15:15 -07:00
Michael Bolin ccb6d70a77 tui: sync session permission profiles 2026-04-21 22:15:15 -07:00
Michael Bolin 134b83009c app-server: accept command permission profiles 2026-04-21 22:15:15 -07:00
Michael Bolin dbf88606a9 protocol: report session permission profiles 2026-04-21 22:15:15 -07:00
Michael Bolin b6c0d5807a rollout: persist turn permission profiles 2026-04-21 22:15:15 -07:00
Michael Bolin 16e687834b clients: send permission profiles to app-server 2026-04-21 22:15:15 -07:00
Michael Bolin 56c927ae5d app-server: accept permission profile overrides 2026-04-21 22:15:15 -07:00
Michael Bolin f76a892a55 app-server: expose thread permission profiles 2026-04-21 22:15:15 -07:00
Michael Bolin 0fef35dc3a core: derive active permission profiles (#18277)
## Why

`Permissions` should not store a separate `PermissionProfile` that can
drift from the constrained `SandboxPolicy` and network settings. The
active profile needs to be derived from the same constrained values that
already honor `requirements.toml`.

## What changed

This adds derivation of the active `PermissionProfile` from the
constrained runtime permission settings and exposes that derived value
through config snapshots and thread state. The app-server can then
report the active profile without introducing a second source of truth.

## Verification

- `cargo test -p codex-core --test all permissions_messages --
--nocapture`
- `cargo test -p codex-core --test all request_permissions --
--nocapture`



























---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/18277).
* #18288
* #18287
* #18286
* #18285
* #18284
* #18283
* #18282
* #18281
* #18280
* #18279
* #18278
* __->__ #18277
2026-04-21 22:11:40 -07:00
Michael Bolin e41b5de26e Merge 8e6431c80a into sapling-pr-archive-bolinfest 2026-04-21 22:05:28 -07:00
Michael Bolin 8e6431c80a fix(exec-server): retain output until streams close 2026-04-21 22:04:55 -07:00
Michael Bolin 313b049060 merge commit for archive created by Sapling 2026-04-21 22:04:36 -07:00
Michael Bolin a4a2863962 fix(exec-server): retain output until streams close 2026-04-21 22:04:23 -07:00
Celia Chen 51fdc35945 chore: remove unused Bedrock auth lazy loading (#18948)
## Summary

The Bedrock Mantle SigV4 auth provider currently looks like it can
lazily load `AwsAuthContext`, but the provider is only constructed after
`resolve_auth_method` has already loaded that context. Because
`with_context` always pre-populates the `OnceCell`, the
`get_or_try_init` fallback is unused in normal operation and makes the
provider lifecycle harder to reason about.

This change removes that dead lazy-loading path and makes the actual
behavior explicit:

- `BedrockAuthMethod::AwsSdkAuth` carries only the resolved
`AwsAuthContext`.
- `BedrockMantleSigV4AuthProvider` stores the resolved context directly.
- request signing uses the stored context without going through
`OnceCell`.

The existing eager AWS auth resolution behavior is unchanged; this is a
simplification of the provider state, not a behavior change.

## Testing

- `cargo shear`
- `cargo test -p codex-model-provider`
- `just bazel-lock-check`
2026-04-22 05:01:22 +00:00
Michael Bolin 5d2b2e0176 Merge 7f4668ae7c into sapling-pr-archive-bolinfest 2026-04-21 21:57:36 -07:00
Michael Bolin 7f4668ae7c fix(exec-server): retain output until streams close 2026-04-21 21:57:30 -07:00
Michael Bolin 16b731a31c Merge cd2f83c3c2 into sapling-pr-archive-bolinfest 2026-04-21 21:53:39 -07:00
Michael Bolin cd2f83c3c2 fix(exec-server): retain output until streams close 2026-04-21 21:53:25 -07:00
Dylan HurdandCodex 34800d717e [codex] Clean guardian instructions (#18934)
## Summary
- Keep the guardian policy installed as guardian base instructions.
- Clear inherited parent `developer_instructions` for guardian review
sessions.
- Update guardian config tests to assert developer instructions are
cleared and policy text is sourced from base instructions.

## Why
Guardian review sessions are intended to run under an isolated guardian
policy. Because the guardian config is cloned from the parent config,
inherited custom or managed developer instructions could otherwise
remain active and conflict with guardian review behavior.

## Validation
- `just fmt`
- `cargo test -p codex-core guardian_review_session_config`

Co-authored-by: Codex <noreply@openai.com>
2026-04-21 21:47:58 -07:00
Michael Bolin faed6d5c07 tests: serialize process-heavy Windows CI suites (#18943)
## Why

A [Windows Cargo
build](https://github.com/openai/codex/actions/runs/24754807756/job/72425641062)
on `main` timed out in several unrelated-looking suites at the same
time:

- `codex-app-server` account tests failed before account logic, while
`mcp.initialize()` was waiting for the first JSON-RPC response.
- `codex-core` `apply_patch_cli` tests timed out while running full
Codex/apply_patch turns.
- `codex-windows-sandbox` legacy session tests timed out while creating
restricted-token child processes and private desktops.

The app-server log reached the test harness write path in
[`McpProcess::initialize_with_params`](https://github.com/openai/codex/blob/731b54d08fb93aec31fb020999a62447886f3ab3/codex-rs/app-server/tests/common/mcp_process.rs#L244-L263),
but never printed the matching stdout read from
[`read_jsonrpc_message`](https://github.com/openai/codex/blob/731b54d08fb93aec31fb020999a62447886f3ab3/codex-rs/app-server/tests/common/mcp_process.rs#L1123-L1128).
The server initialize handler is a small bookkeeping/response path
([`message_processor.rs`](https://github.com/openai/codex/blob/731b54d08fb93aec31fb020999a62447886f3ab3/codex-rs/app-server/src/message_processor.rs#L601-L728)),
so the failure looks like Windows runner process/pipe scheduling
starvation rather than account-specific behavior.

## What Changed

This updates `.config/nextest.toml` to serialize two process-heavy sets:

- `codex-core` tests matching `package(codex-core) & kind(test) &
test(apply_patch_cli)`
- `codex-windows-sandbox` tests matching `package(codex-windows-sandbox)
& test(legacy_)`

`codex-app-server` integration tests were already serialized inside
their own package; this change reduces overlap with the other suites
that were saturating the runner at the same time.

## Verification

- `cargo nextest list --filterset "package(codex-core) & kind(test) &
test(apply_patch_cli)"`
- `cargo nextest list --filterset "package(codex-windows-sandbox) &
test(legacy_)"`

The Windows sandbox filter naturally lists no tests on macOS, but it
validates the nextest filter/config syntax locally.
2026-04-21 21:14:45 -07:00
Michael Bolin f5288c8362 Merge 448f71e7d0 into sapling-pr-archive-bolinfest 2026-04-21 21:13:16 -07:00
Michael Bolin 448f71e7d0 fix(exec-server): retain output until streams close 2026-04-21 21:12:52 -07:00
Dylan Hurd 0e39614d87 chore(tui) debug-config guardian_policy_config (#18923)
## Summary
List guardian_policy_config_source in `/debug-config` output

## Testing
 - [x] Ran locally
2026-04-21 21:00:23 -07:00
Eric Traut c7e5a9d95e Keep TUI status surfaces in sync (#18935) 2026-04-21 20:39:23 -07:00
Michael Bolin 4615e8a8a8 Merge e004f241f4 into sapling-pr-archive-bolinfest 2026-04-21 20:37:23 -07:00
Michael Bolin e004f241f4 tests: serialize process-heavy Windows CI suites 2026-04-21 20:37:14 -07:00
Michael Bolin 03ae4db0f4 ci: keep argument comment lint checks materialized (#18926)
## Why

The fast `rust-ci` workflow decides whether to run the cross-platform
`argument-comment-lint` job based on changed paths. PRs that touch
Rust-adjacent Bazel wrapper files, such as `defs.bzl` or
`workspace_root_test_launcher.*.tpl`, can change how Rust tests and lint
targets behave without changing any `.rs` files.

When that detector returned false, GitHub skipped the matrix job before
expanding it. That produced a single skipped check named `Argument
comment lint - ${{ matrix.name }}` instead of the Linux, macOS, and
Windows check names that branch protection expects, leaving the PR
unable to go green when those matrix checks are required.

## What Changed

- Treat root Bazel wrapper files as `argument-comment-lint` relevant
changes.
- Keep the `argument_comment_lint_prebuilt` matrix job materialized for
every PR so the per-platform check names always exist.
- Add a single gate step that decides whether the real lint work should
run.
- Move the checkout-adjacent Bazel setup and OS-specific lint commands
into `.github/actions/run-argument-comment-lint/action.yml` so the
workflow does not repeat the same path-detection condition on each step.

## Verification

- Parsed `.github/workflows/rust-ci.yml` and
`.github/actions/run-argument-comment-lint/action.yml` with Python YAML
loading.
- Simulated the workflow path-matching shell conditions for the root
Bazel wrapper files and confirmed they set `argument_comment_lint=true`.
2026-04-22 03:36:46 +00:00
Michael Bolin f9c059e000 Merge 04d83c97b2 into sapling-pr-archive-bolinfest 2026-04-21 20:35:05 -07:00
Michael Bolin 04d83c97b2 app-server: flush stdio responses 2026-04-21 20:34:53 -07:00
Michael Bolin 133da6bed0 Merge 731b54d08f into sapling-pr-archive-bolinfest 2026-04-21 20:27:05 -07:00
Michael Bolin 731b54d08f tests: serialize process-heavy Windows CI suites 2026-04-21 20:26:51 -07:00
Michael Bolin 9f59ead36a Merge 3876bdae69 into sapling-pr-archive-bolinfest 2026-04-21 20:23:55 -07:00
Michael Bolin 3876bdae69 tests: isolate approval fixtures from host rules 2026-04-21 20:23:06 -07:00
Michael Bolin 4eea596672 shell-escalation: carry resolved permission profiles 2026-04-21 20:23:06 -07:00
Michael Bolin 1e495d7048 mcp: include permission profiles in sandbox state 2026-04-21 20:23:06 -07:00
Michael Bolin 2f25e5a87e tui: carry permission profiles on user turns 2026-04-21 20:23:06 -07:00
Michael Bolin 19958ca802 tui: sync session permission profiles 2026-04-21 20:23:06 -07:00
Michael Bolin b53f181d85 app-server: accept command permission profiles 2026-04-21 20:23:06 -07:00
Michael Bolin ee9808cc67 protocol: report session permission profiles 2026-04-21 20:23:06 -07:00
Michael Bolin c5baf5a49f rollout: persist turn permission profiles 2026-04-21 20:23:06 -07:00
Michael Bolin 1262d6582a clients: send permission profiles to app-server 2026-04-21 20:23:06 -07:00
Michael Bolin 9048348b5f app-server: accept permission profile overrides 2026-04-21 20:23:06 -07:00