fix: Catch all exceptions from _run_lean to prevent UnboundLocalError#4
Conversation
If _run_lean raises something other than TimeoutExpired (e.g. UnicodeDecodeError from non-UTF-8 lean output), the result variable was unbound, crashing at cache.put() and return. Now catches all exceptions with an INCONCLUSIVE result. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
PR SummaryLow Risk Overview Timeout handling and caching behavior are unchanged; unexpected failures now produce a structured result with elapsed time and the exception message instead of propagating. Reviewed by Cursor Bugbot for commit 96f10ab. Bugbot is set up for automated code reviews on this repo. Configure here. |
Summary
_run_lean, not justTimeoutExpired, preventingUnboundLocalErrorwhen e.g.UnicodeDecodeErroroccurs from non-UTF-8 lean outputINCONCLUSIVEresult instead of crashingAddresses Sentry review feedback on #3.
Test plan
🤖 Generated with Claude Code