fix(queue): cap duplicate-sibling live GitHub fetch concurrency (#5835) - #6049
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
…#5835) Use mapWithConcurrency (extracted to map-with-concurrency.ts) so reconcileLiveDuplicateSiblings caps in-flight live PR fetches at 10 instead of unbounded Promise.all fan-out. Closes JSONbored#5835 Co-authored-by: Cursor <cursoragent@cursor.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6049 +/- ##
==========================================
+ Coverage 95.17% 95.22% +0.05%
==========================================
Files 592 594 +2
Lines 46960 46968 +8
Branches 15007 15011 +4
==========================================
+ Hits 44693 44726 +33
+ Misses 1511 1493 -18
+ Partials 756 749 -7
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-15 07:54:51 UTC
✅ Suggested Action - Approve/Merge
Review summary Nits — 3 non-blocking
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://gittensory.aethereal.dev/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
Fixes #5835
reconcileLiveDuplicateSiblingsfired one simultaneous live GitHub REST call per overlapping duplicate sibling via unboundedPromise.all, risking rate-limit bursts on popular issues with many duplicate PRs.Root cause
The module was split from
processors.tsbut kept the unbounded fan-out while other live-check paths in the same family already usemapWithConcurrencywith a cap of 10.Fix approach
mapWithConcurrencytosrc/queue/map-with-concurrency.ts(shared byprocessors.tsandduplicate-detection.tswithout a circular import)Promise.allwithmapWithConcurrency(overlapping, 10, ...)Impact
Duplicate-cluster reconciliation now matches the concurrency posture of other per-item live GitHub checks in the queue layer.
Risk / tradeoffs