Commit Graph

10603 Commits

Author SHA1 Message Date
Michael Bolin
ccea4f697a merge commit for archive created by Sapling 2026-03-28 17:04:50 -07:00
Michael Bolin
09cc0984e6 codex-tools: extract collaboration tool specs 2026-03-28 17:04:07 -07:00
Michael Bolin
4e119a3b38 codex-tools: extract local host tool specs (#16138)
## Why

`core/src/tools/spec.rs` still bundled a set of pure local-host tool
builders with the orchestration that actually decides when those tools
are exposed and which handlers back them. That made `codex-core`
responsible for JSON/tool-shape construction that does not depend on
session state, and it kept the `codex-tools` migration from taking a
meaningfully larger bite out of `spec.rs`.

This PR moves that reusable spec-building layer into `codex-tools` while
leaving feature gating, handler registration, and runtime-coupled
descriptions in `codex-core`.

## What changed

- added `codex-rs/tools/src/local_tool.rs` for the pure builders for
`exec_command`, `write_stdin`, `shell`, `shell_command`, and
`request_permissions`
- added `codex-rs/tools/src/view_image.rs` for the `view_image` tool
spec and output schema so the extracted modules stay right-sized
- rewired `codex-rs/core/src/tools/spec.rs` to call those extracted
builders instead of constructing these specs inline
- kept the `request_permissions` description source in `codex-core`,
with `codex-tools` taking the description as input so the crate boundary
does not grow a dependency on handler/runtime code
- moved the direct constructor coverage for this slice from
`codex-rs/core/src/tools/spec_tests.rs` into
`codex-rs/tools/src/local_tool_tests.rs` and
`codex-rs/tools/src/view_image_tests.rs`
- updated `codex-rs/tools/README.md` to reflect that `codex-tools` now
owns this local-host spec layer

## Test plan

- `CARGO_TARGET_DIR=/tmp/codex-tools-local-host cargo test -p
codex-tools`
- `CARGO_TARGET_DIR=/tmp/codex-core-local-tools cargo test -p codex-core
--lib tools::spec::`
- `just argument-comment-lint`

## References

- #15923
- #15928
- #15944
- #15953
- #16031
- #16047
- #16129
- #16132
2026-03-28 16:33:58 -07:00
Michael Bolin
c8590d9f72 Merge a8719ac1d6 into sapling-pr-archive-bolinfest 2026-03-28 16:27:48 -07:00
Michael Bolin
a8719ac1d6 ci: tune just bazel helpers for remote iteration 2026-03-28 16:27:41 -07:00
Eric Traut
46b653e73c Fix skills picker scrolling in tui app server (#16109)
Fixes #16091.

The app-server TUI was truncating the filtered mention candidate list to
`MAX_POPUP_ROWS`, so the `$` skills picker only exposed the first 8
matches. That made it look like many skills were missing and prevented
keyboard navigation beyond the first page, even though direct
`$skill-name` insertion still worked.

Testing: I manually verified the regression and confirmed the fix.
2026-03-28 17:22:25 -06:00
Michael Bolin
4610be4eb7 merge commit for archive created by Sapling 2026-03-28 16:17:20 -07:00
Michael Bolin
828c61adf1 codex-tools: extract local host tool specs 2026-03-28 16:15:35 -07:00
Michael Bolin
22aed73f32 merge commit for archive created by Sapling 2026-03-28 16:06:06 -07:00
Michael Bolin
4282fc4d9a ci: tune just bazel helpers for remote iteration 2026-03-28 16:05:54 -07:00
Michael Bolin
f7ef9599ed exec: make review-policy tests hermetic (#16137)
## Why

`thread_start_params_from_config()` is supposed to forward the effective
`approvals_reviewer` into the app-server request, but these tests were
constructing that config through `ConfigBuilder::build()`, which also
loads ambient system and managed config layers. On machines with an
admin or host-level reviewer override, the manual-only case could
inherit `guardian_subagent` and fail even though the exec-side mapping
was correct.

## What changed

- Set `approvals_reviewer` explicitly via `harness_overrides` in the two
`thread_start_params_*review_policy*` tests in
`codex-rs/exec/src/lib.rs`.
- Removed the dependence on default config resolution and temp
`config.toml` writes so the tests exercise only the reviewer-to-request
mapping in `codex-exec`.

## Testing

- `cargo test -p codex-exec`
2026-03-28 23:01:04 +00:00
Michael Bolin
55a0e644f7 Merge 4a15695ea0 into sapling-pr-archive-bolinfest 2026-03-28 15:56:31 -07:00
Michael Bolin
4a15695ea0 permissions: start using PermissionProfile as the canonical runtime model 2026-03-28 15:56:27 -07:00
Michael Bolin
858dbd00ad merge commit for archive created by Sapling 2026-03-28 15:54:05 -07:00
Michael Bolin
3997146eaa ci: run Windows argument-comment-lint via native Bazel 2026-03-28 15:53:45 -07:00
Michael Bolin
2a85786231 merge commit for archive created by Sapling 2026-03-28 15:52:02 -07:00
Michael Bolin
6d747d97fc ci: align just bazel helpers with workflow behavior 2026-03-28 15:51:51 -07:00
Michael Bolin
3438ad2875 merge commit for archive created by Sapling 2026-03-28 15:50:19 -07:00
Michael Bolin
6ccd6f357b ci: run Windows argument-comment-lint via native Bazel 2026-03-28 15:50:14 -07:00
Michael Bolin
c4b3daccb6 Merge 12e0755902 into sapling-pr-archive-bolinfest 2026-03-28 15:49:55 -07:00
Michael Bolin
12e0755902 exec: make review-policy tests hermetic 2026-03-28 15:49:45 -07:00
Michael Bolin
58de9e613e merge commit for archive created by Sapling 2026-03-28 15:39:50 -07:00
Michael Bolin
1bb20d3658 ci: run Windows argument-comment-lint via native Bazel 2026-03-28 15:39:44 -07:00
Michael Bolin
a16a9109d7 ci: use BuildBuddy for rust-ci-full non-Windows argument-comment-lint (#16136)
## Why

PR #16130 fixed the Windows `argument-comment-lint` regression in
`rust-ci-full`, but the next `main` runs still left the Linux and macOS
lint legs timing out.

In [run
23695263729](https://github.com/openai/codex/actions/runs/23695263729),
both non-Windows `argument-comment-lint` jobs were cancelled almost
exactly 30 minutes after they started. The remaining workflow difference
versus `rust-ci.yml` was that `rust-ci-full` did not pass
`BUILDBUDDY_API_KEY` into the non-Windows Bazel lint step, so
`run-bazel-ci.sh` fell back to local Bazel configuration instead of
using the faster remote-backed path available on `main`.

## What changed

- passed `BUILDBUDDY_API_KEY` to the non-Windows `rust-ci-full`
`argument-comment-lint` Bazel step
- left the Windows packaged-wrapper path from #16130 unchanged
- kept the change scoped to `rust-ci-full.yml`

## Test plan

- loaded `.github/workflows/rust-ci-full.yml` and
`.github/workflows/rust-ci.yml` with `python3` + `yaml.safe_load(...)`
- inspected run `23695263729` and confirmed `Argument comment lint -
Linux` and `Argument comment lint - macOS` were cancelled about 30
minutes after start
- verified the updated `rust-ci-full` step now matches the non-Windows
secret wiring already present in `rust-ci.yml`

## References

- #16130
- #16106
2026-03-28 15:36:01 -07:00
Michael Bolin
b340e166a8 Merge b577927d2f into sapling-pr-archive-bolinfest 2026-03-28 15:35:23 -07:00
Michael Bolin
b577927d2f permissions: start using PermissionProfile as the canonical runtime model 2026-03-28 15:35:20 -07:00
Michael Bolin
47f080e045 Merge cd0ea98f7b into sapling-pr-archive-bolinfest 2026-03-28 15:34:33 -07:00
Michael Bolin
cd0ea98f7b ci: use BuildBuddy for rust-ci-full argument-comment-lint 2026-03-28 15:34:20 -07:00
Michael Bolin
2238c16a91 codex-tools: extract code mode tool spec adapters (#16132)
## Why

The longer-term `codex-tools` migration is to move pure tool-definition
and tool-spec plumbing out of `codex-core` while leaving session- and
runtime-coupled orchestration behind.

The remaining code-mode adapter layer in
`core/src/tools/code_mode_description.rs` was a good next extraction
seam because it only transformed `ToolSpec` values for code mode and
already delegated the low-level description rendering to
`codex-code-mode`.

## What Changed

- added `codex-rs/tools/src/code_mode.rs` with
`augment_tool_spec_for_code_mode()` and
`tool_spec_to_code_mode_tool_definition()`
- added focused unit coverage in `codex-rs/tools/src/code_mode_tests.rs`
- rewired `core/src/tools/spec.rs` and `core/src/tools/code_mode/mod.rs`
to use the extracted adapters from `codex-tools`
- removed the old `core/src/tools/code_mode_description.rs` shim and its
test file from `codex-core`
- added the `codex-code-mode` dependency to `codex-tools`, updated
`Cargo.lock`, and refreshed the `codex-tools` README to reflect the
expanded boundary

## Test Plan

- `cargo test -p codex-tools`
- `CARGO_TARGET_DIR=/tmp/codex-core-code-mode-adapters cargo test -p
codex-core --lib tools::spec::`
- `CARGO_TARGET_DIR=/tmp/codex-core-code-mode-adapters cargo test -p
codex-core --lib tools::code_mode::`
- `just bazel-lock-update`
- `just bazel-lock-check`
- `just argument-comment-lint`

## References

- #15923
- #15928
- #15944
- #15953
- #16031
- #16047
- #16129
2026-03-28 15:32:35 -07:00
Michael Bolin
9405ea4f46 merge commit for archive created by Sapling 2026-03-28 15:28:49 -07:00
Michael Bolin
b803333093 ci: run Windows argument-comment-lint via native Bazel 2026-03-28 15:28:38 -07:00
Michael Bolin
684adf7723 Merge 166cd5fb44 into sapling-pr-archive-bolinfest 2026-03-28 15:17:35 -07:00
Michael Bolin
166cd5fb44 ci: run Windows argument-comment-lint via native Bazel 2026-03-28 15:17:17 -07:00
Michael Bolin
c4ad836343 Merge 5323bbab8a into sapling-pr-archive-bolinfest 2026-03-28 15:14:39 -07:00
Michael Bolin
5323bbab8a ci: align just bazel helpers with workflow behavior 2026-03-28 15:14:31 -07:00
Michael Bolin
06ec95588c Merge 24dfe15aca into sapling-pr-archive-bolinfest 2026-03-28 15:12:06 -07:00
Michael Bolin
a56d6f8db9 merge commit for archive created by Sapling 2026-03-28 15:11:43 -07:00
Michael Bolin
7217a9c71f Merge f727c17712 into sapling-pr-archive-bolinfest 2026-03-28 15:11:17 -07:00
Michael Bolin
f727c17712 ci: align just bazel test helpers with Bazel workflow behavior 2026-03-28 15:11:09 -07:00
Michael Bolin
24dfe15aca permissions: start using PermissionProfile as the canonical runtime model 2026-03-28 15:11:01 -07:00
Michael Bolin
d942ea1e87 codex-tools: extract code mode tool spec adapters 2026-03-28 15:10:47 -07:00
Michael Bolin
133c2065fb merge commit for archive created by Sapling 2026-03-28 15:03:14 -07:00
Michael Bolin
8e869a58db ci: run Windows argument-comment-lint via native Bazel 2026-03-28 15:03:03 -07:00
Michael Bolin
c25c0d6e9e core: fix stale curated plugin cache refresh races (#16126)
## Why

The `plugin/list` force-sync path can race app-server startup's curated
plugin cache refresh.

Startup was capturing the configured curated plugin IDs from the initial
config snapshot. If `plugin/list` with `forceRemoteSync` removed curated
plugin entries from `config.toml` while that background refresh was
still in flight, the startup task could recreate cache directories for
plugins that had just been uninstalled.

That leaves the `plugin/list` response logically correct but the on-disk
cache stale, which matches the flaky Ubuntu arm failure seen in
`codex-app-server::all
suite::v2::plugin_list::plugin_list_force_remote_sync_reconciles_curated_plugin_state`
while validating [#16047](https://github.com/openai/codex/pull/16047).

## What

- change `codex-rs/core/src/plugins/manager.rs` so startup curated-repo
refresh rereads the current user `config.toml` before deciding which
curated plugin cache entries to refresh
- factor the configured-plugin parsing so the same logic can be reused
from either the config layer stack or the persisted user config value
- add a regression test that verifies curated plugin IDs are read from
the latest user config state before cache refresh runs

## Testing

- `cargo test -p codex-core
configured_curated_plugin_ids_from_codex_home_reads_latest_user_config
-- --nocapture`
- `cargo test -p codex-app-server
suite::v2::plugin_list::plugin_list_force_remote_sync_reconciles_curated_plugin_state
-- --nocapture`
- `just argument-comment-lint`
2026-03-28 15:00:39 -07:00
Michael Bolin
313fb95989 ci: keep rust-ci-full Windows argument-comment-lint on packaged wrapper (#16130)
## Why

PR #16106 switched `rust-ci-full` over to the native Bazel-backed
`argument-comment-lint` path on all three platforms.

That works on Linux and macOS, but the Windows leg in `rust-ci-full` now
fails before linting starts: Bazel dies while building `rules_rust`'s
`process_wrapper` tool, so `main` reports an `argument-comment-lint`
failure even though no Rust lint finding was produced.

Until native Windows Bazel linting is repaired, `rust-ci-full` should
keep the same Windows split that `rust-ci.yml` already uses.

## What changed

- restored the Windows-only nightly `argument-comment-lint` toolchain
setup in `rust-ci-full`
- limited the Bazel-backed lint step in `rust-ci-full` to non-Windows
runners
- routed the Windows runner back through
`tools/argument-comment-lint/run-prebuilt-linter.py`
- left the Linux and macOS `rust-ci-full` behavior unchanged

## Test plan

- loaded `.github/workflows/rust-ci-full.yml` and
`.github/workflows/rust-ci.yml` with `python3` + `yaml.safe_load(...)`
- inspected failing Actions run `23692864849`, especially job
`69023229311`, to confirm the Windows failure occurs in Bazel
`process_wrapper` setup before lint output is emitted

## References

- #16106
2026-03-28 14:50:19 -07:00
Michael Bolin
af93c2bc0e merge commit for archive created by Sapling 2026-03-28 14:48:01 -07:00
Michael Bolin
0f9982b769 ci: run Windows argument-comment-lint via native Bazel 2026-03-28 14:47:55 -07:00
Michael Bolin
7133cfd318 Merge 150de48a83 into sapling-pr-archive-bolinfest 2026-03-28 14:39:09 -07:00
Michael Bolin
150de48a83 ci: align just bazel test targets with workflow exclusions 2026-03-28 14:38:56 -07:00
Michael Bolin
019190a7ff merge commit for archive created by Sapling 2026-03-28 14:37:08 -07:00