Stop the publish guard rejecting the version it now asks for - #163
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.mjscompared the two for equality and refused: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.