Skip to content

fix(validate-plugins): reject duplicate marketplace names - #767

Draft
xiaoheiai4719-collab wants to merge 2 commits into
cursor:mainfrom
xiaoheiai4719-collab:dot/fix-marketplace-name-uniqueness
Draft

xiaoheiai4719-collab wants to merge 2 commits into
cursor:mainfrom
xiaoheiai4719-collab:dot/fix-marketplace-name-uniqueness

Conversation

@xiaoheiai4719-collab

@xiaoheiai4719-collab xiaoheiai4719-collab commented Oct 22, 2026 •

Copy link
Copy Markdown

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

  • New six-case Node test suite: 6 passed. Against unchanged main: both duplicate cases fail, and all four controls pass.
  • 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.mjs now rejects duplicate plugin names in .cursor-plugin/marketplace.json by 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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant