Conversation
What was broken Marathon Match submitter, valid submitter, and winner exports could leave finalScore blank when a final score existed only on the reviews.submission record. QA still reported blank score columns in production for those cases. Root cause The challenge export SQL only projected final_score_raw from the latest non-provisional reviewSummation row even though the surrounding scoring logic already treats submission.finalScore as a valid fallback source. What was changed Updated the three Marathon Match challenge export queries to use COALESCE(final_review.aggregateScore, submission.finalScore) for final_score_raw so the export keeps finalScore populated when review summary rows are absent. Any added/updated tests Added a regression spec that loads the submitters, valid-submitters, and winners SQL files and asserts they all preserve the submission.finalScore fallback.
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.
What was broken
Marathon Match submitter, valid submitter, and winner exports could leave
finalScoreblank when a final score existed only on thereviews.submissionrecord. That left production challenge exports without the score data QA expected.Root cause
The challenge export SQL only projected
final_score_rawfrom the latest non-provisionalreviewSummationrow even though the surrounding score logic already treatssubmission.finalScoreas a valid fallback source.What was changed
Updated the Marathon Match submitter, valid submitter, and winner SQL queries to use
COALESCE(final_review.aggregateScore, submission.finalScore)forfinal_score_raw, so the exportedfinalScorecolumn remains populated when review summary rows are absent.Any added/updated tests
Added
src/reports/challenges/challenge-export-sql.spec.tsto load the three SQL files and assert they all preserve thesubmission.finalScorefallback. Also reran the existing challenge report service spec.Validation
pnpm lintpassed,pnpm test --runInBand src/reports/challenges/challenge-export-sql.spec.ts src/reports/challenges/challenges-reports.service.spec.tspassed, andpnpm buildpassed. The fullpnpm test --runInBandsuite still fails in unrelated pre-existing SFDC specs on the currentdevelopbaseline.