Conversation
Tie-breaker fix for CORE-2303
Only look at latest submission
| key: `${member.memberId || member.member || ''}`, | ||
| score: member[scoreKey], | ||
| tieBreaker: tieBreaker ? tieBreaker(member) : null, | ||
| })) |
There was a problem hiding this comment.
[performance]
The tieBreaker function is called for every member, which could be inefficient if the function is computationally expensive. Consider caching the results if the tieBreaker values are reused or if the computation is costly.
| : submissions)[0] || null; | ||
| // Provisional ranks should be based solely on the most recent submission, | ||
| // not the best historical one. | ||
| const bestProvisionalScore = normalizeScoreValue( |
There was a problem hiding this comment.
[❗❗ correctness]
The bestProvisionalScore is now based solely on the most recent submission rather than the best historical one. Ensure this change aligns with the intended business logic, as it could impact the ranking outcome.
| 'bestProvisionalScore', | ||
| 'provisionalRank', | ||
| { | ||
| tieBreaker: (entry) => { |
There was a problem hiding this comment.
[💡 readability]
The tieBreaker function uses Number.POSITIVE_INFINITY for missing timestamps, which might not be intuitive. Consider using a more explicit value or documenting this behavior to avoid confusion.
Potential fix for ` vs. ``` in markdown rendering
| padding: 0 6px; | ||
| margin: 0; | ||
| display: inline; | ||
| white-space: pre-wrap; |
There was a problem hiding this comment.
[correctness]
The change from white-space: pre to white-space: pre-wrap for code elements might affect how whitespace is handled within inline code blocks. Ensure this change is intentional and that it does not negatively impact the display of code snippets, especially if they rely on precise formatting.
No description provided.