fix(review): honor autoCloseExemptLogins in closeDraftDodgeAttemptIfBlocked - #9369
fix(review): honor autoCloseExemptLogins in closeDraftDodgeAttemptIfBlocked#9369philluiz2323 wants to merge 2 commits into
Conversation
Follows JSONbored#9276, which fixed 8 files / 12 cases and left these 4 files / 5 cases still red on main (and therefore red on every open PR). Each diagnosed to its introducing commit; two are real source gaps, two are stale sibling tests a deliberate behavior change never updated. SOURCE fixes: - selfhost/metrics.ts: register two counters emitted since JSONbored#9243 and JSONbored#9245 but never added to DEFAULT_METRIC_META, so renderMetrics() emitted them as bare undocumented samples with no HELP/TYPE — exactly what that drift guard exists to catch. Both commits even name the counter in their own body text; a pure registration miss, not a behavior decision. TEST fixes (source verified correct in both cases): - selfhost-pg-retention: the fake Postgres still matched the pre-JSONbored#9083 ctid semi-join, so every DELETE fell through to rowCount 0. JSONbored#9083 deliberately moved retention to an index-backed PK range delete with ORDER BY (the fix for prune-retention blowing its timeout and stalling permanently); it updated the SQLite twin but not the Postgres one. Regex now captures whichever key column is in play, keeping BOTH the mapped-PK and ctid-fallback paths exercised. - salvageability: JSONbored#9085 made an absent blocker confidence degrade to CONFIDENCE_WHEN_UNSTATED (0.5) instead of 1.0, so it is sub-floor against the 0.93 default and the low-confidence hold owns the case. It renamed both sibling assertions in rules.test.ts but missed this third consumption site. Both calls kept — they are the only coverage of the default-floor arm and the nullish-confidence arm respectively. - worker-entry-boundary: false positive, not a real dependency leak. The check grepped whole-file text, so JSONbored#9230's user-facing string "crossed the visual-diff threshold" failed a green tree over a sentence, in a file worker-reachable since JSONbored#4120 that imports none of these deps. Narrowed to scan module specifiers (reusing the file's own parseImportSpecifiers) — the only way a Node-only dep can actually reach the bundle. Added a discriminating test so it cannot pass vacuously; verified by injecting a real `import sharp` and confirming it fails, naming the file and specifier.
…locked closeDraftDodgeAttemptIfBlocked was the one remaining review-evasion auto-close guard that skipped isProtectedAutomationAuthor and isAutoCloseExempt, so authors on the operator allowlist or protected automation bots were still draft-dodge closed despite every sibling guard honoring those exemptions (JSONbored#6165 pattern). Closes JSONbored#9294
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9369 +/- ##
==========================================
+ Coverage 75.38% 75.51% +0.13%
==========================================
Files 275 277 +2
Lines 58023 58402 +379
Branches 6181 8330 +2149
==========================================
+ Hits 43739 44105 +366
- Misses 14014 14017 +3
- Partials 270 280 +10
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Caution 🛑 LoopOver review result - fixes requiredReview updated: 2026-07-27 14:51:19 UTC
Review summary Nits — 4 non-blocking
CI checks failing
Decision drivers
Context & advisory signals — never blocks the verdict
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://loopover.ai/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.
|
|
LoopOver is closing this pull request on the maintainer's behalf (CI is failing (codecov/patch)). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed. |
Summary
closeDraftDodgeAttemptIfBlockedwas the one remaining review-evasion auto-close guard that did not callisProtectedAutomationAuthororisAutoCloseExempt. Authors on the operator'sautoCloseExemptLoginsallowlist, or protected automation bots (dependabot[bot], etc.), were therefore still draft-dodge closed even though every sibling guard insrc/queue/review-evasion.tshonors those exemptions — the same bug class fixed in #6165 on a different sibling.Adds both exemption checks before the close decision, matching
closeReviewEvasionSelfCloseIfReviewedand the other four guards.Test plan
test/unit/queue-lifecycle-guards.test.ts: gate-blocked PR converted to draft by anautoCloseExemptLoginsauthor is NOT closedtest/unit/queue-lifecycle-guards.test.ts: gate-blocked PR converted to draft bydependabot[bot]is NOT closedCloses #9294