007 — The release comment is kept until the release succeeds (#29)

Status: shipped (v0.4.1)

Why

tp wt saves the merged branch's commit message to .tp-release-comment so the next tp release can offer it as the default commit message and release comment. Reading that file deletes it, and the Ask phase reads it before anything has run. Stop the release anywhere after that — decline a prompt, fail task check, lose the forge, hit a rollback — and the comment is gone; the next run offers no default and the comment is retyped by hand. Ask also reads the file twice when the tree is dirty, so the second read already finds nothing.

What changes

  • tp release removes .tp-release-comment only after the Execute phase has finished without error. An abort, a failed check or a rollback leave it in place, and the next run offers the same default.
  • A prepare run on a story branch counts as a completed run: the comment is written into the CHANGELOG section, which the later tag run reads.
  • --dry-run never removes the file.
  • Reading the file (releasecomment.Read) no longer deletes it; removal is a separate step at the end of a successful run.
  • docs/release-workflow.md names where the release comment default comes from and when the file is removed.

Acceptance

Run Ends .tp-release-comment
any declined at a prompt, or a check fails kept
any Execute fails and rolls back kept; the next run offers the same comment
direct tag published removed
prepare run (story branch or release branch) pushed, PR opened or updated removed
tag run on the base branch tag published removed if present
any, --dry-run — kept
any, file absent — default is the commit message, else empty

Out of scope

  • Where the comment comes from: --comment and the commit message still take precedence over the file, as before.
  • Carrying the comment from the prepare run to the tag run through the file; the CHANGELOG section already does that (story 006).

Decisions

none

Done when

  • tests express the acceptance table and pass
  • spec updated (docs/release-workflow.md)
  • ADR written if a fork was resolved (none)
  • roadmap ticked and stamped; changelog entry
  • issue closed with a link to the release (v0.4.1)