fix(queue): honor autoCloseExemptLogins in the repeated-draft-cycling review-evasion guard - #6217
Conversation
… review-evasion guard
| \nSuperagent 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 #6217 +/- ##
=======================================
Coverage 95.32% 95.32%
=======================================
Files 596 596
Lines 47109 47110 +1
Branches 15015 15016 +1
=======================================
+ Hits 44907 44908 +1
Misses 1477 1477
Partials 725 725
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 22:46:37 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
src/queue/review-evasion.tshas three sibling auto-close guards for review-evasion tactics. Two of them --closeReviewEvasionSelfCloseIfReviewedandcloseReviewEvasionDraftConversionIfReviewed-- callif (isAutoCloseExempt(pr.authorLogin, settings.autoCloseExemptLogins)) return;before acting, honoring the maintainer's trusted-contributor allowlist (the same shared allowlist the contributor-cap/review-nag guards use). The third,closeRepeatedDraftCyclingIfDetected(added later, per its#gaming-tactic-draft-cyclecomment), checksisProtectedAutomationAuthorbut never callsisAutoCloseExempt-- so a maintainer-configured trusted-contributor exemption was silently bypassed by this one enforcement path, inconsistent with its two siblings.Changes
isAutoCloseExempt(pr.authorLogin, settings.autoCloseExemptLogins)early-return tocloseRepeatedDraftCyclingIfDetected, in the same position the two sibling guards use (immediately after theisProtectedAutomationAuthorcheck). Both checks coexist, matching the siblings.isProtectedAutomationAuthorand the two correct sibling guards are unchanged;isAutoCloseExemptwas already imported.Scope
src/queue/review-evasion.ts.Validation
npm run typechecknpx vitest run test/unit/queue-lifecycle-guards.test.ts-- 193 passed, incl. the new exemption regression test and all existing draft-cycling/self-close/draft-conversion tests.isAutoCloseExemptbranch is exercised both ways -- exempt author (new fix(review): closeRepeatedDraftCyclingIfDetected skips the autoCloseExemptLogins allowlist its two siblings honor #6165 test, no close) and non-exempt author (existing enforce test, close).main; mergeable-clean.Safety
Closes #6165