feat(release): prune --keep-days, a nightly younger than that is kept past the newest --keep #32

Merged
HumanBean merged 1 commit from HumanBean/Tooling:push-lomqllytqoyw into main 2026-11-23 21:02:31 +00:00
Owner

Summary

release.py prune --keep N deleted every nightly past the newest N. Longshot passes 5, and nightlies come out up to once an hour, so a nightly could be gone within hours: too soon to compare a stable against main or bisect a regression.

prune now takes --keep-days D (default 0, which keeps today's behaviour): a nightly past the newest N is kept while it is younger than D days, by its published_at (else created_at). A nightly that reports no date is kept. Drafts and stables are handled as before. nightly_age's date reading is now age_of, shared by both.

Longshot will pass --keep 20 --keep-days 5 in a follow-up that moves .tooling-rev to this commit.

Testing

Tested: a new test in tests/test_release.py runs prune --keep 2 --keep-days 5 against the fake Forgejo. Eight nightlies, 1 to 8 days old, plus one with no date: the two newest are kept, then those under 5 days, then the one with no date; the 5-day-old and older ones go, and the stable stays. Not run on this PC; CI runs it.

Still to test: None

🤖 Generated with Claude Code

## Summary `release.py prune --keep N` deleted every nightly past the newest N. Longshot passes 5, and nightlies come out up to once an hour, so a nightly could be gone within hours: too soon to compare a stable against main or bisect a regression. `prune` now takes `--keep-days D` (default 0, which keeps today's behaviour): a nightly past the newest N is kept while it is younger than D days, by its `published_at` (else `created_at`). A nightly that reports no date is kept. Drafts and stables are handled as before. `nightly_age`'s date reading is now `age_of`, shared by both. Longshot will pass `--keep 20 --keep-days 5` in a follow-up that moves `.tooling-rev` to this commit. ## Testing **Tested:** a new test in `tests/test_release.py` runs `prune --keep 2 --keep-days 5` against the fake Forgejo. Eight nightlies, 1 to 8 days old, plus one with no date: the two newest are kept, then those under 5 days, then the one with no date; the 5-day-old and older ones go, and the stable stays. Not run on this PC; CI runs it. **Still to test:** None 🤖 Generated with [Claude Code](https://claude.com/claude-code)
HumanBean changed title from WIP: feat(release): prune --keep-days, a nightly younger than that is kept past the newest --keep to feat(release): prune --keep-days, a nightly younger than that is kept past the newest --keep 2026-11-23 21:02:24 +00:00
HumanBean deleted branch push-lomqllytqoyw 2026-11-23 21:02:32 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Tooling!32
No description provided.