MM leaderboard - provisional data fix - #135
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the Topcoder Marathon Match leaderboard pipeline (SQL + service shaping) to better distinguish provisional vs final results, exclude automated scan reviews from scoring, and enrich the returned member/submission data to match frontend expectations.
Changes:
- Updated
leaderboard-mm.sqlto exclude scan-based review types, refine provisional/final score selection, and add richer member/submission fields. - Refactored
getLeaderboardMmprocessing to emit a frontend-aligned entry shape with optional score fields and enrichedmembersDetails.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/reports/topcoder/topcoder-reports.service.ts | Updates MM leaderboard row/entry/member types and reshapes query results into frontend-aligned structures. |
| sql/reports/topcoder/leaderboard-mm.sql | Refines MM leaderboard scoring/ranking logic and expands output fields (member + submission metadata). |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request significantly enhances the Topcoder leaderboard SQL and service logic to provide richer member and submission data, improve score accuracy, and align the backend data shape with frontend requirements. The changes include new SQL logic for filtering out automated review types, more precise score calculations, and expanded member information. The TypeScript service now mirrors the frontend's expected data structures and populates detailed member info.
Leaderboard SQL improvements:
scan_review_typesCTE to exclude automated review types (e.g., AV scan, SonarQube review, Virus scan) from contributing to leaderboard scores, ensuring only relevant reviews are considered. [1] [2]TypeScript data structure and processing updates:
LeaderboardMmRowand introducedLeaderboardMmEntryandLeaderboardMmMemberInfotypes to match frontend expectations, including all new member and submission fields.These improvements ensure the leaderboard is more accurate, displays richer member information, and is easier to maintain and extend in the future.