Repository navigation
fix(review): retry malformed responses with fallback models - #3359
IsmaelMartinez merged 2 commits into
Conversation
PR Summary by QodoRetry malformed review responses with fallback models
AI Description
Diagram
High-Level Assessment
Files changed (5)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require review
Tip of the day💡 Did you know, you can ask Qodo to dismiss a finding you disagree with, with your reason on record |
IsmaelMartinez
left a comment
There was a problem hiding this comment.
Thanks for having the draft up within twenty minutes of asking, and for keeping the change to the plan you wrote down. One small ask inline (the lines sit just outside the hunk, so it is a code block rather than a suggestion), then this is ready; I have released CI on the branch.
Malformed then valid across two models now publishes one review with no failure comment, both models malformed posts exactly one, and a response the repair chain can fix never reaches the fallback. The transport-error partial path for chunks is unchanged.
The inline suggestion removes a branch this change made unreachable; its log line describes a fallback that no longer exists.
| data = self._load_valid_review_yaml(prediction, source=f"review chunk {chunk_index + 1}") | ||
| raw_predictions.append(prediction) | ||
| chunk_outputs.append(data) | ||
|
|
There was a problem hiding this comment.
Just below this hunk, lines 845-849: with two or more chunks every prediction now either lands in chunk_errors (transport error) or in chunk_outputs (validated, or it raises), so the warning("No chunk produced a parsable review, falling back ...") branch cannot run and its message describes a single-call fallback that no longer exists. Coverage lists 848-849 as missing. GitHub will not take a suggestion outside the hunk, so the replacement is:
if not chunk_outputs:
raise chunk_errors[0]Applied here: 108 passed on the four files, full suite unchanged.
There was a problem hiding this comment.
Removed the unreachable branch exactly as suggested in noreply 5c327e4f: when a multi-chunk attempt produces no validated output, it now raises the first recorded chunk error instead of retaining a dead single-call fallback path and stale warning.
Validation on the pushed head:
- the four reviewer/chunk/fallback/ticket-budget files: 108 passed
- full unit suite: 7,855 passed, 33 skipped, 1 xfailed
- Ruff and all applicable pre-commit hooks on
pr_reviewer.pypassed; actionlint was skipped because no workflow file changed - exact one-file diff, commit metadata, and publication leak checks passed
Release Drafter is green on 5c327e4f; Build-and-test, pre-commit, CodeQL, and Provider smoke need fresh fork-workflow approval for this head. Could you please re-review it when those settle? Thanks for catching the now-unreachable fallback rather than leaving misleading dead code behind.
|
Code review by qodo was updated up to the latest commit 5c327e4 |
IsmaelMartinez
left a comment
There was a problem hiding this comment.
Thanks for turning the code block into a four-line commit within the quarter hour and posting your own run beside it; approving.
The branch now carries exactly the removal asked for, the surviving raise always has an error to hand because a chunked attempt holds at least two predictions and each is recorded before that check, and the fallback tests go red with main's reviewer restored. Qodo has nothing on this head.
CI was gated on the new head; released.
Closes #3356.
What changed
reviewshape inside each_prepare_predictionmodel attempt, before that attempt is considered successful.The existing
load_yamlrepair chain still runs before validation. This change deliberately checks only the current non-empty mapping contract; strict field/type validation remains outside this issue.Validation
ruff check .passed.git diff --checkpassed.AI assistance
I used OpenAI Codex to help inspect the retry lifecycle, implement the change, and draft tests. I reviewed the full diff and ran the validation above locally.