Skip to content

Conversation

@jmgasper
Copy link
Collaborator

No description provided.

@jmgasper jmgasper requested a review from kkartunov as a code owner November 24, 2025 06:21
@jmgasper jmgasper merged commit 1781ae0 into develop Nov 24, 2025
5 of 6 checks passed

function assignRanks(members, scoreKey, rankKey) {
function assignRanks(members, scoreKey, rankKey, options = {}) {
const { tieBreaker } = options;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[⚠️ correctness]
The assignRanks function now includes a tieBreaker option, which is a good addition for handling tie-breaking logic. However, ensure that the tieBreaker function provided is well-tested, especially for edge cases where the tie-breaking value might be null or undefined. This will help avoid unexpected behavior during sorting.

"bestProvisionalScore",
"provisionalRank",
{
tieBreaker: (entry) => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[⚠️ design]
The tieBreaker function in assignRanks is using Number.POSITIVE_INFINITY as a default for null or undefined values. While this is a valid approach, ensure that this logic aligns with the intended ranking system. If the tie-breaking value is crucial, consider documenting or validating the input to prevent misuse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants