Skip to content

1120 bug define and implement separate leaderboard and reward rules for human and bot matches - #1122

Merged
CapoMK25 merged 11 commits into
devfrom
1120-bug-define-and-implement-separate-leaderboard-and-reward-rules-for-human-and-bot-matches
Nov 20, 2026
Merged

CapoMK25 merged 11 commits into
devfrom
1120-bug-define-and-implement-separate-leaderboard-and-reward-rules-for-human-and-bot-matches

Conversation

@tickBit

@tickBit tickBit commented Nov 20, 2026

Copy link
Copy Markdown
Collaborator

Brief description

Aligns leaderboard, statistics, daily-task, and reward handling for human-versus-human and human-versus-bot matchmaking matches. Eligible human participants now receive the same mode-specific rewards regardless of whether their opponent is a human or a bot, while bots never receive rewards or leaderboard entries.

Change list

  • Added centralized matchmaking reward eligibility rules.
  • Enabled eligible human leaderboard wins against bots.
  • Prevented winning bots from receiving player or clan leaderboard records.
  • Applied consistent win/loss battle points, statistics, and daily-task progress to human participants.
  • Excluded CUSTOM, 2v2, and TESTING_SESSION matches from the production reward path.
  • Attributed clan wins to the clanId stored on the winning match side.
  • Prevented bot-only sides from receiving clan rewards.
  • Added a durable battleId reward claim and MongoDB transaction for idempotent reward processing.
  • Prevented concurrent, repeated, and post-restart finish requests from awarding rewards more than once.
  • Added the matchmaking reward claim schema and unique-index migration.
  • Expanded unit, integration, concurrency, and E2E test coverage.
  • Updated leaderboard, matchmaking API, and MQTT documentation.

Note

There is one commit, which consists of several prettier and linter changes

@codecov-alt

codecov-alt Bot commented Nov 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.42857% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/auth/auth.service.ts 88.23% 2 Missing ⚠️
src/leaderboard/util/getAcceptedLeaderboardWin.ts 96.29% 1 Missing ⚠️
src/profile/profile.service.ts 66.66% 1 Missing ⚠️
Files with missing lines Coverage Δ
src/auth/box/BoxAuthService.ts 94.64% <100.00%> (ø)
src/box/accountClaimer/accountClaimer.service.ts 95.45% <100.00%> (+2.12%) ⬆️
src/box/auth/BoxAuthHandler.ts 97.50% <100.00%> (ø)
src/leaderboard/clanLeaderboardWin.service.ts 100.00% <100.00%> (ø)
src/leaderboard/playerLeaderboardWin.service.ts 100.00% <100.00%> (ø)
src/matchmaking/matchmaking.service.ts 93.15% <100.00%> (+0.56%) ⬆️
src/player/player.service.ts 54.21% <ø> (ø)
src/session/session.service.ts 100.00% <100.00%> (ø)
src/leaderboard/util/getAcceptedLeaderboardWin.ts 97.29% <96.29%> (-2.71%) ⬇️
src/profile/profile.service.ts 79.00% <66.66%> (ø)
... and 1 more

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tickBit

tickBit commented Nov 20, 2026

Copy link
Copy Markdown
Collaborator Author

Migration has been made into physical server

@CapoMK25 CapoMK25 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, let's go!

@github-project-automation github-project-automation Bot moved this from Backlog to Done in Altzone-Server Nov 20, 2026
@CapoMK25
CapoMK25 merged commit d12a999 into dev Nov 20, 2026
5 checks passed
@CapoMK25
CapoMK25 deleted the 1120-bug-define-and-implement-separate-leaderboard-and-reward-rules-for-human-and-bot-matches branch November 20, 2026 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Bug: Define and implement separate leaderboard and reward rules for human and bot matches

2 participants