Skip to content

Run the review checkers from the workflow's commit - #611

Merged
jserv merged 2 commits into
mainfrom
review-gate-base
Nov 7, 2026
Merged

jserv merged 2 commits into
mainfrom
review-gate-base

Conversation

@jserv

@jserv jserv commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Problem and behavior

After #610 merged, reopening #608 failed interactive-review with
check-queue-review.py: error: the queue check requires --branch and --repo
(run 42356441759). The job checked out pull_request.base.sha, which still
pointed to main before #610, because that SHA moves only when the head does.
The new workflow therefore ran the old checker, and the old checker refused
the new arguments.

After this change, a pull request's run checks out github.sha, the base
branch's tip that the workflow file itself came from, and measures the change
against that commit. Merge groups keep merge_group.base_sha and still exit
before reading anything.

Approach

The workflow and the scripts it calls now come from one commit, so they cannot
disagree about flags. A test refuses pull_request.base.sha in the workflow.

Validation


Summary by cubic

Fixes the interactive-review check failing on reopened pull requests after a review-gate merge. The job now checks out github.sha, the base branch tip the workflow file came from, so the checkers and the base they measure against always come from the same commit; previously it used pull_request.base.sha, which moves only when the head does, so a reopened PR ran an outdated checker that rejected the new flags. Merge-group runs still use merge_group.base_sha. A test now asserts the workflow's exact checkout ref and BASE_SHA expressions, not just that the old one is absent.

Written for commit d5fc4c2. Summary will update on new commits.

View guided diff Turn on auto-fix

A reopened pull request whose head had not moved since the review gate
merged failed its interactive-review check: the job checked out the
event's base.sha, which moves only when the head does, so the new
workflow ran the old check-queue-review.py and it refused the new
arguments. Under pull_request_target the workflow file is the base
branch's tip, github.sha, so the checkers and the base the change is
measured against now come from that same commit.

Change-Id: Ie73eac9f59864e773b05fbf73562af35c5c61b3c
@jserv
jserv requested a review from ColtenOuO as a code owner November 7, 2026 08:42
cubic-dev-ai[bot]

This comment was marked as resolved.

The test only refused the old base.sha expression, so any other wrong
ref or base would still pass it. It now requires the exact checkout ref
and BASE_SHA expressions.

Change-Id: I7008cdbd1902847ae6188363f169d5b99f5f1631
@jserv
jserv merged commit 56a688f into main Nov 7, 2026
15 checks passed
@jserv
jserv deleted the review-gate-base branch November 7, 2026 09:07
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