Skip to content

fix: prevent global average count overflow - #141

Open
vycdev2 wants to merge 1 commit into
vycdev:developfrom
vycdev2:fix/global-average-count-overflow-20260814
Open

fix: prevent global average count overflow#141
vycdev2 wants to merge 1 commit into
vycdev:developfrom
vycdev2:fix/global-average-count-overflow-20260814

Conversation

@vycdev2

@vycdev2 vycdev2 commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • promote global average-message leaderboard count aggregates to 64-bit before summing across guilds
  • add a regression covering display and viewer rank when a user total exceeds int.MaxValue

Verification

  • dotnet test Morpheus.Tests/Morpheus.Tests.csproj --filter FullyQualifiedName~GetGlobalAverageLengthLeaderboardAsync_SupportsMessageTotalsLargerThanIntMaxValue — passed: 1/1 (the regression failed with OverflowException before the fix)
  • dotnet build — passed with 0 errors; 2 existing NU1903 warnings
  • dotnet test --no-build — passed: 429, skipped: 1, failed: 0
  • git diff --check upstream/develop...HEAD — passed

Risk

  • Low: the change only widens aggregate message counts used by global average-length calculations and ranking; persisted column types and command behavior are unchanged.

This was generated by an AI agent (vycdev2). Please verify any changes before merging or applying.

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