⚠️ Definition of Done: this issue must be completed in full, in a single PR. Do not split this
work across multiple PRs, and do not defer any Deliverable below to a follow-up issue. A PR that
satisfies only some of the Deliverables, stubs a required test, or leaves a checkbox
partially-done does NOT resolve this issue and will be closed.
Context
closeDraftDodgeAttemptIfBlocked in src/queue/review-evasion.ts (behind exported
maybeCloseDraftDodgeAttempt) auto-closes a PR that converts to draft to dodge a gate block. Its
exemption check (around line 284) only checks authorIsOwner and authorIsAdmin before closing.
All of its siblings in the same file additionally honor the operator-configured
autoCloseExemptLogins allowlist via isProtectedAutomationAuthor + isAutoCloseExempt:
closeReviewEvasionSelfCloseIfReviewed (~line 628): if (isProtectedAutomationAuthor(pr.authorLogin, env)) return; then if (isAutoCloseExempt(pr.authorLogin, settings.autoCloseExemptLogins)) return;
maybeCloseReviewEvasionDraftConversion
maybeCloseRepeatedDraftCycling
maybeCloseDraftPr
maybeCloseSynchronizeAmendment
closeDraftDodgeAttemptIfBlocked is the one remaining guard in this file that doesn't call either
check — so an author explicitly placed on the operator's autoCloseExemptLogins allowlist is
still auto-closed by this specific enforcement path, even though every other auto-close guard in
the same file honors that same allowlist.
This is the identical bug class already found and fixed in this exact file as #6165
("closeRepeatedDraftCyclingIfDetected skips the autoCloseExemptLogins allowlist its two
siblings honor" — closed, labeled gittensor:bug, help wanted). This issue is a fresh, unfixed
instance of that same pattern on the one remaining sibling that still lacks it.
Requirements
closeDraftDodgeAttemptIfBlocked must call both isProtectedAutomationAuthor(pr.authorLogin, env)
and isAutoCloseExempt(pr.authorLogin, settings.autoCloseExemptLogins) and skip the auto-close
(return early, same as its siblings) when either returns true — in the same relative position in
the function as its siblings check them (before the close decision, alongside the existing
authorIsOwner/authorIsAdmin checks).
- Do not change the existing
authorIsOwner/authorIsAdmin/block.overridden/block.headSha
conditions — only add the two missing exemption checks.
- Do not modify any other function in
src/queue/review-evasion.ts — the other five guards
already correctly honor these exemptions.
Deliverables
All three deliverables are required in this single PR.
Test Coverage Requirements
This repo enforces 99%+ Codecov patch coverage, branch-counted, on every changed line/branch in
src/**. The new exemption checks and both new test cases above must be covered.
Expected Outcome
An author on autoCloseExemptLogins, or a protected automation author, converting a
gate-blocked PR to draft is no longer auto-closed by closeDraftDodgeAttemptIfBlocked — matching
the exemption behavior every other auto-close guard in src/queue/review-evasion.ts already
provides.
Links & Resources
Context
closeDraftDodgeAttemptIfBlockedinsrc/queue/review-evasion.ts(behind exportedmaybeCloseDraftDodgeAttempt) auto-closes a PR that converts to draft to dodge a gate block. Itsexemption check (around line 284) only checks
authorIsOwnerandauthorIsAdminbefore closing.All of its siblings in the same file additionally honor the operator-configured
autoCloseExemptLoginsallowlist viaisProtectedAutomationAuthor+isAutoCloseExempt:closeReviewEvasionSelfCloseIfReviewed(~line 628):if (isProtectedAutomationAuthor(pr.authorLogin, env)) return;thenif (isAutoCloseExempt(pr.authorLogin, settings.autoCloseExemptLogins)) return;maybeCloseReviewEvasionDraftConversionmaybeCloseRepeatedDraftCyclingmaybeCloseDraftPrmaybeCloseSynchronizeAmendmentcloseDraftDodgeAttemptIfBlockedis the one remaining guard in this file that doesn't call eithercheck — so an author explicitly placed on the operator's
autoCloseExemptLoginsallowlist isstill auto-closed by this specific enforcement path, even though every other auto-close guard in
the same file honors that same allowlist.
This is the identical bug class already found and fixed in this exact file as #6165
("
closeRepeatedDraftCyclingIfDetectedskips theautoCloseExemptLoginsallowlist its twosiblings honor" — closed, labeled
gittensor:bug,help wanted). This issue is a fresh, unfixedinstance of that same pattern on the one remaining sibling that still lacks it.
Requirements
closeDraftDodgeAttemptIfBlockedmust call bothisProtectedAutomationAuthor(pr.authorLogin, env)and
isAutoCloseExempt(pr.authorLogin, settings.autoCloseExemptLogins)and skip the auto-close(return early, same as its siblings) when either returns true — in the same relative position in
the function as its siblings check them (before the close decision, alongside the existing
authorIsOwner/authorIsAdminchecks).authorIsOwner/authorIsAdmin/block.overridden/block.headShaconditions — only add the two missing exemption checks.
src/queue/review-evasion.ts— the other five guardsalready correctly honor these exemptions.
Deliverables
closeDraftDodgeAttemptIfBlockedinsrc/queue/review-evasion.tsgains theisProtectedAutomationAuthorandisAutoCloseExemptchecks, matching the pattern used bycloseReviewEvasionSelfCloseIfReviewed(or any of the other four exempt-checking siblings)in the same file.
settings.autoCloseExemptLoginsthatconverts to draft while gate-blocked is NOT auto-closed by
maybeCloseDraftDodgeAttempt(mirroring fix(review): closeRepeatedDraftCyclingIfDetected skips the autoCloseExemptLogins allowlist its two siblings honor #6165's regression test for the equivalent fix on
closeRepeatedDraftCyclingIfDetected).path.
All three deliverables are required in this single PR.
Test Coverage Requirements
This repo enforces 99%+ Codecov patch coverage, branch-counted, on every changed line/branch in
src/**. The new exemption checks and both new test cases above must be covered.Expected Outcome
An author on
autoCloseExemptLogins, or a protected automation author, converting agate-blocked PR to draft is no longer auto-closed by
closeDraftDodgeAttemptIfBlocked— matchingthe exemption behavior every other auto-close guard in
src/queue/review-evasion.tsalreadyprovides.
Links & Resources
src/queue/review-evasion.ts(file to fix —closeDraftDodgeAttemptIfBlocked)src/settings/agent-actions.ts:86(isProtectedAutomationAuthor)fix and regression test as the direct pattern to mirror)