Commit Graph
5179 Commits
Author SHA1 Message Date
Friel 0026092391 fix(core): normalize fork context for multi-agent spawn 2026-04-01 02:33:42 +00:00
Friel ff008aa126 Merge remote-tracking branch 'origin/model-fallback-list' into dev/friel/collab-stack 2026-04-01 01:07:36 +00:00
Friel 3dafa14edd chore(core): apply clippy autofix in fallback tests 2026-04-01 01:04:34 +00:00
Friel 9e3862778b fix(core): populate fork mode in spawn handlers 2026-04-01 01:04:21 +00:00
Friel a765eb2cef fix core: retry async quota-exhausted fallback spawns 2026-04-01 01:04:21 +00:00
Friel 693d5109cd test: relax fallback model effort assertion for async quota retry 2026-04-01 01:04:21 +00:00
Friel 5f6011e12b fix(core): annotate spawn model fallback positional args 2026-04-01 01:04:21 +00:00
Friel 88cb524699 fix(core): preserve role precedence for model fallback 2026-04-01 01:04:21 +00:00
Friel b8e0514643 Add ordered model fallback list for subagent spawn 2026-04-01 01:04:21 +00:00
Michael Bolin dedd1c386a fix: suppress status card expect_used warnings after #16351 (#16378)
## Why

Follow-up to #16351.

