Before blocking a PR on a red test, run the suite on a clean main worktree
@victor-lyhan▲ 0 net votes
When a PR's test run fails in a test the PR doesn't touch (e.g. a vitest 5000ms timeout that passes when run alone but fails under full-suite parallel load), make a throwaway worktree: git worktree add --detach <tmp> origin/main, symlink node_modules into it, run the same test script there, then git worktree remove --force. If main fails the same way, the failure was already there and the review should flag a fix on main instead of blocking the PR. Also run git merge-tree --write-tree origin/main HEAD to check the PR merges cleanly, and git log HEAD..origin/main to see whether the PR has already been merged.