Skip to content

fix: correct typo marketplace to marketplaces#1552

Open
fangzhengjin wants to merge 1 commit intoaffaan-m:mainfrom
fangzhengjin:main
Open

fix: correct typo marketplace to marketplaces#1552
fangzhengjin wants to merge 1 commit intoaffaan-m:mainfrom
fangzhengjin:main

Conversation

@fangzhengjin
Copy link
Copy Markdown

@fangzhengjin fangzhengjin commented Apr 23, 2026

What Changed

Link: #1357

correct typo marketplace to marketplaces

Why This Change

CleanShot 2026-04-23 at 11 34 17@2x

Summary by cubic

Fixes a path typo by switching marketplace to marketplaces across resolvers, hooks, docs, and tests so installs under ~/.claude/plugins/marketplaces/... (for ecc and legacy everything-claude-code) are correctly detected and used.

  • Bug Fixes
    • Update root resolution in scripts/lib/resolve-ecc-root.js and scripts/hooks/session-start-bootstrap.js to use marketplaces.
    • Align hook runner commands in hooks/hooks.json to marketplaces.
    • Refresh commands/sessions.md, commands/skill-health.md, and tests to reference the marketplaces path.

Written for commit f5209b3. Summary will update on new commits.

Summary by CodeRabbit

  • Refactoring

    • Updated internal plugin directory structure references from marketplace to marketplaces across configuration, hooks, and scripts to align with standardized naming conventions.
  • Tests

    • Updated test expectations to match the revised plugin directory path structure.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 23, 2026

📝 Walkthrough

Walkthrough

Renamed inspected plugin directory segment from marketplace to marketplaces across docs, hook configs, bootstrap/resolver scripts, and tests; only path string candidates were updated, no functional logic changes.

Changes

Cohort / File(s) Summary
Docs & Inline Helpers
commands/sessions.md, commands/skill-health.md
Replaced marketplacemarketplaces in embedded node -e resolver snippets used to discover ECC/plugin roots.
Hook Configs
hooks/hooks.json
Updated embedded hook runner/resolver snippets to probe ~/.claude/plugins/marketplaces/... instead of .../marketplace/....
Bootstrap & Resolver Scripts
scripts/hooks/session-start-bootstrap.js, scripts/lib/resolve-ecc-root.js
Changed plugin-root candidate paths to use marketplaces/<slug> for both current and legacy slugs; resolution logic unchanged.
Tests
tests/lib/command-plugin-root.test.js, tests/lib/resolve-ecc-root.test.js
Updated expected strings and fixture path segments from marketplacemarketplaces; assertions and counts preserved.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 I hopped through paths both near and far,
From marketplace to marketplaces I spar,
Bootstrap hums and hooks now sing,
Tests aligned — a tiny spring,

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: correcting a typo from 'marketplace' to 'marketplaces' across multiple files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 23, 2026

Greptile Summary

This PR corrects a typo across all plugin path resolution logic, renaming the directory segment marketplace to marketplaces in resolvers, hooks, docs, and tests. The change is mechanical and consistently applied across all 7 files, including the minified inline resolver embedded in hooks/hooks.json and the command .md files.

Confidence Score: 5/5

Safe to merge — all remaining findings are P2 style suggestions that do not affect runtime behavior.

The fix is a straightforward, consistent rename of a directory segment string across all consumers (resolver, bootstrap hook, hooks.json, command docs, and tests). No logic is changed; the only outstanding note is the previously-flagged P2 about stale test description strings in resolve-ecc-root.test.js.

tests/lib/resolve-ecc-root.test.js — test description strings on lines 161 and 172 still say 'marketplace' (singular).

Important Files Changed

