Repository navigation
fix: resolve linked accounts for all winners in final results (#139) - #140
Merged
Merged
Conversation
…ops#139) The final-results cron only looked up links for the first 10 leaderboard rows, but messages.ts checks every winner. Linked winners ranked 11th or lower were called unlinked and their Discord mentions were omitted. Resolve linked accounts for all winners plus the displayed rows in the final-results path. The weekly update keeps its top-10 lookup.
Collaborator
Author
|
@anurag629 the breakinig ci is likely due to the gitHub actions env . take a look at this and lemme know if any further fix is expected |
anurag629
requested changes
Nov 4, 2026
anurag629
left a comment
Member
There was a problem hiding this comment.
Hey @bhushan4work, the fix in index.ts is right. Two things before I merge:
- The red CI wasn't your change. A test in
page.test.tsused the real clock and broke once October ended. #141 fixed it ondevelop, so please mergedevelopinto your branch and CI will run again. - The new tests pass without the fix too. In the index test,
u11's PRs are dated 2026-10-02, so it reaches 5 early and ranks around 4th, inside the 10 rows the old code already looked up. The messages test passes ondevelopbecausemessages.tsdidn't change. Please make the linked winner the last one to reach 5 (give it the latest dates) so it really ranks 11th. Then the index test fails ondevelopand passes here.
anurag629
approved these changes
Nov 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
the final-results cron previously looked up linked discord accounts for only the first 10 leaderboard rows, causing linked winners ranked beyond 10 to be incorrectly called unlinked.
what does this change?
closes #139
how i tested this
npm run typechecknpx vitest run test/messages.test.ts test/index.test.ts(59/59 passed)npm test(332/332 passed)git diff --checkai assistance
none
checklist
npm run typecheckandnpm testpasstest/