Repository navigation
fix(validate-plugins): reject duplicate marketplace names - #767
Draft
xiaoheiai4719-collab wants to merge 2 commits into
Draft
xiaoheiai4719-collab wants to merge 2 commits into
xiaoheiai4719-collab wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reject repeated plugin names within
.cursor-plugin/marketplace.json. The plugin reference requires unique names, but the current validator accepts both a repeated entry and different plugin directories sharing a name.A Set scoped to the Cursor catalog catches these conflicts without changing per-plugin checks or disallowing the same name across separate Cursor and Claude catalogs. Add real validator-subprocess regressions and run them in the existing validation workflow.
Verification
node scripts/validate-plugins.mjs: all 118 current catalog entries pass.node scripts/generate-pstack-harness-trees.mjs --check: passes.node scripts/check-pstack-docs.mjs: zero problems.git diff --check: passes.Tests ran with Node 24.19.0, Ajv 8.17.1 and ajv-formats 3.0.1. No Cursor application, agent, or model calls were used; no client installation behavior is claimed. AI-assisted implementation and automated local verification, without a claim of human review.
This is separate from the validator gaps tracked in #531 and does not close that issue.
Note
Low Risk
Adds stricter validation and CI tests only; no runtime or publishing behavior changes beyond failing invalid marketplace configs.
Overview
validate-plugins.mjsnow rejects duplicate plugin names in.cursor-plugin/marketplace.jsonby tracking seen names in a Set while iterating marketplace entries, matching the submission requirement for unique catalog names.Duplicate detection applies only within the Cursor marketplace (not across separate Cursor vs Claude catalogs). Existing checks—name mismatch with
plugin.json, schema validation, etc.—are unchanged.A new Node test suite (
validate-marketplace-names.test.mjs) exercises the validator in isolated temp fixtures via subprocess: distinct names pass, repeated entries and different directories sharing a name fail, cross-catalog name reuse still passes, and name-mismatch behavior is preserved. CI runs these tests in the validate-plugins workflow after the main validation step.Reviewed by Cursor Bugbot for commit 5d93fa6. Bugbot is set up for automated code reviews on this repo. Configure here.