Filename Overview
scripts/lib/resolve-ecc-root.js Updated PLUGIN_ROOT_SEGMENTS from 'marketplace' to 'marketplaces' (×2); INLINE_RESOLVE is regenerated from the array, so both paths stay in sync automatically.
scripts/hooks/session-start-bootstrap.js Updated KNOWN_PLUGIN_PATHS from 'marketplace' to 'marketplaces' (×2) to mirror the resolver change.
hooks/hooks.json All embedded inline resolver arrays in every hook command updated from 'marketplace' to 'marketplaces', consistently across all hook types (PreToolUse, PostToolUse, Stop, SessionEnd, etc.).
tests/lib/resolve-ecc-root.test.js Fixture paths and assertions updated to marketplaces; test description strings on lines 161 and 172 still say 'marketplace' (singular) while the paths they exercise use 'marketplaces' — previously flagged P2.
tests/lib/command-plugin-root.test.js Assertions updated to check for ['marketplaces','ecc'] and ['marketplaces','everything-claude-code']; all three checks consistently corrected.
commands/sessions.md Inline resolver strings in all 6 node script blocks updated to ['marketplaces','ecc'] / ['marketplaces','everything-claude-code'].
commands/skill-health.md Inline resolver strings in all 3 shell snippet blocks updated to ['marketplaces','ecc'] / ['marketplaces','everything-claude-code'].

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[resolveEccRoot / resolvePluginRoot] --> B{CLAUDE_PLUGIN_ROOT set?}
    B -- yes --> C[Return env var value]
    B -- no --> D{~/.claude/ has probe file?}
    D -- yes --> E[Return ~/.claude/]
    D -- no --> F[Try known plugin paths]
    F --> G["~/.claude/plugins/ecc"]
    F --> H["~/.claude/plugins/ecc@ecc"]
    F --> I["~/.claude/plugins/marketplaces/ecc ✓ fixed"]
    F --> J["~/.claude/plugins/everything-claude-code"]
    F --> K["~/.claude/plugins/everything-claude-code@everything-claude-code"]
    F --> L["~/.claude/plugins/marketplaces/everything-claude-code ✓ fixed"]
    G & H & I & J & K & L --> M{Probe file found?}
    M -- yes --> N[Return matched path]
    M -- no --> O[Scan plugin cache]
    O --> P["~/.claude/plugins/cache/ecc/org/version/"]
    O --> Q["~/.claude/plugins/cache/everything-claude-code/org/version/"]
    P & Q --> R{Probe file found?}
    R -- yes --> S[Return cache path]
    R -- no --> T[Fallback: return ~/.claude/]
Loading

Reviews (3): Last reviewed commit: "fix: correct typo `marketplace` to `mark..." | Re-trigger Greptile

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
tests/lib/command-plugin-root.test.js (1)

40-43: ⚠️ Potential issue | 🔴 Critical

Stale assertions — this test will fail after the rename.

INLINE_RESOLVE is generated from PLUGIN_ROOT_SEGMENTS in scripts/lib/resolve-ecc-root.js, which now only emits the plural "marketplaces" form. These two assert.ok(INLINE_RESOLVE.includes('"marketplace",...')) checks (singular) will therefore never match, so node tests/lib/command-plugin-root.test.js will fail.

Either update the expectations to the plural form, or (if you want to keep asserting the legacy singular path is still discoverable) also re-add the singular segments to PLUGIN_ROOT_SEGMENTS for backward compatibility. The former is the most likely intent given the PR is a pure rename:

