A set is a PR if nothing dominates it.
Callus compares a set with the other counted sets on the same lift. If any one of them has at least as much weight and at least as many reps, the new set is not a PR. If none does, it is.
A counted set is a confirmed set that is not deleted, not a warm-up, not in a deleted session and not in a deload session (a set without a session counts), and is not a zero-rep set unless it is timed. Everything else is left out of the comparison, so a heavy warm-up never stops a working set from being a PR.