Problem
The Branch Cleanup workflow (.github/workflows/branch-cleanup.yml) accepts
batch: stale as a workflow_dispatch choice, and its sentinel-commit path
also parses [run-cleanup:stale]. But scripts/maintenance/branch-cleanup-delete.sh
only implements a case for safe|review and falls through to
usage: ... {safe|review} with exit 2 for any other argument — including
stale.
Evidence
Every historical Branch Cleanup run that selected the stale batch has
failed with the same signature, going back to at least 2026-08-07 and as
recently as 2026-09-09 (run
https://github.com/groupthinking/EventRelay/actions/runs/34392035516):
scripts/maintenance/branch-cleanup-delete.sh "stale"
usage: scripts/maintenance/branch-cleanup-delete.sh {safe|review} (prefix DRY_RUN=1 to preview)
##[error]Process completed with exit code 2.
At least 15 runs over the last 5 weeks show this same failure with no
remediation.
Fix
Add a STALE_BRANCHES array (currently empty, since
docs/branch-cleanup-matrix.csv has no CLOSE-STALE verdict rows yet) and a
matching stale) case, so the stale batch runs as a documented no-op
instead of erroring out. This keeps the workflow usable for future audits
that do produce CLOSE-STALE branches, without deleting anything today.
Generated by pr-iteration-loop for #1778 · copilot · auto · 98.5 AIC · ⌖ 20.8 AIC · ⊞ 12.1K · ◷
Problem
The
Branch Cleanupworkflow (.github/workflows/branch-cleanup.yml) acceptsbatch: staleas aworkflow_dispatchchoice, and its sentinel-commit pathalso parses
[run-cleanup:stale]. Butscripts/maintenance/branch-cleanup-delete.shonly implements a
caseforsafe|reviewand falls through tousage: ... {safe|review}withexit 2for any other argument — includingstale.Evidence
Every historical
Branch Cleanuprun that selected thestalebatch hasfailed with the same signature, going back to at least 2026-08-07 and as
recently as 2026-09-09 (run
https://github.com/groupthinking/EventRelay/actions/runs/34392035516):
At least 15 runs over the last 5 weeks show this same failure with no
remediation.
Fix
Add a
STALE_BRANCHESarray (currently empty, sincedocs/branch-cleanup-matrix.csvhas noCLOSE-STALEverdict rows yet) and amatching
stale)case, so thestalebatch runs as a documented no-opinstead of erroring out. This keeps the workflow usable for future audits
that do produce
CLOSE-STALEbranches, without deleting anything today.