Commit Graph
11041 Commits
Author SHA1 Message Date
Michael Bolin 5d64e58a38 fix: increase timeout to account for slow PowerShell startup (#16608)
Similar to https://github.com/openai/codex/pull/16604, I am seeing
failures on Windows Bazel that could be due to PowerShell startup
timeouts, so try increasing.
2026-04-02 12:40:19 -07:00
Michael Bolin 1510a76a75 Merge 7d23c6668a into sapling-pr-archive-bolinfest 2026-04-02 12:34:56 -07:00
Michael Bolin 7d23c6668a fix: increase timeout to account for slow PowerShell startup 2026-04-02 12:34:47 -07:00
Michael Bolin f894c3f687 fix: add more detail to test assertion (#16606)
In https://github.com/openai/codex/pull/16528, I am trying to get tests
running under Bazel on Windows, but currently I see:

```
thread 'suite::user_shell_cmd::user_shell_command_does_not_set_network_sandbox_env_var' (10220) panicked at core/tests\suite\user_shell_cmd.rs:358:5:
assertion failed: `(left == right)`

Diff < left / right > :
<1
>0
```

This PR updates the `assert_eq!()` to provide more information to help
diagnose the failure.

---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/16606).
* #16608
* __->__ #16606
2026-04-02 12:34:42 -07:00
Michael Bolin 76c624dc54 Merge ab6ead9790 into sapling-pr-archive-bolinfest 2026-04-02 12:34:02 -07:00
Michael Bolin ab6ead9790 fix: increase timeout to account for slow PowerShell startup 2026-04-02 12:33:55 -07:00
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`](https://github.com/openai/codex/blob/a6ec239a24fd21507bb75a28f17277653f52e3a2/.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`](https://github.com/openai/codex/blob/a6ec239a24fd21507bb75a28f17277653f52e3a2/.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