Skip to content

fix(outside-review): a check-results sign-off keeps the no-findings conclusion (#3469) - #3641

Closed
vilano93 wants to merge 1 commit into
garrytan:mainfrom
vilano93:fix/outside-review-checks-after-conclusion
Closed

vilano93 wants to merge 1 commit into
garrytan:mainfrom
vilano93:fix/outside-review-checks-after-conclusion

Conversation

@vilano93

@vilano93 vilano93 commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Why (in your own words)

A clean Codex review often ends with one sentence about the checks it ran: "No actionable regressions were identified in the diff. Tests, lint, and build all pass." Since #3304, only the reply's last sentence (or its Recommendation because-clause) can conclude it, so that check sentence pushes the no-findings statement out of the conclusion and the review reads VERDICT: unverified / REASON: untagged_review. /ship and /review then report missing outside coverage for a review that ran and found nothing.

This change strips closing check-results sentences from the raw reply before the conclusion is read, as #3469 suggests. The #3304 safeguards still apply to the conclusion itself. It also accepts the reporter's second sign-off form, "The changes introduce no definite, actionable regressions." Without that, the second quote in the issue would still read unverified.

How the stripping avoids a false pass (each point was a false pass in an earlier draft, found by a Codex review of that draft and pinned by a test):

  • Check sentences are matched on the raw reply, before inline code is removed. "Tests do not pass." and "Not all tests pass." are therefore never check reports.
  • Only the reply's own closing sentences are dropped, and only whole sentences: after ., !, ? or ;, or after a blank line. A wrapped tail ("Not all\ntests pass.") and a condition after a colon ("provided that:\nTests pass.") stay.
  • Dropped sentences still count toward the sentence total. Dropping one never turns a scoped claim ("No issues in the parser, while …") into the reply's only sentence, which would skip the scope check.
  • The new "The changes introduce no …" form is always held to the whole-change scope rule, even as the only sentence.

Fixes #3469

Live evidence

The two sign-offs from #3469, plus a negative control, through the CLI as /ship calls it:

# upstream main 1.91.330.0 (ce3a093a6)
$ bun lib/outside-review-result.ts --label 'Codex structured review' --exit 0 --stderr err structured <file>
"No actionable regressions were identified in the diff. Tests, lint, and build all pass."       VERDICT: unverified
"The changes introduce no definite, actionable regressions. Tests, lint, and build all pass."   VERDICT: unverified
"No regressions found. Tests pass, but the fallback path now swallows ENOENT."                  VERDICT: unverified

# this branch, same command
"No actionable regressions were identified in the diff. Tests, lint, and build all pass."       VERDICT: clean
"The changes introduce no definite, actionable regressions. Tests, lint, and build all pass."   VERDICT: clean
"No regressions found. Tests pass, but the fallback path now swallows ENOENT."                  VERDICT: unverified

The new tests were red first, then green:

# test/outside-review-result.test.ts with upstream main's lib/outside-review-result.ts
(fail) a check-results sentence after the no-findings conclusion keeps it the conclusion (#3469) > the reporter's codex review sign-offs read clean through the reporter's CLI invocation
(fail) a check-results sentence after the no-findings conclusion keeps it the conclusion (#3469) > other check-results sign-offs, one or several
 42 pass
 2 fail
# this branch
 44 pass
 0 fail

Counter-review: I ran codex exec (read-only, gpt-6.1-sol, high effort) on the diff after each fix. Rounds 1–6 each found one false-pass path, listed above. Each one got a negative test first and then a fix. Round 7 answered NO_FINDINGS.

Scope

  • Changed:
    • lib/outside-review-result.ts: withoutClosingCheckResults() strips closing check-results sentences (CHECK_RESULTS) from the raw reply. The prose builder moved into reviewProse(). concludesNoFindings(code, concluding) reads the conclusion from the stripped reply and counts sentences on the full one. FINDING_NOUN takes up to two adjectives (plus definite), and NO_FINDINGS takes a whole-change subject ("the/this/these change(s)/diff/patch introduce(s)/add(s)/contain(s)/has/have no …").
    • test/outside-review-result.test.ts: a new #3469 block with the reporter's two sign-offs (in-process and through the CLI), four more clean sign-offs, and 15 negative controls: the outside-review-result: "no actionable regressions" is read as an untagged (unverified) review #3294 safeguards plus every false-pass path the counter-review found.
    • docs/troubleshooting.md: the "How the verdict is read" entry names the new form and the check-results rule.
  • Verified live by:
    • the CLI runs and red/green test runs above;
    • bun test test/outside-review-result.test.ts test/outside-review-severity.test.ts test/outside-review-unparsed-severity.test.ts: 85 pass, 0 fail;
    • bun run typecheck: clean; bun run typecheck:test: "814 known diagnostics, none new".
  • Compared with a clean upstream/main (ce3a093) on macOS: bun run test:quick reports failures in 18 files, none of them outside-review. I ran those 18 files on both trees. Both give 163 pass and 67 fail, with the same failing tests. These are this Mac's host failures (Linux inotify, Bun store layout, Aside, cso and others).
  • Did NOT test:
    • A real /ship run whose Codex reply ends this way. The CLI runs use the reporter's exact text.
    • Count-style check lines such as "Focused tests: 85 passed, 0 failed across 3 files." still read unverified. Round 7's own NO_FINDINGS reply ended that way. Reading counts safely ("0 failed" vs "1 failed") is a separate change.
    • The review gate when the check sentence sits before the Recommendation: line. Only the reply's last sentences are stripped; the because-clause still concludes as before.
  • Notes for review: "No issues in the parser, while missing configuration now silently disables authentication." as a reply's only sentence already reads clean on main ("while" is not in NO_FINDINGS_EXCEPTION). This PR does not change that, and the new paths do not reach it.

Liveness proof (required for external contributors)

SCR-20261029-ixel

Checklist

🤖 Generated with Claude Code

…onclusion (garrytan#3469)

Codex often closes a clean review with one sentence about its checks
("Tests, lint, and build all pass."). That sentence became the last
sentence, so the no-findings statement before it no longer counted and
the review read unverified.

Closing check-results sentences are now stripped from the raw reply
before the conclusion is read. They are matched before inline code is
removed and only as whole sentences (after . ! ? ; or a blank line), so
a negated, wrapped or conditional check is never dropped. They still
count toward the sentence total, so dropping one never makes a scoped
claim the reply's only sentence. "The changes introduce no ...
regressions" is accepted as a no-findings statement and is always held
to the whole-change scope rule.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@trunk-io

trunk-io Bot commented Oct 30, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@capy-ai

capy-ai Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Thank you for this fix. A crew lane is picking it up to land on current main with Co-authored-by credit to you.

@capy-ai

capy-ai Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

A quick update, since we said a crew lane was picking this up: that hasn't happened yet, sorry. #3469 still reproduces on main at cefcb20 (1.98.0.0): the first sign-off from the issue still reads VERDICT: unverified / REASON: untagged_review. It's on today's pick-up list, and if it lands you'll be credited as co-author.

@capy-ai

capy-ai Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Thanks, @vilano93. We rewrote this on main with stricter fail-closed parsing and landed it in #4130 (e58be61), with you credited as co-author. Closing this one in favor of that. It ships in the next gstack release after 1.98.0.0.

@capy-ai capy-ai Bot closed this Nov 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

outside-review-result: a clean structured review is unverified when Codex adds a check-results sentence after its conclusion

1 participant