fix(queue): bound issue-linked re-gate fanout#3960
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-07 07:57:07 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 4 non-blocking
Concerns raised — review before merging
Review context
Contributor next steps
Signal definitions
🟩 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 Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3960 +/- ##
=======================================
Coverage 93.66% 93.66%
=======================================
Files 372 372
Lines 34856 34856
Branches 12743 12743
=======================================
Hits 32649 32649
Misses 1588 1588
Partials 619 619
🚀 New features to boost your workflow:
|
Motivation
issueswebhook could enqueue re-gate jobs for every open PR linked to that issue (up to the DB limit), exhausting queue, GitHub REST, and AI-review budgets.SWEEP_MAX_PRSsource budget to keep the prompt fan-out per-repo bounded while the regular stale sweep continues converging any remaining tail.Description
.slice(0, SWEEP_MAX_PRS)to the filtered linking PRs insrc/queue/processors.tsso only a bounded batch is enqueued.src/queue/processors.tsto document the availability/cost rationale and the tail-convergence behavior.test/unit/queue.test.tsto assert that a large set of linked PRs only enqueuesSWEEP_MAX_PRSjobs and that staggered delays match the bounded batch semantics.Testing
npx vitest run test/unit/queue.test.ts -t "issue-side linked PR wake keeps fan-out bounded"and passed.npm run typecheckcompleted successfully with no TypeScript errors.npx vitest run test/unit/queue.test.tsfailed to complete due to an unrelatedRangeError: Maximum call stack size exceededoriginating in the broader test harness, so the focused test above was used to validate the fix.Codex Task