fix: Don't cache timeout/error results in LeanProver#5
Conversation
Only cache results from successful lean invocations (success or type-check failure). Timeout and unexpected errors are transient and should not permanently prevent retries for the same spec. Matches CoqProver behavior where cache.put is inside the try block. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
PR SummaryLow Risk Overview This ensures only actual Lean execution outcomes are cached via Reviewed by Cursor Bugbot for commit 38c35c9. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is ON, but it could not run because the spend limit has been reached. To enable Bugbot Autofix, have a team admin raise the spend limit in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit da8e4e1. Configure here.
cache.put inside try was covered by the broad except Exception, meaning a cache error would discard a valid proof result and return INCONCLUSIVE. Since both except branches return early, cache.put safely goes after the try/except block — only reached with a valid result from _run_lean. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

Summary
cache.putinside thetryblock so only actual lean execution results (success/type-check failure) get cachedAddresses Bugbot review on #3.
Test plan
🤖 Generated with Claude Code