Selects the canonical branch from candidates: filters to eligible branches and returns the maximum under compareBranchScores. On a full tie the later candidate wins (matching Rust max_by). Returns undefined if none eligible.
max_by
Selects the canonical branch from candidates: filters to eligible branches and returns the maximum under compareBranchScores. On a full tie the later candidate wins (matching Rust
max_by). Returns undefined if none eligible.