Peel the annotated tag object in the release lane #44

Merged
svc-agent-writer merged 1 commit from fix/41-annotated-tag-commit into main 2026-11-02 11:51:09 +00:00

Summary

On a tag event Woodpecker sets CI_COMMIT_SHA to the annotated tag object, not to the commit it tags. The tag step compared the peeled tag with that object, so every annotated release tag failed. The image step also wrote the tag object into the revision label.

 tag step (release-tag-check.sh)
+  commit = peel CI_COMMIT_SHA to its commit
-  refuse unless tag^{commit} == CI_COMMIT_SHA
+  refuse unless tag^{commit} == commit
-  refuse unless CI_COMMIT_SHA is on main
+  refuse unless commit is on main
+  write commit to .release/commit
 image step (release-image.sh)
-  label revision = CI_COMMIT_SHA
+  label revision = .release/commit

Evidence

The tag step from each branch, run against the real v0.1.0-rc.5 tag (object 623112439f56, commit 8f84bf3), with CI_COMMIT_SHA set to the tag object as Woodpecker sets it:

  • Before (main): release: v0.1.0-rc.5 does not point at 623112439f56fcaee37f2ba628367320a6927a82; it moved after the push, exit 1.
    After (this branch): release: v0.1.0-rc.5 at 8f84bf3adc53445eecb09b82f0a91984750ccef6 is an annotated tag on main, exit 0, .release/commit = 8f84bf3.

The peel is a no-op when CI_COMMIT_SHA already names a commit, so the check also holds if Woodpecker changes this behaviour.

Merge Danger

Door: two-way

The change touches only the two release scripts, which run only on v* tag events.

Blast Radius: release-lane

No effect on validation runs or on the deployed service. v0.1.0-rc.5 stays unreleasable, because its tree predates this fix; the plan is to cut v0.1.0-rc.6 on the merged main and delete rc.5.

Refs #41

🤖 Generated with Claude Code

## Summary On a tag event Woodpecker sets `CI_COMMIT_SHA` to the annotated tag object, not to the commit it tags. The `tag` step compared the peeled tag with that object, so every annotated release tag failed. The `image` step also wrote the tag object into the revision label. ```diff tag step (release-tag-check.sh) + commit = peel CI_COMMIT_SHA to its commit - refuse unless tag^{commit} == CI_COMMIT_SHA + refuse unless tag^{commit} == commit - refuse unless CI_COMMIT_SHA is on main + refuse unless commit is on main + write commit to .release/commit image step (release-image.sh) - label revision = CI_COMMIT_SHA + label revision = .release/commit ``` ## Evidence The tag step from each branch, run against the real `v0.1.0-rc.5` tag (object `623112439f56`, commit `8f84bf3`), with `CI_COMMIT_SHA` set to the tag object as Woodpecker sets it: - **Before (main):** `release: v0.1.0-rc.5 does not point at 623112439f56fcaee37f2ba628367320a6927a82; it moved after the push`, exit 1. **After (this branch):** `release: v0.1.0-rc.5 at 8f84bf3adc53445eecb09b82f0a91984750ccef6 is an annotated tag on main`, exit 0, `.release/commit` = `8f84bf3`. The peel is a no-op when `CI_COMMIT_SHA` already names a commit, so the check also holds if Woodpecker changes this behaviour. ## Merge Danger **Door:** two-way The change touches only the two release scripts, which run only on `v*` tag events. **Blast Radius:** release-lane No effect on validation runs or on the deployed service. `v0.1.0-rc.5` stays unreleasable, because its tree predates this fix; the plan is to cut `v0.1.0-rc.6` on the merged main and delete `rc.5`. Refs #41 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Peel the annotated tag object in the release lane
All checks were successful
ci/woodpecker/pr/validation Pipeline was successful
7e0ce55e62
On a tag event Woodpecker sets CI_COMMIT_SHA to the annotated tag
object, not the commit it tags, so the tag step refused every release
tag (pipeline 3, v0.1.0-rc.5) and the revision label would have named
the tag object. The tag step now peels CI_COMMIT_SHA to its commit and
writes it to .release/commit for the image step's revision label.

Refs #41

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
svc-agent-writer deleted branch fix/41-annotated-tag-commit 2026-11-02 11:51:10 +00:00
Sign in to join this conversation.
No description provided.