Detect Codex installs managed by Vite+ - #30880
charliemarsh-oai wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dc174cdc4e
ℹ️ 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".
| match self { | ||
| UpdateAction::NpmGlobalLatest => ("npm", &["install", "-g", "@openai/codex"]), | ||
| UpdateAction::BunGlobalLatest => ("bun", &["install", "-g", "@openai/codex"]), | ||
| UpdateAction::VitePlusGlobalLatest => ("vp", &["install", "-g", "@openai/codex"]), |
There was a problem hiding this comment.
Add snapshot coverage for the Vite+ update path
When the install context is VitePlus, this new action renders as the command in the update popup/history via UpdateAction::command_str(), but the change only adds a mapping unit test and leaves the existing insta snapshots covering other install paths. That means the new Vite+ update UI text can regress without the visual review/CI coverage required for TUI-visible changes.
Useful? React with 👍 / 👎.
## Why Vite+ launches Codex through the same JavaScript shim as npm, so Codex could misidentify Vite+-owned installations and recommend npm for updates. ## What changed - Detect Vite+ global installs from their package ownership metadata and pass a dedicated `CODEX_MANAGED_BY_VITE_PLUS` marker to the native binary. - Represent Vite+ in install context and `codex doctor` output. - Recommend `vp install -g @openai/codex` in update and repair flows for Vite+-managed installs. See #30880. GitOrigin-RevId: 8add724eefd31170a078086392609dbbd7f20b26
## Why Vite+ launches Codex through the same JavaScript shim as npm, so Codex could misidentify Vite+-owned installations and recommend npm for updates. ## What changed - Detect Vite+ global installs from their package ownership metadata and pass a dedicated `CODEX_MANAGED_BY_VITE_PLUS` marker to the native binary. - Represent Vite+ in install context and `codex doctor` output. - Recommend `vp install -g @openai/codex` in update and repair flows for Vite+-managed installs. See openai#30880. GitOrigin-RevId: 8add724eefd31170a078086392609dbbd7f20b26
## Why Vite+ launches Codex through the same JavaScript shim as npm, so Codex could misidentify Vite+-owned installations and recommend npm for updates. ## What changed - Detect Vite+ global installs from their package ownership metadata and pass a dedicated `CODEX_MANAGED_BY_VITE_PLUS` marker to the native binary. - Represent Vite+ in install context and `codex doctor` output. - Recommend `vp install -g @openai/codex` in update and repair flows for Vite+-managed installs. See openai#30880. GitOrigin-RevId: 8add724eefd31170a078086392609dbbd7f20b26
Summary
vp install -g @openai/codexwhen repairing or updating Vite+-managed installsWhy
Vite+ installs
@openai/codexunderVP_HOME/packagesbut launches through the same JavaScript shim as npm. The shim previously treated any non-Bun launch as npm-managed, so doctor and update flows suggested npm even though Vite+ owned the package. A dedicated marker keeps ownership accurate and clears stale package-manager markers before launching the native binary.Focused install-context and update-action coverage passes, including a smoke test using the Vite+ directory layout. Scoped Clippy, formatting, and diff checks pass. The broader affected-crate run passed 3,260 tests; two unrelated Guardian tests failed identically on
main.Closes #30698.