Skip to content

docs(release): write down the orphaned-anchor recovery - #282

Merged
sunib merged 2 commits into
mainfrom
docs-release-orphaned-anchor-runbook
Jul 28, 2026
Merged

docs(release): write down the orphaned-anchor recovery#282
sunib merged 2 commits into
mainfrom
docs-release-orphaned-anchor-runbook

Conversation

@sunib

@sunib sunib commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Twice now a release has produced a PR containing the entire repository history, and both times the recovery was rediscovered from scratch. This writes it into the Troubleshooting section of .github/RELEASES.md, keyed to the log line that identifies the case:

✔ No latest release found for path: ., component: , but a previous version (0.40.0)
  was specified in the manifest.

The mechanism

release-please-config.json sets draft: true, which the publish jobs require so they can attach assets before immutable releases freeze the release. A publish job that fails therefore strands the release as a draft, and a draft is invisible to release-please twice over: it is skipped in the release search, and it creates no tag. .release-please-manifest.json still names the version, so the next run holds a version it cannot anchor and falls back to collecting every commit in the repository.

That is what produced PR #280 (0.41.0, re-announcing the already-shipped breaking analyzer change) after the 0.40.0 publish failed on the dash/bash bug fixed in #279.

What the entry gives the reader

  • The symptom and the exact log line, so it is matched rather than derived.
  • A "do not merge that PR" warning: merging burns a version on already-released work.
  • The tag-push recovery, with the note that a bare lightweight tag suffices because release-please falls back to tags when no published release anchors the version.
  • How to resolve the stranded draft, and why deleting is usually right: publishing freezes a release whose own notes link to assets it does not carry.
  • That last-release-sha does not rescue this, because release-please reads it only as a top-level key and this repo's copy is nested under packages["."].

Documentation only, no behaviour change. task lint-docs passes; I also ran Vale directly on the file since it is not in .docs-lint-scope. The two Vale errors it reports are pre-existing em dashes at lines 68 and 73; the added prose has none, and its headings follow the file's existing Title Case rather than introducing a second convention mid-document.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes

    • Improved release publishing reliability so automated scripts consistently support advanced Bash behaviors and error handling.
  • Documentation

    • Added troubleshooting guidance for oversized release pull requests that repeat previously published changes.
    • Documented steps to recover when a draft release prevents the next release from being anchored correctly.
    • Clarified how to preserve release tags while resolving stranded draft releases.

sunib and others added 2 commits July 27, 2026 18:20
The publish-analyzer job declares `container:`, and a container job's
default shell is `sh`, not the `bash` a runner-hosted job gets. Its build
step opens with `set -euo pipefail`, which dash rejects: the 0.40.0
release died on that first line with "Illegal option -o pipefail",
59 seconds in, having compiled nothing.

The job is gated on `release_created`, so it had never once run before
that release — cancelled in the run that added it, skipped in the next.
Its first execution was also its first failure, and it fails every time,
not intermittently.

Declaring the shell for the whole job rather than the one broken step
keeps a later step from silently inheriting dash again. publish-helm is
the other container job and carries the same trap, but it uses no
bash-only syntax, so it stays untouched here.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A failed publish job strands the GitHub Release as a draft, and a draft is
invisible to release-please twice over: it is skipped in the release search
and it creates no tag. The manifest still names the version, so the next run
has a version it cannot anchor and proposes the entire history as one
release. It has now happened twice, and both times the recovery was
rediscovered from scratch rather than looked up.

The fix is a lightweight tag at the release commit, which the troubleshooting
section now spells out alongside the log line that identifies the case, so
the next person matches the symptom instead of deriving it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c2f6fc4b-da0d-49ed-b0b3-2c5f2084be6e

📥 Commits

Reviewing files that changed from the base of the PR and between 8bb4490 and 98b7ad1.

📒 Files selected for processing (2)
  • .github/RELEASES.md
  • .github/workflows/release.yml

📝 Walkthrough

Walkthrough

The release guide adds recovery instructions for oversized Release PRs caused by missing tags, while the publish analyzer job is configured to execute scripts with Bash.

Changes

Release operations

Layer / File(s) Summary
Release PR troubleshooting
.github/RELEASES.md
Documents the missing-tag and draft-release failure mode, lightweight tag recovery, Release Please rerun steps, and stranded draft handling.
Publish analyzer shell configuration
.github/workflows/release.yml
Sets the container-based publish-analyzer job’s default shell to Bash so pipefail and other Bash behavior are available.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the documentation change about orphaned-anchor recovery.
Description check ✅ Passed The description covers the change, rationale, testing, and key notes, with only optional template sections omitted.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs-release-orphaned-anchor-runbook

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sunib
sunib merged commit 63c347e into main Jul 28, 2026
11 of 12 checks passed
@sunib
sunib deleted the docs-release-orphaned-anchor-runbook branch July 28, 2026 05:55
@codecov

codecov Bot commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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