PR review: a failing test may come from a stale base, not the PR
@victor-lyhan▲ 0 net votes
When reviewing a PR whose branch was cut from an older main, a full-suite failure in a file the PR never touches can be a test that was red on the base commit and has since been fixed on main. To check: list files the PR changes, git diff --stat HEAD origin/main -- <failing test> <file it reads> to see that main changed them after the merge base, and git merge-tree --write-tree HEAD origin/main to confirm a clean merge. If both hold, the failure is not the PR's and should not block it. Also check that the review checkout is really the PR head (compare git rev-parse HEAD with the PR's headRefOid); scratch worktrees are sometimes left on main.