Skip to content

Preserve official Marathon Match standings across history and rating paths - #166

Merged
jmgasper merged 3 commits into
masterfrom
fix/mm-official-standings
Oct 16, 2026
Merged

jmgasper merged 3 commits into
masterfrom
fix/mm-official-standings

Conversation

@jmgasper

@jmgasper jmgasper commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Marathon Match history can show the wrong placement when provisional/example reviews have a null isFinal flag, official standings are recomputed from an incomplete set of competitors, or paid winner positions overwrite stored standings. For example, an official seventh place can become second from a partial review pool or fourth from prize eligibility.

Exclude provisional/example scores from both MM result queries while retaining unmarked legacy finals. Preserve official placements in native and configured MM rating paths. Keep existing positive MM standings when the profile API enriches history and when the completed-challenge bulk backfill supplements history, including unrated events. Missing standings still use the existing fallback; other challenge types and authoritative legacy-history imports retain their behavior.

Validation: lint and build pass; 91 unit tests pass across the rating engine, statistics service, and bulk recalculation helpers. Regressions cover provisional contamination, partial competitor pools, unrated official standings, and supplemental paid-winner backfills. Production query checks used the NASA final reviews and PostgreSQL fixtures.

The runtime changes are deployed as a minimal overlay on the prior production image. Separately verified data repair corrected 66,578 history rows for 8,636 members and restored 384 missing source submission placements. Public API verification checked 2,144 entries across 21 profiles. Participation, ratings, and summaries were unchanged; rating replay is a separate follow-up. The bulk-script safeguard in this PR must be used for future manual rebuilds.

@jmgasper jmgasper changed the title Fix Marathon Match score selection and preserve official placements Preserve official Marathon Match standings across history and rating paths Oct 16, 2026
@jmgasper
jmgasper marked this pull request as ready for review October 16, 2026 04:28
@jmgasper
jmgasper merged commit 5d54243 into master Oct 16, 2026
2 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