Repository navigation
fix(comment-release-fixes): skip release tags with no common ancestor - #12
Merged
Merged
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing: 2
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. Comment |
This was referenced Oct 20, 2026
Merged
jdx
added a commit
to jdx/hk
that referenced
this pull request
Oct 20, 2026
…eases (#1744) The `comment release fixes` job failed for v2.8.0 (run 39480695287) with `cannot safely establish release ancestry`: the `v0.1.x` tags sit on a history that was never merged into main, so comparing against them returns `No common ancestor`. The shared workflow now skips those tags (jdx/workflows#12, released as v1.1.1) and picks the nearest real earlier release. This bumps hk's pin to v1.1.1 so the next release posts its "fixed in" comments. The missed v2.8.0 comments are backfilled separately by running the workflow manually for that tag. 🤖 Generated with [Claude Code](https://claude.com/claude-code) *AI-assisted — Tool: Claude Code; model: anthropic/claude-sonnet-5-5; version: unavailable.* <!-- CURSOR_SUMMARY --> --- > [!NOTE] > <sup>[Cursor Bugbot](https://cursor.com/bugbot) is generating a summary for commit 11253f0. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
jdx
added a commit
that referenced
this pull request
Oct 20, 2026
The reusable workflow checks out its script at an immutable SHA, so v1.1.1 still ran the pre-#12 script. Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
The release-fix comment job aborts for repos whose release list includes tags from a disjoint history. For hk's v2.8.0 it compared against v0.1.9 … v0.1.1, got `No common ancestor` (HTTP 404) for each, and failed with `cannot safely establish release ancestry` before ever considering v2.7.1 or v2.7.0 (run 39480695287).
A tag with no common ancestor cannot be an earlier release contained in the target, so `base_release` now skips it. Every other comparison error (other 404s, 5xx, etc.) still fails closed, and the closest contained release is still chosen as the base, so the range never widens past a verified ancestor.
Added a test where an older tag has no common ancestor and the base resolves to the nearest real ancestor; the existing fail-closed test still passes (17 tests OK).
Once released, hk needs its `comment-release-fixes.yml` pin bumped, and the v2.8.0 comments can be backfilled via `workflow_dispatch`.
🤖 Generated with Claude Code
AI-assisted — Tool: Claude Code; model: anthropic/claude-sonnet-5-5; version: unavailable.
Note
Low Risk
Narrow change to release ancestry resolution in an automation script; skips known-benign 404s while preserving fail-closed behavior for other API errors.
Overview
Fixes release-fix comment jobs that abort when the published release list includes tags from disjoint git history (e.g. after a repo rewrite). GitHub’s compare API returns HTTP 404 with “No common ancestor”; those failures were treated as fatal and blocked picking a real base tag.
base_releasenow ignores compare errors that are 404 with “No common ancestor”, since such tags cannot be ancestors of the target release. All other compare failures still fail closed withcannot safely establish release ancestry. Ancestor selection (closest contained release, alias handling) is unchanged.Adds
test_tags_with_no_common_ancestor_are_skippedso a skippablev0.1still resolves the base tov1forv2.Reviewed by Cursor Bugbot for commit 6410853. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit