{"record":{"id":"acac7df7e190008b","repo":"affaan-m/ECC","slug":"marketplace-collision","errorCode":"MARKETPLACE_COLLISION","errorMessage":"Refusing the `ecc` marketplace collision because it is not the official affaan-m/ECC source.","messagePattern":"Refusing the `ecc` marketplace collision because it is not the official affaan-m/ECC source\\.","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"scripts/lib/claude-scope-migration.js","lineNumber":287,"sourceCode":"  const plugins = readPluginInventory(run, paths.projectRoot, 'inventory');\n  const migration = assertMigrationInventory(plugins, options.scope);\n  const hooks = options.hooks === undefined\n    ? deriveHookMode(settings)\n    : options.hooks;\n  const hookConfiguration = options.hooks === undefined\n    ? readStoredHookOptions(settings)\n    : hookOptions(options.hooks);\n  const needsCommitAttributionPreference = needsClaudeCommitAttributionPreferenceWrite(settings);\n\n  const marketplaces = parseMarketplaceList(\n    run(\n      ['plugin', 'marketplace', 'list', '--json'],\n      { cwd: paths.projectRoot, phase: 'marketplace-inventory' }\n    ).stdout\n  );\n  const namedMarketplace = marketplaces.find(entry => entry?.name === 'ecc');\n  if (namedMarketplace && !isOfficialMarketplace(namedMarketplace)) {\n    throw migrationError(\n      'MARKETPLACE_COLLISION',\n      'Refusing the `ecc` marketplace collision because it is not the official affaan-m/ECC source.',\n      {\n        phase: 'marketplace-inventory',\n        observedScopes: migration.observedScopes,\n      }\n    );\n  }\n\n  if (migration.mode === 'already-migrated') {\n    const result = {\n      action: 'already-migrated',\n      hooks,\n      pluginId: CURRENT_PLUGIN_ID,\n      sourceScope: null,\n      scope: options.scope,\n    };\n    if (options.dryRun) {","sourceCodeStart":269,"sourceCodeEnd":305,"githubUrl":"https://github.com/affaan-m/ECC/blob/8321021c54d670126ce3b2969d5deb880b4b0c2a/scripts/lib/claude-scope-migration.js#L269-L305","documentation":"ClaudeSetupError with code MARKETPLACE_COLLISION thrown by migrateClaudePluginScope in scripts/lib/claude-scope-migration.js:287 during the 'marketplace-inventory' phase. The migration inspects `claude plugin marketplace list --json` for a marketplace named 'ecc'. If one exists but isOfficialMarketplace() determines it does not point at the official affaan-m/ECC source (OFFICIAL_MARKETPLACE_URL), the tool refuses to proceed: installing/ensuring the official marketplace could clobber or conflict with a third-party marketplace that squats the 'ecc' name.","triggerScenarios":"Running a scope migration when the local Claude config contains a marketplace registered under the name 'ecc' whose source URL/repo differs from the official affaan-m/ECC marketplace — e.g. a fork, a mirror, or a maliciously/accidentally registered same-named marketplace.","commonSituations":"Previously added a community fork of ECC as a marketplace named 'ecc'; a company-internal mirror registered under the same name; an old marketplace registration pointing at a moved or renamed repo so the URL no longer matches the official one.","solutions":["Inspect the conflicting entry: `claude plugin marketplace list --json` and compare its source against the official affaan-m/ECC URL.","Remove the non-official marketplace: `claude plugin marketplace remove ecc`, then re-run the migration (it will re-add the official marketplace).","If the marketplace is intentional (internal mirror), unregister it under that name and register the official source, or migrate manually without the automated tool.","If the URL is merely outdated (repo moved), update the marketplace registration to the official URL and retry."],"exampleFix":"// before: a fork registered as 'ecc'\n// claude plugin marketplace remove ecc\n\n// after: official source re-registered by the migration\n// ecc migrate-scope --scope project","handlingStrategy":"validation","validationCode":"const marketplaces = JSON.parse(run(['plugin', 'marketplace', 'list', '--json'], { cwd }).stdout);\nconst named = marketplaces.find(m => m?.name === 'ecc');\nif (named && !isOfficialMarketplace(named)) {\n  console.error(\"Non-official marketplace named 'ecc' found; remove it: claude plugin marketplace remove ecc\");\n  process.exit(1);\n}","typeGuard":"function isOfficialEccMarketplace(entry, officialUrl) { return !!entry && entry.name === 'ecc' && (entry.source === officialUrl || entry.url === officialUrl); }","tryCatchPattern":"try { await migrateClaudePluginScope({ scope }) }\ncatch (e) {\n  if (e.code === 'MARKETPLACE_COLLISION') {\n    console.log('Resolve the collision, then retry:', e.details.phase);\n  } else throw e;\n}","preventionTips":["Register forks or mirrors under a different marketplace name than 'ecc'.","Audit `claude plugin marketplace list --json` for name squatters before setup.","Keep the official marketplace registration pointing at affaan-m/ECC.","Update stale marketplace URLs after upstream repo moves."],"tags":["claude-plugin","marketplace","security","name-collision"],"backgroundTag":"conflicting-config-options","analyzedSha":"8321021c54d670126ce3b2969d5deb880b4b0c2a","analyzedAt":"2026-09-16T10:08:13.343Z","contentChangedAt":"2026-09-16T10:08:13.343Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}