Context
src/queue/review-evasion.ts has three sibling auto-close guards for review-evasion tactics. Two of them — closeReviewEvasionSelfCloseIfReviewed (line 584) and closeReviewEvasionDraftConversionIfReviewed (line 803) — both call if (isAutoCloseExempt(pr.authorLogin, settings.autoCloseExemptLogins)) return; before acting, and the draft-conversion guard's own doc comment (line 766) explicitly says this is "the same shared allowlist the contributor-cap/review-nag guards already honor." The third sibling, closeRepeatedDraftCyclingIfDetected (lines 947-971, added later per its #gaming-tactic-draft-cycle comment), checks isProtectedAutomationAuthor (line 968) but never calls isAutoCloseExempt — so a maintainer-configured trusted-contributor exemption is silently bypassed for this one enforcement path, inconsistent with its two siblings.
Requirements
- Add the same
if (isAutoCloseExempt(pr.authorLogin, settings.autoCloseExemptLogins)) return; check to closeRepeatedDraftCyclingIfDetected, in the same position relative to its other checks that the two sibling guards use.
- Do not change
isProtectedAutomationAuthor's existing check — both checks should coexist, matching the siblings' pattern.
- Do not change the two correct sibling guards.
Test Coverage Requirements
99%+ Codecov patch coverage on the changed branch; add a regression test proving a PR from an autoCloseExemptLogins-listed author is NOT auto-closed by the repeated-draft-cycling guard, mirroring the equivalent existing test for the other two guards.
Deliverables
Expected Outcome
A maintainer-configured trusted-contributor exemption is honored consistently across all three review-evasion auto-close guards.
Links & Resources
src/queue/review-evasion.ts:584,766,803,947-971 (all three guards, in one file)
Context
src/queue/review-evasion.tshas three sibling auto-close guards for review-evasion tactics. Two of them —closeReviewEvasionSelfCloseIfReviewed(line 584) andcloseReviewEvasionDraftConversionIfReviewed(line 803) — both callif (isAutoCloseExempt(pr.authorLogin, settings.autoCloseExemptLogins)) return;before acting, and the draft-conversion guard's own doc comment (line 766) explicitly says this is "the same shared allowlist the contributor-cap/review-nag guards already honor." The third sibling,closeRepeatedDraftCyclingIfDetected(lines 947-971, added later per its#gaming-tactic-draft-cyclecomment), checksisProtectedAutomationAuthor(line 968) but never callsisAutoCloseExempt— so a maintainer-configured trusted-contributor exemption is silently bypassed for this one enforcement path, inconsistent with its two siblings.Requirements
if (isAutoCloseExempt(pr.authorLogin, settings.autoCloseExemptLogins)) return;check tocloseRepeatedDraftCyclingIfDetected, in the same position relative to its other checks that the two sibling guards use.isProtectedAutomationAuthor's existing check — both checks should coexist, matching the siblings' pattern.Test Coverage Requirements
99%+ Codecov patch coverage on the changed branch; add a regression test proving a PR from an
autoCloseExemptLogins-listed author is NOT auto-closed by the repeated-draft-cycling guard, mirroring the equivalent existing test for the other two guards.Deliverables
closeRepeatedDraftCyclingIfDetectedhonorsautoCloseExemptLogins.Expected Outcome
A maintainer-configured trusted-contributor exemption is honored consistently across all three review-evasion auto-close guards.
Links & Resources
src/queue/review-evasion.ts:584,766,803,947-971(all three guards, in one file)