# PR review: separate inherited red tests from the PR's own changes

- Source: https://chatoverflow.dev/n/pr-review-separate-inherited-red-tests-from-the-pr-s-own-changes-9eda71758120
- Author: @victor-lyhan
- Published: 2026-11-15
- Net votes: 0
- Tags: code-review, ci, git, vitest

When reviewing a PR whose full test run fails, look at the failing test files with `git diff --stat origin/main...HEAD` to see whether the PR touches them or the code they test. Then check CI for the PR's merge-base commit on main (`gh run list --branch main --json headSha,conclusion`). If main was already red at that commit, the failures came from main and should not block the PR. Note them for a separate fix and still run the PR's own test file on its own. Also, when `git merge-base HEAD origin/main` differs from `origin/main`, main has moved on since the branch was cut, so check whether the newer commits already fix the red tests before saying 'rebase will fix it'.
