fix: wait for the Codex platform binary before installing - #159
Open
devFancy wants to merge 1 commit into
Open
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
devFancy
force-pushed
the
fix/issue-158-install-verification
branch
2 times, most recently
from
August 24, 2026 01:43
b945004 to
1378a26
Compare
devFancy
force-pushed
the
fix/issue-158-install-verification
branch
from
August 24, 2026 01:56
1378a26 to
6691bc7
Compare
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #158.
Why
npm install -g "@openai/codex@${CODEX_VERSION}"can exit0while leaving a CLI that cannot run. The platform binary is an aliasedoptionalDependency, so npm skips it silently when it is not published yet, and the job fails several steps later withMissing optional dependency @openai/codex-linux-x64.Platform packages are published after the wrapper becomes
latest, so there is a window wherelatestresolves but its binary does not exist. For0.149.1that was 115s on linux-x64 and 1413s on win32-x64. Measurements in #158.Fixing the publish order itself belongs to
openai/codex. This change stops the action from installing inside the window without noticing.What changed
Resolve the version first, wait for
@openai/codex@<version>-<platform>to appear on the registry, then install, then confirm the CLI runs.npm view.CODEX_HOMEunder${RUNNER_TEMP}so it does not create~/.codexbefore the action resolves the real Codex home.Testing
corepack pnpm testcorepack pnpm run checkcheckpasses.testgives the same result before and after this change (138 pass, 1 fail, 2 cancelled); the failure is--disable-sigusr1 is not allowed in NODE_OPTIONSfrom a local Node 18 and is unrelated.I also exercised the step against the registry: the normal path installs without waiting, a stubbed unpublished platform package makes it wait and then proceed once the package appears, and deleting
@openai/codex/node_modules/@openai/codex-<platform>makes the final check fail as intended.