Repository navigation
fix(gitlab_ci): stop posting a check-mark LGTM on a failed review - #1999
Merged
lizhengfeng101 merged 3 commits intoNov 19, 2026
Merged
Conversation
Contributor
|
✅ OpenCodeReview: Review complete: 0 finding(s) across 1 selected item(s). |
atishay-kasliwal
left a comment
There was a problem hiding this comment.
Fix looks right for failed. One gap on the same path, inline.
| message = result.get("message", "No comments generated. Looks good to me.") | ||
| body = wrap_summary_body("✅ **OpenCodeReview**: %s" % message, | ||
| config.get("run_tag", "0-0")) | ||
| if result.get("status") == "failed": |
There was a problem hiding this comment.
A partial run still takes the else branch. With zero comments it posts ✅ **OpenCodeReview**: Review partially complete: 0 finding(s); 2 of 3 selected item(s) failed. (message from manifestMessage, cmd/opencodereview/output.go:638). #1882 shows partial as failed in the VS Code extension, so maybe the same here?
if result.get("status") in ("failed", "partial"):(From reading publish() and manifestMessage, I didn't run it.)
Contributor
Author
There was a problem hiding this comment.
Done in 929ee98: partial now takes the warning branch too, with a test for it.
The zero-comment path always rendered a success glyph and the LGTM default. A failed review has zero comments too, so a completely failed review posted an all-clear onto the merge request. On status=failed the summary now warns that the review did not complete, and a regression test asserts the success glyph is absent.
gengwg
force-pushed
the
fix/gitlab-ci-failed-review-not-lgtm
branch
from
November 19, 2026 05:10
9e0408b to
929ee98
Compare
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
Fixes #1998.
examples/gitlab_ci/post_review.py's zero-comment path always rendered a success glyph (✅) and the default "No comments generated. Looks good to me." A failed or partial review can have zero comments too, so a review that never covered some or all of its selected files posted an all-clear summary onto the merge request — the one durable record a reviewer reads.Now, when
result.statusisfailedorpartial, the summary warns that the review did not complete instead of showing the success glyph, and carries the CLI'smessage(for example "Review partially complete: 0 finding(s); 2 of 3 selected item(s) failed."). Without amessage, it names the status. Other statuses keep the existing LGTM behavior.Tests
Added
test_failed_review_not_lgtmandtest_partial_review_not_lgtm, which assert the success glyph is absent and the CLI's failure text is present, andtest_incomplete_review_without_message_names_statusfor the fallback text.Mutation-checked: with the fix reverted, the new tests fail (
✅present); with it, all 157 pass.Disclosure (per CONTRIBUTING.md)
This change was produced with AI/LLM assistance (an agent using Kimi K3.1 ran the integration, hit this on a real merge request, and wrote the first commit's patch and test). The follow-up commit for
partialwas written with Claude Code (Claude Opus 5.5). I have read and understand every line of the diff: the zero-comment branch now treatsstatusfailedorpartialas incomplete and emits a warning instead of the success glyph, and the tests pin that behavior. No AI/LLM attribution is included in the commits.