fix(prune-rc-tags): self-pin exclusion (Surveyor 2acc catch — #164 self-orphan gap) #167
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#167
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?
The bug
scripts/prune-rc-tags.sh(#164) enumeratesvCUT_VERSION-rc.*at cut-time and deletes ALL matched tags. The cross-version prefix guard protects external consumer pins (e.g. cellblock pinnedv0.10.1-rc.1is safe when the toolkit cutsv0.12.0— different version family).But the SAME-version self-pin case is unprotected:
release.ymlpinstoolkit_ref: vX.Y.Z-rc.NvX.Y.Zcut runsprune-rc-tags.sh vX.Y.ZvX.Y.Z-rc.N(the live pin)push:mainfiresrelease.ymlat the now-deleteduses:@vX.Y.Z-rc.N→ workflow fails to startWhy it hasn't fired yet
Pure luck from the v0.12.0 SemVer surprise: the rolling PR currently in flight cuts
v0.12.0, and toolkit-self is onv0.11.1-rc.1. The auto-prune (if it runs at the v0.12.0 cut) enumeratesv0.12.0-rc.*→ empty → self-pin survives. The version-mismatch is accidentally shielding the bug from firing.The moment any cut's CUT_VERSION matches the toolkit-self pin's version family (the normal case once the re-pin discipline is fully in cycle), the bug activates.
Surveyor's framing (2acc)
Fix
Add an optional 4th positional arg
PINNED_REFtoprune-rc-tags.sh. If supplied AND present in the enumerated family, EXCLUDE it from the delete list._release.ymlpasses${{ inputs.toolkit_ref }}so the workflow's known pin is preserved without re-parsing release.yml.Self-pin is NOT superseded by the cut that runs at it; deleting it during that cut is the bug. The next re-pin cycle handles the replacement.
Bats coverage
5 new fixtures covering the exclusion semantics:
v0.12.0-rc.1must not shadowv0.12.0-rc.10/v0.12.0-rc.11(mutation-verify:grep -vFxnot-vF)Composition
What this PR will NOT do
Refs