Skip to content

MM leaderboard - provisional data fix - #135

Merged
vas3a merged 1 commit into
developfrom
mm-leaderboard-provisional-data
Aug 14, 2026
Merged

MM leaderboard - provisional data fix#135
vas3a merged 1 commit into
developfrom
mm-leaderboard-provisional-data

Conversation

@vas3a

@vas3a vas3a commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

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:

  • Added a scan_review_types CTE 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]
  • Enhanced score calculation logic to distinguish between final and provisional scores, pin small non-zero scores to 0.01, and use more precise rules for ranking and score display.
  • Included additional member fields (name, country, country code, photo URL, rating, rating color) and submission metadata (submission ID, submitted/updated dates) in the SQL output. [1] [2]

TypeScript data structure and processing updates:

  • Expanded LeaderboardMmRow and introduced LeaderboardMmEntry and LeaderboardMmMemberInfo types to match frontend expectations, including all new member and submission fields.
  • Refactored leaderboard data processing to populate the new types and parse numeric fields correctly, and to extract detailed member info from the SQL results (including rating, country, and photo URL).

These improvements ensure the leaderboard is more accurate, displays richer member information, and is easier to maintain and extend in the future.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.sql to exclude scan-based review types, refine provisional/final score selection, and add richer member/submission fields.
  • Refactored getLeaderboardMm processing to emit a frontend-aligned entry shape with optional score fields and enriched membersDetails.

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.

Comment thread sql/reports/topcoder/leaderboard-mm.sql
@vas3a
vas3a merged commit 5341817 into develop Aug 14, 2026
7 checks passed
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