Pick reviewers more fairly: own PRs don't count as load, ties go to the longest wait - #45
Open
willson556 wants to merge 1 commit into
Open
willson556 wants to merge 1 commit into
willson556 wants to merge 1 commit into
Conversation
staflsystemsci
Bot
requested review from
a team,
fcheein,
gretl-silva-stafl,
mament0,
mns4595,
mzhu48,
nehalkpatel and
thebhef
and removed request for
a team
October 2, 2026 22:56
This was referenced Oct 2, 2026
Member
Author
willson556
force-pushed
the
graphite-base/45
branch
from
October 2, 2026 23:00
a5d6ccb to
a97c52b
Compare
willson556
force-pushed
the
fair-reviewer-pick
branch
from
October 2, 2026 23:00
d6b6155 to
8ad4543
Compare
|
Review SLA
Due times are in business hours, 10:00 to 17:00 Pacific: 4 h for a PR under 250 added lines, 7 h otherwise, and 4 h for a re-review. Mid-stack, an assignee owes a response on the lowest PR they haven't approved. Dashboard |
…he longest wait Two changes to the shared least-loaded pick, used by AssignReviewers and by ReviewSLA's out-of-office reassignment: - A PR doesn't count toward its author's load. Someone who assigns themselves to their own PRs looked busier than everyone else and was passed over. - PRs merge quickly, so most people sit at 0 open assigned PRs and most picks are ties. Ties now go to whoever was assigned to someone else's PR longest ago, and only then rotate by PR number, which doesn't remember who went recently. When each person was last assigned comes from a second, smaller query of recent assignment events; one combined query timed out. If it fails, ties fall back to PR number as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
willson556
force-pushed
the
fair-reviewer-pick
branch
from
October 2, 2026 23:01
8ad4543 to
3fcb89e
Compare
thebhef
approved these changes
Oct 2, 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.

Makes the shared least-loaded reviewer pick (
ReviewConfig/pick.js) fairer.AssignReviewersuses it to pick a new PR's assignees, andReviewSLAuses it when it replaces someone who is out of office.In the first days of Proposal 1, the rotation picks were uneven:
Two things caused it:
PR number % number tiedonly evens out over many PRs, and it doesn't remember who went recently. Ties now go to whoever was assigned to someone else's PR longest ago, with anyone not assigned recently first. Only then does PR number decide.When each person was last assigned comes from assignment events on the most recently updated PRs in the 20 most recently pushed repos. Like load, it's read from live PR data rather than search, so back-to-back picks see each other.
I first added this to the load query, but the combined query timed out against the org, so it's a second, smaller query. If it fails, the job warns and breaks ties by PR number as before. If the load query fails, nothing changes from today.
AssignReviewers' log line now includes when the person was last assigned, for examplepicked X from embeddedreviewers (0 open assigned PRs, last assigned 2026-10-01).Testing:
node --test AssignReviewers/ ReviewConfig/ ReviewSLA/: 87 cases, 3 of them new. They cover a PR not counting toward its author's load, ties going to the longest wait (with someone not assigned recently first), and a failed last-assigned query falling back to load and PR number. Under the old rules, all three would pick someone else.🤖 Generated with Claude Code