fix(scoring): base open-PR threshold on merged history only#455
Merged
JSONbored merged 2 commits intoJun 7, 2026
Merged
Conversation
computeScoreCore added the planned PR's own totalTokenScore to its open-PR concurrency threshold, so a single large preview inflated the contributor's allowance for concurrent open PRs with zero merged history. Use only existingContributorTokenScore (established merged-history trust) for the threshold bonus.
|
Note Gittensory Gate skippedPR closed before full evaluation. No late first comment was created.
Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers. |
JSONbored
approved these changes
Jun 7, 2026
JSONbored
left a comment
Owner
There was a problem hiding this comment.
Reviewed the patch and current CI state. The threshold now depends only on established merged-history token score, and the regression covers both no-history and with-history behavior. CI is green. No merge action taken.
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 #454.
The open-PR spam gate (
computeScoreCore) computed its concurrency threshold by adding the planned PR's owntotalTokenScoreto the contributor's established merged-history token score (existingContributorTokenScore). So previewing a single large PR inflated the contributor's own allowance for concurrent open PRs, even with zero merged history.Example:
existingContributorTokenScore: 0, plannedtotalTokenScore: 300,openPrCount: 3→ thresholdmin(30, 2 + floor((0+300)/300)) = 3, gate passes; with the planned PR excluded it is2, gate blocks.Changes
existingContributorTokenScoreonly (established merged-history trust), not the in-flight PR's tokens.Verification
5vs2).