package code mode host as a managed resource#31890
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 47a3d2fa93
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
47a3d2f to
2c89649
Compare
| mkdir -p "$bundle_root/codex-resources" | ||
| cp "$dest/codex-${{ matrix.target }}" "$bundle_root/codex" | ||
| cp "$dest/codex-code-mode-host-${{ matrix.target }}" "$bundle_root/codex-code-mode-host" | ||
| cp "$dest/codex-code-mode-host-${{ matrix.target }}" "$bundle_root/codex-resources/codex-code-mode-host" |
There was a problem hiding this comment.
Having logic for codex-code-mode-host in this Linux-specific block feels wrong to me. Shouldn't the logic for this be universal to all three platforms?
There was a problem hiding this comment.
This block is for the special "legacy" codex bundle for linux where we have a tarball with the binary at the top level. I think we should probably look at deprecating this release for the codex-package for linux.
2c89649 to
8fc5ae3
Compare
Why
codex-code-mode-hostis a managed runtime dependency, not a user-facing entrypoint. Packaging it with entrypoint binaries and resolving it relative to the running executable made its location depend on the install format. That was especially fragile across npm, standalone, and direct Linux bundles.The host should live with the other managed resources and be resolved through
InstallContext, which already owns knowledge of the active package layout.What changed
codex-code-mode-hostundercodex-resources/in canonical archives on every platform, and in the direct Linux release bundle alongsidebwrap.InstallContext. Code mode uses the in-process implementation when the active installation does not provide a managed host; it no longer uses an environment override or searches next to the Codex executable.bwrapresolve from theircodex-resources/directory.bin/, while all newly produced packages usecodex-resources/.Testing
InstallContextcoverage for canonical packages, direct Linux bundles, missing resources, and Windows path normalization.