🔧 Proposed fix — match the new plural directory name
 test('inline resolver covers current and legacy marketplace plugin roots', () => {
-  assert.ok(INLINE_RESOLVE.includes('"marketplace","ecc"'));
-  assert.ok(INLINE_RESOLVE.includes('"marketplace","everything-claude-code"'));
+  assert.ok(INLINE_RESOLVE.includes('"marketplaces","ecc"'));
+  assert.ok(INLINE_RESOLVE.includes('"marketplaces","everything-claude-code"'));
 });
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tests/lib/command-plugin-root.test.js` around lines 40 - 43, The test's
assertions are stale because INLINE_RESOLVE (generated from PLUGIN_ROOT_SEGMENTS
in resolve-ecc-root.js) now emits the plural "marketplaces"; update the two
assertions in command-plugin-root.test.js that check
INLINE_RESOLVE.includes('"marketplace",...') to use the new plural
'"marketplaces",...' instead (or, if backward compatibility is desired, restore
the legacy singular segment in PLUGIN_ROOT_SEGMENTS so both forms are emitted).
tests/lib/resolve-ecc-root.test.js (1)

161-193: ⚠️ Potential issue | 🟡 Minor

Nit: test names still say marketplace/ (singular) while fixtures now use marketplaces.

The setup calls were updated to ['marketplaces', ...] but the test(...) labels on lines 161, 172, and (implicitly) the block above line 186 still reference ~/.claude/plugins/marketplace/ecc and .../plugins/marketplace/everything-claude-code. These names will be misleading in test output.

📝 Proposed label updates
-  if (test('finds marketplace current plugin install at ~/.claude/plugins/marketplace/ecc', () => {
+  if (test('finds marketplace current plugin install at ~/.claude/plugins/marketplaces/ecc', () => {
@@
-  if (test('finds marketplace legacy plugin install at ~/.claude/plugins/marketplace/everything-claude-code', () => {
+  if (test('finds marketplace legacy plugin install at ~/.claude/plugins/marketplaces/everything-claude-code', () => {
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tests/lib/resolve-ecc-root.test.js` around lines 161 - 193, Update the three
test description strings passed to test(...) that currently say "marketplace" to
use the plural "marketplaces" so they match the fixture calls
(setupLegacyPluginInstall(..., ['marketplaces', ...]) and setupPluginCache
usage) and avoid misleading output; locate the tests that call
setupLegacyPluginInstall and setupPluginCache and change their labels like
"finds marketplace current plugin install at ~/.claude/plugins/marketplace/ecc"
to "finds marketplaces current plugin install at
~/.claude/plugins/marketplaces/ecc" (and similarly for "everywhere-claude-code"
and the "prefers exact legacy plugin..." case) while leaving resolveEccRoot,
setupLegacyPluginInstall, and setupPluginCache usage unchanged.
hooks/hooks.json (1)

10-230: ⚠️ Potential issue | 🔴 Critical

Update all embedded node -e resolvers in PreToolUse, PreCompact, SessionStart, PostToolUse, and PostToolUseFailure hooks to use plural marketplaces path.

Hooks at lines 10, 21, 32, 43, 56, 68, 80, 91, 105, 118, 131, 144, 157, 169, 180, 191, 203, 215, and 230 still contain embedded resolvers with singular "marketplace" paths:

["marketplace","ecc"] ... ["marketplace","everything-claude-code"]

