Skip to content

PM-4151: suppress incomplete MM final export data#109

Merged
jmgasper merged 1 commit into
developfrom
PM-4151-4
Jun 22, 2026
Merged

PM-4151: suppress incomplete MM final export data#109
jmgasper merged 1 commit into
developfrom
PM-4151-4

Conversation

@jmgasper

Copy link
Copy Markdown
Collaborator

What was broken
Marathon Match submitter exports could show negative failed-run scores, finalScore values while a challenge was still in submission, and a finalRank column before the challenge was completed.

Root cause
The challenge export SQL treated any final score field as exportable regardless of challenge status, used negative review summation scores as normal scores, and always emitted Marathon Match final columns from the formatter.

What was changed
Changed the submitter, valid submitter, and winner SQL to ignore negative Marathon Match scores, only expose finalScore/finalRank data for completed challenges, and avoid falling back to submission.finalScore when a final review row explicitly failed.
Updated the challenge report formatter so Marathon Match finalScore and finalRank columns are only emitted when at least one row has those values.
Updated report descriptions and DTO documentation to match the completed-only final data behavior.

Any added/updated tests
Updated the challenge SQL regression spec for completed-only final scores, negative score filtering, and completed-only final ranks.
Added a service regression test that verifies active Marathon Match exports omit finalScore and finalRank columns when final scoring is unavailable.

Validation
pnpm lint passed.
pnpm test -- --runInBand src/reports/challenges/challenge-export-sql.spec.ts src/reports/challenges/challenges-reports.service.spec.ts passed.
pnpm build passed.
The full pnpm test -- --runInBand suite still fails in unrelated existing SFDC DTO/service specs and report-directory access coverage on the current develop base.

What was broken
Marathon Match submitter exports could show negative failed-run scores, finalScore values while a challenge was still in submission, and a finalRank column before the challenge was completed.

Root cause
The challenge export SQL treated any final score field as exportable regardless of challenge status, used negative review summation scores as normal scores, and always emitted Marathon Match final columns from the formatter.

What was changed
Changed the submitter, valid submitter, and winner SQL to ignore negative Marathon Match scores, only expose finalScore/finalRank data for completed challenges, and avoid falling back to submission.finalScore when a final review row explicitly failed.
Updated the challenge report formatter so Marathon Match finalScore and finalRank columns are only emitted when at least one row has those values.
Updated report descriptions and DTO documentation to match the completed-only final data behavior.

Any added/updated tests
Updated the challenge SQL regression spec for completed-only final scores, negative score filtering, and completed-only final ranks.
Added a service regression test that verifies active Marathon Match exports omit finalScore and finalRank columns when final scoring is unavailable.
@jmgasper jmgasper merged commit c367f65 into develop Jun 22, 2026
5 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