Commit Graph

10470 Commits

Author SHA1 Message Date
Michael Bolin
fda1ef1b3d Merge acd10385b4 into sapling-pr-archive-bolinfest 2026-03-28 04:52:10 -07:00
Michael Bolin
acd10385b4 ci: run argument-comment-lint through bazel package tests 2026-03-28 04:52:07 -07:00
Michael Bolin
82f818672c merge commit for archive created by Sapling 2026-03-28 04:20:28 -07:00
Michael Bolin
a4200b969c ci: run argument-comment-lint through bazel package tests 2026-03-28 04:20:22 -07:00
Michael Bolin
803289f29b Merge 1608791b3e into sapling-pr-archive-bolinfest 2026-03-28 03:17:31 -07:00
Michael Bolin
1608791b3e ci: run argument-comment-lint through bazel package tests 2026-03-28 03:17:26 -07:00
Michael Bolin
6afba17422 merge commit for archive created by Sapling 2026-03-28 02:01:04 -07:00
Michael Bolin
335f56b5ed ci: run argument-comment-lint through bazel package tests 2026-03-28 02:00:57 -07:00
Michael Bolin
9bdef62d08 merge commit for archive created by Sapling 2026-03-28 00:52:04 -07:00
Michael Bolin
52e610b8cd ci: run argument-comment-lint through bazel package tests 2026-03-28 00:51:56 -07:00
Michael Bolin
427c2aab5e merge commit for archive created by Sapling 2026-03-28 00:30:36 -07:00
Michael Bolin
4b490357e3 ci: run argument-comment-lint through bazel package tests 2026-03-28 00:30:27 -07:00
Michael Bolin
5359cca1d0 merge commit for archive created by Sapling 2026-03-28 00:20:41 -07:00
Michael Bolin
a4ba3d5aaf ci: run argument-comment-lint through bazel package tests 2026-03-28 00:20:35 -07:00
Michael Bolin
a502619410 merge commit for archive created by Sapling 2026-03-28 00:00:06 -07:00
Michael Bolin
a8ed684959 ci: run argument-comment-lint through bazel package tests 2026-03-27 23:59:59 -07:00
Michael Bolin
3920775a49 merge commit for archive created by Sapling 2026-03-27 23:45:38 -07:00
Michael Bolin
a7aab8c17c ci: run argument-comment-lint through bazel package tests 2026-03-27 23:45:31 -07:00
Michael Bolin
b2690206ef merge commit for archive created by Sapling 2026-03-27 23:09:15 -07:00
Michael Bolin
bb201371db ci: run argument-comment-lint through bazel package tests 2026-03-27 23:09:08 -07:00
Michael Bolin
137f8982b5 merge commit for archive created by Sapling 2026-03-27 22:57:40 -07:00
Michael Bolin
be084ba816 ci: run argument-comment-lint through bazel package tests 2026-03-27 22:57:30 -07:00
Michael Bolin
9e3f12b323 merge commit for archive created by Sapling 2026-03-27 22:52:44 -07:00
Michael Bolin
1b73e39ef7 ci: run argument-comment-lint through bazel package tests 2026-03-27 22:52:37 -07:00
Michael Bolin
867615aeba Merge d3e8ab7e44 into sapling-pr-archive-bolinfest 2026-03-27 22:47:38 -07:00
Michael Bolin
d3e8ab7e44 ci: run argument-comment-lint through bazel package tests 2026-03-27 22:47:27 -07:00
Michael Bolin
87bfb1d645 merge commit for archive created by Sapling 2026-03-27 22:41:20 -07:00
Michael Bolin
8c200156e5 ci: run argument-comment-lint through bazel package tests 2026-03-27 22:41:05 -07:00
Michael Bolin
e5dd2b6bbc merge commit for archive created by Sapling 2026-03-27 22:39:19 -07:00
Michael Bolin
ffae2cc58d ci: run argument-comment-lint through bazel package tests 2026-03-27 22:39:07 -07:00
Michael Bolin
e39ddc61b1 bazel: add Windows gnullvm stack flags to unit test binaries (#16074)
## Summary

Add the Windows gnullvm stack-reserve flags to the `*-unit-tests-bin`
path in `codex_rust_crate()`.

## Why

This is the narrow code fix behind the earlier review comment on
[#16067](https://github.com/openai/codex/pull/16067). That comment was
stale relative to the workflow-only PR it landed on, but it pointed at a
real gap in `defs.bzl`.

Today, `codex_rust_crate()` already appends
`WINDOWS_GNULLVM_RUSTC_STACK_FLAGS` for:

- `rust_binary()` targets
- integration-test `rust_test()` targets

But the unit-test binary path still omitted those flags. That meant the
generated `*-unit-tests-bin` executables were not built the same way as
the rest of the Windows gnullvm executables in the macro.

## What Changed

- Added `WINDOWS_GNULLVM_RUSTC_STACK_FLAGS` to the `unit_test_binary`
`rust_test()` rule in `defs.bzl`
- Added a short comment explaining why unit-test binaries need the same
stack-reserve treatment as binaries and integration tests on Windows
gnullvm

## Testing

- `bazel query '//codex-rs/core:*'`
- `bazel query '//codex-rs/shell-command:*'`

Those queries load packages that exercise `codex_rust_crate()`,
including `*-unit-tests-bin` targets. The actual runtime effect is
Windows-specific, so the real end-to-end confirmation still comes from
Windows CI.
2026-03-27 22:11:49 -07:00
Michael Bolin
0bfe9772b5 Merge 44667f3544 into sapling-pr-archive-bolinfest 2026-03-27 21:20:47 -07:00
Michael Bolin
ef14b723ef Merge 7cd1c93e3c into sapling-pr-archive-bolinfest 2026-03-27 21:18:16 -07:00
Michael Bolin
7cd1c93e3c bazel: add Windows gnullvm stack flags to unit test binaries 2026-03-27 21:18:04 -07:00
Michael Bolin
44667f3544 permissions: start using PermissionProfile as the canonical runtime model 2026-03-27 21:17:49 -07:00
Michael Bolin
7590d061bd Merge 7eced5c566 into sapling-pr-archive-bolinfest 2026-03-27 21:08:24 -07:00
Michael Bolin
7eced5c566 stabilize zsh-fork approvals and resume --last 2026-03-27 21:08:16 -07:00
Michael Bolin
b94366441e ci: split fast PR Rust CI from full post-merge Cargo CI (#16072)
## Summary

Split the old all-in-one `rust-ci.yml` into:

- a PR-time Cargo workflow in `rust-ci.yml`
- a full post-merge Cargo workflow in `rust-ci-full.yml`

This keeps the PR path focused on fast Cargo-native hygiene plus the
Bazel `build` / `test` / `clippy` coverage in `bazel.yml`, while moving
the heavyweight Cargo-native matrix to `main`.

## Why

`bazel.yml` is now the main Rust verification workflow for pull
requests. It already covers the Bazel build, test, and clippy signal we
care about pre-merge, and it also runs on pushes to `main` to re-verify
the merged tree and help keep the BuildBuddy caches warm.

What was still missing was a clean split for the Cargo-native checks
that Bazel does not replace yet. The old `rust-ci.yml` mixed together:

- fast hygiene checks such as `cargo fmt --check` and `cargo shear`
- `argument-comment-lint`
- the full Cargo clippy / nextest / release-build matrix

That made every PR pay for the full Cargo matrix even though most of
that coverage is better treated as post-merge verification. The goal of
this change is to leave PRs with the checks we still want before merge,
while moving the heavier Cargo-native matrix off the review path.

## What Changed

- Renamed the old heavyweight workflow to `rust-ci-full.yml` and limited
it to `push` on `main` plus `workflow_dispatch`.
- Added a new PR-only `rust-ci.yml` that runs:
  - changed-path detection
  - `cargo fmt --check`
  - `cargo shear`
  - `argument-comment-lint` on Linux, macOS, and Windows
- `tools/argument-comment-lint` package tests when the lint itself or
its workflow wiring changes
- Kept the PR workflow's gatherer as the single required Cargo-native
status so branch protection can stay simple.
- Added `.github/workflows/README.md` to document the intended split
between `bazel.yml`, `rust-ci.yml`, and `rust-ci-full.yml`.
- Preserved the recent Windows `argument-comment-lint` behavior from
`e02fd6e1d3` in `rust-ci-full.yml`, and mirrored cross-platform lint
coverage into the PR workflow.

A few details are deliberate:

- The PR workflow still keeps the Linux lint lane on the
default-targets-only invocation for now, while macOS and Windows use the
broader released-linter path.
- This PR does not change `bazel.yml`; it changes the Cargo-native
workflow around the existing Bazel PR path.

## Testing

- Rebasing this change onto `main` after `e02fd6e1d3`
- `ruby -e 'require "yaml"; %w[.github/workflows/rust-ci.yml
.github/workflows/rust-ci-full.yml .github/workflows/bazel.yml].each {
|f| YAML.load_file(f) }'`
2026-03-27 21:08:08 -07:00
Michael Bolin
2e052c35c4 merge commit for archive created by Sapling 2026-03-27 20:57:07 -07:00
Michael Bolin
a58428ae46 ci: split fast PR Rust CI from full post-merge Cargo CI 2026-03-27 20:56:55 -07:00
Michael Bolin
381cbe2613 Merge 83f2a4ca15 into sapling-pr-archive-bolinfest 2026-03-27 20:52:53 -07:00
Michael Bolin
83f2a4ca15 ci: split fast PR Rust CI from full post-merge Cargo CI 2026-03-27 20:52:30 -07:00
Michael Bolin
e02fd6e1d3 fix: clean up remaining Windows argument-comment-lint violations (#16071)
## Why

The initial `argument-comment-lint` rollout left Windows on
default-target coverage because there were still Windows-only callsites
failing under `--all-targets`. This follow-up cleans up those remaining
Windows-specific violations so the Windows CI lane can enforce the same
stricter coverage, leaving Linux as the remaining platform-specific
follow-up.

## What changed

- switched the Windows `rust-ci` argument-comment-lint step back to the
default wrapper invocation so it runs full-target coverage again
- added the required `/*param_name*/` annotations at Windows-gated
literal callsites in:
  - `codex-rs/windows-sandbox-rs/src/lib.rs`
  - `codex-rs/windows-sandbox-rs/src/elevated_impl.rs`
  - `codex-rs/tui_app_server/src/multi_agents.rs`
  - `codex-rs/network-proxy/src/proxy.rs`

## Validation

- Windows `argument comment lint` CI on this PR
2026-03-27 20:48:21 -07:00
Michael Bolin
f4d0cbfda6 ci: run Bazel clippy on Windows gnullvm (#16067)
## Why

We want more of the pre-merge Rust signal to come from `bazel.yml`,
especially on Windows. The Bazel test workflow already exercises
`x86_64-pc-windows-gnullvm`, but the Bazel clippy job still only ran on
Linux x64 and macOS arm64. That left a gap where Windows-only Bazel lint
breakages could slip through until the Cargo-based workflow ran.

This change keeps the fix narrow. Rather than expanding the Bazel clippy
target set or changing the shared setup logic, it extends the existing
clippy matrix to the same Windows GNU toolchain that the Bazel test job
already uses.

## What Changed

- add `windows-latest` / `x86_64-pc-windows-gnullvm` to the `clippy` job
matrix in `.github/workflows/bazel.yml`
- update the nearby workflow comment to explain that the goal is to get
Bazel-native Windows lint coverage on the same toolchain as the Bazel
test lane
- leave the Bazel clippy scope unchanged at `//codex-rs/...
-//codex-rs/v8-poc:all`

## Verification

- parsed `.github/workflows/bazel.yml` successfully with Ruby
`YAML.load_file`
2026-03-27 20:47:22 -07:00
Michael Bolin
23c5e3dec9 Merge a667068f8d into sapling-pr-archive-bolinfest 2026-03-27 20:37:25 -07:00
Michael Bolin
a667068f8d ci: add Windows Bazel clippy lane 2026-03-27 20:37:07 -07:00
Michael Bolin
343d1af3da bazel: enable the full Windows gnullvm CI path (#15952)
## Why

This PR is the current, consolidated follow-up to the earlier Windows
Bazel attempt in #11229. The goal is no longer just to get a tiny
Windows smoke job limping along: it is to make the ordinary Bazel CI
path usable on `windows-latest` for `x86_64-pc-windows-gnullvm`, with
the same broad `//...` test shape that macOS and Linux already use.

The earlier smoke-list version of this work was useful as a foothold,
but it was not a good long-term landing point. Windows Bazel kept
surfacing real issues outside that allowlist:

- GitHub's Windows runner exposed runfiles-manifest bugs such as
`FINDSTR: Cannot open D:MANIFEST`, which broke Bazel test launchers even
when the manifest file existed.
- `rules_rs`, `rules_rust`, LLVM extraction, and Abseil still needed
`windows-gnullvm`-specific fixes for our hermetic toolchain.
- the V8 path needed more work than just turning the Windows matrix
entry back on: `rusty_v8` does not ship Windows GNU artifacts in the
same shape we need, and Bazel's in-tree V8 build needed a set of Windows
GNU portability fixes.

Windows performance pressure also pushed this toward a full solution
instead of a permanent smoke suite. During this investigation we hit
targets such as `//codex-rs/shell-command:shell-command-unit-tests` that
were much more expensive on Windows because they repeatedly spawn real
PowerShell parsers (see #16057 for one concrete example of that
pressure). That made it much more valuable to get the real Windows Bazel
path working than to keep iterating on a narrowly curated subset.

The net result is that this PR now aims for the same CI contract on
Windows that we already expect elsewhere: keep standalone
`//third_party/v8:all` out of the ordinary Bazel lane, but allow V8
consumers under `//codex-rs/...` to build and test transitively through
`//...`.

## What Changed

### CI and workflow wiring

- re-enable the `windows-latest` / `x86_64-pc-windows-gnullvm` Bazel
matrix entry in `.github/workflows/bazel.yml`
- move the Windows Bazel output root to `D:\b` and enable `git config
--global core.longpaths true` in
`.github/actions/setup-bazel-ci/action.yml`
- keep the ordinary Bazel target set on Windows aligned with macOS and
Linux by running `//...` while excluding only standalone
`//third_party/v8:all` targets from the normal lane

### Toolchain and module support for `windows-gnullvm`

- patch `rules_rs` so `windows-gnullvm` is modeled as a distinct Windows
exec/toolchain platform instead of collapsing into the generic Windows
shape
- patch `rules_rust` build-script environment handling so llvm-mingw
build-script probes do not inherit unsupported `-fstack-protector*`
flags
- patch the LLVM module archive so it extracts cleanly on Windows and
provides the MinGW libraries this toolchain needs
- patch Abseil so its thread-local identity path matches the hermetic
`windows-gnullvm` toolchain instead of taking an incompatible MinGW
pthread path
- keep both MSVC and GNU Windows targets in the generated Cargo metadata
because the current V8 release-asset story still uses MSVC-shaped names
in some places while the Bazel build targets the GNU ABI

### Windows test-launch and binary-behavior fixes

- update `workspace_root_test_launcher.bat.tpl` to read the runfiles
manifest directly instead of shelling out to `findstr`, which was the
source of the `D:MANIFEST` failures on the GitHub Windows runner
- thread a larger Windows GNU stack reserve through `defs.bzl` so
Bazel-built binaries that pull in V8 behave correctly both under normal
builds and under `bazel test`
- remove the no-longer-needed Windows bootstrap sh-toolchain override
from `.bazelrc`

### V8 / `rusty_v8` Windows GNU support

- export and apply the new Windows GNU patch set from
`patches/BUILD.bazel` / `MODULE.bazel`
- patch the V8 module/rules/source layers so the in-tree V8 build can
produce Windows GNU archives under Bazel
- teach `third_party/v8/BUILD.bazel` to build Windows GNU static
archives in-tree instead of aliasing them to the MSVC prebuilts
- reuse the Linux release binding for the experimental Windows GNU path
where `rusty_v8` does not currently publish a Windows GNU binding
artifact

## Testing

- the primary end-to-end validation for this work is the `Bazel`
workflow plus `v8-canary`, since the hard parts are Windows-specific and
depend on real GitHub runner behavior
- before consolidation back onto this PR, the same net change passed the
full Bazel matrix in [run
23675590471](https://github.com/openai/codex/actions/runs/23675590471)
and passed `v8-canary` in [run
23675590453](https://github.com/openai/codex/actions/runs/23675590453)
- those successful runs included the `windows-latest` /
`x86_64-pc-windows-gnullvm` Bazel job with the ordinary `//...` path,
not the earlier Windows smoke allowlist

---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/15952).
* #16067
* __->__ #15952
2026-03-27 20:37:03 -07:00
Michael Bolin
c4f8eb1fbe Merge cff12b0135 into sapling-pr-archive-bolinfest 2026-03-27 20:14:37 -07:00
Michael Bolin
cff12b0135 ci: add Windows Bazel clippy lane 2026-03-27 20:14:28 -07:00
Michael Bolin
2619ef6673 merge commit for archive created by Sapling 2026-03-27 19:59:21 -07:00