Skip to content

Detect Codex installs managed by Vite+ - #30880

Draft
charliemarsh-oai wants to merge 1 commit into
mainfrom
charlie/fix-vite-plus-install-detection
Draft

charliemarsh-oai wants to merge 1 commit into
mainfrom
charlie/fix-vite-plus-install-detection

Conversation

@charliemarsh-oai

Copy link
Copy Markdown
Contributor

Summary

  • detect Vite+ global installations from their package layout before falling back to npm metadata
  • propagate a dedicated Vite+ install method through doctor and update surfaces
  • use vp install -g @openai/codex when repairing or updating Vite+-managed installs

Why

Vite+ installs @openai/codex under VP_HOME/packages but 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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"]),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@charliemarsh-oai
charliemarsh-oai removed the request for review from etraut-openai July 8, 2026 00:35
@charliemarsh-oai
charliemarsh-oai marked this pull request as draft July 8, 2026 00:37
copyberry Bot pushed a commit that referenced this pull request Sep 1, 2026
## 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
boboZeng pushed a commit to boboZeng/codex that referenced this pull request Sep 14, 2026
## 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
sedna-release-publisher Bot pushed a commit to sednalabs/codex that referenced this pull request Sep 15, 2026
## 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

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Detect Codex installs managed by Vite+

1 participant