Skip to content

PM-5793: Align downloaded profile activity stats - #151

Merged
jmgasper merged 1 commit into
developfrom
PM-5793
Aug 1, 2026
Merged

PM-5793: Align downloaded profile activity stats#151
jmgasper merged 1 commit into
developfrom
PM-5793

Conversation

@jmgasper

@jmgasper jmgasper commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

What was broken

Downloaded profiles showed activity totals that differed from Profiles. The download showed Quality Assurance separately, reported different Development, Design, and Testing counters, and displayed Competitive Programming when the UI did not.

Root cause (if identifiable)

The download flow recalculated activity from challenge winner and resource rows. That logic used different win, submission, grouping, and Data Science rules from the member stats and history data used by Profiles.

What was changed

  • Read downloaded-profile activity from the existing member stats and history services.
  • Map Development, Design, Testing, and SRM-based Competitive Programming with Profiles-compatible grouping and history fallbacks.
  • Preserve aggregate-stat output when history is temporarily unavailable, while allowing profile generation to continue if activity data cannot be loaded.

Any added/updated tests

  • Added a regression fixture for the PM-5793 profile totals: Development 247/200/229, Design 6/1/6, and Testing 20/8/15, with inactive Competitive Programming omitted.
  • Added coverage for active SRM Competitive Programming and overlapping AI Engineering history.
  • Focused tests: 3 passing.
  • Lint: passed.
  • Build: passed.
  • Full suite: 218 passing and 17 pre-existing Joi message assertion failures. origin/develop has the same 17 failures with 215 passing tests, so this change adds no repository-wide failures.

What was broken

Downloaded profiles showed activity totals that differed from Profiles, including a separate Quality Assurance row and Competitive Programming activity that the UI did not display.

Root cause (if identifiable)

The download flow recalculated activity from challenge winner and resource rows. That logic used different win, submission, grouping, and Data Science rules from the member stats and history data used by Profiles.

What was changed

The download now reads member stats and history through StatisticsService and maps the Development, Design, Testing, and SRM-based Competitive Programming rows with the same grouping and history fallbacks used by Profiles. A history lookup failure falls back to aggregate stats so profile generation can continue.

Any added/updated tests

Added unit coverage for the PM-5793 profile totals, SRM-only Competitive Programming visibility, and overlapping AI Engineering history. The focused tests, lint, and build pass. The full suite has 218 passing tests and the same 17 pre-existing Joi message assertion failures as origin/develop, which has 215 passing tests and those 17 failures.
@jmgasper
jmgasper merged commit 2b6a136 into develop Aug 1, 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