Skip to content

Statistics and ratings fixes#129

Merged
jmgasper merged 22 commits into
masterfrom
develop
Jun 16, 2026
Merged

Statistics and ratings fixes#129
jmgasper merged 22 commits into
masterfrom
develop

Conversation

@jmgasper

Copy link
Copy Markdown
Contributor

No description provided.

jmgasper added 22 commits June 4, 2026 13:49
What was broken
QA challenge winners could be missing from member profile history and rating updates when review-api had no challengeResult rows for those winners.

Root cause (if identifiable)
The completed-challenge rerate path only discovered Development participants from review-api challengeResult rows. Winner-only QA participants stored in challenge-api ChallengeWinner were never passed into the Development rerating replay, so their history and rating stats were not updated.

What was changed
Merged placement ChallengeWinner rows into the Development participant discovery and rating replay paths while preserving review-api rows when both sources exist. The placement rows now drive the existing placement-score fallback so winner-only members receive profile history, statistics, and max rating updates.

Any added/updated tests
Added unit coverage for rerating winner-only ChallengeWinner placements in the Development rating engine and for StatisticsService including challenge winners when review result rows are absent.
What was broken
Development-track Marathon Match challenges were not routed into the native Marathon Match rating rerate flow, so profile stats could show MM counters and history without updated rating data.

Root cause
StatisticsService only classified Marathon Match rating jobs when the challenge track was DATA_SCIENCE and the type was MARATHON_MATCH. Other rating code already treats MARATHON_MATCH as type-driven because some Challenge API rows carry the Development track.

What was changed
Updated the rating source resolver to classify any MARATHON_MATCH challenge type as the Marathon Match rating source, preserving Development Challenge routing for the Challenge type.

Any added/updated tests
Added a StatisticsService unit test covering a Development-track MARATHON_MATCH challenge and verifying it rerates through the MM job rather than the Development Challenge job.
What was broken
Completed Data Science / Challenge events were skipped by the member stats rerate endpoint, so submitters could receive profile history cards without rating data and the challenge completion hook reported no supported ratings.

Root cause (if identifiable)
The rerate source resolver only recognized Development / Challenge and Data Science / Marathon Match native ratings. The challenge-result rating engine also hardcoded its source and storage dimensions to Development / Challenge.

What was changed
Added Data Science / Challenge as a native rating source and parameterized the challenge-result rating replay so it can store ratings and history under DATA_SCIENCE / Challenge while preserving the existing Development behavior.

Any added/updated tests
Added unit coverage for rerating Data Science Challenge submitters through the completion endpoint and for persisting Data Science Challenge ratings/history in the rating engine.
PM-5221: rate Data Science Challenge history
PM-5222: rerate Development Marathon Matches as MM
What was broken
Profiles that saved open-to-work availability after preferred roles were removed could still be reported as incomplete with the engagement availability prompt.

Root cause
getProfileCompleteness only treated engagement availability as complete when availability was absent or legacy nested preferred roles were present, so current open-to-work records with an availability value and no preferred roles were missed.

What was changed
Added a small engagement-availability completeness helper that accepts an explicit not-open-to-work choice, current availability values, and legacy nested preferred roles. The profile completeness lookup now includes availableForGigs for that decision.

Any added/updated tests
Added a MemberService regression test for open-to-work availability without legacy preferred roles.
PM-5278: Count availability as profile complete
PM-5223: include challenge winners in member rerates
What was broken
Development-track Marathon Match rerates could calculate ratings from review summation placeholder scores even when the completed review result had the correct final score. This could make a first-place 100 score look like a very low or floor rating in member stats.

Root cause
The native Marathon Match rerate flow loaded placement data from challengeResult but did not carry challengeResult.finalScore into the MM score fallback path. When reviewSummation.aggregateScore and submission.finalScore were zero or -1 placeholders, the rerate could order the participant by the placeholder score.

What was changed
The MM rerate engine now joins challengeResult score data for both target history discovery and challenge participant loading. Positive challengeResult.finalScore is used only after positive aggregateScore and positive submission finalScore are unavailable, preserving existing MM aggregate and complete-placement behavior.

Any added/updated tests
Added a Marathon Match engine regression test for a Development-track Marathon Match where the summation score is a placeholder but challengeResult.finalScore is 100.
PM-5222: Use challenge result scores for Dev MM rerates
What was broken
The completion rerate endpoint only added ChallengeWinner placement participants for Development Challenge ratings. A Data Science Challenge winner without a review-api challengeResult row was never passed to the rating replay, so no DATA_SCIENCE / Challenge rating or history row was created for that profile.

Root cause (if identifiable)
The previous PM-5221 fix added Data Science Challenge rating jobs and Data Science rating dimensions, but participant discovery for DATA_SCIENCE_CHALLENGE still returned only challengeResult submitters while DEVELOPMENT_CHALLENGE also appended ChallengeWinner placement ids.

What was changed
Data Science Challenge participant discovery now includes ChallengeWinner placement ids using the existing winner fallback and de-duplication path, matching the Development Challenge behavior.

Any added/updated tests
Added unit coverage for rerating Data Science Challenge winners when challengeResult rows are absent.
PM-5221: include Data Science Challenge winners
What was broken
QA track Challenge completions were not added to member profile history and did not update ratings. The earlier PM-5223 fix added ChallengeWinner rows to the rating replay, but only after the completed challenge had already been accepted as a supported Development or Data Science source.

Root cause (if identifiable)
Quality Assurance Challenge metadata resolves to a QUALITY_ASSURANCE source track, and the rerate dispatcher did not map that track to any supported rating source. The Data Science Challenge replay also only admitted DATA_SCIENCE source challenges, so QA ChallengeWinner placements could not enter the target member timeline.

What was changed
Mapped Quality Assurance Challenge rows to the public DATA_SCIENCE / Challenge rating bucket. Data Science Challenge rerates now replay both DATA_SCIENCE and QUALITY_ASSURANCE source tracks, including ChallengeWinner placements when review-api result rows are missing.

Any added/updated tests
Added Development rating engine coverage for QA ChallengeWinner-only replay into DATA_SCIENCE / Challenge. Added StatisticsService coverage for rerating QA Challenge winners through the completed-challenge submitter rerate endpoint, and updated Data Science rerate expectations for the expanded source track list.
PM-5223: route QA challenges into Data Science ratings
@jmgasper jmgasper merged commit 0dc84fb into master Jun 16, 2026
6 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.

1 participant