fix(review-evasion): draft-dodge close audits its REAL outcome instead of an unconditional 'completed' - #8809
Conversation
…d of an unconditional 'completed' (#8801) The draft-dodge guard was the one sibling in this file still swallowing the closePullRequest error and recording outcome:"completed" regardless — a transient 403/5xx left the PR open on GitHub while the audit trail claimed a draft-dodge close was enforced (the exact #2260 anti-pattern the reopen-reclose guard in this same file already fixed, with the same comment explaining why an operator trusting the trail must never be lied to). Apply the identical pattern: capture the close error, audit completed/error accordingly, and name the failure ("the PR may still be open") with the error in metadata. Regression test: a 502 on the close PATCH now audits outcome "error" with the FAILED detail (and covers the unknown-author fallback arm).
|
Superagent 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 #8809 +/- ##
==========================================
- Coverage 93.81% 92.26% -1.55%
==========================================
Files 797 797
Lines 79608 79613 +5
Branches 24127 24131 +4
==========================================
- Hits 74686 73458 -1228
- Misses 3556 5090 +1534
+ Partials 1366 1065 -301
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-26 07:12:47 UTC
Review summary Nits — 3 non-blocking
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.
|
Summary
Round-2 audit fix (#8801):
closeDraftDodgeAttemptIfBlockedswallowed theclosePullRequestfailure and unconditionally auditedoutcome: "completed"— the exact anti-pattern #2260 fixed in this file's six sibling guards. A transient 403/5xx left the PR open while the audit trail said the one-shot close was enforced.Changes
src/queue/review-evasion.ts— the identical.then(() => null).catch(error)capture +completed/erroroutcome + FAILED detail ("the PR may still be open") + error in metadata, byte-matching the reopen-reclose sibling's fix(queue): reopen-reclose swallows close-API errors and records a false "completed" audit outcome #2260 pattern at :511-529.Test plan
npm run typecheck— cleanoutcome: "error"with the FAILED detail (attempted-close asserted; unknown-author fallback arm covered)queue-lifecycle-guardssuite 227/227Closes #8801