Bug: Branch Cleanup workflow fails when stale batch is selected
.github/workflows/branch-cleanup.yml still exposes a stale option in both:
- the
workflow_dispatch.inputs.batch choice list ([safe, stale, review]), and
- the push-sentinel regex (
\[run-cleanup:(safe|stale|review)\])
but scripts/maintenance/branch-cleanup-delete.sh only implements case "${1:-}" in safe|review|*) — there is no STALE_BRANCHES array and no stale) case. Per docs/branch-cleanup-followups.md, the 30 CLOSE-STALE branches were already archived+deleted on 2026-06-02, so the array was intentionally dropped from the script — but the workflow wasn't updated to match.
Evidence: run 33689347799 (Security Scan, unrelated) plus the reproducible failure observed on run 34392035516 (Branch Cleanup, dry_run=1, batch=stale):
usage: scripts/maintenance/branch-cleanup-delete.sh {safe|review} (prefix DRY_RUN=1 to preview)
##[error]Process completed with exit code 2.
Any manual dispatch or push-sentinel using stale fails immediately with exit code 2, even in dry-run mode.
Fix
Remove the dead stale option from the workflow (dispatch choices + sentinel regex + doc comments), since the underlying batch no longer exists in the delete script and its work is already done. This keeps the workflow's advertised options in sync with what the script actually supports, preventing confusing "usage" failures on every stale-batch invocation.
Related to #1827
Generated by pr-iteration-loop for #1827 · copilot · auto · 88.5 AIC · ⌖ 17.2 AIC · ⊞ 12.1K · ◷
Bug:
Branch Cleanupworkflow fails whenstalebatch is selected.github/workflows/branch-cleanup.ymlstill exposes astaleoption in both:workflow_dispatch.inputs.batchchoice list ([safe, stale, review]), and\[run-cleanup:(safe|stale|review)\])but
scripts/maintenance/branch-cleanup-delete.shonly implementscase "${1:-}" in safe|review|*)— there is noSTALE_BRANCHESarray and nostale)case. Perdocs/branch-cleanup-followups.md, the 30 CLOSE-STALE branches were already archived+deleted on 2026-06-02, so the array was intentionally dropped from the script — but the workflow wasn't updated to match.Evidence: run 33689347799 (
Security Scan, unrelated) plus the reproducible failure observed on run34392035516(Branch Cleanup,dry_run=1,batch=stale):Any manual dispatch or push-sentinel using
stalefails immediately with exit code 2, even in dry-run mode.Fix
Remove the dead
staleoption from the workflow (dispatch choices + sentinel regex + doc comments), since the underlying batch no longer exists in the delete script and its work is already done. This keeps the workflow's advertised options in sync with what the script actually supports, preventing confusing "usage" failures on every stale-batch invocation.Related to #1827