Repository navigation
Description
Epic: graph-2026-10-freeze-c Tier: mechanical Execution: sequant_run
Follow-up from #1325 (PR #1466), which found during its doc fix that no CI step reads the marketplace version.
Problem
Three files carry the release version: package.json, plugin/.claude-plugin/plugin.json and .claude-plugin/marketplace.json → plugins[0].version. docs/internal/plugin-updates.md says "All versions MUST match."
CI enforces only the first two:
ci.yml'sCheck version syncstep comparespackage.jsonwithplugin.json.ci.yml:271(Validate marketplace.json structure) andplugin-install-test.yml:66(line numbers at de03af8) check only that the marketplace file parses and hasnameand a non-emptyplugins.
The marketplace version is written at release by scripts/release.sh:93 (a sed over every "version" key) and by scripts/prepare-marketplace.ts:139-149. A hand edit, a merge resolution, or a release that skips one of those steps leaves it stale, and nothing fails.
ci.yml is off-limits (freeze-b D-7: the job that produces the required test and canary checks). But scripts/plugin-mcp-pin.test.ts already parses marketplace.json and package.json (:22-30, :47-50), and it runs in the unit project (vitest.config.ts:20), which npm test runs in the required test job. One assertion there closes the gap.
Acceptance Criteria
- AC-1: A unit test fails when
.claude-plugin/marketplace.json'ssequantplugin entry has aversiondifferent frompackage.json'sversion, and passes on today's files (both 2.19.0). Evidence:npx vitest run scripts/plugin-mcp-pin.test.ts -t "marketplace version"reports ≥ 1 passed, 0 failed (today it reports every test skipped), mutation-verified by changingplugins[0].versionin.claude-plugin/marketplace.jsonto0.0.0(exactly that test fails), then restoring. - AC-2: The test finds the entry by
name === "sequant", not by index, and fails with a message naming both files and both versions. Evidence:npx vitest run scripts/plugin-mcp-pin.test.ts -t "marketplace version"output under the AC-1 mutation namesmarketplace.json,package.jsonand both version strings. - AC-3:
docs/internal/plugin-updates.mdno longer says that no CI step reads the marketplace version, and it names the test that does. Evidence:grep -c "No CI step reads the marketplace version" docs/internal/plugin-updates.mdprints0, andgrep -n "plugin-mcp-pin.test.ts" docs/internal/plugin-updates.mdprints the line.
Prior fixes / producers
- Prior fixes: b70426b (2026-04-07, "auto-sync marketplace.json version from package.json") added the
prepare-marketplace.tsstamp. chore(plugin): plugin-version-sync.ts has no production caller, and plugin-updates.md says CI uses it #1325 (PR chore(#1325): delete the unused plugin-version-sync module #1466) deleted the unusedplugin-version-sync.tsand documented the gap. No earlier issue covers a check. - Producers of the marketplace version:
scripts/release.sh:93andscripts/prepare-marketplace.ts:143. Readers: the Claude Code marketplace, and the staleness hook's fixtures (__tests__/plugin-staleness-warning.integration.test.ts, synthetic versions, unaffected). A test is the check, not a third producer.
May touch
scripts/plugin-mcp-pin.test.ts, docs/internal/plugin-updates.md.
Non-Goals
- Any edit to
.github/workflows/ci.ymlorplugin-install-test.yml(freeze-b D-7). - Changing how
release.shorprepare-marketplace.tswrites the version. - A top-level
metadata.versioninmarketplace.json(absent today). - Any edit under
plugin/,.claude/skills/ortemplates/skills/(plugin freeze).
Activity
admarble commentedon Oct 17, 2026
Complexity: Simple (3 ACs, 2 directories)
AC Quality Check
All three ACs are single-line with
Evidence:clauses. AC-1's evidence is non-vacuous:-t "marketplace version"matches nothing on main today (all skipped, 0 passed), so "≥ 1 passed" can only hold once the test exists. Non-Goals present. No vague wording.Scope Assessment
Non-Goals: present (no
ci.yml/plugin-install-test.ymledits, no producer changes, nometadata.version, nothing underplugin/or skill dirs).Verdict: ✅ SCOPE_OK (1 feature, 3 AC, 2 files)
Acceptance Criteria
AC-1: Test fails on marketplace/package version drift
Verification: Unit Test
Scenario: Given marketplace
sequantentry at 2.19.0 = package.json → Then pass; Given it is0.0.0→ Then exactly this test fails.AC-2: Lookup by name; message names both files and versions
Verification: Unit Test
Scenario: Given the AC-1 mutation → Then the failure output contains
marketplace.json,package.json,0.0.0and2.19.0.AC-3: Docs updated
Verification: Manual Test (grep)
Scenario: Given the edited doc →
grep -c "No CI step reads the marketplace version"prints 0 andgrep -n "plugin-mcp-pin.test.ts"prints a line.Implementation Plan
Phase 1: Test
scripts/plugin-mcp-pin.test.ts, add adescribe("marketplace version", …).shippedMcpJsonPath()(line 21) already does thename === "sequant"lookup but returns only the path; add a small helper that reads.claude-plugin/marketplace.jsonand returns thesequantentry'sversion(find by name, throw if absent, as the existing helper does).itasserting equality withpackage.jsonversion. Use an explicitif (a !== b) throw/expect(..., message)so the message reads e.g..claude-plugin/marketplace.json sequant version (0.0.0) != package.json version (2.19.0). PlaintoBealone would not name the files.pkgconst is scoped inside the fix(cli): preAction auto-sync fires onserve— the plugin's @latest MCP server silently rewrites .claude/hooks, skills, AGENTS.md in every project it starts in (#793 pin never ships via marketplace source "./") #988 block.Phase 2: Docs
docs/internal/plugin-updates.md:15, replace "No CI step reads the marketplace version." with a sentence sayingscripts/plugin-mcp-pin.test.ts("marketplace version") asserts it equalspackage.json's, run vianpm testin the requiredtestjob.Verification
plugins[0].versionto0.0.0, confirm only that test fails with the expected message, restore. Record in the PR body:Mutation-verified: AC-1 — set marketplace.json plugins[0].version to 0.0.0; scripts/plugin-mcp-pin.test.ts > marketplace version > <case> failed; restored.(file path first, per the marker format).Design Review
unitproject, hence in the requiredtestjob.ci.ymlis frozen.serve— the plugin's @latest MCP server silently rewrites .claude/hooks, skills, AGENTS.md in every project it starts in (#793 pin never ships via marketplace source "./") #988, fix(plugin): ship a slim ./plugin folder — the repo-root plugin pulls ~700 MB of dev dependencies into every install and fails directory review limits #1265). Prior fixes: b70426b (stamp), chore(plugin): plugin-version-sync.ts has no production caller, and plugin-updates.md says CI uses it #1325 (docs). Under 2 prior fix issues for a missing check, so the check is the class fix. Not a re-patch.release.sh:93andprepare-marketplace.ts:143(unchanged). The test is a reader only, not a third producer. No parity concern.Feature Quality Planning
All standard checks pass. Notes: the file's header comment mentions only #988, so a one-line mention of this check there is optional. A release-time ordering risk exists: if a release bumps
package.jsonbefore the marketplace stamp, a mid-release test run would fail. That is the intended signal, and CI runs on the PR after both are written.Open Questions
None. (No sibling-site expansion needed. The
plugin.jsonsync is already covered byci.yml.)Recommended Workflow
Phases: exec → qa
Quality Loop: disabled
Reasoning: Tiny, single-test change plus one doc line.
testgenis not needed since the test is the deliverable. No ADR (no design choice between options).Label Review
Current: enhancement, graph-2026-10-freeze-c
Recommended: same (+
planned)Quality Loop: Won't auto-enable.
test(#1488): call compareVersions so the guard is not tautological
admarble commentedon Oct 17, 2026
QA Verdict: AC_MET_BUT_NOT_A_PLUS
AC coverage: 1/3 met
Gaps:
compareVersions(...) !== 0(line 277) repeats the!==check right before it, and theexpect(...).toBeafter thethrowrepeats the check again. The import seems to exist only so the tautology detector sees a real call (commitdadefd659). It also pullssrc/lib/version-check.ts, and through itstacks.js, into a JSON-comparison test.describeblock. It's harmless formatting, but it isn't part of this change.test(#1488): fail when marketplace.json's sequant version drifts from…