fix(staleness): collapse day + commit thresholds into a single issue - #34
Merged
theDakshJaitly merged 1 commit intoApr 21, 2026
Merged
Conversation
When a file trips both the day threshold and the commit threshold, checkStaleness returned two separate STALE_FILE issues for the same underlying condition. computeScore then deducted per-issue, charging the file twice for the same staleness (20 points instead of 10). Collapse the two signals into a single STALE_FILE issue using the higher severity and a combined message, so the score reflects one staleness condition per file. Fixes mex-memory#31
Collaborator
|
Hey @mvanhorn , Sorry for the delay in review. got caught up in some stuff, will be done by tonight tho. |
theDakshJaitly
self-requested a review
April 20, 2026 05:58
Contributor
Author
|
No rush on the review @theDakshJaitly — tonight works. On growth: honestly it's tricky, you never know what people will latch onto. The stuff that's worked for me, roughly:
Rest is just shipping and staying consistent. |
Collaborator
theDakshJaitly
approved these changes
Apr 21, 2026
Contributor
Author
|
Appreciate the threshold consolidation. |
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.
Summary
checkStalenessreturned two separateSTALE_FILEissues when a file tripped both the day threshold (>=90d) and the commit threshold (>=200 commits).computeScorededucts per-issue, so the same underlying staleness cost the score 20 points instead of 10 (a file can drop from 100 to 0 off a single stale scaffold if other issues are also present).This collapses the two signals into a single compound
STALE_FILEissue using:"...100 days...; ...250 commits...")computeScoreis unchanged -- the fix keeps the scoring layer pure and localized to the checker.Test plan
test/checkers.test.tscovering:nullgit history -> no issuesnpm run buildcleannpx tsc --noEmitcleanCloses #31