fix(ci): sync versions in release pre-commit hook so tags are not stale#29
Merged
Merged
Conversation
conventional-changelog-action committed+tagged+pushed, then the old step 2b amended the branch and force-pushed - the tag never moved, so vX.Y.Z (which agent-plugins pins) pointed at a pre-sync tree. Verified: tag v1.13.0 carried SKILL.md/.codex-plugin version 1.12.0 while the release was 1.13.0. Move the SKILL.md + .codex-plugin/plugin.json sync into the action's pre-commit hook (.github/release/pre-commit.js), which runs before the action's git add/commit/tag, so the synced files are in the release commit and the tag. Delete step 2b entirely (no more amend, no more --force push). version.json stays action-owned. Set skip-ci:'true' explicitly. Expand validate.yml triggers to cover workflow/hook paths. Plan converged via GPT+Gemini+Claude consensus (2 rounds).
Owner
Author
Gated verification complete - both passed1. Scratch-repo pipeline dry-run (throwaway private repo, real
The exact defect (tag pointing at a pre-sync tree) is resolved: synced files are now inside the tag the marketplace pins. 2. Branch protection / token: master is not protected, no rulesets; the workflow declares Observation (not a blocker): in the scratch run the bump was major; that is the conventional-changelog action's own semver math over the scratch commit range. On real merge this PR squashes as Draft lifted. Ready for review. |
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.
Problem
conventional-changelog-actioncommits + tags + pushes, then the old step 2b amended the branch and force-pushed. The tag never moved, sovX.Y.Z(whichantonbabenko/agent-pluginspins) pointed at a pre-sync tree.Verified live: tag
v1.13.0(commit 2835989) != master tip; at the tag bothskills/terraform-skill/SKILL.mdand.codex-plugin/plugin.jsoncarried1.12.0while the release was1.13.0.version.jsonwas correct (action bumps it natively before its commit).Fix
pre-commithook (.github/release/pre-commit.js), which runs before the action's git add/commit/tag, so the synced files land in the release commit AND the tag.git commit --amend, no moregit push --force-with-lease. No--forceanywhere in the workflow.version.jsonstays action-owned.skip-ci: 'true'set explicitly.validate.ymltriggers to cover.github/workflows/**and.github/release/**so this PR exercises the sync check.Hook: Node built-ins only, zero deps. Resolves root from
GITHUB_WORKSPACE || cwdwith aversion.jsonsentinel; value-only anchored replace of the manifest version line (position / trailing-comma / byte-layout independent); throws (fails the release job) on any missing version line; explicit in-hookgit add(the action only auto-stages version-file + changelog).Verification done (local)
Gated before merge (do NOT merge until done)
fix:commit on a fork, assert the producedvX.Y.Ztag == release commit (single commit),git show <tag>:for SKILL.md + manifest carry the new version,.codex-plugin/present at tag,version.jsoncorrect, no--forcein final workflow.Plan converged via GPT + Gemini + Claude consensus (2 rounds). Draft until 1-2 pass.