fix(queue): prioritize linked-issue siblings when waking PRs on a merge - #7905
Conversation
The #4005 sibling-wake mechanism (maybeEnqueueSiblingRegateForMergedPr) capped its wake set at the first MERGE_WAKE_MAX_PRS entries of an ascending-by-PR-number list built for duplicate-winner election, not relevance. In a busy repo with that many older open PRs, a genuinely-affected duplicate-cluster sibling could be silently excluded from ever being woken, even though catching exactly that case ("a duplicate cluster now missing its winner") is this mechanism's whole purpose. Siblings sharing a linked issue with the merged PR are now placed first, ahead of the existing oldest-first fallback used for the general "any PR could now conflict with the new base tip" case.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7905 +/- ##
==========================================
- Coverage 91.40% 89.74% -1.66%
==========================================
Files 730 89 -641
Lines 74789 24347 -50442
Branches 22822 4787 -18035
==========================================
- Hits 68358 21850 -46508
+ Misses 5389 2232 -3157
+ Partials 1042 265 -777
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Warning ⏸️ LoopOver review result - manual review recommendedReview updated: 2026-07-21 17:07:42 UTC
Review summary Nits — 3 non-blocking
Concerns raised — review before merging
📋 Copy for AI agents — paste into your coding agentDecision drivers
Context & advisory signals — never blocks the verdict
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.
|
Summary
maybeEnqueueSiblingRegateForMergedPr) exists specifically to catch "a duplicate cluster now missing its winner" the instant a merge happens, instead of waiting for the sweep. But it capped its wake set at the firstMERGE_WAKE_MAX_PRS(15) entries ofotherOpenPullRequests, a list ordered ascending-by-PR-number for a different purpose (duplicate-winner election, where the lowest number IS the winner). Reused here, that meant the mechanism always woke the 15 oldest open PRs in the repo — with zero relation to which PRs a given merge could actually invalidate.manual-reviewhold is never auto-cleared), a genuinely-affected, newer duplicate-cluster sibling could be silently excluded from ever being woken by this mechanism at all, leaving it to the ordinary (much slower) sweep cadence.Test plan
npm run typechecktest/unit/queue.test.tscovering: a linked sibling winning priority over a lower-numbered unrelated one, and every linked sibling surviving the cap by displacing the highest-numbered fallback siblingstest/unit/queue*.test.tssuite (960 tests) passesvitest --coverage)npm run test:coveragein progress