release: report shipped-and-prunable branches after a successful release; --prune as the explicit opt-in #221

Closed
opened 2026-07-17 16:49:45 +00:00 by hexajon · 0 comments
hexajon commented 2026-07-17 16:49:45 +00:00 (Migrated from codeberg.org)

After a successful release, every branch whose content just shipped is provably done - but release.sh says nothing, and merged branches accumulate until someone runs prune by hand.

Decided shape (report, don't act - the same consent principle as the install consent flags):

  • At the end of a successful (non-dry-run) release, the script computes the would-delete set with the same machinery prune's dry run uses and prints one line: "N merged branch(es) now shipped; clean them with: madtea prune --delete-branches --remote". Zero branches prints nothing. Failure or resume paths print nothing.
  • An explicit --prune flag runs that cleanup (local + remote, i.e. prune --delete-branches --remote) as the final step, only after the release fully succeeded. No flag, no mutation - the script's contract stays "publish artifacts".
  • Explicitly rejected: pruning by default. The script runs in varied contexts (CI, resumes, unfamiliar checkouts) and must not mutate the branch list as a side effect of publishing; prune's content-verification makes auto-cleanup safe but not unsurprising.

Acceptance criteria:

  • Successful release with merged branches present: report line with the correct count and the exact command. With --prune: branches cleaned after publish, actions narrated.
  • Dry run, failed release, and resume: no report line, no mutation, --prune ignored with a note on non-success paths.
  • Count agrees with madtea prune dry-run output on the same repo state (test via a fixture repo or by factoring the count out of the prune service).
  • docs/contributing/releasing.md notes the report line and the flag.
After a successful release, every branch whose content just shipped is provably done - but release.sh says nothing, and merged branches accumulate until someone runs prune by hand. Decided shape (report, don't act - the same consent principle as the install consent flags): - At the end of a successful (non-dry-run) release, the script computes the would-delete set with the same machinery prune's dry run uses and prints one line: "N merged branch(es) now shipped; clean them with: madtea prune --delete-branches --remote". Zero branches prints nothing. Failure or resume paths print nothing. - An explicit --prune flag runs that cleanup (local + remote, i.e. prune --delete-branches --remote) as the final step, only after the release fully succeeded. No flag, no mutation - the script's contract stays "publish artifacts". - Explicitly rejected: pruning by default. The script runs in varied contexts (CI, resumes, unfamiliar checkouts) and must not mutate the branch list as a side effect of publishing; prune's content-verification makes auto-cleanup safe but not unsurprising. Acceptance criteria: - Successful release with merged branches present: report line with the correct count and the exact command. With --prune: branches cleaned after publish, actions narrated. - Dry run, failed release, and resume: no report line, no mutation, --prune ignored with a note on non-success paths. - Count agrees with `madtea prune` dry-run output on the same repo state (test via a fixture repo or by factoring the count out of the prune service). - docs/contributing/releasing.md notes the report line and the flag.
Sign in to join this conversation.
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
sixfold-space/madtea#221
No description provided.