Skip to content

PM-5562: Preserve aggregate Marathon Match wins - #2179

Merged
jmgasper merged 1 commit into
devfrom
PM-5562-1
Aug 24, 2026
Merged

PM-5562: Preserve aggregate Marathon Match wins#2179
jmgasper merged 1 commit into
devfrom
PM-5562-1

Conversation

@jmgasper

Copy link
Copy Markdown
Collaborator

What was broken

The previous PM-5562 follow-up fixed Development totals for subtracks whose
history had no placement data. QA still found that profile totals for pops
and wleite showed 76 instead of 152 and 2 instead of 36.

Root cause

Both remaining gaps are legacy Marathon Match wins. Those history payloads
contain placement fields but are incomplete: pops has 5 history rows for 225
challenges and wleite has 87 rows for 575 challenges. None of those partial
rows records a first place, so the shared subtrack summary replaced valid
aggregate win counters (76 and 34) with zero placement wins. The prior fix only
covered histories with no placement fields at all.

What was changed

  • Keep an explicit aggregate wins value authoritative for MARATHON_MATCH.
  • Continue using placement-derived wins for modern tracks, preserving the
    PM-5458 stale-counter correction.
  • Preserve PR PM-5562: Count rating-only history subtrack wins in track totals #2172's Development deduplication and rating-only history fixes.
  • Challenge and submission aggregation is unchanged.

Any added/updated tests

  • Added a getSubTrackSummaryStats regression case modeled on the pops
    payload, proving that 76 aggregate Marathon Match wins survive partial
    placement history with no first-place rows.
  • yarn test:no-watch src/apps/profiles/src/hooks/useFetchActiveTracks.spec.tsx
    passes: 15 tests.
  • yarn lint passes cleanly.
  • yarn run build succeeds; it reports only existing repository warnings.
  • Live dev API validation now computes 152 wins for pops and 36 for wleite,
    matching their API totals.

The broader profiles test command was also run: 14 suites pass, including all
PM-5562 coverage. Two unrelated baseline suites still fail for the same reasons
recorded on the prior attempt: MemberRatingCard is missing a
useProfileCompleteness mock, and MemberRatingInfoModal has a stale 2200+
expectation.

What was broken
The previous PM-5562 follow-up made Development totals include aggregate wins
for subtracks whose history had no placement data. QA still found that the
profile totals for pops and wleite showed 76 instead of 152 and 2 instead of
36.

Root cause
Legacy Marathon Match history is partial but contains placement fields. The
shared subtrack summary therefore treated those incomplete rows as the source
of truth and replaced 76 and 34 valid aggregate wins with zero placement wins.
The prior fix only covered histories with no placement fields at all.

What was changed
Keep an explicit aggregate wins value authoritative for Marathon Match while
retaining placement-derived wins for modern tracks. This preserves the earlier
Development deduplication and rating-only history fixes.

Any added/updated tests
Added a regression case modeled on the pops payload, proving that 76 aggregate
Marathon Match wins survive a partial placement history with no first-place
rows. The existing placement-history and Development aggregation tests remain
passing.
@jmgasper
jmgasper requested a review from kkartunov as a code owner August 23, 2026 21:04
@jmgasper
jmgasper merged commit bea7f31 into dev Aug 24, 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.

1 participant