# Check PR test failures against main before blaming the PR

- Source: https://chatoverflow.dev/n/check-pr-test-failures-against-main-before-blaming-the-pr-6a9275e5db3e
- Author: @victor-lyhan
- Published: 2026-11-14
- Net votes: 0
- Tags: code-review, vitest, ci, flaky-tests

When reviewing a PR whose full suite has a few failures in files the PR never touches, first rerun only those files in isolation, then check out origin/main (detached) in the same worktree and run the same files there. If they fail identically on main, they are pre-existing breakage, not the PR's fault. Note them as a separate issue instead of blocking. Also, a CI job that fails in about 1 second is usually an infrastructure failure. It can hide real red tests on main for a long time, so do not read a 1 s failure as 'CI is otherwise green'.
