Commit Graph

13478 Commits

Author SHA1 Message Date
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
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
Michael Bolin
901f2caf60 permissions: derive legacy exec policies at boundaries 2026-04-26 17:39:52 -07:00
Michael Bolin
c083bfd24c permissions: constrain requirements as profiles 2026-04-26 17:31:05 -07:00
Andrey Mishchenko
35bc6e3d01 Delete unused ResponseItem::Message.end_turn (#19605)
This field is unused. Delete it.
2026-04-26 17:18:09 -07:00
Michael Bolin
1c457ba152 permissions: store only constrained permission profiles 2026-04-26 17:12:12 -07:00
Michael Bolin
b9f505d67d merge commit for archive created by Sapling 2026-04-26 16:48:33 -07:00
Michael Bolin
5d19e0ace4 fix: fall back to git metadata for HEAD commit hash 2026-04-26 16:48:26 -07:00
Michael Bolin
e772ad61b6 permissions: centralize legacy sandbox projection 2026-04-26 16:47:37 -07:00
Michael Bolin
68804b16e1 merge commit for archive created by Sapling 2026-04-26 16:37:04 -07:00
Michael Bolin
d8019b1c83 fix: fall back to git metadata for HEAD commit hash 2026-04-26 16:36:20 -07:00
Ahmed Ibrahim
0bda8161a2 Split MCP connection modules (#19725)
## Why

The MCP connection manager module had grown to mix orchestration, RMCP
client startup, elicitation handling, Codex Apps cache and naming
behavior, tool qualification and filtering, and runtime data. The
previous stacked PRs split these responsibilities incrementally; this PR
collapses that work into one self-contained refactor on latest main.

## What changed

- Move McpConnectionManager into connection_manager.rs.
- Move RMCP client lifecycle, startup, and uncached tool listing into
rmcp_client.rs.
- Move elicitation request tracking and policy handling into
elicitation.rs.
- Move Codex Apps cache, key, filtering, and naming helpers into
codex_apps.rs.
- Rename the tool-name helper module to tools.rs and move ToolInfo, tool
filtering, schema masking, and qualification there.
- Move runtime and sandbox shared types into runtime.rs.
- Preserve latest main PermissionProfile-based MCP elicitation
auto-approval behavior.

## Verification

- just fmt
- cargo check -p codex-mcp
- cargo check -p codex-mcp --tests
- cargo check -p codex-core

---------

Co-authored-by: Codex <noreply@openai.com>
2026-04-26 23:23:34 +00:00
Michael Bolin
4c58e64f08 test: increase core-all-test shard count to 16 (#19727)
## Summary

Increase `core-all-test`'s Bazel shard count from `8` to `16`.

## Why

[#19609](https://github.com/openai/codex/pull/19609) restored
`bazel.yml` to a 30-minute timeout and increased `app-server-all-test`'s
shard count because the bigger timeout risk was not just a cold Windows
build. The more common problem was a long `rust_test()` shard failing
and getting retried multiple times.

Recent `main` runs show that `//codex-rs/core:core-all-test` still has
the same shape of problem on Windows:

- [Run
24943931330](https://github.com/openai/codex/actions/runs/24943931330)
reported `//codex-rs/core:core-all-test` as flaky after first-attempt
failures in shard `5/8` and shard `8/8`.
- Those retries were driven by
`suite::cli_stream::responses_mode_stream_cli_supports_openai_base_url_config_override`
and
`suite::pending_input::steered_user_input_waits_when_tool_output_triggers_compact_before_next_request`.
- The failed shard attempts in that run took `272.61s` and `259.27s`
before retrying, which is exactly the sort of wall-clock cost that burns
through the 30-minute budget.
- [Run
24966332583](https://github.com/openai/codex/actions/runs/24966332583)
also retried `//codex-rs/tui:tui-unit-tests` after
`app::tests::update_memory_settings_updates_current_thread_memory_mode`
failed once on Windows.
- [Run
24965527138](https://github.com/openai/codex/actions/runs/24965527138)
and its linked [BuildBuddy
invocation](https://app.buildbuddy.io/invocation/ac1a8265-06fa-4da5-9552-4715b7965bce)
show the other half of the problem: when Windows cache reuse is weak,
the `bazel test //...` step can already consume `24m11s` on its own,
leaving very little headroom for flaky retries.

Increasing `core-all-test` to `16` shards does not fix the flaky tests,
but it does reduce the wall-clock cost when a single shard has to be
retried. That matches the mitigation we already applied to
`app-server-all-test` in `#19609`.

## What Changed

- Update `codex-rs/core/BUILD.bazel` so `core-all-test` uses `16` shards
instead of `8`.
- Leave `core-unit-tests` unchanged.

## Follow-up Work

This change is meant to buy back CI headroom while we fix the flaky
tests themselves in subsequent commits. The recent Windows retries that
look worth addressing directly include:

-
`suite::cli_stream::responses_mode_stream_cli_supports_openai_base_url_config_override`
-
`suite::pending_input::steered_user_input_waits_when_tool_output_triggers_compact_before_next_request`
-
`app::tests::update_memory_settings_updates_current_thread_memory_mode`

## Verification

- Compared `core-all-test`'s current sharding against the
`app-server-all-test` precedent in
[#19609](https://github.com/openai/codex/pull/19609).
- Inspected recent `main` Bazel workflow logs and the linked BuildBuddy
invocation to confirm that Windows retries on long shards are still
consuming a meaningful fraction of the 30-minute timeout budget.
- Did not run local tests for this change because it only adjusts Bazel
sharding metadata.
2026-04-26 23:10:26 +00:00
Michael Bolin
3ec32e7175 Merge dded5ad0b4 into sapling-pr-archive-bolinfest 2026-04-26 16:05:47 -07:00
Michael Bolin
9ed2360397 Merge a70f712441 into sapling-pr-archive-bolinfest 2026-04-26 16:01:33 -07:00
Michael Bolin
a70f712441 fix: fall back to git metadata for HEAD commit hash 2026-04-26 16:01:18 -07:00
Michael Bolin
dded5ad0b4 permissions: finish profile-backed app surfaces 2026-04-26 15:59:14 -07:00
Michael Bolin
f74e3ec78e permissions: remove core legacy policy round trips 2026-04-26 15:59:14 -07:00