Repository navigation
fix(ci): diff the PR head in the SDK freeze checks - #5951
Merged
Merged
Conversation
The Python and TypeScript SDK freeze checks ran `git diff BASE_SHA...HEAD`, where HEAD is the merge commit that actions/checkout creates for a pull_request event. The recorded pull_request.base.sha does not move when main advances, so on a long-lived PR the diff included every change main made after that base, and the checks failed PRs that never touched the SDKs. Diff against pull_request.head.sha instead. The merge-base of the recorded base and the PR head is the PR's real fork point, so only the PR's own changes are checked. Signed-off-by: Vishwanath Raman <vishwanathr@nvidia.com>
pimlock
approved these changes
Nov 24, 2026
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
The Python and TypeScript SDK freeze checks fail PRs that never touch the SDKs when the PR's recorded base is older than main. Diff against the PR head rather than the checked-out merge commit so only the PR's own changes are checked.
Related Issue
No issue: this fixes a broken check, under the write-access exception in CONTRIBUTING.md.
Python SDK Freeze fails on #4564, which changes only
rfc/0020-cedar-policy-engine/README.md. The job rangit diff BASE_SHA...HEAD.BASE_SHAispull_request.base.sha, recorded for #4564 asfa2d381ea(Oct 27), and it does not move when main advances.HEADis the merge commitactions/checkoutbuilds against today's main. Their merge-base isfa2d381ea, so the diff covered every change main made since then, and the job reported 7 Python files changed on main by other PRs (failed run).Changes
pull_request.head.shaasHEAD_SHAand diffBASE_SHA...HEAD_SHA. The merge-base of the recorded base and the PR head is the PR's fork point, so the diff holds only the PR's changes.fetch-depth: 0already fetches the head commit as a parent of the merge commit.BASE_SHA...HEADpattern, but it also servesmerge_groupevents, and a false positive there only runs the mixin job. That can follow separately if wanted.Testing
Ran both checks' exact
git diffcommands locally on real commits:BASE_SHA...merge commit)BASE_SHA...HEAD_SHA)python/openshell/sandbox.py(00222c281)sdk/typescript/src(90e34ad10)HEAD_SHAenvChecklist