Skip to content

fix(release): map changelog runs to squash-merge commits in the evidence check - #6373

Merged
leaanthony merged 1 commit into
masterfrom
ci/changelog-evidence-squash
Oct 26, 2026
Merged

leaanthony merged 1 commit into
masterfrom
ci/changelog-evidence-squash

Conversation

@taliesin-ai

@taliesin-ai taliesin-ai commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Merge before 15:00 UTC today, or the first scheduled nightly will fail.

Found in the weekly dry run (run 40401196251). It failed at "Verify changelog workflow evidence":

RuntimeError: Cannot determine whether changelog run commit 6a0733f… is in this release

Cause

Fix (v3/scripts/check-changelog-runs.py)

  • Only unsuccessful runs are looked up. A successful run never blocks. That alone fixes this failure, since ci(release): look past auto-changelog commits in the green-commit check #6372's run succeeded.
  • Squash merges are handled. A run counts as part of the release when its commit, or the merge commit of the merged PR headed at it (via commits/{sha}/pulls), is an ancestor of the release snapshot. That's what the check was meant to verify.
  • Still fails closed for an unknown commit with no merged PR.

Tested

  • Unit tests: 8 pass, 6 of them new. They cover a deleted-branch PR merged into the snapshot, a PR merged after the snapshot, a commit outside the snapshot, failing closed, and no lookup for successful runs.
  • The real check against live changelog runs passes at both the weekly snapshot 6a740e59c and master. 6a0733f3a resolves to ci(release): look past auto-changelog commits in the green-commit check #6372's merge commit d2ac69f24.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved release changelog checks so runs are matched more reliably to the release snapshot, including changes brought in through merged pull requests. Missing or unrelated commits are handled more accurately.

…nce check

Auto Changelog runs on pull_request_target, so each run's head_sha is the
PR branch head. PRs are squash-merged and their branches auto-deleted, so
that commit is neither in master's history nor fetchable, and
check-changelog-runs.py failed closed ("Cannot determine whether changelog
run commit ... is in this release"). Any release containing a merged PR
with a deleted branch was blocked, including the scheduled nightly.

- Only unsuccessful runs are looked up; a successful run never blocks.
- A run's commit counts as included when it, or the merge commit of the
  merged PR headed at it, is an ancestor of the release snapshot.
- An unknown commit with no merged PR still fails closed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Caution

Review failed

The pull request is closed.

Walkthrough

The script filters successful and skipped runs before checking snapshot membership. It recognizes commits through ancestry or an associated merged PR commit. Unknown commits without a matching merged PR raise an error.

Changes

Changelog snapshot matching

Layer / File(s) Summary
Filter runs by conclusion
v3/scripts/check-changelog-runs.py, v3/scripts/test_check_changelog_runs.py
Successful and skipped runs are filtered before snapshot checks. A test verifies that successful runs do not trigger ancestry lookup.
Resolve snapshot commits
v3/scripts/check-changelog-runs.py, v3/scripts/test_check_changelog_runs.py
Commit matching checks ancestry and associated merged PR merge commits. Git ancestry errors return an unknown result. Tests cover snapshot membership, later merges, and unknown commits without a merged PR.

Priority: Not assessed

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

Change: Bug fix

Suggested labels: Bug, v3

Suggested reviewers: leaanthony

Merge Risk: Moderate · up to 75dd4

The release check can pass when a failed changelog run's merge commit can't be resolved locally, so it can let an incomplete release through. Treat unknown merge-commit ancestry as an error before merging. Also add a timeout to the new GitHub lookup so a stalled call doesn't hang the release job.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

A rabbit checks each changelog run,
And skips the ones whose work is done.
Through commit trails and merged PRs,
It finds the snapshot where it stirs.
Unknown paths raise a clear alert,
Then hops away with checks kept curt.

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

@leaanthony
leaanthony merged commit de994ba into master Oct 26, 2026
42 of 46 checks passed
@leaanthony
leaanthony deleted the ci/changelog-evidence-squash branch October 26, 2026 21:10
leaanthony pushed a commit that referenced this pull request Oct 26, 2026
…ngelog runs to squash-merge commits in the evidence check
leaanthony pushed a commit that referenced this pull request Oct 26, 2026
)

The weekly checks out the newest green commit before releasing, and every
later step then ran the release checks from that commit. CI-only PRs never
become "green" (the v3 test workflow does not run on them), so the snapshot
can predate fixes to the checks: the weekly dry run after #6373 still ran
the old evidence script and failed on a deleted PR branch.

Copy master's check-changelog-runs.py and its tests before the snapshot
checkout and run that copy. The release gate and green-commit selection
already run before the checkout; the release script still runs on the
snapshot, which its tag-only mode needs.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

2 participants