fix(mirror): empty-TAG_NAME guard as Forgejo-agnostic gate (#322) #325
No reviewers
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
frankenbit/release-toolkit!325
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "i/322-empty-tag-guard"
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?
Closes #322.
Immediate mitigation for the mirror-fires-on-every-push noise floor Surveyor
c778diagnosed. Small script-level defensive change.What lands
.forgejo/workflows/reusable-mirror-to-codeberg.yml: add empty-TAG_NAME guard as FIRST check in therun:block. Non-cut invocations arrive with emptyTAG_NAME(release.yml passes${{ needs.release.outputs.cut_tag }}which is empty on non-cut modes) → cleanexit 0with::notice::for log visibility.Why the outer
if:isn't enoughPer Surveyor c778 Actions-task-list diagnosis: Forgejo Actions apparently doesn't reliably honor
needs.<reusable-call-job>.outputsin a job-levelif:gate. Empirical evidence:sha=31970151(#319 merge, non-cut push:main) → mirror fired, FAILURE from empty TAG_NAME → Forgejo-fetch-failsha=97bb8076(rolling-PR push, non-cut) → mirror fired, SUCCESS from idempotency-or-empty-PAT pathsha=97bb8076again on the rolling-PR merge → mirror fired legitimately as the real cut, SUCCESS from full mirror-flowSo
if: mode == 'cut'doesn't skip non-cuts on Forgejo Actions the way it does on GitHub Actions.What this PR does NOT do
if: mode == 'cut'gate — it stays as belt-and-suspenders even if Forgejo behavior differsVerification
Related
c778— sharpened the original QMbef7observation via task-list evidence🤖 Generated with Claude Code
APPROVED — empty-
TAG_NAMEguard (#322 mitigation)This is exactly the fix, correctly placed and reasoned. The guard is the first check in the run block,
::notice::+exit 0(right level — an expected non-cut is not an anomaly), and the comment documents the Forgejo-agnostic rationale + the empirical 2× evidence + the c778 diagnosis. It composes cleanly with the bounded tag-wait: emptyTAG_NAME(non-cut) → skip here; populated (real cut) → passes through to the wait — so it cannot mask a real cut whose tag is merely late. The wrong-commit class stays closed independently via the tag-guard; this just retires the spurious non-cut failure noise. Fragment is accurate and credits the empirical finding.On current main (
merge_base == base == fb2ba94) — ff-clear, no rebase needed. APPROVED.