Skip to content

fix(review-evasion): draft-dodge close swallows the close failure and records outcome 'completed' — the exact #2260 anti-pattern its own siblings already fixed #8801

Description

@JSONbored

Context (ORB round-2 adversarial audit)

src/queue/review-evasion.ts:305-326 (closeDraftDodgeAttemptIfBlocked): `closePullRequest(...).catch(() => undefined)` followed by an UNCONDITIONAL `recordAuditEvent({ eventType: "github_app.draft_dodge_closed", outcome: "completed" })`. All six sibling guards in the same file check the close outcome — the reopen-reclose guard (:511-529) carries the literal #2260 comment explaining this exact bug class ("an operator trusting the audit trail believed a one-shot close was enforced when it may not have been").

Failure scenario: transient 403/5xx on the close → PR stays OPEN, no comment posted, audit trail says "closed — prior gate failure stands". Operator investigating trusts the log.

Fix

Apply the identical `.then(() => null).catch((error) => error)` + `outcome: closeError === null ? "completed" : "error"` pattern from :511-529. Regression test: close rejects → audit outcome "error", handler resolves.

99%+ patch coverage, branch-counted.

Metadata

Metadata

Assignees

Labels

maintainer-onlyOwner-only work — yields no Gittensor points.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions