028 — tp release on a released story branch stops in Gather (#166)

Status: in progress

Why

A rerun of tp release on a story branch whose release has already finished (merged into release, release merged into main, tagged, release deleted by the forge) ran the checks, pushed the branch, and tried to open its pull request into release. It ended on the forge's raw 400 (target_branch does not exist), which reads like a misconfigured remote. The push recreated a branch the forge had deleted. Seen on lighthouse v0.11.2 with task-plus v0.41.0.

Gather already knows enough: after the fetch the branch's tip is an ancestor of the remote base branch.

What changes

  • tp release on a story branch already merged into the base stops before the checks: it names the release the story went out in and the tidy-up (git switch main && git branch -d story/<n>-<slug>). Merged but not yet tagged, it points at the tag run on the base branch.
  • tp release query on such a branch reports the same next step.

Acceptance

Story tip vs remote base Tag containing it tp release tp release query next step
ancestor v0.2.0 stops in Gather; no checks, push or pull request; "released in v0.2.0", tidy-up agent: story/46-s was released in v0.2.0: git switch main && git branch -d story/46-s
ancestor none stops in Gather; "in main, not yet tagged: tp release on main" human: on main: tp release (story/46-s is merged into it, untagged)
not an ancestor — as before as before

Out of scope

  • Deleting the local branch for the user (#162 covers the tag run).
  • Waiting for the forge to register a push before opening the pull request (source_branch does not exist).

Decisions

none

Done when

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