fix(triage): make reconsider mode fail-safe on malformed LLM verdict

Only reopen on an explicit 'pass' verdict. Previously any non-'fail'
value (including missing/empty/unknown verdicts) would trigger a
reopen, undoing a prior auto-close based on an ambiguous response.

Co-authored-by: Yassin Kortam <yassin@berri.ai>
This commit is contained in:
Cursor Agent 2026-05-19 07:20:12 +00:00
parent 6a3b5f6491
commit 90f86258a8
No known key found for this signature in database

View file

@ -741,7 +741,10 @@ def triage(
# fail -> leave closed + post a "still failing" comment so the
# contributor can iterate again. When `close=False` we preview
# the action instead of actually posting/reopening.
if decision != "fail":
# Only an explicit "pass" verdict triggers a reopen — any other
# value (including missing/malformed verdicts) is fail-safe and
# leaves the PR/issue closed.
if decision == "pass":
reopen_body = format_reopen_comment(kind)
if not close:
return {