Skip to content

fix(queue): honor autoCloseExemptLogins in the repeated-draft-cycling review-evasion guard - #6217

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
real-venus:fix/queue-draft-cycling-autoclose-exempt
Jul 15, 2026
Merged

fix(queue): honor autoCloseExemptLogins in the repeated-draft-cycling review-evasion guard#6217
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
real-venus:fix/queue-draft-cycling-autoclose-exempt

Conversation

@real-venus

Copy link
Copy Markdown
Contributor

Summary

src/queue/review-evasion.ts has three sibling auto-close guards for review-evasion tactics. Two of them -- closeReviewEvasionSelfCloseIfReviewed and closeReviewEvasionDraftConversionIfReviewed -- call if (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-cycle comment), checks isProtectedAutomationAuthor but never calls isAutoCloseExempt -- so a maintainer-configured trusted-contributor exemption was silently bypassed by this one enforcement path, inconsistent with its two siblings.

Changes

  • Added the same isAutoCloseExempt(pr.authorLogin, settings.autoCloseExemptLogins) early-return to closeRepeatedDraftCyclingIfDetected, in the same position the two sibling guards use (immediately after the isProtectedAutomationAuthor check). Both checks coexist, matching the siblings.
  • isProtectedAutomationAuthor and the two correct sibling guards are unchanged; isAutoCloseExempt was already imported.

Scope

  • Single-purpose consistency fix in src/queue/review-evasion.ts.
  • No behavior change for non-exempt authors (the existing enforcement path is untouched).

Validation

Safety

  • No secrets or private terms. Tightens (never loosens) who gets auto-closed: an exempt trusted contributor is now correctly skipped, matching the two siblings.

Closes #6165

@real-venus
real-venus requested a review from JSONbored as a code owner July 15, 2026 22:38
@superagent-security

Copy link
Copy Markdown
Contributor
\nSuperagent didn't find any vulnerabilities or security issues in this PR.

@codecov

codecov Bot commented Jul 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.32%. Comparing base (73b773c) to head (73e9992).

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           
Flag Coverage Δ
shard-1 43.96% <0.00%> (-0.06%) ⬇️
shard-2 36.68% <0.00%> (+0.12%) ⬆️
shard-3 32.21% <0.00%> (+0.01%) ⬆️
shard-4 33.95% <100.00%> (-0.14%) ⬇️
shard-5 31.69% <0.00%> (-0.01%) ⬇️
shard-6 45.30% <0.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/queue/review-evasion.ts 100.00% <100.00%> (ø)

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 15, 2026
@loopover-orb

loopover-orb Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Tip

🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩

✅ LoopOver review result - approve/merge recommended

Review updated: 2026-07-15 22:46:37 UTC

2 files · 1 AI reviewer · no blockers · readiness 80/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This PR adds a missing `isAutoCloseExempt` check to `closeRepeatedDraftCyclingIfDetected`, matching the pattern already used by its two sibling guards, so a maintainer-configured trusted-contributor exemption is now honored consistently across all three review-evasion auto-close paths. The change is minimal, placed in the same position as the sibling guards (right after the existing `isProtectedAutomationAuthor` check), and is accompanied by a targeted regression test verifying the exempt author is skipped and no audit event is recorded. This is a narrow, well-scoped consistency fix with no behavior change for non-exempt authors.

Nits — 3 non-blocking
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #6165
Related work ⚠️ 2 scoped overlaps Top overlaps are listed below; lower-confidence bulk is hidden.
Change scope ❌ 8/20 High review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 139 registered-repo PR(s), 75 merged, 21 issue(s).
Contributor context ✅ Confirmed Gittensor contributor real-venus; Gittensor profile; 139 PR(s), 21 issue(s).
Gate result ✅ Passing No configured blocker found.
Improvement ✅ Minor risk: clean · value: minor · LLM: minor
Linked issue satisfaction

Addressed
The diff adds the exact `isAutoCloseExempt(pr.authorLogin, settings.autoCloseExemptLogins)` early-return to `closeRepeatedDraftCyclingIfDetected` immediately after the `isProtectedAutomationAuthor` check, matching the position/pattern used by the two sibling guards, and leaves those siblings untouched. A regression test is added verifying that an author on `autoCloseExemptLogins` is not auto-close

Review context
Contributor next steps
  • Start here: Review top overlaps.
  • Then work through the remaining 2 steps in the Signals table above.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
🧪 Chat with LoopOver

Ask 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.

  • @loopover ask &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat &lt;question&gt; answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover mention with a real question is routed to the closest matching read-only command automatically — no exact syntax required.

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.

  • Re-run LoopOver review

@loopover-orb loopover-orb Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LoopOver approves — the gate is satisfied and CI is green.

@loopover-orb
loopover-orb Bot merged commit b326745 into JSONbored:main Jul 15, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(review): closeRepeatedDraftCyclingIfDetected skips the autoCloseExemptLogins allowlist its two siblings honor

1 participant