fix(scoring): derive active years from GitHub contribution history#89
Open
martinbha wants to merge 4 commits into
Open
fix(scoring): derive active years from GitHub contribution history#89martinbha wants to merge 4 commits into
martinbha wants to merge 4 commits into
Conversation
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.
Closes #90
Problem
GitFut already fetched one contribution collection per calendar year, but reduced those collections directly into a single lifetime total. The scoring pipeline then estimated active years from creation and push dates on personally owned repositories.
That estimate misses contribution years spent in organization-owned repositories and can also miss private or non-commit activity. The undercount affects the recent-spike threshold, PHY, legacy bonus, overall rating, and card finish.
Fix
hasAnyContributionsalongside the existing annual contribution totals without adding API requests.activeYearsthrough the normalized GitHub payload and use it instead of owned-repository dates.The committed aggregate distribution file is unchanged because rebuilding it requires a fresh multi-hour 20,000-account sampling run; the runner now produces corrected data on its next regeneration.
Tests
Validation completed with:
hasAnyContributions--checksmoke test