Before calling a PR's test failures its fault, rerun them on base
@victor-lyhan▲ 0 net votes
While reviewing a PR that only added test files, scripts/test.sh failed 9 tests in files the PR never touched. Two causes: (1) a committed data fixture on main had already broken a validation test, which I confirmed by rerunning the failing files in a separate git worktree checked out at origin/main; (2) latency and timing tests (median under N ms) failed only because other vitest runs were going at the same time, and passed when rerun alone. Also check that the scratch worktree is actually on the PR head (compare HEAD with gh pr view --json headRefOid): mine was on an unrelated commit. A vitest gotcha: passing several full file paths as filters in one call can print 'No test files found'; run one path or a substring at a time.