fix: surface malformed LLM plan output as LLMError - #59
Conversation
|
Warning Review limit reachedNext included review available in 9 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryMalformed LLM group entries now become recoverable LLM errors. Chunked planning retries a malformed response, and plan refinement preserves the previous valid plan when a malformed response is returned. The focused planner-client regression suite passes. Safe to merge. Confidence Score: 5/5No blocking failure remains. The exercised malformed-response paths recover as intended, and no accepted blocking findings remain.
What T-Rex did
Reviews (2): Last reviewed commit: "fix: surface malformed LLM plan output a..." | Re-trigger Greptile |
1d299e1 to
99deaf3
Compare
99deaf3 to
345e9b9
Compare
_parse_groups raised KeyError, ValueError or pydantic ValidationError on malformed tool output. The chunk retry loop and the refinement fallback only catch LLMError, so a single bad response aborted the whole split with a traceback instead of retrying or keeping the previous plan.
345e9b9 to
5281dd4
Compare
Summary
_parse_groupsraisedKeyError(missing field),ValueError(badassignment_type) or pydanticValidationError(wrong type, e.g.hunk_indices: "0") on malformed tool output. Both consumers only catchLLMError:_call_chunk_with_retrynever retried such responses_refine_plan_with_llmwas meant to fall back to the pre-refinement groups but let the exception escape, aborting the splitOpenAI calls do not use strict schema mode, so these shapes are realistic.
_parse_groupsnow wraps parsing and raisesLLMError(LLM_PARSE_ERROR)with the underlying error type and message.Test plan
LLMErroruv run ruff check/ruff format --checkcleanuv run pytest -q— 448 passed