Files
dfe1755da6 fix(jobs): prune --status filter + --older-than 0d as explicit no-age-floor (takeover of #2282)
Salvages the CLI plumbing from PR #2282 (queue.prune already accepted a
status[] param; the CLI exposed neither knob) and repairs the flaws found
in verification:

- --status completed,failed,dead,cancelled passes an explicit terminal
  subset through to queue.prune; anything else fails fast. Parsing lives
  in exported parsePruneStatuses (unit-tested, mirrors parseNiceFlag).
- --older-than 0d is documented and messaged as what it actually does:
  NO age floor — deletes ALL matching terminal jobs — not "same-day
  only" as the original PR body claimed. Help text + success line say so
  ("regardless of age") so an operator can't mistake it for a same-day
  cutoff.
- Real tests this time: queue-level status-filter + zero-age-floor cases
  in test/minions.test.ts, parser cases in test/jobs-prune-flags.test.ts
  (the original PR cited tests in a file that does not exist).

Co-authored-by: brettdavies <brettdavies@users.noreply.github.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 14:20:23 -07:00
..