Repository navigation
Release script resumes an interrupted release - #168
Merged
Merged
Conversation
Run again with the same version, the release script looks for the newest PR from release-<version> and the branch on origin: it opens the PR for a pushed branch, waits on and merges an open PR, or tags a merged one. A v<version> tag already on origin at the merge of the bump PR is reported and the script exits 0; a tag anywhere else is refused, as is a bump PR closed without merging. The fake gh's pr list takes --head and reports headRefOid. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A resumed release now tags the merge commit GitHub reports for the bump PR rather than looking for it on main, and the helpers that end the run or read an earlier one are named for it. The fake gh reports a PR's mergeCommit and reads headRefOid in one place. The resume tests share the fixture's one impl block and assert on origin and PRs only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in #167's agent-written release summary. The PR body is now built in open_pr from the bump commit's sha rather than HEAD, since the script no longer runs inside the worktree, so version_diff takes <base> <head>. The fake gh's pr view keeps both --jq support and headRefOid through pr_fields. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30T03:08:01Z, host tracewake. Uncommitted work at the time of failure is included in this commit.
JacobStephens2
marked this pull request as draft
September 30, 2026 03:08
Resume keeps main's refusals and --review: a fresh run is checked and reviewed before its branch is pushed, a pushed branch with no PR has its summary reviewed before the PR opens, and with no earlier run an existing tag is refused by check_can_release as on main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
stop_if_tagged, as it exits 0 or refuses, and the docs say a tag elsewhere on origin is refused. A test covers a tag while the PR is open. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
JacobStephens2
marked this pull request as ready for review
September 30, 2026 12:21
This was referenced Sep 30, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Running
scripts/release.sh [--review] <version>again carries on from the first step not yet done. It keeps main's refusals (#157) and--reviewfor a fresh run.On a resume,
check_can_releaseis skipped because the first run already passed it, and after the merge the version is no longer higher than main's. With no earlier run, an existing tag is still refused bycheck_can_release, in main's order and wording.The fake
gh'spr listnow takes--head(exact match) and reportsheadRefOidandmergeCommit. The README's Releasing section gains a paragraph on resuming.Closes #158
Evidence
After:
cargo test --test releasepasses 35 of 35, main's refusal and review tests included. The fullcargo testpasses, andcargo clippy --all-targetsandshellcheck scripts/release.share clean.Merge Danger
Door: two-way
Only the maintainer's release script, its test fakes and the README change. Nothing ships in the binary.
Blast Radius: release-tooling
A wrong resume decision could tag the wrong commit. The tag is only ever pushed onto the merge commit of the
release-<version>PR, and an existing tag anywhere else on origin is refused.Unaddressed findings
Standards
pr_state,url,head,merge,summary,diff), which is a Data Clump and gives the steps a hidden order. This matches how the script already sharesversion/tag/branch, and bash has no clean way to return several values.release.shis outside the factory's domain, and those are the plain words for what it does.release.shand the fake (PR_LINE_OF_NEWEST). This follows the fake's existingWORKFLOW_RUN_LINESpattern. The fake fails loudly on any other--jq, so the two can't drift silently.push_bump/open_bump_pr/merge_bump_prsetup. Each test spells out the interrupted state it sets up. A combined helper would hide which steps the earlier run got through.format!("release-{version}")is built in three test helpers. It's a small, fixed naming rule. A helper for it would save little.Spec
v<version>tag. The script pushes the tag from the merge commit's SHA, never from a local tag, so a local tag can't change what gets tagged. The docs now say "elsewhere on origin".--reviewis asked about again. The PR needs a summary, and the first run's summary was never saved anywhere.🤖 Generated with Claude Code