Commit Graph

10985 Commits

Author SHA1 Message Date
Michael Bolin
2bdea7c0fc Merge b1d1c47e63 into sapling-pr-archive-bolinfest 2026-04-02 12:21:30 -07:00
Michael Bolin
b1d1c47e63 fix: add more detail to test assertion 2026-04-02 12:21:24 -07:00
Michael Bolin
2146e1b82d test: deflake external bearer auth token tests on Windows (#16604)
## Why

`external_bearer_only_auth_manager_uses_cached_provider_token` can fail
on Windows when cold `powershell.exe` startup exceeds the provider-auth
helper's 1s timeout. When that happens,
`AuthManager::resolve_external_api_key_auth()` [logs the resolver error
and returns
`None`](https://github.com/openai/codex/blob/024b08b411fe/codex-rs/login/src/auth/manager.rs#L1449-L1455),
which is exactly the assertion failure from the flake.

## What

- Invoke `powershell.exe` explicitly in the Windows provider-auth test
helpers in `login/src/auth/auth_tests.rs`.
- Increase the helper timeout to `10_000` ms and document why that slack
exists.

## Verification

- `cargo test -p codex-login`
2026-04-02 12:12:18 -07:00
Michael Bolin
2c16f12a74 Merge 024b08b411 into sapling-pr-archive-bolinfest 2026-04-02 12:02:21 -07:00
Michael Bolin
024b08b411 test: deflake external bearer auth token tests on Windows 2026-04-02 12:02:09 -07:00
Michael Bolin
95ea958dfa Merge 0ba6db0d8f into sapling-pr-archive-bolinfest 2026-04-02 11:23:08 -07:00
Michael Bolin
0ba6db0d8f refactor: move shell and snapshot code out of codex-core 2026-04-02 11:21:21 -07:00
Tyler French
1d8a22e9dd Fix non-determinism in rules_rs/crate_git_repository.bzl (#16590)
Running multiple builds with no changes causes some differences, we see
that
https://app.buildbuddy.io/compare/a9719629-1660-4735-a477-d66357f234fb...df85310b-eb5c-4c10-8b79-4d0449ba6cdd#file
shows the file-differences between two Bazel builds.

These differences are caused by a non-deterministic `.git` entry in the
rules_rs crates that are created with `crate_git_repository`.

As a way to make these deterministic, we can remove this entry after we
download the git source, so that the input to the compile action is
deterministic.

### CLA

I have read the CLA Document and I hereby sign the CLA
2026-04-02 11:21:11 -07:00
Michael Bolin
ece00cc49a merge commit for archive created by Sapling 2026-04-02 10:41:35 -07:00
Michael Bolin
379acefcc7 refactor: move shell and snapshot code out of codex-core 2026-04-02 10:41:23 -07:00
Michael Bolin
d9a729a33b Merge 2e5beb8aad into sapling-pr-archive-bolinfest 2026-04-02 10:18:38 -07:00
Michael Bolin
2e5beb8aad testing https://github.com/tyler-french/codex/pull/2 2026-04-02 10:18:34 -07:00
Michael Bolin
39340bc279 Merge 4c13386d63 into sapling-pr-archive-bolinfest 2026-04-02 10:13:48 -07:00
Michael Bolin
4c13386d63 testing https://github.com/tyler-french/codex/pull/2 2026-04-02 10:13:41 -07:00
Michael Bolin
95b0b5a204 chore: move codex-exec unit tests into sibling files (#16581)
## Why

`codex-rs/exec/src/lib.rs` already keeps unit tests in a sibling
`lib_tests.rs` module so the implementation stays top-heavy and easier
to read. This applies that same layout to the rest of
`codex-rs/exec/src` so each production file keeps its entry points and
helpers ahead of test code.

## What

- Move inline unit tests out of `cli.rs`, `main.rs`,
`event_processor_with_human_output.rs`, and
`event_processor_with_jsonl_output.rs` into sibling `*_tests.rs` files.
- Keep test modules wired through `#[cfg(test)]` plus `#[path = "..."]
mod tests;`, matching the `lib.rs` pattern.
- Preserve the existing test coverage and assertions while making this a
source-layout-only refactor.

## Verification

- `cargo test -p codex-exec`
2026-04-02 10:01:40 -07:00
Michael Bolin
18a52f68e3 Merge e8192d87c6 into sapling-pr-archive-bolinfest 2026-04-02 09:33:06 -07:00
Michael Bolin
e8192d87c6 chore: move unit tests in codex-exec into their own files 2026-04-02 09:31:48 -07:00
Michael Bolin
300fec2bfb Merge ce349df98a into sapling-pr-archive-bolinfest 2026-04-02 09:08:19 -07:00
Michael Bolin
ce349df98a chore: move unit tests in codex-exec into their own files 2026-04-02 09:08:12 -07:00
Michael Bolin
a098834148 ci: upload compact Bazel execution logs for bazel.yml (#16577)
## Why

The main Bazel CI lanes need compact execution logs to investigate cache
misses and unexpected rebuilds, but local users of the shared wrapper
should not pay that log-generation cost by default.

## What Changed

-
[`.github/scripts/run-bazel-ci.sh`](a6ec239a24/.github/scripts/run-bazel-ci.sh (L149-L153))
now appends `--execution_log_compact_file=...` only when
`CODEX_BAZEL_EXECUTION_LOG_COMPACT_DIR` is set; the caller owns creating
that directory.
-
[`.github/workflows/bazel.yml`](a6ec239a24/.github/workflows/bazel.yml (L66-L174))
enables that env var only for the main `test` and `clippy` jobs, creates
the temp log directory in each job, and uploads the resulting `*.zst`
files from `runner.temp`.

## Verification

- `bash -n .github/scripts/run-bazel-ci.sh`
- Parsed `.github/workflows/bazel.yml` as YAML.
- Ran a local opt-in wrapper smoke test and confirmed it writes
`execution-log-cquery-local-*.zst` when the caller pre-creates
`CODEX_BAZEL_EXECUTION_LOG_COMPACT_DIR`.
2026-04-02 08:41:04 -07:00
Michael Bolin
6577870a3b Merge 36fc1b6cfa into sapling-pr-archive-bolinfest 2026-04-02 08:37:17 -07:00
Michael Bolin
36fc1b6cfa refactor: move shell and snapshot code out of codex-core 2026-04-02 08:37:08 -07:00
Michael Bolin
0b332ae3e5 merge commit for archive created by Sapling 2026-04-02 08:35:25 -07:00
Michael Bolin
a6ec239a24 ci: upload compact Bazel execution logs 2026-04-02 08:35:12 -07:00
Michael Bolin
e4fbb2ce0c Merge ba017c605a into sapling-pr-archive-bolinfest 2026-04-02 08:27:46 -07:00
Michael Bolin
ba017c605a ci: upload compact Bazel execution logs 2026-04-02 08:27:31 -07:00
jif-oai
7fc36249b5 chore: rename assign_task for followup_task (#16571) 2026-04-02 16:51:17 +02:00
jif-oai
ea27d861b2 nit: state machine desc (#16569) 2026-04-02 16:18:53 +02:00
jif-oai
ab6cce62b8 chore: rework state machine further (#16567) 2026-04-02 16:15:28 +02:00
jif-oai
e47ed5e57f fix: races in end of turn (#16566) 2026-04-02 15:55:55 +02:00
jif-oai
bd50496411 nit: lint (#16564) 2026-04-02 15:41:18 +02:00
jif-oai
627299c551 fix: race pending (#16561) 2026-04-02 15:31:30 +02:00
jif-oai
97df35c74f chore: memories mini model (#16559) 2026-04-02 14:48:43 +02:00
Michael Bolin
e238542d54 Merge 8ccb31a65e into sapling-pr-archive-bolinfest 2026-04-02 01:41:48 -07:00
Michael Bolin
8ccb31a65e refactor: move shell and snapshot code out of codex-core 2026-04-02 01:41:31 -07:00
Michael Bolin
c1d18ceb6f [codex] Remove codex-core config type shim (#16529)
## Why

This finishes the config-type move out of `codex-core` by removing the
temporary compatibility shim in `codex_core::config::types`. Callers now
depend on `codex-config` directly, which keeps these config model types
owned by the config crate instead of re-expanding `codex-core` as a
transitive API surface.

## What Changed

- Removed the `codex-rs/core/src/config/types.rs` re-export shim and the
`core::config::ApprovalsReviewer` re-export.
- Updated `codex-core`, `codex-cli`, `codex-tui`, `codex-app-server`,
`codex-mcp-server`, and `codex-linux-sandbox` call sites to import
`codex_config::types` directly.
- Added explicit `codex-config` dependencies to downstream crates that
previously relied on the `codex-core` re-export.
- Regenerated `codex-rs/core/config.schema.json` after updating the
config docs path reference.
2026-04-02 01:19:44 -07:00
Michael Bolin
f0de985865 merge commit for archive created by Sapling 2026-04-02 00:59:34 -07:00
Michael Bolin
17a1a48815 config: remove codex-core config type shim 2026-04-02 00:58:39 -07:00
Michael Bolin
da3177871c Merge cfe9a9dba7 into sapling-pr-archive-bolinfest 2026-04-02 00:56:17 -07:00
Michael Bolin
cfe9a9dba7 config: remove codex-core config type shim 2026-04-02 00:56:07 -07:00
Michael Bolin
228962d154 Merge ec0c4005fe into sapling-pr-archive-bolinfest 2026-04-02 00:49:41 -07:00
Michael Bolin
e846fed2b1 fix: move some test utilities out of codex-rs/core/src/tools/spec.rs (#16524)
The `#[cfg(test)]` in `codex-rs/core/src/tools/spec.rs` smelled funny to
me and it turns out these members were straightforward to move.
2026-04-02 00:49:37 -07:00
Michael Bolin
ec0c4005fe core: prune low-value tests 2026-04-02 00:49:23 -07:00
Michael Bolin
f32a5e84bf [codex] Move config types into codex-config (#16523)
## Why

`codex-rs/core/src/config/types.rs` is a plain config-type module with
no dependency on `codex-core`. Moving it into `codex-config` shrinks the
core crate and gives config-only consumers a more natural dependency
boundary.

## What Changed

- Added `codex_config::types` with the moved structs, enums, constants,
and unit tests.
- Kept `codex_core::config::types` as a compatibility re-export to avoid
a broad call-site migration in this PR.
- Switched notice-table writes in `core/src/config/edit.rs` to a local
`NOTICE_TABLE_KEY` constant.
- Added the `wildmatch` runtime dependency and `tempfile` test
dependency to `codex-config`.
2026-04-02 00:39:20 -07:00
Michael Bolin
07a269417a merge commit for archive created by Sapling 2026-04-02 00:32:05 -07:00
Michael Bolin
866d1f5247 fix: move some test utilities out of codex-rs/core/src/tools/spec.rs 2026-04-02 00:31:53 -07:00
Michael Bolin
5131e0de45 Move tool registry plan tests into codex-tools (#16521)
## Why

#16513 moved pure tool-registry planning into `codex-tools`, but much of
the corresponding spec/feature-gating coverage still lived in
`codex-core`. That leaves the tests for planner behavior in the crate
that no longer owns that logic and makes the next extraction steps
harder to review.

## What

Move the planner-only `spec_tests.rs` coverage into
`codex-rs/tools/src/tool_registry_plan_tests.rs` and wire it up from
`codex-rs/tools/src/tool_registry_plan.rs` using the crate-local `#[path
= "tool_registry_plan_tests.rs"] mod tests;` pattern.

The `codex-core` test file now keeps the core-side integration checks:
router-visible model tool lists, namespaced handler alias registration,
shell adapter behavior, and MCP schema edge cases that still exercise
the `core` binding layer.

## Verification

- `cargo test -p codex-tools`
- `cargo test -p codex-core tools::spec::tests`
2026-04-02 00:26:51 -07:00
Michael Bolin
127d60b2bd Merge dadfca7a94 into sapling-pr-archive-bolinfest 2026-04-02 00:18:33 -07:00
Michael Bolin
dadfca7a94 Move tool registry plan tests into codex-tools 2026-04-02 00:18:27 -07:00
Michael Bolin
828b837235 Extract tool registry planning into codex-tools (#16513)
## Why
This is a larger step in the `codex-core` -> `codex-tools` migration
called out in `AGENTS.md`.

`codex-rs/core/src/tools/spec.rs` had become mostly pure tool-spec
assembly plus handler registration. That made it hard to move more of
the tool-definition layer into `codex-tools`, because the runtime
binding and the crate-independent planning logic were still interleaved
in one function.

Splitting those concerns gives `codex-tools` ownership of the
declarative registry plan while keeping `codex-core` responsible for
instantiating concrete handlers.

## What Changed
- Add a `codex-tools` registry-plan layer in
`codex-rs/tools/src/tool_registry_plan.rs` and
`codex-rs/tools/src/tool_registry_plan_types.rs`.
- Move feature-gated tool-spec assembly, MCP/dynamic tool conversion,
tool-search aliases, and code-mode nested-plan expansion into
`codex-tools`.
- Keep `codex-rs/core/src/tools/spec.rs` as the core-side adapter that
maps each planned handler kind to concrete runtime handler instances.
- Update `spec_tests.rs` to import the moved `codex_tools` symbols
directly instead of relying on top-level `spec.rs` re-exports.

This is intended to be a straight refactor with no behavior change and
no new test surface.

## Verification
- `cargo test -p codex-tools`
- `cargo test -p codex-core tools::spec::tests`

---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/16513).
* #16521
* __->__ #16513
2026-04-02 00:18:18 -07:00