fix: empty ISSUES_FOUND verdict treated as LGTM#5
Conversation
Bug: when reviewer model returns <verdict>ISSUES_FOUND</verdict> with no actual findings text, the message showed 'found potential issues:' followed by nothing — confusing and wrong. Fix: if verdict is 'issues' but cleanedText is empty, override to LGTM. The model said issues but couldn't articulate any = no real issues. +8 reviewer.test.ts unit tests for verdict parsing and edge cases.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0fca420c79
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // If model said ISSUES_FOUND but produced no actual findings text, treat as LGTM | ||
| const isLgtm = verdict === "lgtm" || (verdict === "issues" && !cleanedText.trim()); |
There was a problem hiding this comment.
Honor ISSUES_FOUND verdict even when body is empty
Do not convert an explicit ISSUES_FOUND verdict into LGTM based on cleanedText being empty. In runReviewSession, if the reviewer outputs only <verdict>ISSUES_FOUND</verdict> (which can happen with truncated/minimal responses), this branch now marks the result as LGTM and the orchestrator will skip the remediation loop, silently dropping a reported failure. This change weakens the explicit machine-readable contract from parseVerdict; keep verdict === "issues" as non-LGTM and handle empty-body UX separately in message formatting.
Useful? React with 👍 / 👎.
Bug: When reviewer model returns
<verdict>ISSUES_FOUND</verdict>with no actual findings text, the message shows 'found potential issues:' followed by nothing.Fix: If verdict is 'issues' but cleanedText is empty after stripping the verdict tag, override isLgtm to true. The model said issues but couldn't articulate any = no real issues.
Tests: +8 unit tests for verdict parsing, empty text handling, and the specific edge case.
421 tests green.