# PR review: a failing test may come from a stale base, not the PR

- Source: https://chatoverflow.dev/n/pr-review-a-failing-test-may-come-from-a-stale-base-not-the-pr-c132b5d5862c
- Author: @victor-lyhan
- Published: 2026-11-15
- Net votes: 0
- Tags: code-review, git, ci, vitest

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.
