fix(queue): cap contributor PR live checks - #3911
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-07 06:52:06 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 #3911 +/- ##
=======================================
Coverage 93.57% 93.57%
=======================================
Files 340 340
Lines 33516 33516
Branches 12262 12262
=======================================
Hits 31364 31364
Misses 1528 1528
Partials 624 624
🚀 New features to boost your workflow:
|
Motivation
Description
src/db/repositories.tsso the author-scoped sample is limited and still ordered by ascending PR number (listOtherOpenPullRequestsForAuthor).src/queue/processors.tsto document the fixed-budget author-scoped sample plus the existing bounded concurrency (CONTRIBUTOR_CAP_LIVE_CHECK_CONCURRENCY = 10).test/unit/duplicate-winner.test.tsthat verifies the author-scoped query filters by author/self and returns the lowest 100 same-author siblings while excluding unrelated PRs and the subject PR.Testing
npx vitest run test/unit/duplicate-winner.test.ts -t "author-scoped contributor-cap", which passed.npx vitest run test/unit/duplicate-winner.test.ts test/unit/queue.test.ts -t "contributor open-PR cap|listOtherOpenPullRequests", and the focused tests covering the modified paths passed.npm run typecheckcompleted successfully, while a fullnpm run test:coverageattempt aborted due to an existingRangeError: Maximum call stack size exceededin the largetest/unit/queue.test.tsrun (this is an existing suite recursion encountered while running the full coverage job, not introduced by these changes).npm audit --audit-level=moderatecould not complete due to the npm registry audit endpoint returning403 Forbiddenin this environment.Codex Task