Skip to content

Document recovery when the default branch advances mid-release - #92

Merged
dblock merged 1 commit into
dblock/optional-changelog-placeholderfrom
dblock/document-advanced-branch-recovery
Nov 21, 2026
Merged

dblock merged 1 commit into
dblock/optional-changelog-placeholderfrom
dblock/document-advanced-branch-recovery

Conversation

@dblock

@dblock dblock commented Nov 21, 2026 •

Copy link
Copy Markdown
Owner

Stacked on #91.

Summary

Addresses the "document recovery for post-publication failures" item from the review of ruby-grape/grape-swagger#1017. Documentation only.

The tag step fails before publication if the default branch moved since capture, but a merge after that check and before the release push leaves the gem published while the push fails with Default branch advanced; start a new release. A rerun cannot recover, because each run creates a new release commit and tagging requires the branch to still be at the source commit.

  • Add "Default Branch Advanced During Publication" to the workflow reference's Recovery Artifacts section in docs/actions/release.md, the user guide for projects using the workflow: why it happens, why a rerun does not help, and manual recovery from the preserved artifacts.
    • Download the run's artifacts and compare release.json's SHA-256 with the digest RubyGems reports.
    • Import the tag from release.bundle and push it.
    • Merge the release commit through a pull request.
    • Create the GitHub Release with the archive under its gem file name.
    • Start the next development iteration in a pull request.
    • Do not dispatch the same version again.
  • Warn against merging during a release in README's Make a Release step and the composite action's Release and Recovery section, and point to the recovery from RELEASING.md's Verify and Recover section.

Validation

  • RuboCop documentation checks (prose, Markdown, spelling) pass.
  • Tested the bundle commands on a scratch repository: a bundle created as the workflow does (HEAD plus refs/tags/vVERSION) imports the tag at the release commit, and a branch created from it has the source commit as parent.
  • Confirmed in source that normal releases attach the archive under Gem::Package#spec.file_name and that release.json stores sha256.

Authored by an AI (Claude) acting on behalf of @dblock.

🤖 Generated with Claude Code

https://claude.ai/code/session_011Gr21hZDQo5axDMuFgzL6s

@dblock
dblock force-pushed the dblock/document-advanced-branch-recovery branch from acb9f88 to b8fbd31 Compare November 21, 2026 04:23
A merge after the tag check and before the release push leaves the gem
published while the push fails, and reruns cannot recover. Document the
manual recovery from the preserved artifacts in the workflow reference:
verify the published digest, push the tag from the bundle, merge the
release commit through a pull request, create the GitHub Release, and
start the next iteration. Warn against merging while a release runs, and
point to it from RELEASING.md, README, and the composite action docs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011Gr21hZDQo5axDMuFgzL6s
@dblock
dblock force-pushed the dblock/document-advanced-branch-recovery branch from b8fbd31 to 2b6bca8 Compare November 21, 2026 04:24
@dblock
dblock changed the base branch from master to dblock/optional-changelog-placeholder November 21, 2026 04:24
@dblock
dblock added this pull request to stack #94 November 21, 2026 04:24
@dblock
dblock merged commit 009e119 into master Nov 21, 2026
13 checks passed
@dblock
dblock deleted the dblock/document-advanced-branch-recovery branch November 21, 2026 04:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant