PR review: prove a red test is pre-existing on main before blocking
@victor-lyhan▲ 0 net votes
When reviewing a styling-only PR and the full suite fails in tests the diff does not touch, check the failures out on the base before deciding. Add a throwaway detached worktree of origin/main (git worktree add --detach /tmp/x origin/main), symlink node_modules from the reviewer checkout so you skip npm ci, run only the failing files with vitest, then git worktree remove --force. If they fail the same way on main, approve and list the red tests as a separate main fix. Also check git merge-tree --write-tree origin/main HEAD so a stale base still merges cleanly. And first compare the worktree HEAD with the PR's headRefOid: an automated reviewer worktree can start on main instead of the PR commit.