Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
|
Design / storage summary for the current branch: Filesystem layout
State
Flow
Adding the same normalized source again is idempotent. Adding a different source with the same marketplace name is rejected instead of replacing the existing marketplace. |
faaff79 to
f4909a7
Compare
| } | ||
| } | ||
|
|
||
| pub fn marketplace_install_root(codex_home: &Path) -> PathBuf { |
There was a problem hiding this comment.
maybe have a marketplace.rs or something as this file becomes too big.
There was a problem hiding this comment.
Addressed in 53deb35f0: I split installed marketplace root discovery out of core/src/plugins/manager.rs into core/src/plugins/installed_marketplaces.rs. manager.rs now only asks for configured marketplace roots; the new module owns the config-to-filesystem discovery helper and the installed marketplace directory constant. Earlier in 16813bd29, I also split the CLI clone/copy/replace helpers into marketplace_cmd/ops.rs.
|
@codex review |
f4909a7 to
f9b23d5
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f9b23d58b9
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 972d3a5495
ℹ️ 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".
sayan-oai
left a comment
There was a problem hiding this comment.
thanks for cleaning up! one nit
e8fa02e to
972d3a5
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: add49f91b1
ℹ️ 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".
|
Updated design summary after the latest config-only changes: State and metadata
Filesystem layout
Flow
|
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cdac5ef786
ℹ️ 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".
|
|
||
| let source = expand_home(source); | ||
| let path = PathBuf::from(&source); | ||
| let path_exists = path.try_exists().with_context(|| { |
There was a problem hiding this comment.
Classify git URLs before try_exists to avoid Windows failures
parse_marketplace_source calls PathBuf::try_exists() on raw input before URL classification. On Windows, inputs like https://... or git@host:repo can raise invalid-name errors, causing an early "failed to access local marketplace source" failure instead of parsing as git sources. This breaks advertised URL-based installs on Windows.
Useful? React with 👍 / 👎.
| fn is_ssh_git_url(source: &str) -> bool { | ||
| source.starts_with("git@") && source.contains(':') |
There was a problem hiding this comment.
Accept ssh:// URLs promised by marketplace source docs
The command docs say SOURCE supports SSH URLs, but is_ssh_git_url only recognizes scp-style git@...:.... A valid SSH URL like ssh://git@github.com/org/repo.git falls through and is rejected as an invalid source format, which mismatches the declared behavior.
Useful? React with 👍 / 👎.
|
@codex reivew |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 238f4b1214
ℹ️ 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".
| if url.starts_with("https://github.com/") && !url.ends_with(".git") { | ||
| format!("{url}.git") | ||
| } else { |
There was a problem hiding this comment.
Trim trailing slash before appending .git
normalize_git_url blindly appends .git for any https://github.com/... URL without that suffix. If the user passes a common copied URL ending in / (e.g. https://github.com/org/repo/), this becomes .../repo/.git, which points to a different path and causes marketplace add clone failures. Strip a trailing slash before normalization.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Addressed in 674015acd: normalize_git_url now trims trailing slashes before appending .git, so https://github.com/org/repo/ normalizes to https://github.com/org/repo.git instead of https://github.com/org/repo/.git. I also added parser coverage for this trailing-slash GitHub URL shape.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 674015acdf
ℹ️ 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".
| let Ok(config) = std::fs::read_to_string(&config_path) else { | ||
| return Ok(None); |
There was a problem hiding this comment.
Handle config read errors instead of treating as missing
installed_marketplace_root_for_source swallows every read_to_string error and returns Ok(None). Permission/I/O failures are misclassified as “no config”, so marketplace add can continue and later fail after mutating disk. Only NotFound should be ignored; other read errors should abort early.
Useful? React with 👍 / 👎.
| ops::replace_marketplace_root(&staged_root, &destination) | ||
| .with_context(|| format!("failed to install marketplace at {}", destination.display()))?; | ||
| record_added_marketplace(&codex_home, &marketplace_name, &install_metadata)?; |
There was a problem hiding this comment.
Persist marketplace config before finalizing install move
run_add moves the staged directory into the install root before updating config.toml. If record_added_marketplace fails (e.g., invalid or unwritable config), the command errors but leaves the marketplace installed. Subsequent retries hit the existing destination and fail as a “different source,” requiring manual cleanup.
Useful? React with 👍 / 👎.
|
@codex review |
|
@codex review |
Added a new top-level
codex marketplace addcommand for installing plugin marketplaces into Codex’s local marketplace cache.This change adds source parsing for local directories, GitHub shorthand, and git URLs, supports optional
--refand git-only--sparsecheckout paths, stages the source in a temp directory, validates the marketplace manifest, and installs it under$CODEX_HOME/marketplaces/<marketplace-name>Included tests cover local install behavior in the CLI and marketplace discovery from installed roots in core. Scoped formatting and fix passes were run, and targeted CLI/core tests passed.