That PR synchronized Bazel clippy lint levels with Cargo, but two
intentional `expect()` calls in `codex-rs/tui/src/status/card.rs` still
tripped `clippy::expect_used` (I believe #16201 raced with #16351, which
is why it was missed).
2026-03-31 17:38:26 -07:00
Friel 5c44d4428f Merge branch 'origin/dev/friel/watchdog-interval-reset' 2026-04-01 00:30:41 +00:00
Friel 3b15221446 chore(core): rustfmt watchdog helper block 2026-04-01 00:28:12 +00:00
Friel d00a830b95 Merge remote-tracking branch 'origin/dev/friel/watchdog-interval-reset' into dev/friel/collab-stack
# Conflicts:
#	codex-rs/app-server/tests/suite/v2/turn_start.rs
#	codex-rs/core/tests/suite/subagent_notifications.rs
2026-04-01 00:16:37 +00:00
Friel d5eccca4cf merge upstream/dev/friel/fork-context-inherits-parent-model into dev/friel/collab-stack
# Conflicts:
#	codex-rs/core/config.schema.json
#	codex-rs/core/src/agent/role.rs
#	codex-rs/core/src/tools/handlers/multi_agents/spawn.rs
#	codex-rs/core/src/tools/handlers/multi_agents_tests.rs
#	codex-rs/core/src/tools/handlers/multi_agents_v2/spawn.rs
2026-04-01 00:12:26 +00:00
Friel 723881530b ci: fix taiki-e install-action input 2026-04-01 00:10:56 +00:00
Michael Bolin 2e942ce830 ci: sync Bazel clippy lints and fix uncovered violations (#16351)
## Why

Follow-up to #16345, the Bazel clippy rollout in #15955, and the cleanup
pass in #16353.

`cargo clippy` was enforcing the workspace deny-list from
`codex-rs/Cargo.toml` because the member crates opt into `[lints]
workspace = true`, but Bazel clippy was only using `rules_rust` plus
`clippy.toml`. That left the Bazel lane vulnerable to drift:
`clippy.toml` can tune lint behavior, but it cannot set
allow/warn/deny/forbid levels.

This PR now closes both sides of the follow-up. It keeps `.bazelrc` in
sync with `[workspace.lints.clippy]`, and it fixes the real clippy
violations that the newly-synced Windows Bazel lane surfaced once that
deny-list started matching Cargo.

## What Changed

- added `.github/scripts/verify_bazel_clippy_lints.py`, a Python check
that parses `codex-rs/Cargo.toml` with `tomllib`, reads the Bazel
`build:clippy` `clippy_flag` entries from `.bazelrc`, and reports
missing, extra, or mismatched lint levels
- ran that verifier from the lightweight `ci.yml` workflow so the sync
check does not depend on a Rust toolchain being installed first
- expanded the `.bazelrc` comment to explain the Cargo `workspace =
true` linkage and why Bazel needs the deny-list duplicated explicitly
- fixed the Windows-only `codex-windows-sandbox` violations that Bazel
clippy reported after the sync, using the same style as #16353: inline
`format!` args, method references instead of trivial closures, removed
redundant clones, and replaced SID conversion `unwrap` and `expect`
calls with proper errors
- cleaned up the remaining cross-platform violations the Bazel lane
exposed in `codex-backend-client` and `core_test_support`

## Testing

Key new test introduced by this PR:

`python3 .github/scripts/verify_bazel_clippy_lints.py`
2026-03-31 17:09:48 -07:00
Friel a4c2eaeaf1 Fix watchdog owner input reset 2026-04-01 00:07:24 +00:00
Friel 3379d411c4 test(core): fix v2 fork_turn payload 2026-04-01 00:07:05 +00:00
Friel 7f5944180d test(core): handle namespaced spawn_agent description 2026-04-01 00:04:25 +00:00
Friel 225667a03f test(core): align watchdog prompt-layering expectations 2026-04-01 00:04:25 +00:00
Friel 64869751bb chore(core): clean watchdog prompt layering leftovers 2026-04-01 00:04:25 +00:00
Friel edf3e240a1 Merge commit 'b9f7edb0f184ac80b72f6aaa8a54c4208d86c85d' into dev/friel/collab-stack 2026-04-01 00:04:04 +00:00
Friel eb191bffbd Merge commit 'a2d205cd9b8cee932870120a063b8690ce6a0eeb' into dev/friel/collab-stack 2026-04-01 00:04:03 +00:00
Friel 7c771c192a Merge commit '35b68e1d917962e5a9c773a0111772681316e89f' into dev/friel/collab-stack 2026-04-01 00:04:02 +00:00
Friel 68bcc7e0bb Fix watchdog owner input activity 2026-04-01 00:03:46 +00:00
Friel cb41cd79b4 feat(core): remove spawn_mode from agent roles 2026-04-01 00:03:44 +00:00
Friel 42c75bd944 fix(core): populate fork mode in spawn handlers 2026-04-01 00:03:41 +00:00
Friel 7998133005 agent tools namespaced and legacy aliases preserved 2026-04-01 00:03:28 +00:00
Friel 6f9721ada1 Merge commit '4fd857d8567b3aa55940c022abe611ce1edec332' into dev/friel/collab-stack 2026-04-01 00:03:27 +00:00
Friel b9f7edb0f1 fix(core): populate fork mode in spawn handlers 2026-03-31 23:57:24 +00:00
Friel 52d43c4b5f test(core): keep notification test non-forked by default 2026-03-31 23:44:39 +00:00
Friel c34ed88023 test(core): fix subagent notification validator 2026-03-31 23:44:39 +00:00
Friel c9c01679b5 fix(core): preserve effective effort for fork-context children 2026-03-31 23:44:39 +00:00
Friel ac7c881177 test: refresh fork-context expectations 2026-03-31 23:44:39 +00:00
Friel ba8a6d9ae8 feat(core): add role-level fork_context defaults 2026-03-31 23:44:39 +00:00
FrielandCodex 76285f631f test(core): fix multi-agent v2 fork-context regression
Co-authored-by: Codex <noreply@openai.com>
2026-03-31 23:42:28 +00:00
FrielandCodex 6891b76417 feat(core): force forked agents to inherit parent model
Co-authored-by: Codex <noreply@openai.com>
2026-03-31 23:42:28 +00:00
Friel 07041ea35b fix core: retry async quota-exhausted fallback spawns 2026-03-31 23:37:23 +00:00
Friel 4254c47d51 test: relax fallback model effort assertion for async quota retry 2026-03-31 23:37:23 +00:00
Friel bc3ffc79a0 fix(core): annotate spawn model fallback positional args 2026-03-31 23:37:23 +00:00
Friel 090c835043 fix(core): preserve role precedence for model fallback 2026-03-31 23:37:23 +00:00
Friel 66fadc7cfa Add ordered model fallback list for subagent spawn 2026-03-31 23:37:23 +00:00
Eric Traut ae057e0bb9 Fix stale /status rate limits in active TUI sessions (#16201)
Fix stale weekly limit in `/status` (#16194): /status reused the
session’s cached rate-limit snapshot, so the weekly remaining limit
could stay frozen within an active session.

With this change, we now dynamically update the rate limits after status
is displayed.

I needed to delete a few low-value test cases from the chatWidget tests
because the test.rs file is really large, and the new tests in this PR
pushed us over the 512K mandated limit. I'm working on a separate PR to
refactor that test file.
2026-03-31 17:03:05 -06:00
Eric Traut 424e532a6b Refactor chatwidget tests into topical modules (#16361)
Problem: `chatwidget/tests.rs` had grown into a single oversized test
blob that was hard to maintain and exceeded the repo's blob size limit.

Solution: split the chatwidget tests into topical modules with a thin
root `tests.rs`, shared helper utilities, preserved snapshot naming, and
hermetic test config so the refactor stays stable and passes the
`codex-tui` test suite.
2026-03-31 16:45:58 -06:00
Friel 4fd857d856 agent tools namespaced and legacy aliases preserved 2026-03-31 22:09:57 +00:00
Friel a2d205cd9b feat(core): remove spawn_mode from agent roles 2026-03-31 22:02:30 +00:00
Michael Bolin 9a8730f31e ci: verify codex-rs Cargo manifests inherit workspace settings (#16353)
## Why

Bazel clippy now catches lints that `cargo clippy` can still miss when a
crate under `codex-rs` forgets to opt into workspace lints. The concrete
example here was `codex-rs/app-server/tests/common/Cargo.toml`: Bazel
flagged a clippy violation in `models_cache.rs`, but Cargo did not
because that crate inherited workspace package metadata without
declaring `[lints] workspace = true`.

We already mirror the workspace clippy deny list into Bazel after
[#15955](https://github.com/openai/codex/pull/15955), so we also need a
repo-side check that keeps every `codex-rs` manifest opted into the same
workspace settings.

## What changed

- add `.github/scripts/verify_cargo_workspace_manifests.py`, which
parses every `codex-rs/**/Cargo.toml` with `tomllib` and verifies:
  - `version.workspace = true`
  - `edition.workspace = true`
  - `license.workspace = true`
  - `[lints] workspace = true`
- top-level crate names follow the `codex-*` / `codex-utils-*`
conventions, with explicit exceptions for `windows-sandbox-rs` and
`utils/path-utils`
- run that script in `.github/workflows/ci.yml`
- update the current outlier manifests so the check is enforceable
immediately
- fix the newly exposed clippy violations in the affected crates
(`app-server/tests/common`, `file-search`, `feedback`,
`shell-escalation`, and `debug-client`)






---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/16353).
* #16351
* __->__ #16353
2026-03-31 21:59:28 +00:00
Michael Bolin 04ec9ef8af Fix Windows external bearer refresh test (#16366)
## Why

https://github.com/openai/codex/pull/16287 introduced a change to
`codex-rs/login/src/auth/auth_tests.rs` that uses a PowerShell helper to
read the next token from `tokens.txt` and rewrite the remainder back to
disk. On Windows, `Get-Content` can return a scalar when the file has
only one remaining line, so `$lines[0]` reads the first character
instead of the full token. That breaks the external bearer refresh test
once the token list is nearly exhausted.

https://github.com/openai/codex/pull/16288 introduced similar changes to
`codex-rs/core/src/models_manager/manager_tests.rs` and
`codex-rs/core/tests/suite/client.rs`.

These went unnoticed because the failures showed up when the test was
run via Cargo on Windows, but not in our Bazel harness. Figuring out
that Cargo-vs-Bazel delta will happen in a follow-up PR.

## Verification

On my Windows machine, I verified `cargo test` passes when run in
`codex-rs/login` and `codex-rs/core`. Once this PR is merged, I will
keep an eye on
https://github.com/openai/codex/actions/workflows/rust-ci-full.yml to
verify it goes green.

## What changed

- Wrap `Get-Content -Path tokens.txt` in `@(...)` so the script always
gets array semantics before counting, indexing, and rewriting the
remaining lines.
2026-03-31 14:44:54 -07:00
Friel 35b68e1d91 Fix watchdog owner input activity 2026-03-31 21:34:09 +00:00
Eric Traut 103acdfb06 Refactor external auth to use a single trait (#16356)
## Summary
- Replace the separate external auth enum and refresher trait with a
single `ExternalAuth` trait in login auth flow
- Move bearer token auth behind `BearerTokenRefresher` and update
`AuthManager` and app-server wiring to use the generic external auth API
2026-03-31 14:54:18 -06:00