fix(suggestions): align fallback chunks after conversion failure - #2867
Conversation
PR Summary by QodoAlign fallback suggestion chunks after conversion failure
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
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 reply 'qodo' on any finding to push back, ask questions, or dig deeper |
IsmaelMartinez
left a comment
There was a problem hiding this comment.
Verified correct, and this is the default path: decouple_hunks = false.
On main the fallback re-chunks with line numbers but keeps the stale unnumbered list, so zip misaligns and truncates: 4 numbered chunks became 3 prediction calls, each paired with another chunk's text.
Reachable in a default config, no mock needed: a model outside MAX_TOKENS makes the conversion throw and return []. Your head passes all 12 scenarios I ran; main fails 8.
Thanks for deriving both views from one canonical list rather than re-chunking twice. One ask inline.
868a6fe to
d651bb9
Compare
|
/agentic_review |
IsmaelMartinez
left a comment
There was a problem hiding this comment.
Applied exactly as asked, and the new coverage still goes red against main. Taking it from here, thanks again for the follow-up.
Returning an empty list stopped the chunk from raising, so The-PR-Agent#2867's coverage footer counted it as successful and a partial run reported as a complete one. Record the parse failure and add it to failed_chunk_count. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Summary
push_inline_code_suggestionsreturnNoneexplicitly on every path to satisfy CodeQLTesting
PYTHONPATH=. ./.venv/bin/pytest tests/unittest -q(2764 passed, 1 skipped, 1 xfailed)./.venv/bin/pre-commit run --files pr_agent/tools/pr_code_suggestions.py tests/unittest/test_pr_code_suggestions_core.py tests/unittest/test_pr_code_suggestions_rendering.pyFollow-up to #2863.