ci: fail when the plugin's version manifests disagree - #28
Conversation
The plugin's version is written in three places a client reads independently, and nothing made them agree. They drifted silently once: marketplace.json stayed at 0.2.1 while plugin.json moved to 0.2.2 and then 0.2.3, so two releases existed that no installed client was ever offered -- the marketplace entry is what a client compares against to decide an update exists, and it never moved. Checks marketplace metadata.version and the code-index entry's version against plugin.json's version, and the version named in bin/server.sha256 against plugin.json's serverVersion. The latter has the same silent-failure shape: bump serverVersion without renaming the checksum line and every install refuses to run, which today is only caught by the release workflow after a tag is already pushed. Its own job rather than a step in build-and-test -- no SDK, no restore, no matrix, and a mismatch reads better on its own line in the checks list than buried in a build log.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
|
Проверил, что проверка действительно падает, а не только зеленеет: коммит 18ac55c намеренно рассинхронизирует обе пары версий, следующий за ним — revert. Запись в маркетплейсе я ломал только в |
The plugin's version lives in three places a client reads independently, and nothing made them agree.
They drifted silently once already:
.claude-plugin/marketplace.jsonstayed at0.2.1whileplugins/code-index/.claude-plugin/plugin.jsonmoved to0.2.2and then0.2.3. The marketplace entry is what a client compares against to decide an update exists — it never moved, so two releases existed that no installed client was ever offered. That is what made #26's release land without reaching anyone until #27.Checks:
marketplace.jsonmetadata.versionplugin.jsonversionmarketplace.jsoncode-index entryversionplugin.jsonversionbin/server.sha256plugin.jsonserverVersionThe third has the same silent-failure shape: bump
serverVersionwithout renaming the checksum line and every install refuses to run. Today that is only caught by the release workflow, after a tag has already been pushed.The marketplace entry is selected by name, not index, so adding a second plugin later cannot silently start checking the wrong one.
Runs as its own job — no SDK, no restore, no matrix — so a mismatch appears on its own line in the checks list instead of inside a build log.
Not checked, and arguably worth adding later: that
CHANGELOG.md's newest heading matches the version being shipped. Left out deliberately — it would fail on any branch that bumps the version before writing the entry, which is a normal order to work in.