Conversation
6fb492a to
15357d3
Compare
shijie-oai
approved these changes
May 21, 2026
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
Installing
@openai/codexcurrently places a Dotslashrgmanifest atnode_modules/@openai/codex/bin/rg, even though the native optional dependency already ships the actual helper undervendor/<target>/codex-path/rg. The launcher prepends thatcodex-pathdirectory, so the top-levelbin/rgfile is redundant in the npm install.The remaining direct consumers of the manifest are package-building paths:
scripts/codex_package/ripgrep.pyandcodex-cli/scripts/install_native_deps.py. Keeping the manifest undercodex-cli/binmakes it look like a shipped npm binary, so this moves it next to the package-builder code that owns it. The checked-in@openai/codexpackage metadata should likewise describe only the meta package payload; generated platform packages continue to publishvendor.What Changed
codex-cli/bin/rgtoscripts/codex_package/rg.codex-cli/scripts/build_npm_package.pyfrom copyingrginto the@openai/codexmeta package.fileswhitelist tobin/codex.js.Verification
python3 -m unittest discover -s scripts/codex_package -p "test_*.py"python3 -m unittest discover -s codex-cli/scripts -p "test_*.py"python3 -m py_compile codex-cli/scripts/build_npm_package.py codex-cli/scripts/install_native_deps.py scripts/codex_package/ripgrep.py scripts/codex_package/cli.py scripts/stage_npm_packages.pycodex-cli/scripts/build_npm_package.py --package codex --version 0.0.0-test --pack-output <tmp>/codex-meta-no-vendor.tgztar -tf <tmp>/codex-meta-no-vendor.tgzshowed onlypackage/bin/codex.js,package/package.json, andpackage/README.md.codexusesfiles: ["bin/codex.js"]whilecodex-darwin-arm64still usesfiles: ["vendor"].Stack created with Sapling. Best reviewed with ReviewStack.