feat(gate): tell a queued PR its position in the merge train, not just the PR ahead of it - #9954
Conversation
…t the PR ahead of it The wait comment named the immediate blocker and nothing else: Queued in the merge train behind #4, which touches overlapping work and was opened first. "Behind #4" and "behind #4 and six others" are very different waits, and a queue that will not say which one it is reads as a stall rather than a wait -- which is how it was read in practice. The information was already computed and thrown away: shouldWaitForOlderSiblings builds the full sorted list of viable overlapping older siblings and returned only viable[0]. It now returns the whole list, and the comment reports the position: Queued in the merge train at position 4, behind 3 overlapping PRs opened before this one (#1, #2, #3). The nearest is #1. The single-blocker wording is unchanged -- rendering a one-item queue as "1 PR ahead: #4" is noise. The queue inherits every eviction rule the blocker choice already had, which the tests pin: a draft, a conflicted PR, a manual-review hold and a non-overlapping sibling are all absent from it. A contributor must never be told they are behind PRs that are not actually in front of them. Closes #9952
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-30 20:27:29 UTC
Review summary Nits — 4 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9954 +/- ##
==========================================
- Coverage 91.88% 91.00% -0.88%
==========================================
Files 928 928
Lines 113671 113673 +2
Branches 27412 27412
==========================================
- Hits 104441 103451 -990
- Misses 7931 9118 +1187
+ Partials 1299 1104 -195
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Closes #9952
The problem
The contributor-facing wait comment named the immediate blocker and nothing else:
"Behind #4" and "behind #4 and six others" are very different waits. A queue that will not say which one it is reads as a stall rather than a wait — which is exactly how it was read in practice.
The fix
The information was already computed and discarded:
shouldWaitForOlderSiblingsbuilds the full sorted list of viable overlapping older siblings and returned onlyviable[0]. It now returns the whole list, and the comment reports position:Single-blocker wording is unchanged — rendering a one-item queue as "1 PR ahead: #4" is noise.
The queue inherits every eviction rule
queueAheadis derived from the same filtered list asblockingPr, so a draft, a git-conflicted PR, a manual-review hold and a non-overlapping sibling are all absent from it. A contributor must never be told they are behind PRs that are not actually in front of them — pinned by an explicit invariant test that puts one of each in the sibling set and asserts a one-item queue.Also asserted:
queueAhead[0] === blockingPr, since the comment quotes both and they must agree.Not included
The comment is posted once per blocker and never updated as the queue drains, so someone who reads it at position 5 cannot learn they are now at position 2 without watching the train. Editing in place (marker comment + update) is the natural follow-up, left out deliberately to keep this change small and verifiable — noted on the issue.
Full suite green (25,869 passing). Changed-line coverage: zero uncovered statements, zero uncovered branches.