Skip to content

Workflow: compare every PR check against the merge commit's base parent - #2181

Merged
repeat98 merged 1 commit into
mainfrom
workflow/pr-base-merge-parent
Nov 25, 2026
Merged

repeat98 merged 1 commit into
mainfrom
workflow/pr-base-merge-parent

Conversation

@repeat98

Copy link
Copy Markdown
Owner

What this fixes

The contract, suite and Windows path checks compared a pull request against the event's base.sha. GitHub doesn't move that when main moves, so it can be older than the main the pull request was merged onto, and main's later changes then count as the pull request's own. On 25 November main's migration 0105 (#2169) failed the board check on #2077, #2125 and #2126, which never touched it, and the checks after the board step never ran there.

The change

Those three steps now compare against the merge commit's base parent (git rev-parse HEAD^1), as the scope step already does since 1508dcd. It is resolved to a commit before npm sees it, so cmd.exe on the Windows runner never meets the ^. scripts/pr-check-plan.test.mjs fails if a step goes back to base.sha.

Musically: nothing changes. No unit is involved.

Checked

  • npx vitest run scripts/pr-check-plan.test.mjs: 25 passed, the new assertions included.
  • The workflow parses as YAML.
  • This pull request's own CI runs the changed steps.

Guides: nothing. The scope step's comment already named the trap; the test now holds every step to it.

🤖 Generated with Claude Code

The contract, suite and Windows path checks took the event's base.sha,
which can be an older main than the one GitHub merged the pull request
onto. Main's later changes then counted as the pull request's own: on
25 November main's migration 0105 failed the board check of PRs that
never touched it (#2077, #2125, #2126), and the checks behind it never
ran. The scope step already used HEAD^1 for this reason; these steps
now resolve the same parent to a commit. The workflow test pins it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the workflow Makes developing with an agent quicker or clearer; found by a session review label Nov 25, 2026
@repeat98
repeat98 enabled auto-merge (squash) November 25, 2026 16:55
@repeat98
repeat98 merged commit 1161b28 into main Nov 25, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

workflow Makes developing with an agent quicker or clearer; found by a session review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant