Skip to content

PM-5775: expose active checkpoint winners - #141

Merged
jmgasper merged 1 commit into
developfrom
PM-5775
Jul 31, 2026
Merged

PM-5775: expose active checkpoint winners#141
jmgasper merged 1 commit into
developfrom
PM-5775

Conversation

@jmgasper

@jmgasper jmgasper commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

What was broken

Checkpoint winners assigned during an active challenge were hidden until the entire challenge completed, so the Review app could not tell a member that they had won a checkpoint prize.

Root cause

Challenge response sanitization treated checkpoint winners like final-placement winners and removed both from every non-completed challenge.

What was changed

  • Return checkpoint winners for an active challenge only after Checkpoint Review has opened and closed.
  • Continue hiding final-placement winners until challenge completion.
  • Apply the same visibility rule to challenge detail and listing responses.
  • Document the checkpoint-winner response timing in Swagger.

Any added/updated tests

  • Added service coverage for active challenges while Checkpoint Review is open and after it closes.
  • Verified detail and listing responses expose checkpoint winners only after closure.
  • Verified placement winners remain hidden throughout the active challenge.

Validation

  • NODE_ENV=test pnpm exec mocha --require ts-node/register/transpile-only test/unit/ChallengeService.test.js --grep "returns checkpoint winners after checkpoint review closes" --timeout 30000 --exit — passed.
  • pnpm lint — passed.
  • pnpm build — passed.
  • The repository-wide pnpm test still reports 143 pre-existing failures caused by unavailable local mock services and existing harness/schema expectation issues; the PM-5775 regression test passes independently.

Paired change

Paired with Platform UI PR #2082, which renders the checkpoint-winner indicator and tooltip.

What was broken

The Challenge API hid assigned checkpoint winners until the entire challenge was completed, so the review app could not identify winners after Checkpoint Review.

Root cause

Winner response sanitization removed both final-placement and checkpoint winner data for every non-completed challenge.

What was changed

- Expose checkpoint winners for active challenges only after Checkpoint Review has opened and closed.
- Continue hiding final-placement winners until challenge completion.
- Document when checkpoint winners are returned.

Any added/updated tests

- Added detail and listing coverage for open and closed Checkpoint Review states.
- Verified placement winners remain hidden while checkpoint winners become visible.
@jmgasper
jmgasper merged commit a527d6a into develop Jul 31, 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