Skip to content

fix(release): verify tag annotation and signature via the API - #12

Merged
Radiergummi merged 1 commit into
mainfrom
fix/tag-verification-uses-api
Jul 30, 2026
Merged

fix(release): verify tag annotation and signature via the API#12
Radiergummi merged 1 commit into
mainfrom
fix/tag-verification-uses-api

Conversation

@Radiergummi

Copy link
Copy Markdown
Member

The v0.1.0 release run rejected a good tag. The workflow was wrong, not the tag — GitHub reports it as annotated with verification "reason": "valid".

Cause

actions/checkout materialises a tag ref as a lightweight local tag pointing straight at the commit. So inside a runner:

git cat-file -t v0.1.0   # -> commit

while on a developer machine and via the API the same tag is tag. That is why this passed every local check and only failed in CI.

Fix

Both facts now come from the API, which sees the real object:

  • annotated-ness from .object.type on the ref
  • signature from .verification.verified on the tag object

This also removes a latent second bug: the old code took the tag SHA from git rev-parse, which resolves through an annotated tag on some paths, so it could have queried the commit instead of the tag object and found no verification data at all.

Blast radius

None. The run stopped in the first job, so nothing was built, attested or published. npmjs still has only the 0.0.0 placeholder; PyPI and Packagist have nothing.

After merging

v0.1.0 currently points at a commit whose workflow contains the bug, and Actions runs the workflow definition from the tagged ref — so re-running it would just fail the same way. See my note on the options; one of them needs your call because it means bypassing the immutable-tag ruleset.

The first v0.1.0 release run rejected a perfectly good tag: annotated,
signed, and reported by GitHub as verification "valid". The workflow was
wrong, not the tag.

`actions/checkout` materialises a tag ref as a LIGHTWEIGHT local tag
pointing straight at the commit, so `git cat-file -t v0.1.0` returns
`commit` inside a runner even when the real object is an annotated tag. It
returns `tag` on a developer machine and the API agrees, which is why this
passed every local check and only failed in CI.

Both facts now come from the API, which sees the real object:

  - annotated-ness from .object.type on the ref
  - signature from .verification.verified on the tag object

That also removes a latent second bug. The old code took the tag SHA from
`git rev-parse`, which resolves through an annotated tag on some paths, so
it could have queried the commit rather than the tag object and found no
verification data at all.

Nothing was published by the failed run; it stopped in the first job.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CEdTd43qLEEE5qCsL1A7gW
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@Radiergummi Radiergummi self-assigned this Jul 30, 2026
@Radiergummi
Radiergummi merged commit 54d7b68 into main Jul 30, 2026
12 checks passed
@Radiergummi
Radiergummi deleted the fix/tag-verification-uses-api branch July 30, 2026 13:30
@Radiergummi Radiergummi mentioned this pull request Jul 30, 2026
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