Skip to content

Stop the publish guard rejecting the version it now asks for - #163

Merged
silverstein merged 1 commit into
masterfrom
fix-publish-version-guard
Aug 15, 2026
Merged

Stop the publish guard rejecting the version it now asks for#163
silverstein merged 1 commit into
masterfrom
fix-publish-version-guard

Conversation

@silverstein

Copy link
Copy Markdown
Member

The published plugin is stale right now, and this is why.

The plugin version now carries build metadata identifying its commit, so between releases it deliberately differs from package.json. publish-agent-plugin.mjs compared the two for equality and refused:

[publish] built plugin is 0.10.0+99.g1fcd8da but this tree is 0.10.0. Rebuild with: npm run build:plugin

It has failed on every hourly run since, so the distribution repo has been serving an older build. That is precisely the failure the publisher was built to prevent, reintroduced by the change meant to make its labelling honest. Mine, and caught by checking the publisher after the release rather than assuming it worked.

The fix compares the release component, then checks the embedded commit against HEAD. That is stricter than the equality it replaces: the old test could not distinguish a fresh build from one made twenty commits earlier under the same version number, which is the drift the build metadata exists to end.

Verified end to end. Build, then publish dry run: previously exited 1 at the version check, now syncs 12 changed files and restores the tree.

The plugin version carries build metadata identifying the commit it was built
from, so between releases it deliberately differs from package.json. The publish
script compared the two for equality, so it refused every publish the moment that
landed, and it did so hourly: the distribution repo has been stale since, which is
the exact failure the publisher exists to prevent.

It now compares the release component and then checks the embedded commit against
this tree's HEAD. That is stricter than the equality it replaces, which could not
tell a fresh build from one made twenty commits earlier under the same version
number.

Verified end to end: build then publish dry run, which previously exited 1 on the
version check and now syncs 12 changed files.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@silverstein
silverstein merged commit dc90e75 into master Aug 15, 2026
3 of 4 checks passed
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