bug(manifest-check): pre-release tags (vX.Y.Z-rc.N) falsely fail tag-vs-manifest — last-tag detection isn't semver-aware #66
Labels
No labels
bump
major
bump
minor
bump
patch
kind/bug
kind/chore
kind/docs
kind/feature
priority/critical
priority/high
priority/low
priority/medium
size/L
size/M
size/S
size/XL
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
frankenbit/release-toolkit#66
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom
manifest-check.shsteptag-vs-manifestfails when a pre-release tag (e.g.v0.4.0-rc.1) exists in the repo and is the closest tag to HEAD, even though the manifest correctly tracks the stable lineage:Surfaced by slice 2 (PR #65): slice 3 pushed
v0.4.0-rc.1at139f1caas the reusable-workflow ref-tag, and the toolkit dogfoodsmanifest-checkon its own repo. The check now reads rc.1 as "the last release tag" and flagsVERSION=0.3.4as behind. CI red → #65 blocked.Root cause (verified at source)
scripts/manifest-check.shline 170:--match 'v*'matchesv0.4.0-rc.1(it begins withv), andgit describe --abbrev=0returns the closest tag by commit distance — rc.1 (at139f1ca) is closer to HEAD than v0.3.4 (at16c1868). Solast_tag=v0.4.0-rc.1, and0.3.4 < 0.4.0-rc.1→ FAIL. The detection has no notion that a pre-release is not a released version.This is present in both
@v0.3.1(what #65's consumer CI pins) and HEAD — it is not fixable by bumping the pin.Tested fix
Exclude the semver pre-release delimiter from last-tag detection:
Verified locally against the slice-2 tree:
git describe --tags --abbrev=0 --match 'v*'→v0.4.0-rc.1… --exclude '*-*'→v0.3.4→ matches manifest → PASS(A
git tag --sort=-v:refname | grep -v -- '-' | head -1filter is an equivalent if--excludeportability is a concern, but--excludeis supported by the git in CI.)Why this matters beyond the dogfood
An external consumer pinning
@v0.4.0-rc.1wouldn't have rc.1 in their tag list, so they wouldn't trip this specific case. But any consumer who creates their own pre-release tag (-rc/-beta/-alpha) on their repo would hit the identical false-failure. The fix is semver-correctness (pre-releases are not releases), not a dogfooding workaround.Sequencing note (the knot)
Because #65's consumer
manifest-check.ymlpins_manifest-check.yml@v0.3.1, the fix must (a) land inmanifest-check.sh, (b) ship as a new patch tag (e.g. v0.3.5, cuttable via the still-present v0.3.x mechanism on main before #65 merges), then (c) #65 re-pinsmanifest-check.yml@v0.3.1 → @v0.3.5. Exact path is QM/operator's call.Refs
v0.4.0-rc.1at139f1caFiled: 2026-06-25 from Surveyor's #65 review (CI-red root-cause).