Repository navigation
fix(action): show warnings in zero-finding PR summaries - #1766
Conversation
|
🔍 OpenCodeReview found 1 issue(s) in this PR.
|
| const body = appendCheckpoint(`${SUMMARY_MARKER}\n✅ **OpenCodeReview**: ${message}${rangeNote}`, result.manifest); | ||
| // Warnings are not an input to that decision. | ||
| const body = appendCheckpoint( | ||
| `${SUMMARY_MARKER}\n${icon} **OpenCodeReview**: ${message}${rangeNote}${warningBlock}`, |
There was a problem hiding this comment.
Inconsistent ordering of rangeNote and warnings between code paths.
In the comments-present path (lines 537-538), the summary is built as …warnings → rangeNote. Here, the order is reversed: …rangeNote → warningBlock. This means the visual layout of the summary will differ depending on whether comments were generated or not.
Consider aligning the order to match the other path (warnings first, then rangeNote) for consistency.
Suggestion:
| `${SUMMARY_MARKER}\n${icon} **OpenCodeReview**: ${message}${rangeNote}${warningBlock}`, | |
| `${SUMMARY_MARKER}\n${icon} **OpenCodeReview**: ${message}${warningBlock}${rangeNote}`, |
NanaseInori
left a comment
There was a problem hiding this comment.
Reviewed both changed files, #1752, the current bot discussion, and the earlier #1755 implementation. The requirement is valid: a completed zero-finding run can still carry warnings that must remain visible without changing checkpoint eligibility.
The current head implements that presentation contract, including warning-first/range-note-second ordering. The earlier inline ordering comment is addressed and should not be treated as an outstanding defect. The tests also exercise non-sticky publication in addition to new/sticky summaries, supplied/fallback messages, warning formats, and checkpoint eligibility.
This directly overlaps #1755 in the same production branch. Both use the existing formatWarnings helper, select the warning icon and neutral fallback, and preserve the existing checkpoint path. The meaningful difference is additional test coverage, rather than a separate production capability. I recommend retaining one implementation; any useful additional tests here can be carried into the chosen branch. The earlier PR should not be held waiting for this later duplicate.
No blocking implementation defect found in the inspected patch. This is a source/overlap review, not an independent run of the Actions suite or a request to close the PR automatically.
This review was conducted by NanaseInori's review bot, using the model GPT-6 Astra Pro. If you need a human review, please manually @NanaseInori.
|
After comparing this head ( Both implementations satisfy the intended presentation contract; I found no blocking production defect in either patch. This PR additionally verifies warning details on non-sticky summaries and alongside retained checkpoints for partial/failed results. In controlled in-memory mutations, removing warning details only from either of those paths was caught by this PR's tests but not by #1755's tests. That is a test-protection distinction, not a claim that #1755 currently has those bugs. Both pinned heads passed local The next step is to rebase onto current After rebasing, please rerun AI disclosure: This comparison used OpenAI Codex and the OpenCodeReview CLI. The local checks and mutation experiments described above were executed against the pinned heads. |
Description
When a review finishes with zero findings,
runPostReviewCommentsposts the summary from thecomments.length === 0branch and returns beforeformatWarnings(result.warnings)is called. So a run that hit, for example,review_limit_reachedstill gets a ✅ summary ("Looks good to me" when there is no message) and the warnings are dropped. The findings path already appends them.This PR changes only the zero-finding branch in
scripts/github-actions/post-review-comments.js:formatWarningsblock as the findings path (string and structured warnings).result.messageis kept as is. When there is no message, the fallback is "No comments generated. See warnings below." instead of "Looks good to me".Type of Change
How Has This Been Tested?
make testpasses locallyNew cases in
scripts/github-actions/post-review-comments.test.jscover a completed zero-finding review with a structuredreview_limit_reachedwarning (new and sticky summary), string and mixed warnings, the no-message fallback, the unchanged no-warning output, and the checkpoint still advancing when warnings are present. The new summary test fails on the old code and passes with the fix.Local runs on Linux, all exit 0:
npm run test:github-actions,npm run test:launcher, the provider generator-check,scripts/verify-license.sh,scripts/verify-action-pins.sh,scripts/verify-english-only.go,make check(no diff afterwards),make test, andmake build.Checklist
go fmt,go vet)AI disclosure: I drafted and reviewed this change with AI assistance (Grok Build CLI, model grok-4.7). I have reviewed the diff myself. The commit carries no AI attribution.
Related Issues
closes #1752