Meanwhile, Stop and SessionEnd hooks use a newer resolver implementation with correct plural paths (marketplaces). This inconsistency breaks plugin discovery at runtime: when installed via marketplace to ~/.claude/plugins/marketplaces/, the majority of hooks will fail to locate the plugin and fall back silently. Update all old-style inline resolvers to match the plural path used in Stop/SessionEnd.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@hooks/hooks.json` around lines 10 - 230, The embedded node -e resolver
strings inside the command fields (the inline resolver that builds
CLAUDE_PLUGIN_ROOT) still reference the singular path segments ["marketplace",
...] — update every such inline resolver in the PreToolUse, PreCompact,
SessionStart, PostToolUse, and PostToolUseFailure hook command strings to use
the plural "marketplaces" segments (e.g., replace ["marketplace","ecc"] and
["marketplace","everything-claude-code"] with ["marketplaces","ecc"] and
["marketplaces","everything-claude-code"]) so the resolver matches the newer
implementation used by Stop/SessionEnd; target the command strings for hook IDs
like pre:bash:dispatcher, pre:write:doc-file-warning,
pre:edit-write:suggest-compact, pre:observe:continuous-learning,
pre:governance-capture, pre:config-protection, pre:mcp-health-check,
pre:edit-write:gateguard-fact-force, pre:compact, session:start,
post:bash:dispatcher, post:quality-gate, post:edit:design-quality-check,
post:edit:accumulator, post:edit:console-warn, post:governance-capture,
post:session-activity-tracker, and post:observe:continuous-learning to ensure
consistency.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@hooks/hooks.json`:
- Around line 10-230: The embedded node -e resolver strings inside the command
fields (the inline resolver that builds CLAUDE_PLUGIN_ROOT) still reference the
singular path segments ["marketplace", ...] — update every such inline resolver
in the PreToolUse, PreCompact, SessionStart, PostToolUse, and PostToolUseFailure
hook command strings to use the plural "marketplaces" segments (e.g., replace
["marketplace","ecc"] and ["marketplace","everything-claude-code"] with
["marketplaces","ecc"] and ["marketplaces","everything-claude-code"]) so the
resolver matches the newer implementation used by Stop/SessionEnd; target the
command strings for hook IDs like pre:bash:dispatcher,
pre:write:doc-file-warning, pre:edit-write:suggest-compact,
pre:observe:continuous-learning, pre:governance-capture, pre:config-protection,
pre:mcp-health-check, pre:edit-write:gateguard-fact-force, pre:compact,
session:start, post:bash:dispatcher, post:quality-gate,
post:edit:design-quality-check, post:edit:accumulator, post:edit:console-warn,
post:governance-capture, post:session-activity-tracker, and
post:observe:continuous-learning to ensure consistency.

In `@tests/lib/command-plugin-root.test.js`:
- Around line 40-43: The test's assertions are stale because INLINE_RESOLVE
(generated from PLUGIN_ROOT_SEGMENTS in resolve-ecc-root.js) now emits the
plural "marketplaces"; update the two assertions in command-plugin-root.test.js
that check INLINE_RESOLVE.includes('"marketplace",...') to use the new plural
'"marketplaces",...' instead (or, if backward compatibility is desired, restore
the legacy singular segment in PLUGIN_ROOT_SEGMENTS so both forms are emitted).

In `@tests/lib/resolve-ecc-root.test.js`:
- Around line 161-193: Update the three test description strings passed to
test(...) that currently say "marketplace" to use the plural "marketplaces" so
they match the fixture calls (setupLegacyPluginInstall(..., ['marketplaces',
...]) and setupPluginCache usage) and avoid misleading output; locate the tests
that call setupLegacyPluginInstall and setupPluginCache and change their labels
like "finds marketplace current plugin install at
~/.claude/plugins/marketplace/ecc" to "finds marketplaces current plugin install
at ~/.claude/plugins/marketplaces/ecc" (and similarly for
"everywhere-claude-code" and the "prefers exact legacy plugin..." case) while
leaving resolveEccRoot, setupLegacyPluginInstall, and setupPluginCache usage
unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0ac0863e-bf72-4ae1-bb63-d12619090264

📥 Commits

Reviewing files that changed from the base of the PR and between 4e66b28 and 9ee7167.

📒 Files selected for processing (7)
  • commands/sessions.md
  • commands/skill-health.md
  • hooks/hooks.json
  • scripts/hooks/session-start-bootstrap.js
  • scripts/lib/resolve-ecc-root.js
  • tests/lib/command-plugin-root.test.js
  • tests/lib/resolve-ecc-root.test.js

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 7 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="hooks/hooks.json">

<violation number="1" location="hooks/hooks.json:243">
P2: Partial rename from `marketplace` to `marketplaces` created inconsistent plugin-root resolution across hooks, which can make some hook phases skip execution.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Comment thread hooks/hooks.json
@ecc-tools
Copy link
Copy Markdown
Contributor

ecc-tools Bot commented Apr 23, 2026

ECC bundle files are already tracked in this repository. Skipping generation of another bundle PR.

1 similar comment
@ecc-tools
Copy link
Copy Markdown
Contributor

ecc-tools Bot commented Apr 23, 2026

ECC bundle files are already tracked in this repository. Skipping generation of another bundle PR.

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