Commit Graph

545 Commits

Author SHA1 Message Date
Ian MacLeod
bfb8986f7f Install build tools in full Rust CI (#39794)
## What changed

Install the `build-essential` package on apt-based runners in both full Rust CI workflows, including the platform-specific nextest workflow.

GitOrigin-RevId: 52e611235f032ed4a630301f40f8aafd9ca11a08
2026-08-20 20:04:45 +00:00
William Woodruff
6d020311f0 Stop persisting checkout credentials in V8 workflows (#39719)
## What changed

Set `persist-credentials: false` for the V8 canary repository checkout and
for the `rusty_v8` checkouts in both the canary and release workflows.

GitOrigin-RevId: b4ccca7c7edf4e038b7b84c83f83d1416f655f65
2026-08-20 14:08:18 +00:00
William Woodruff
2c74b56fcd Pass CI workflow inputs through environment variables (#39717)
## Why

Embedding reusable-workflow inputs directly in shell scripts can cause their
contents to be interpreted as shell syntax.

## What changed

- Export the Rust nextest target, profile, and test-thread inputs as environment
  variables before using them in Bash commands and paths.
- Pass the MSVC target and host architecture to PowerShell through environment
  variables.

GitOrigin-RevId: f96bbeeb7b556022e4bdea9db384a88f925050bf
2026-08-20 14:02:13 +00:00
Adam Perry @ OpenAI
6869d17cc2 Enable user namespaces in shared CI setup (#39606)
## What changed

- Enable unprivileged user namespaces for every Linux job that uses the shared
  `setup-ci` action.
- Disable AppArmor's unprivileged user namespace restriction when that sysctl is
  available.
- Remove the duplicate setup from the two nextest workflow jobs.

GitOrigin-RevId: a5aebe0795ada435e687826134411c8b1c28bd98
2026-08-20 05:59:06 +00:00
Adam Perry @ OpenAI
8e2265196e Add a just recipe for assembling Codex packages (#39584)
## What changed

- Add `just assemble-codex-package` as the documented entry point for the package builder.
- Export `CODEX_REPO_ROOT` from `just` and release CI, and require the package builder to use it for repository-relative inputs.
- Resolve the ripgrep and zsh manifests relative to their Python modules.

GitOrigin-RevId: 039d12107a49171f064b0119adc6b99cf97c6c1e
2026-08-20 04:55:47 +00:00
Adam Perry @ OpenAI
956f590ad5 Remove npm package staging from repo checks (#39402)
## What changed

Remove the `repo-checks` steps that staged a Codex npm package from a fixed
release workflow and uploaded the resulting tarball as an artifact.

GitOrigin-RevId: bb3756188eeea2ed236710273234e70f17dc9e9d
2026-08-19 03:52:59 +00:00
Ahmed Ibrahim
f6ba9110fa Prepare Python SDK 0.147.0 stable release (#39155)
## What changed

- Pin `openai-codex` to the `0.147.0` CLI runtime and regenerate its protocol models and lockfile.
- Allow stable Python SDK release tags and require their versions to match the pinned runtime.
- Expose the regenerated API additions, including thread sections, environment connection notifications, audio inputs, and the `section_id` thread-list filter.

## Testing

- Update release staging, generated-contract, notification, and public-signature coverage for the new runtime.

GitOrigin-RevId: 8b99ef6781e01c34d9d697c8c44247fb4e4fe3ab
2026-08-18 06:43:10 +00:00
Ahmed Ibrahim
6f95f19103 Update PyPI publish action to v1.14.2 (#39152)
## What changed

Update `pypa/gh-action-pypi-publish` from v1.13.0 to v1.14.2 for the Python runtime and SDK publishing jobs.

GitOrigin-RevId: 239d2787aec47fd53111e05c29efdd680c0c7c67
2026-08-18 06:18:37 +00:00
Eric Traut
31f23b6022 Clarify the external contribution policy (#39089)
## Why

Community expertise is most useful when shared through detailed issue reports, reproduction steps, logs, analysis, and design discussion. Reviewing external code changes requires broader architectural and roadmap context and can divert maintainers from higher-priority work.

## What changed

- State that external code contributions and pull requests are not accepted.
- Replace invited-contributor workflow and CLA guidance with instructions for reporting bugs and requesting features through the issue tracker.
- Remove the pull request template and align the ChatGPT crate guidance with the repository-wide policy.
- Direct vulnerability reports to the security policy.

GitOrigin-RevId: 736c0cb181e07cc751bc46f4fefc53c6964e3dab
2026-08-17 22:37:14 +00:00
Charlie Marsh
afb1b3c984 Verify the pinned zsh manifest in release builds (#39056)
## Why

Release jobs download the `codex-zsh` manifest before packaging or signing its
bundled binaries. Verify that download against a pinned digest so an unexpected
manifest cannot enter release artifacts.

## What changed

- Pin the SHA-256 digest for the `codex-zsh-v0.1.0` manifest.
- Add a portable verification script that uses `sha256sum` or macOS `shasum`.
- Run verification in both the package archive and macOS helper signing flows.

GitOrigin-RevId: a404bb897c8cc0bf3c0ff38e8a6e1cce059d7fab
2026-08-17 19:30:38 +00:00
Eric Burke
cce33123a1 Read Apple notarization issuer ID from Key Vault (#38646)
## What changed

- Load the Apple issuer ID from the notarization key's `apple-issuer-id`
  tag alongside its key ID and pinned version.
- Require the tag to contain a valid UUID before creating the notarization JWT.
- Remove the separate `APPLE_NOTARIZATION_ISSUER_ID` environment variable and
  release workflow secret wiring.

## Testing

- Cover valid, missing, empty, and malformed issuer ID tags in the macOS
  notarization tests.

GitOrigin-RevId: c42da96a36293cf39312d8238f958f6898247f19
2026-08-14 20:49:15 +00:00
Adam Perry @ OpenAI
965b9f263a Run required CI against pull request merge commits (#38051)
## Why

Checking only the pull request head can miss conflicts with changes already on
`main`.

## What changed

Remove explicit pull request head refs from required workflow checkouts so
GitHub Actions checks out the synthetic merge commit by default. Keep the
blocking gate on the same combined revision as the child workflows it
evaluates, and document the merge-commit policy in the workflow README.

GitOrigin-RevId: dc357caa5dc43f46b9b9a0edea6ee560b4fe8efb
2026-08-11 18:31:31 +00:00
Eric Burke
0c07c7ee47 Use Azure Key Vault for macOS notarization (#37154)
## Why

Keep the App Store Connect private key in Azure Key Vault instead of exporting it to release runners as a base64-encoded `.p8` secret.

## What changed

- Add a notarization client that creates notary-scoped Apple JWTs with a pinned Azure Key Vault key, submits and streams artifacts to Apple's notarization service, polls for completion, and saves developer diagnostics.
- Update the binary and DMG release wrappers to use the new client while continuing to staple accepted DMGs with `rcodesign`.
- Configure release jobs with the notarization vault key name and version instead of private-key material.

## Testing

- Add unit coverage for key validation, JWT signing, uploads, polling, diagnostic logs, and the binary and DMG wrapper contracts.

GitOrigin-RevId: 8f526c5691d774964fd33f847f8420cac0840b05
2026-08-05 20:31:46 +00:00
Grant Birkinbine
e1f39b5f5b Add Fence auditing to the blob size workflow (#36979)
## What changed

Run the hash-pinned `openai/fence` action in `audit` mode before checkout in
the blob size policy job.

GitOrigin-RevId: 9312897dae76d93298008b2ce8a8767680fe34b8
2026-08-04 22:03:13 +00:00
Grant Birkinbine
ceaa818898 Grant the blob size policy job read access to contents (#36945)
GitOrigin-RevId: 64c798ce72dfbab19314dce0dda14ba323fa6faf
2026-08-04 18:44:58 +00:00
zsol-openai
2a16af8234 Parallelize R2 asset publishing with DotSlash (#36871)
## Why

R2 publication waited for DotSlash to finish before uploading any release
assets, extending the release pipeline's critical path.

## What changed

- Start an `assets` stage after the GitHub release is created, in parallel with
  DotSlash publication. Upload available assets concurrently without publishing
  release metadata or channel aliases.
- Run a `finalize` stage after both jobs complete. Verify assets already present
  in R2, upload any assets DotSlash added, and then publish metadata, stable
  installer aliases, and release channels.
- Validate downloaded assets before upload and retain no-overwrite semantics
  across both stages.

GitOrigin-RevId: 1c3e8ca715be4064c2532a5c651f1bbe03ed96a4
2026-08-04 10:05:24 +00:00
Adam Perry @ OpenAI
51d4aa946c Normalize rusty_v8 checksum manifest line endings (#36797)
## What changed

- Write staged `rusty_v8` checksum manifests with LF line endings on every platform.
- Strip carriage returns when verifying manifests so existing Windows-built releases with CRLF line endings remain usable.

## Testing

- Assert that staged checksum manifests contain no carriage returns.

GitOrigin-RevId: 142855c147a08a60f5e5782c61e2fcd6b2e350d6
2026-08-03 20:41:24 +00:00
Sean Huang
2e32d95894 Enable sandboxed V8 for code mode (#36374)
## Why

Code mode must link against a V8 build with sandbox support, but Windows MSVC
still used upstream non-sandboxed prebuilts and package builds selected the
older release artifact profile.

## What changed

- Enable the `v8_enable_sandbox` feature directly for the code mode runtime.
- Select the `ptrcomp_sandbox_release` archive and bindings in Cargo packaging
  and CI, including Windows MSVC release builds.
- Point Bazel's Windows MSVC targets at the sandbox-enabled Codex artifacts and
  enable the matching crate feature.

## Testing

Add a runtime test that calls `v8__V8__IsSandboxEnabled()` and verifies that
the linked V8 library has sandbox support enabled.

GitOrigin-RevId: c1b49b44a6ccfea5b5006d69ec7866848d1cddd7
2026-07-31 18:32:28 +00:00
Adam Perry @ OpenAI
845497f483 Run native Windows Bazel tests with MSVC (#36372)
## What changed

- Target `x86_64-pc-windows-msvc` in the post-merge native Windows Bazel job.
- Select the `//:windows_x86_64_msvc` target platform and the MSVC host platform.
- Update the job and execution-log artifact names to identify the MSVC target.

GitOrigin-RevId: ca7d65c8bc074dccb5e7ebbac3be80b97545a846
2026-07-31 18:22:06 +00:00
Sean Huang
3d1d26915a Stop publishing legacy Linux bundle archives (#36342)
## Why

Linux release packages already include `codex`, `codex-code-mode-host`, and
`codex-resources/bwrap` in the `codex-package-<target>` archive.

## What changed

Remove the release workflow step that also created the redundant
`codex-<target>-bundle.tar.zst` archive for primary Linux builds.

GitOrigin-RevId: b4fd80e96b4fed991e9365e41fe7aad42a3fa28d
2026-07-31 14:55:14 +00:00
Adam Perry @ OpenAI
dd6b880353 Advance latest-alpha-cli after release publishing completes (#35818)
## What changed

Make the `update-branch` job wait for successful R2 publication before moving
`latest-alpha-cli`. For releases that publish npm packages, also require the npm
job to succeed; releases that intentionally skip npm publication can still
advance the branch.

GitOrigin-RevId: 38381b82c95c5c9650b2d72258ea7b835bdfa555
2026-07-28 19:27:00 +00:00
zsol-openai
3d519bf63a Allow alpha hotfix versions in R2 releases (#35595)
## Why

The Rust release workflow accepts alpha versions with a second numeric suffix,
such as `1.2.3-alpha.4.1`, but the R2 publisher rejects them as invalid.

## What changed

- Allow up to two numeric suffix components for alpha versions in
  `publish_r2_release.py`.
- Document that its version pattern must remain aligned with release tag
  validation in `rust-release.yml`.

GitOrigin-RevId: 8df68ce4f4d3e652367f7394a642827f21979d70
2026-07-27 10:54:58 +00:00
Channing Conger
a453588416 Sign bundled macOS helper binaries (#35264)
## Why

The macOS release workflow fetched `rg` and zsh while assembling package
archives, after the signing stage. This left the bundled helper executables
outside the workflow's signing and notarization checks.

## What changed

- Fetch, sign, notarize, and upload the pinned macOS `rg` and zsh binaries with
  the other release artifacts.
- Build package archives from those signed helpers via `--rg-bin` and the new
  `--zsh-bin` override.
- Verify the helpers' architecture, signatures, and absence of entitlements in
  the final package.

## Testing

- Cover the prebuilt zsh override and verify that package assembly preserves
  the supplied helper binaries.

GitOrigin-RevId: a3865c04fa2f0f4df32e627ee7202bc87bdc3241
2026-07-24 23:44:55 +00:00
zbarsky-openai
b5748e6e3c Remove Windows Bazel lint toolchain overrides (#34827)
## What changed

- Stop forcing the `local_windows_msvc` host platform for Windows
  `argument-comment-lint` builds.
- Stop selecting the Rust linker preference explicitly.
- Continue skipping incompatible explicit targets on Windows.

GitOrigin-RevId: de3014c1fb0685d33cad32fccb0081a3717d9676
2026-07-22 21:07:34 +00:00
zsol-openai
667b6bbaf1 Publish stable installer aliases to R2 (#34729)
## What changed

- Publish `install.sh` and `install.ps1` from stable release assets to the
  mutable `codex/install.sh` and `codex/install.ps1` R2 keys.
- Require both installer assets and verify each uploaded object's size,
  SHA-256 metadata, and CRC64 checksum before completing publication.
- Leave prerelease publication unchanged.

GitOrigin-RevId: 869f5fcd6c5f5d7fa4dc39c5216b31409d595fc9
2026-07-22 10:53:06 +00:00
zsol-openai
a148e0b50a Publish release metadata to R2 channels (#34508)
## What changed

- Publish the verified `release.json` metadata to `codex/channels/latest` for
  stable releases and `codex/channels/prerelease` for prereleases.
- Pass the release classification through the reusable R2 workflow so GitHub
  Releases and R2 channels use the same stable-versus-prerelease decision.
- Allow channel objects to be replaced while keeping versioned release objects
  immutable, and verify each channel upload before completing the publication.

GitOrigin-RevId: bd5c728c5565befe42b041ee1a032b111daca1c2
2026-07-21 09:55:09 +00:00
zsol-openai
cc875d61ce Mirror Rust release artifacts to Cloudflare R2 (#34505)
## What changed

- Add a reusable workflow that runs after the GitHub Release and DotSlash publishing jobs and mirrors each release asset to a versioned R2 prefix.
- Validate GitHub asset sizes and SHA-256 digests before upload, publish objects without overwriting existing files, and verify their remote size, digest metadata, and CRC64 checksum.
- Generate `release.json` with installer-facing asset URLs and digests, then publish and verify it alongside the release assets.
- Allow an in-progress Rust release workflow to finish instead of cancelling it when another run starts.

GitOrigin-RevId: e6717cd27914994accced6e2c5df696f0e9a558e
2026-07-21 09:41:23 +00:00
Michael Bolin
9970cd706f Support alpha hotfix release versions (#34463)
## What changed

- Map Python `aN.postM` versions to Codex `-alpha.N.M` release tags through shared release-version helpers.
- Accept alpha hotfix versions in Python runtime workflows, Rust release validation, npm publishing, and the shell and PowerShell installers.

## Testing

- Cover version conversion, workflow output, runtime setup, artifact staging, and installer handling for alpha hotfix releases.

GitOrigin-RevId: b95edb56f7c93b435a8050c10f0202dc117e6669
2026-07-21 03:59:38 +00:00
pakrym-oai
20e5edfa74 Expand agent core ownership (#31675)
The agent core team owns the core agent implementation and should review
changes to its adjacent runtime crates. Those crates were not covered by
the existing CODEOWNERS rules.

This adds `@openai/codex-core-agent-team` ownership for:

- `codex-rs/arg0`
- `codex-rs/codex-mcp`
- `codex-rs/exec-server`

## Validation

- `git diff --check`

No runtime tests are applicable because this only changes CODEOWNERS
metadata.
2026-07-08 18:04:44 -07:00
Adam Perry @ OpenAI
bd5c860abe ci: route build IO through Dev Drives (#31357)
## Why

Windows Cargo and Bazel jobs spend significant time in filesystem-heavy
build and cache directories. Route those directories through one CI
build root so Windows can use its Dev Drive and Unix can use a stable
cache root.

## What

- Have `setup-ci` define `CI_BUILD_ROOT`, `CARGO_TARGET_DIR`, Bazel
cache/output paths, and temp paths.
- Require Windows to find or provision a verified Dev Drive instead of
falling back to `C:`.
- Pass the shared Bazel output base to `setup-bazel` so its explicit
`output_base` does not defeat Dev Drive routing.
- Point nextest, release, and V8 source-build paths at the shared
environment contract.

## Benchmark results

One-off cold-cache WPR/ETW traces show the explicit Bazel output-base
routing removes the dominant `C:` traffic:

| sample | `C:\_bazel` | summed `C:` traffic | traced test step |
|---|---:|---:|---:|
| shard 1 before | 62.2 GiB | 85.2 GiB | 16m22s |
| shard 1 updated | 0 | 16.5 GiB | 12m05s |
| shard 3 before | 67.2 GiB | 84.6 GiB | 16m48s |
| shard 3 updated | 0 | 13.5 GiB | 11m08s |

For a cold x64 V8 source build, the retained build-tail sample showed
`D:\cargo-target` at ~1.29 GiB while measured `C:` roots totaled ~0.45
GiB (`C:\Users` ~0.33 GiB, `C:\Program Files` ~0.06 GiB, `C:\Windows`
~0.03 GiB). The full cold build took 2h20m36s.

The Bazel timing improvement is directional because both refreshed
shards failed tests. The V8 trace is a bounded build-tail sample, not
the full build. All final samples had zero lost ETW events; VHDX traffic
was excluded from the optimization ranking.

Runs: [baseline
Bazel](https://github.com/openai/codex/actions/runs/28911908527),
[updated
Bazel](https://github.com/openai/codex/actions/runs/28917133701), [V8
build tail](https://github.com/openai/codex/actions/runs/28933626678).

## Manual validation

- Ran `just fmt`.
- Ran `just test-github-scripts` (35 tests).
- Parsed GitHub Actions YAML with `yq`.
- Ran `git diff --check`.

## Stack

- [#31332](https://github.com/openai/codex/pull/31332) — parameterize
Cargo target paths
- [#31356](https://github.com/openai/codex/pull/31356) — Windows 2025
runner bump
- [#31357](https://github.com/openai/codex/pull/31357) — Dev Drive I/O
routing
2026-07-08 14:06:37 -07:00
Adam Perry @ OpenAI
aaa30f79c2 ci: run V8 source builds on Windows 2025 (#31356)
## Why

The V8 Windows source jobs need a runner image that can support the
later Dev Drive setup.

## What

Move the two V8 Windows source-build matrix entries from `windows-2022`
to `windows-2025`.
Namespace the canary source-build cache by runner image so it cannot
restore Windows 2022 native outputs.

## Manual validation

- Ran `just fmt`.
- Ran `just test-github-scripts` (33 tests).
- Parsed GitHub Actions YAML with `yq`.
- Ran `git diff --check`.

## Stack

- [#31332](https://github.com/openai/codex/pull/31332) — parameterize
Cargo target paths
- [#31356](https://github.com/openai/codex/pull/31356) — Windows 2025
runner bump
- [#31357](https://github.com/openai/codex/pull/31357) — Dev Drive I/O
routing
2026-07-07 18:12:49 -07:00
Adam Perry @ OpenAI
77b766c6ee ci: parameterize Cargo target paths (#31332)
## Why

Prepare CI jobs for a later build-output relocation without changing
where they write today.

## What

- Export `CARGO_TARGET_DIR` from `setup-ci` at the existing
`codex-rs/target` path.
- Route nextest, release, artifact, and signing paths through
`CARGO_TARGET_DIR`.
- Require V8 staging callers to pass an explicit target directory while
preserving the existing upstream path.

## Manual validation

- Ran `just test-github-scripts`.
- Parsed GitHub Actions YAML with `yq`.

## Stack

- [#31332](https://github.com/openai/codex/pull/31332) — parameterize
Cargo target paths
- [#31356](https://github.com/openai/codex/pull/31356) — Windows 2025
runner bump
- [#31357](https://github.com/openai/codex/pull/31357) — Dev Drive I/O
routing
2026-07-08 00:02:16 +00:00
malsamiri-oai
f363ed70cc fix(release): add missing Intel V8 signing entitlement (#30953)
## Why

Intel macOS release binaries crash on the first Code Mode tool call
while V8 creates its code range. The x86_64 V8 allocator later makes a
non-`MAP_JIT` reservation executable, which Hardened Runtime rejects
when the signature contains only `com.apple.security.cs.allow-jit`.

Tracks
[SE-8006](https://linear.app/openai/issue/SE-8006/intel-macos-codex-cli-crashes-in-v8-startup-on-gpt-56-sol-tool-calls).
Fixes #28390.

## What

- add an expanded entitlement profile only for x86_64 `codex` and
`codex-app-server`, the release binaries that link V8
- keep arm64 and `codex-responses-api-proxy` on the existing narrower
profile
- share one fail-closed target/binary selector between signing and final
verification
- verify the expected Mach-O architecture and exact entitlement
dictionary for the signed binary, tar.gz, zstd, package, and DMG copies

## Verification

- `just test-github-scripts` (34 tests)
- `UV_CACHE_DIR=/private/tmp/codex-uv-cache just fmt-check`
- `bash -n .github/scripts/macos-signing/select_codex_entitlements.sh`
- `plutil -lint` on both entitlement profiles
- parsed `rust-release.yml` as YAML
- `git diff --check`
- ad-hoc Hardened Runtime signing smoke on an x86_64 Mach-O slice:
strict `codesign` verification passed; the Codex profile contained
exactly both keys and the proxy profile retained exactly `allow-jit`

## Release validation

Run a native Intel smoke of the final Developer ID-signed x86_64 Codex
binary through V8 isolate creation before shipping. PR #30849 is
diagnostic scaffolding, but its non-sandbox release job currently fails
in the harness before V8 starts, so it is not counted as coverage here.
2026-07-07 16:47:21 +00:00
Adam Perry @ OpenAI
7226904ed1 ci: share common workflow setup (#31318)
## Why

CI jobs repeat common bootstrap steps, which makes it harder to keep
Bazel and Cargo lanes aligned. Centralizing the lightweight setup gives
us one place for future runner-wide optimizations without adding Rust
toolchain or component installation to the Windows Bazel long poles.

## What

- add zero-input `.github/actions/setup-ci` to set Cargo's git
transport, install DotSlash and `just`, expose DotSlash from stable PATH
locations, and enable Windows Git long paths
- have `setup-bazel-ci` compose the common setup, then remove its
DotSlash/test-prerequisite plumbing
- migrate Bazel, Cargo CI, V8 canary, repo checks, nextest, and Windows
release call sites while keeping Rust toolchain and MSVC setup explicit
- preserve the existing nextest Dev Drive setup unchanged

## Validation

- `just test-github-scripts` (30 tests)
- parsed workflow and composite-action YAML with `yq`
2026-07-06 17:27:44 -07:00
Channing Conger
3f61570044 [codex] bundle code mode host in release packages (#30202)
## Summary

- build, strip, sign, and publish `codex-code-mode-host` with the
primary Codex release binaries on Linux, macOS, and Windows
- place the host beside `codex[.exe]` in canonical package archives,
macOS DMGs, and the legacy Linux bundle so the runtime's sibling lookup
succeeds
- preserve and validate the host through standalone installers and
Python runtime wheel staging
- add package-builder coverage for source selection and the resulting
package layout

## Why

The process-owned code-mode client launches `codex-code-mode-host` as a
sibling of the running Codex executable. Release artifacts currently
build and bundle `codex` without that host, so code mode cannot start
from installed packages.
2026-07-06 16:58:05 -07:00
Michael Bolin
319d03056e fix(install): reuse GitHub release metadata (#31056)
## Why

The standalone installers currently perform separate unauthenticated
GitHub REST API lookups while resolving the latest version, locating the
platform package, locating its checksum manifest, and retrieving asset
digests. A single install can therefore make up to four release-metadata
requests.

When GitHub's shared unauthenticated rate limit is exhausted, valid
releases fail to install. The shell installer also suppresses the
metadata request failure while probing assets, so a `403` is misreported
as though the release assets do not exist. This makes the failure both
more likely and harder to diagnose.

Fixes #28538.

## What changed

- Resolve the selected version and fetch its release metadata together.
- Reuse that one metadata response for package, checksum, and
legacy-package selection in both `install.sh` and `install.ps1`.
- Report metadata fetch failures as possible GitHub availability or
rate-limit failures instead of missing assets.
- Add a mocked-`curl` regression suite covering exact releases,
`latest`, and a simulated metadata `403`, and run it in `repo-checks`.

For `latest`, the metadata returned by `/releases/latest` now supplies
both the resolved version and the asset list. For an explicitly selected
version, the installer makes one request to that release's tag endpoint.

## Verification

- `python3 -m unittest discover -s scripts/install -p 'test_*.py' -v`
- `sh -n scripts/install/install.sh`
- Parsed `scripts/install/install.ps1` with the PowerShell language
parser.

## Scope

This change reduces GitHub API usage and preserves the underlying error,
but it does not move release artifacts away from GitHub's CDN.
2026-07-03 15:11:19 -07:00
Eric Traut
4808c162ee [codex] auto-label AWS Bedrock issues (#30607)
## Summary

AWS Bedrock issues currently fall under broader labels, which makes
provider-specific reports harder to find. The issue tracker now has an
`aws-bedrock` label, but the automated labeler does not know to apply
it.

Teach the issue labeler to select `aws-bedrock` for Amazon Bedrock
provider or Bedrock Mantle issues while excluding generic AWS
references.
2026-06-29 11:10:38 -07:00
Adam Perry @ OpenAI
1168254bd9 [codex] group blocking and postmerge CI workflows (#30146)
## Why

It's hard to change the set of required jobs when they're managed in the
GitHub UI, and when each workflow is responsible for choosing it's own
scheduling it's easy to end up with skew between what we enforce on PRs
vs. on main.

## What

- add a `blocking-ci` caller workflow, triggered by pull requests and
pushes to `main`, for Bazel, blob size, cargo-deny, Codespell,
`repo-checks`, rust CI, and SDK CI
- add an `always()` terminal job named `CI required` that fails unless
every called workflow succeeds
- add a `postmerge-ci` caller workflow for `rust-ci-full` and
`v8-canary`, with a terminal `Postmerge CI results` job
- centralize V8 relevance detection in `v8_canary_changes.py`; unrelated
PR and postmerge runs execute metadata only and skip the expensive build
matrices
- leave `v8-canary` outside the blocking gate and leave the external
`cla` check independent

## Rollout

A repository admin must replace the existing required GitHub Actions
contexts with `CI required` in the main-branch ruleset. Retain `cla` as
a separate required check. Until that change is coordinated, this PR
cannot satisfy the old standalone check names. In-flight PRs will need
to be rebased after this lands.
2026-06-26 15:07:05 -07:00
Michael Bolin
e23e7cbe46 release: consume standalone zsh artifacts (#30116)
## Why

Once #30114 publishes zsh independently, regular Rust releases should
reuse that protected, versioned artifact set instead of rebuilding
identical zsh binaries for every Codex version. Keeping the zsh release
tag explicit in the workflow also makes future artifact upgrades
deliberate and easy to review.

This PR assumes the first standalone artifact release will be published
as `codex-zsh-v0.1.0` before this change lands.

## What changed

- Added `CODEX_ZSH_RELEASE_TAG` near the top of
`.github/workflows/rust-release.yml`, initially pinned to
`codex-zsh-v0.1.0`.
- Download the standalone release’s generated `codex-zsh` DotSlash
manifest before assembling Linux and macOS Codex packages.
- Added a `--zsh-manifest` package-builder override so release packaging
fetches the matching target archive and verifies the size and SHA-256
digest recorded in that manifest.
- Removed the reusable zsh build job from regular Rust releases.
- Stopped copying zsh archives into each Rust release and stopped
regenerating a zsh DotSlash manifest there.

Windows packaging remains unchanged because the patched zsh resource is
only shipped for supported Unix targets.

## Testing

- Added package-helper coverage that supplies a standalone manifest
override and verifies the extracted zsh bytes.
- Ran the `scripts/codex_package` unit test suite.
- Validated `.github/scripts/build-codex-package-archive.sh` with `bash
-n`.
2026-06-25 14:05:49 -07:00
Michael Bolin
891f1f4c85 release: publish standalone zsh artifacts (#30114)
## Why

The patched zsh artifacts rarely change, but
`.github/workflows/rust-release-zsh.yml` currently runs as part of every
Rust release. Rebuilding the same four binaries for each Codex version
wastes release capacity and ties an independently versioned runtime
dependency to the main release cadence.

This establishes the producer side of a build-once flow. The existing
Rust release workflow remains unchanged until the first standalone
artifact release has been published and the checked-in DotSlash
manifests can be updated with its URLs and checksums.

## What changed

- Run the zsh release workflow for protected `codex-zsh-vX.Y.Z` tags
instead of as a reusable workflow.
- Validate the semantic release tag before starting the platform builds.
- Publish the four zsh archives to a GitHub prerelease so the release
never becomes the repository latest release.
- Publish the generated `codex-zsh` DotSlash manifest alongside the
archives.
- Document how to publish the next artifact version after changing the
pinned zsh commit or patch.

## Tag protection

An active repository tag ruleset named `codex-zsh-v*.*.*` targets
`refs/tags/codex-zsh-v*.*.*`. It restricts tag creation, updates,
deletion, and non-fast-forward changes; requires linear history; and
limits bypass to the configured repository role.

This was verified with:

```shell
gh api repos/openai/codex/rulesets/18140982
```

The response reported `"enforcement":"active"`, the expected tag
condition, and the `creation`, `update`, `deletion`, `non_fast_forward`,
and `required_linear_history` rules.

## Rollout

After this lands, publish the first `codex-zsh-vX.Y.Z` release. A
follow-up can then update the checked-in DotSlash manifests and remove
the zsh rebuild from `.github/workflows/rust-release.yml`.



---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/30114).
* #30116
* __->__ #30114
2026-06-25 13:56:08 -07:00
Adam Perry @ OpenAI
93c79046d6 ci: fail jobs that dirty the worktree (#29720)
## Why

CI jobs should not silently leave tracked changes or untracked files in
the repository worktree.

## What

- Add a shared final worktree-cleanliness action to 19 checkout-bearing
PR and main CI jobs.
- Ignore the intentional SDK scratch directory and nested V8 checkout.
- Pin Bazelisk in shared CI setup so `.bazelversion` remains
authoritative, avoiding `MODULE.bazel.lock` deltas on Windows runners.
- Leave `rust-ci-full` and release-only workflows unchanged.
- Update `AGENTS.md` to discourage review bots from asking for
`MODULE.bazel.lock` changes.
2026-06-24 11:06:35 -07:00
Adam Perry @ OpenAI
829f5b6b59 protocol: separate app and exec RPC ownership (#29714)
## Why

The app-server and exec-server expose separate JSON-RPC APIs, but
exec-server currently sources its serialized protocol and envelope types
through app-server-oriented code. Giving each API an explicit owner
makes the crate boundary legible without introducing shared generic
envelopes.

## What changed

- Added `codex-exec-server-protocol` to own exec DTOs, process IDs, and
JSON-RPC envelopes.
- Updated exec-server clients, transports, handlers, and tests to use
the new crate.
- Exposed app-server's existing JSON-RPC types through a public `rpc`
module while retaining root re-exports.
- Preserved existing wire shapes, including exec `PathUri` behavior.

## Stack

This is PR 1 of 6. Next: [PR
#29721](https://github.com/openai/codex/pull/29721), which moves auth
mode below the app wire boundary.

## Validation

- Exec-server protocol and server coverage passed in the focused
protocol test runs.
- App-server protocol schema fixtures passed.
2026-06-23 22:37:31 +00:00
Adam Perry @ OpenAI
c1f8b280b5 ci: restore custom Windows runner with hermetic LLVM 0.7.9 (#29143)
The custom Windows argument-comment-lint job was temporarily moved to
`windows-2022` in #28940 after hermetic LLVM source extraction failed on
the newer runner. This takes the upstream extraction fix so the job can
return to the intended custom runner.

This upgrades `llvm` to `0.7.9` and `rules_cc` to `0.2.18`, refreshes
the module lock, rebases the remaining Windows and custom libc++
patches, drops the obsolete symlink-extraction workaround, and restores
the `windows-x64` runner configuration.

Validation:

- Verified all LLVM patches apply cleanly against the `0.7.9` source.
- Built `@llvm-project//compiler-rt:clang_rt.builtins.static`.
2026-06-22 17:26:30 +00:00
rka-oai
47ab51470b Pin Windows argument lint to Windows 2022 (#28940)
## What

Run the Windows argument-comment-lint job on the `windows-2022` hosted
runner instead of the custom Windows runner pool.

## Why

The custom pool recently moved from the Visual Studio 2022 Windows image
to `windows-2025-vs2026`. Since that migration, the job fails while
Bazel materializes LLVM external repository sources, before the argument
lint itself runs. The same failure appears across unrelated PRs.

This narrow change tests GitHub’s recommended mitigation for workloads
that still require the Visual Studio 2022 image:
https://github.com/actions/runner-images/issues/14017

## How

Use the standard `windows-2022` runner for only the Windows
argument-comment-lint matrix entry. No product code or lint behavior
changes.
2026-06-18 17:16:51 +00:00
Channing Conger
009a2bb93d ci: run code-mode unit tests on all bazel targets (#28562)
## Why

V8 should be stable under Bazel, so the `codex-code-mode` unit tests
should run across the Bazel platform matrix. If these tests prove
unstable, we should fix the tests rather than exclude them from CI.

## What changed

- Remove the explicit `//codex-rs/code-mode:code-mode-unit-tests`
exclusion from the macOS and Linux Bazel test jobs.
- Remove the same exclusion from the native Windows post-merge job.
- Keep the existing Windows gnullvm shard coverage.

## Bazel test coverage

The target contains 26 unit tests. A fresh uncached local Bazel
execution ran all 26 with 0 failures, 0 ignored tests, and 0 filtered
tests.

PR Bazel CI selected the target on every enabled platform and reported a
cached pass:

| Platform | Passing CI job |
| --- | --- |
| macOS aarch64 | [Bazel test
passed](https://github.com/openai/codex/actions/runs/27636617545/job/81725447804)
|
| macOS x86_64 | [Bazel test passed in
2.2s](https://github.com/openai/codex/actions/runs/27636617545/job/81725448008)
|
| Linux GNU | [Bazel test passed in
0.4s](https://github.com/openai/codex/actions/runs/27636617545/job/81725447898)
|
| Linux musl | [Bazel test passed in
0.4s](https://github.com/openai/codex/actions/runs/27636617545/job/81725448117)
|
| Windows gnullvm | [Bazel test passed in shard 4/4 in
1.6s](https://github.com/openai/codex/actions/runs/27636617545/job/81725448166)
|
2026-06-16 11:26:33 -07:00
Adam Perry @ OpenAI
1fe89de576 Run core integration tests against a Wine-backed Windows executor (#28401)
## Why

We want to exercise a linux app-server against a windows exec-server
without having to repeat every test case. This approach has slight
precedent in the remote docker test setup.

## What

Run the shared `codex-core` integration suite against Windows
exec-server behavior from Linux. This makes cross-OS path and shell
regressions visible while keeping unsupported cases owned by individual
tests.

- Add `local`, `docker`, and `wine-exec` test environment selection with
legacy Docker compatibility.
- Extend `codex_rust_crate` to generate a sharded Wine-exec variant
using a cross-built Windows server and pinned Bazel Wine/PowerShell
runtimes.
- Teach remote-aware helpers about Windows paths and track temporary
incompatibilities with source-local `skip_if_wine_exec!` calls and
follow-up reasons.
2026-06-16 00:38:41 +00:00
Adam Perry @ OpenAI
740c4f269d build: run buildifier from just fmt (#28125)
## Intent

Keep Bazel and Starlark files consistently formatted without requiring
contributors to install or version buildifier themselves.

## Implementation

- Add a SHA-256-pinned, cross-platform DotSlash manifest for buildifier
v8.5.1.
- Run buildifier from the shared `just fmt` and `just fmt-check` driver,
with Windows-safe explicit DotSlash invocation.
- Provision DotSlash in formatting CI and contributor devcontainers, and
document the source-build prerequisite.
- Apply the initial mechanical buildifier formatting baseline.
2026-06-13 21:43:39 -07:00
Tamir Duberstein
17586d80ee [codex] package Windows ARM64 on x64 (#28001)
The first release after parallelizing Windows packaging moved the
critical path to the ARM64 packaging job:

https://github.com/openai/codex/actions/runs/27451157324

The x64 job started immediately and finished in 5m29s. The ARM64
job waited 76s for its runner and then took 5m56s, holding the
release for 1m43s after x64 had finished.

Packaging only downloads, signs, archives, and compresses already
built binaries. It does not execute target code. Run both packaging
jobs on x64 runners, keeping ARM64 hardware for compilation.
2026-06-13 12:55:53 -07:00
Tamir Duberstein
51483bb583 [codex] parallelize Windows package archives (#27854)
In the Windows x64 packaging job from

https://github.com/openai/codex/actions/runs/27391514823

building the primary and app-server package archives serially took 116
seconds.

Both archives read the same signed-binary directory but write separate
package trees and output files. Run them concurrently with xargs -P2.

The package helper rewrites DotSlash executables under the process temp
directory. A naive concurrent run failed when one process tried to
replace an executable used by the other. Give each bundle separate TMP
and TEMP roots to keep those caches independent.

On Windows x64 in

https://github.com/openai/codex/actions/runs/27397197944

three serial trials took 127, 128, and 126 seconds. Concurrent trials
took 76, 74, and 74 seconds, saving 52 to 54 seconds. This removes about
50 seconds from the release critical path without changing the packaging
commands or output set.
2026-06-13 00:00:15 +00:00
Tamir Duberstein
eb46984aaa [codex] package Windows symbols in parallel (#27856)
In the x64 packaging job from

https://github.com/openai/codex/actions/runs/27391514823

archiving and uploading PDBs took 65 seconds after signing. Release
packaging could not start until that work completed.

Windows code signing changes executables but not their PDBs. Package
the PDBs in a sibling Ubuntu job as soon as all binary artifacts are
available. Signing and release packaging can then proceed without
waiting for the symbols archive, reducing the critical path by about
one minute.
2026-06-12 16:52:23 -07:00