Skip to content

fix: reap superseded rc tags at publish time - #265

Merged
joshua-temple merged 1 commit into
mainfrom
fix/reap-superseded-rc-tags
Jun 23, 2026
Merged

joshua-temple merged 1 commit into
mainfrom
fix/reap-superseded-rc-tags

Conversation

@joshua-temple

Copy link
Copy Markdown
Collaborator

Problem

Publish-time RC-tag cleanup only deleted tags whose base exactly equaled the published version. RC tags from an earlier base that was never published were orphaned: publishing v1.0.1 left v1.0.0-rc.0 behind when the v1.0.0 lifecycle was abandoned (diverged and superseded) before it ever published. The live fleet surfaced this on rc v0.3.0-rc.25.

Fix

cleanupRCTags now reaps every RC tag whose parsed base version is at or below the published version, using cascade's internal/version semver comparator. Tags on a strictly higher base (future work) and tags with a different prefix are preserved. Hotfix-variant RC tags (-rc.N.hotfix.M) are left to hotfix-rejoin cleanup, which owns that lifecycle. A 404 on an already-deleted tag stays a no-op, so cleanup remains idempotent.

Verification

go build, go test ./... (1726 pass), golangci-lint, cascade verify (no drift), and e2e build/vet all green. New TestCleanupRCTags_ReapsSupersededBases covers the below/equal/above boundary, 404 idempotency, prefix mismatch, and hotfix-variant exclusion. schema_version unchanged; pure-Go.

Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
@joshua-temple
joshua-temple enabled auto-merge (squash) June 23, 2026 22:38
@joshua-temple
joshua-temple merged commit 5444162 into main Jun 23, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant