Conversation
This was referenced May 20, 2026
31b30b5 to
86acecb
Compare
viyatb-oai
approved these changes
May 20, 2026
Collaborator
viyatb-oai
left a comment
There was a problem hiding this comment.
Approved. Rechecked the current head after the force-push; no additional security or correctness issues found.
bolinfest
added a commit
that referenced
this pull request
May 20, 2026
## Why
Release CI already builds the Codex entrypoints before staging
artifacts, and the package builder can now package those prebuilt
binaries directly. The workflow should produce package-shaped sidecar
archives from the same staged entrypoints that downstream distribution
channels will eventually consume, without rebuilding `codex` or
`codex-app-server` inside the packaging step.
This intentionally does **not** publish the new package archives as
GitHub Release assets yet. The archives are kept with workflow artifacts
until npm, Homebrew, `install.sh`, winget, and related consumers are
ready to switch over.
## What changed
- Adds a `Build Codex package archive` step to
`.github/workflows/rust-release.yml` after target artifacts are staged.
- Runs `scripts/build_codex_package.py` for both release bundles:
- `primary` builds `codex-package-${TARGET}.tar.gz` with `--variant
codex`.
- `app-server` builds `codex-app-server-package-${TARGET}.tar.gz` with
`--variant codex-app-server`.
- Passes `--entrypoint-bin target/${TARGET}/release/<entrypoint>` so
packages contain the entrypoint already built by the workflow.
- Deletes both package archive names before the final GitHub Release
upload so they remain workflow artifacts only for now.
## Verification
- Parsed `.github/workflows/rust-release.yml` with Ruby's YAML loader.
---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/23582).
* #23596
* __->__ #23582
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The package-builder stack now creates a canonical Codex package directory where the entrypoint lives under
bin/, bundled helper resources live undercodex-resources/, and bundled PATH-style tools live undercodex-path/. That layout is not specific to the standalone installer: npm, brew, install scripts, and manually unpacked artifacts should all be able to use the same package shape.The Rust runtime still only knew about the legacy standalone release layout, where resources sit next to the executable. A packaged binary therefore would not identify its package root or prefer the bundled
rgfromcodex-path/.What changed
CodexPackageLayouttocodex-install-contextand detects it from an executable path shaped like<package>/bin/<entrypoint>when<package>/codex-package.jsonis present.InstallContextinto an installmethodplus an optional package layout so the layout is shared across npm, bun, brew, standalone, and other launch contexts.AbsolutePathBufvalues.codex-resources/andcodex-path/optional so Codex can still run with degraded behavior if sidecar directories are missing.InstallContext::rg_command()to prefer bundledcodex-path/rgorrg.exe, then fall back to the legacy standalone resources location, then systemrg.codex doctorreporting so package installs show package, bin, resources, and path directories, and so bundled search detection recognizescodex-path/for any install method.Test plan
cargo test -p codex-install-contextcargo test -p codex-clicargo test -p codex-tui update_action::tests::maps_install_context_to_update_actionjust bazel-lock-check