Skip to content

fix(plugins): keep version upgrades additive#23356

Merged
iceweasel-oai merged 4 commits into
mainfrom
codex/plugin-cache-additive-install
May 19, 2026
Merged

fix(plugins): keep version upgrades additive#23356
iceweasel-oai merged 4 commits into
mainfrom
codex/plugin-cache-additive-install

Conversation

@iceweasel-oai
Copy link
Copy Markdown
Collaborator

Why

Windows can reject plugin cache upgrades when a running MCP server still has its working directory inside the currently active plugin version. The existing cache refresh path replaces plugins/cache/<marketplace>/<plugin> as a whole, so a live handle under the old version can make an otherwise ordinary version bump fail.

This PR keeps the existing plugin-selection model intact while making version bumps less disruptive.

What changed

  • When installing a new version beside an existing plugin cache root, move only the staged version directory into place instead of replacing the whole plugin root.
  • Best-effort prune older sibling version directories after the new version is activated.
  • Preserve the existing whole-root replacement path for first installs and same-version refreshes.
  • Add regression coverage for upgrading from 1.0.0 to 2.0.0 without replacing the plugin root.

Verification

  • cargo test -p codex-core-plugins install_with_new_version
  • cargo fmt --package codex-core-plugins --check

@iceweasel-oai iceweasel-oai marked this pull request as ready for review May 18, 2026 20:14
Copy link
Copy Markdown
Contributor

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

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: f321b4ef0b

ℹ️ 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".

Comment thread codex-rs/core-plugins/src/store.rs Outdated
@iceweasel-oai iceweasel-oai enabled auto-merge (squash) May 19, 2026 03:52
@iceweasel-oai iceweasel-oai merged commit d3d3815 into main May 19, 2026
31 checks passed
@iceweasel-oai iceweasel-oai deleted the codex/plugin-cache-additive-install branch May 19, 2026 04:02
@github-actions github-actions Bot locked and limited conversation to collaborators May 19, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants