ci: fail when plugin/marketplace/skill versions drift from package.json - #32
Conversation
`.claude-plugin/plugin.json` and `.claude-plugin/marketplace.json` sat at
0.3.19 through both the 0.3.20 and 0.3.21 releases because nothing checked
them — the drift was only caught by hand during the 0.3.22 release. The
existing plugin-metadata job validated that these files parse, not that
their versions mean anything.
Adds two steps to that job:
- Plugin + marketplace versions match package.json — covers
plugin.json's version, marketplace.json's metadata.version, and every
plugins[].version entry. The npm package version is the release version,
so all of them must equal it. Prints a per-field ok/DRIFT table so a
failure names the offending file immediately.
- Skill manifest version matches package.json — pins
tinycloud-skill.json's skill_version. Deliberately only skill_version:
min_version/supported_range are the compatibility FLOOR, already diffed
against preflight.sh by the next step, and may legitimately sit below the
release version on a no-raise release (0.3.13 and 0.3.19 both did).
Verified both directions locally: passes on the current tree (all four
version fields 0.3.22), and re-injecting the exact historical drift
(plugin.json → 0.3.19) fails with
"Version drift against package.json (0.3.22): {'.claude-plugin/plugin.json': '0.3.19'}"
and exit 1.
PR SummaryLow Risk Overview The first step requires Reviewed by Cursor Bugbot for commit 8d47e67. Bugbot is set up for automated code reviews on this repo. Configure here. |
Why
.claude-plugin/plugin.jsonand.claude-plugin/marketplace.jsonwere still on 0.3.19 through both the 0.3.20 and 0.3.21 releases. Nothing checked them, so the drift only surfaced when it was noticed by hand during the 0.3.22 release. The existing Plugin + skill metadata job validated that these files parse — not that their versions mean anything.What
Two new steps in that same job:
Plugin + marketplace versions match package.json — covers
plugin.json'sversion,marketplace.json'smetadata.version, and everyplugins[].versionentry. The npm package version is the release version, so all of them must equal it. Prints a per-fieldok/DRIFTtable so a failure names the offending file straight away:Skill manifest version matches package.json — pins
tinycloud-skill.json'sskill_version.Deliberately only
skill_version:min_version/supported_rangeare the compatibility floor, already diffed againstpreflight.shby the next step, and they may legitimately sit below the release version on a no-raise release — 0.3.13 and 0.3.19 both shipped that way. Pinning them here would have failed those releases for no reason.Verified both directions
plugin.json→ 0.3.19):No behavior change to the shipped package — CI only.