You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
chore(plugin): plugin-version-sync.ts has no production caller, and plugin-updates.md says CI uses it #1325
Found: 2026-10-05, #1301 spec Open Question 2 and QA on PR #1321
Problem.src/lib/plugin-version-sync.ts (checkVersionSync) has no production caller. Only its own test (src/lib/plugin-version-sync.test.ts) imports it. docs/internal/plugin-updates.md:15 says "The CI pipeline enforces this check on every PR via plugin-version-sync.ts". That isn't true: CI checks versions with inline node in ci.yml's Validate plugin.json structure step. #1301 retargeted the module to plugin/.claude-plugin/plugin.json but left the question of keeping it open.
Decision (graph doc D-7): delete the module. Wiring it into ci.yml would edit the workflow that produces the required test / canary checks.
Acceptance Criteria
AC-1: src/lib/plugin-version-sync.ts and its test are deleted, and nothing references checkVersionSync. Evidence: git grep -n checkVersionSync -- src bin scripts .github prints nothing
AC-2: docs/internal/plugin-updates.md names what actually enforces version sync. Evidence: grep -n "Validate plugin.json structure" docs/internal/plugin-updates.md matches, and grep -n "plugin-version-sync" docs/internal/plugin-updates.md prints nothing
Prior fixes / producers
Isolated: one module, no production caller. git log -S checkVersionSync: #191 (original), #1301 (retarget).
In plain terms:src/lib/plugin-version-sync.ts checks that the plugin's version numbers match, but nothing in the real build or CI calls it; only its own tests do. A doc also claims CI uses it. Either delete the module (and its test), or wire it into the one place CI already checks versions, and then make the doc say what actually does the check. Its blocker, #1301, merged on 2026-10-05.
Where to look:
src/lib/plugin-version-sync.ts and src/lib/plugin-version-sync.test.ts
.github/workflows/ci.yml: search for the plugin job's inline node version check
docs/internal/plugin-updates.md line 15: the sentence that needs correcting
Setup and check:
npm install # Node 22.13 or newer
grep -rn checkVersionSync src scripts .github # shows it has no production caller
npm run build && npx vitest run src/lib/plugin-version-sync
Deciding between delete and wire: if the inline check in ci.yml already does the job, deleting is the smaller, cleaner change. Say which you chose and why in the PR.
Size: a few files, mostly deletion or a one-line CI change plus a doc line. Comment here if you pick it up.
Runner context (graph-2026-10-freeze-b, tracker #1452), for the exec and qa phases:
exec and qa: do not run the full suite (npm test / npx vitest run with no file filter). Six phase agents run at once and the MCP phase wall is 30 minutes (graph doc I-5). Full-suite evidence comes from CI. Run only the targeted test files, in the foreground, under timeout 600, after a WIP commit. Do not use run_in_background or Monitor.
No edit under plugin/, .claude/skills/ or templates/skills/ (plugin freeze, I-1).
Gate-test ACs need the mutation record in the PR body (CLAUDE.md, Testing).
AC-1 Evidence is too narrow (flag).git grep -n checkVersionSync -- src bin scripts .github does not search __tests__/. __tests__/root-plugin-manifest-retired.test.ts (chore(plugin): decide the root .claude-plugin/plugin.json and memory/ — second manifest kept in sync by hand since ./plugin ships #1301's gate test) imports checkVersionSync (line 20), calls it in its first case, and lists src/lib/plugin-version-sync.ts in READERS (line 38). Deleting the module breaks that test, and the AC-1 grep would still print nothing. Run against the base branch the grep prints 14 lines, so it is not vacuous. It is incomplete. Suggested wording: use git grep -n "checkVersionSync\|plugin-version-sync" -- src bin scripts .github __tests__.
AC-2 names the wrong CI step (flag). The step that compares versions is Check version sync (ci.yml:249). Validate plugin.json structure (ci.yml:219) only checks existence, JSON syntax and the name/description fields. The evidence grep would pass on a doc that names the structure step and not the version check. I recommend the doc names Check version sync. It may also name the structure step, so the stated evidence still matches. A negative test at ci.yml:305 also covers the check.
Both evidence commands fail on the base branch today (AC-2 prints one plugin-version-sync hit, no Validate… hit), so they gate the work.
Scope Assessment
Non-Goals: present (no ci.yml edits; nothing under plugin/, .claude/skills/, templates/skills/).
Metric
Value
Status
Feature count
1
✅
AC items
2
✅
Directory spread
4
✅
Verdict: ✅ SCOPE_OK
Acceptance Criteria
AC-1: Delete plugin-version-sync.ts and its test; no reference to checkVersionSync
Verification: Integration Test (command check) Scenario: Given the module has no production caller → When the module, its test, and the gate test's use of it are removed → Then git grep -n "checkVersionSync\|plugin-version-sync" -- src bin scripts .github __tests__ prints nothing and npx vitest run __tests__/root-plugin-manifest-retired.test.ts passes. Assumptions:ci.yml is untouched. docs/adr/0008 and the graph docs mention the module by name. They are history, so leave them.
AC-2: plugin-updates.md names what enforces version sync
Verification: Manual Test (grep) Scenario: Given plugin-updates.md:15 cites the module → When the sentence is rewritten → Then grep -n "Validate plugin.json structure" matches and grep -n "plugin-version-sync" prints nothing. Assumptions: the rewrite names Check version sync (ci.yml:249) as the version check.
Edit __tests__/root-plugin-manifest-retired.test.ts (not in the issue's "May touch" list): drop the checkVersionSync import, drop "src/lib/plugin-version-sync.ts" from READERS, and replace the first case's checkVersionSync calls with a plain assertion that the root manifest is gone. Keep the existsSync(...) === false assertion, which is the part that gates chore(plugin): decide the root .claude-plugin/plugin.json and memory/ — second manifest kept in sync by hand since ./plugin ships #1301. The "version sync reads plugin/" claim stays covered by ci.yml's Check version sync and its negative test.
Phase 2: Doc and changelog
Rewrite docs/internal/plugin-updates.md:15, naming the Check version sync step of ci.yml's plugin job (and the Validate plugin.json structure step for the manifest checks).
Add a CHANGELOG.md entry under Unreleased.
Phase 3: Verify
Run npm run build and timeout 600 npx vitest run __tests__/root-plugin-manifest-retired.test.ts after a WIP commit. Do not run the full suite (runner context).
Design Review
Where does this logic belong? Nowhere. ci.yml already enforces package-vs-plugin versions inline. Deleting is the decision recorded as D-7.
Simplest correct approach? Delete, fix the one test that imported it, fix the doc. Rejected: wiring the module into ci.yml, because it edits the workflow that produces the required test and canary checks (Non-Goal).
Reviewer challenge: "Does anything else read marketplace.json versions?" The module's marketplace check is not mirrored in the inline CI step. Confirm during exec whether Check version sync covers marketplace.json. If not, that is a pre-existing gap to file separately, not widen here.
(Standard/Complex only.)
Open Questions
Widen AC-1's evidence to include __tests__? Recommendation: yes; edit the AC line. Impact if not: exec follows the grep, leaves root-plugin-manifest-retired.test.ts importing a deleted file, and the test check fails.
Should the doc name Check version sync (recommended) or only the AC's Validate plugin.json structure? Recommendation: name both; it satisfies the AC text and is accurate.
Recommended Workflow
Phases: exec → qa Quality Loop: disabled Reasoning: Mechanical deletion plus a one-line doc fix. No unit-test stubs to generate (the AC is a deletion), so no testgen. No UI, so no test phase.
Label Review
Current: good first issue, refactor, graph-2026-10-freeze-b Recommended: same, plus planned Quality Loop: Won't auto-enable (SCOPE_OK).
The rewritten doc sentence says CI checks all three versions; CI compares only package.json and plugin.json, and since the deleted module was the only marketplace.json version check, that version is now unchecked
The new sentence in docs/internal/plugin-updates.md:15 claims more than CI does. It sits under a three-row table (package.json, plugin.json, marketplace.json) and says "All versions MUST match. The CI pipeline enforces this … the Check version sync step compares the versions".
ci.yml:249-267 compares only package.json with plugin/.claude-plugin/plugin.json.
Validate marketplace.json structure (lines 271-303) checks only name and plugins. It never reads the version.
The deleted module was the only code that compared marketplace.json's plugins[0].version. After this PR, nothing checks that version except release.sh writing it.
The old sentence was also wrong, but this PR wrote a new and more specific claim. AC-2 asks the doc to name "what actually enforces", so the sentence should say which two files the step compares.
Suggestions:
Change the step description to "compares package.json with plugin/.claude-plugin/plugin.json". Add that marketplace.json's version is set by scripts/release.sh and is not checked in CI.
Activity
admarble commentedon Oct 8, 2026
Start here (good first issue)
In plain terms:
src/lib/plugin-version-sync.tschecks that the plugin's version numbers match, but nothing in the real build or CI calls it; only its own tests do. A doc also claims CI uses it. Either delete the module (and its test), or wire it into the one place CI already checks versions, and then make the doc say what actually does the check. Its blocker, #1301, merged on 2026-10-05.Where to look:
src/lib/plugin-version-sync.tsandsrc/lib/plugin-version-sync.test.ts.github/workflows/ci.yml: search for the plugin job's inlinenodeversion checkdocs/internal/plugin-updates.mdline 15: the sentence that needs correctingSetup and check:
Deciding between delete and wire: if the inline check in
ci.ymlalready does the job, deleting is the smaller, cleaner change. Say which you chose and why in the PR.Size: a few files, mostly deletion or a one-line CI change plus a doc line. Comment here if you pick it up.
docs(contributing): Node 22.13 floor to match package.json engines; p…
admarble commentedon Oct 16, 2026
Runner context (graph-2026-10-freeze-b, tracker #1452), for the exec and qa phases:
npm test/npx vitest runwith no file filter). Six phase agents run at once and the MCP phase wall is 30 minutes (graph doc I-5). Full-suite evidence comes from CI. Run only the targeted test files, in the foreground, undertimeout 600, after a WIP commit. Do not userun_in_backgroundor Monitor.plugin/,.claude/skills/ortemplates/skills/(plugin freeze, I-1).admarble commentedon Oct 16, 2026
Complexity: Simple (2 ACs, 4 directories)
AC Quality Check
git grep -n checkVersionSync -- src bin scripts .githubdoes not search__tests__/.__tests__/root-plugin-manifest-retired.test.ts(chore(plugin): decide the root .claude-plugin/plugin.json and memory/ — second manifest kept in sync by hand since ./plugin ships #1301's gate test) importscheckVersionSync(line 20), calls it in its first case, and listssrc/lib/plugin-version-sync.tsinREADERS(line 38). Deleting the module breaks that test, and the AC-1 grep would still print nothing. Run against the base branch the grep prints 14 lines, so it is not vacuous. It is incomplete. Suggested wording: usegit grep -n "checkVersionSync\|plugin-version-sync" -- src bin scripts .github __tests__.Check version sync(ci.yml:249).Validate plugin.json structure(ci.yml:219) only checks existence, JSON syntax and thename/descriptionfields. The evidence grep would pass on a doc that names the structure step and not the version check. I recommend the doc namesCheck version sync. It may also name the structure step, so the stated evidence still matches. A negative test atci.yml:305also covers the check.plugin-version-synchit, noValidate…hit), so they gate the work.Scope Assessment
Non-Goals: present (no
ci.ymledits; nothing underplugin/,.claude/skills/,templates/skills/).Verdict: ✅ SCOPE_OK
Acceptance Criteria
AC-1: Delete
plugin-version-sync.tsand its test; no reference tocheckVersionSyncVerification: Integration Test (command check)
Scenario: Given the module has no production caller → When the module, its test, and the gate test's use of it are removed → Then
git grep -n "checkVersionSync\|plugin-version-sync" -- src bin scripts .github __tests__prints nothing andnpx vitest run __tests__/root-plugin-manifest-retired.test.tspasses.Assumptions:
ci.ymlis untouched.docs/adr/0008and the graph docs mention the module by name. They are history, so leave them.AC-2:
plugin-updates.mdnames what enforces version syncVerification: Manual Test (grep)
Scenario: Given
plugin-updates.md:15cites the module → When the sentence is rewritten → Thengrep -n "Validate plugin.json structure"matches andgrep -n "plugin-version-sync"prints nothing.Assumptions: the rewrite names
Check version sync(ci.yml:249) as the version check.Implementation Plan
Phase 1: Remove the module
git rm src/lib/plugin-version-sync.ts src/lib/plugin-version-sync.test.ts.__tests__/root-plugin-manifest-retired.test.ts(not in the issue's "May touch" list): drop thecheckVersionSyncimport, drop"src/lib/plugin-version-sync.ts"fromREADERS, and replace the first case'scheckVersionSynccalls with a plain assertion that the root manifest is gone. Keep theexistsSync(...) === falseassertion, which is the part that gates chore(plugin): decide the root .claude-plugin/plugin.json and memory/ — second manifest kept in sync by hand since ./plugin ships #1301. The "version sync reads plugin/" claim stays covered byci.yml'sCheck version syncand its negative test.Phase 2: Doc and changelog
docs/internal/plugin-updates.md:15, naming theCheck version syncstep ofci.yml's plugin job (and theValidate plugin.json structurestep for the manifest checks).CHANGELOG.mdentry under Unreleased.Phase 3: Verify
npm run buildandtimeout 600 npx vitest run __tests__/root-plugin-manifest-retired.test.tsafter a WIP commit. Do not run the full suite (runner context).Design Review
ci.ymlalready enforces package-vs-plugin versions inline. Deleting is the decision recorded as D-7.ci.yml, because it edits the workflow that produces the requiredtestandcanarychecks (Non-Goal).git log -S checkVersionSync: docs(#185): complete AC-6 release and update process #191, feat(#248): improve plugin file sync for seamless updates #342, fix(#1265): ship a slim plugin/ folder instead of the whole dev repo #1275, chore(plugin): decide the root .claude-plugin/plugin.json and memory/ — second manifest kept in sync by hand since ./plugin ships #1301. chore(plugin): decide the root .claude-plugin/plugin.json and memory/ — second manifest kept in sync by hand since ./plugin ships #1301 was the only one that touched it in response to a defect, so this is below the recurrence threshold.Check version synccoversmarketplace.json. If not, that is a pre-existing gap to file separately, not widen here.Open Questions
__tests__? Recommendation: yes; edit the AC line. Impact if not: exec follows the grep, leavesroot-plugin-manifest-retired.test.tsimporting a deleted file, and thetestcheck fails.Check version sync(recommended) or only the AC'sValidate plugin.json structure? Recommendation: name both; it satisfies the AC text and is accurate.Recommended Workflow
Phases: exec → qa
Quality Loop: disabled
Reasoning: Mechanical deletion plus a one-line doc fix. No unit-test stubs to generate (the AC is a deletion), so no testgen. No UI, so no test phase.
Label Review
Current: good first issue, refactor, graph-2026-10-freeze-b
Recommended: same, plus
plannedQuality Loop: Won't auto-enable (SCOPE_OK).
admarble commentedon Oct 16, 2026
QA Verdict: AC_MET_BUT_NOT_A_PLUS
AC coverage: 2/2 met
Gaps:
docs/internal/plugin-updates.md:15claims more than CI does. It sits under a three-row table (package.json,plugin.json,marketplace.json) and says "All versions MUST match. The CI pipeline enforces this … theCheck version syncstep compares the versions".ci.yml:249-267compares onlypackage.jsonwithplugin/.claude-plugin/plugin.json.Validate marketplace.json structure(lines 271-303) checks onlynameandplugins. It never reads the version.marketplace.json'splugins[0].version. After this PR, nothing checks that version exceptrelease.shwriting it.Suggestions:
package.jsonwithplugin/.claude-plugin/plugin.json". Add thatmarketplace.json's version is set byscripts/release.shand is not checked in CI.docs(#1325): plugin-updates.md names the two versions CI compares
chore(#1325): delete the unused plugin-version-sync module (#1466)