Skip to content

Tighten marketplace root removal#21120

Open
xli-oai wants to merge 3 commits into
mainfrom
xli-codex/marketplace-remove-file-root
Open

Tighten marketplace root removal#21120
xli-oai wants to merge 3 commits into
mainfrom
xli-codex/marketplace-remove-file-root

Conversation

@xli-oai
Copy link
Copy Markdown
Contributor

@xli-oai xli-oai commented May 5, 2026

Summary

  • preserve filesystem existence-check errors when removing an installed marketplace root
  • remove directory roots with remove_dir_all and regular file roots with remove_file
  • return a clear error when the root exists but is neither a file nor a directory

Why

A corrupted marketplace install can leave CODEX_HOME/.tmp/marketplaces/<name> as a regular file. The remove flow should clean that file up instead of treating the path as directory-only and stopping before the removal outcome is complete.

Validation

  • just fmt
  • cargo test -p codex-core-plugins marketplace_remove
  • cargo test -p codex-core-plugins
  • cargo test -p codex-cli --test marketplace_remove
  • cargo test -p codex-app-server marketplace_remove -- --nocapture
  • cargo clippy -p codex-core-plugins --all-targets -- -D warnings

After rebasing onto current main, reran:

  • cargo test -p codex-core-plugins marketplace_remove

@xli-oai xli-oai added the oai PRs contributed by OpenAI employees label May 5, 2026 — with ChatGPT Codex Connector
@xli-oai xli-oai marked this pull request as ready for review May 5, 2026 01:46
@xli-oai
Copy link
Copy Markdown
Contributor Author

xli-oai commented May 5, 2026

@codex review

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

ℹ️ 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/marketplace_remove.rs Outdated
@xli-oai
Copy link
Copy Markdown
Contributor Author

xli-oai commented May 5, 2026

@codex review

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: 910e5dd685

ℹ️ 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/marketplace_remove.rs Outdated
@xli-oai xli-oai force-pushed the xli-codex/marketplace-remove-file-root branch from 97cb3cf to e1ed688 Compare May 6, 2026 03:41
@xli-oai xli-oai force-pushed the xli-codex/marketplace-remove-file-root branch from e1ed688 to cce7782 Compare May 6, 2026 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

oai PRs contributed by OpenAI employees

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant