diff --git a/lib/outside-review-result.ts b/lib/outside-review-result.ts index e376b107b..8409c73b2 100644 --- a/lib/outside-review-result.ts +++ b/lib/outside-review-result.ts @@ -151,7 +151,7 @@ const WHOLE_CHANGE_SCOPE = /^(?:in|within|across|throughout|with|from|for)\s.*\b /** * The review's conclusion says it found nothing: its last prose sentence or - * ", and" clause (wrapped lines joined), or the because-clause of its + * ", and" clause (a wrapped line that continues in lowercase joined), or the because-clause of its * Recommendation line, is an unqualified no-findings statement. When other * prose precedes it, anything after the statement other than a predicate * ("were found", "is evident") or a colon explanation must scope it to the @@ -174,7 +174,7 @@ function concludesNoFindings(code: string): boolean { if (clause) { because = clause; recommendationOpen = !/[.!?]$/.test(clause); } prose += '\n'; } else if (/^[\t ]*#{1,6}[\t ]/.test(line)) prose += `\n${text}\n`; - else prose += listed || prose.endsWith('\n') || /[.!?;:]$/.test(prose) ? `\n${text}` : ` ${text}`; + else prose += listed || prose.endsWith('\n') || /[.!?;:]$/.test(prose) || !/^[a-z]/.test(text) ? `\n${text}` : ` ${text}`; } const sentences = prose.split(/(?<=[.!?;])\s+|\n|,\s+and\s+/i).map(sentence => sentence.trim()).filter(Boolean); const total = sentences.length + (because ? 1 : 0); diff --git a/test/outside-review-result.test.ts b/test/outside-review-result.test.ts index ed13f8138..572b90f30 100644 --- a/test/outside-review-result.test.ts +++ b/test/outside-review-result.test.ts @@ -82,6 +82,7 @@ describe('a no-findings statement counts only as the reply\'s conclusion (#3294) 'NO_FINDINGS', '**NO_FINDINGS**', '`NO_FINDINGS`', '- NO_FINDINGS', `The change adds a retry cap and its tests.\n${REPORTER}`, 'Reviewed the retry helper.\n\nNo issues found in this change.', 'After reviewing the patch, I found no issues.', 'I found no issues in this read-only change.', + 'Summary of the retry helper\nNo issues found.', 'I found no actionable regressions in the staged\nchanges.', // Clean `codex review --uncommitted` replies captured from codex-cli 0.160.0 with gpt-6-sol. 'The change validates the retry limit before execution. No actionable regression was found.', 'The change validates `max` before retrying. No affected callers or tests are present in the repository, and no actionable regression is evident.']) {