agent: clean up the proof tree files a run leaves behind - #16
Closed
dingf3ng wants to merge 1 commit into
Closed
Conversation
ProofController writes <theorem>_proof_tree_final.png and .json next to the file being proved (proof_controller.py:280). They are named after the theorem, not the scratch copy, so ScratchProof's cleanup -- which works from self.path -- never matched them. Five benchmark goals left ten files behind in AutoRocq-bench, untracked and not gitignored. Deleting by name pattern would risk removing output from an earlier run, so open() records which of them already exist and close() removes only what this run added. Same shape as the _CoqProject backup already here. Re-running the same five goals, the benchmark tree is empty afterwards on both checks: git status clean, and no *_autorocq_*.v or *_proof_tree_final.* anywhere under benchmarks/. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Collaborator
Author
|
Superseded by #17. Two things were wrong here:
#17 writes the tree into the run's output directory instead, beside |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
ProofControllerwrites<theorem>_proof_tree_final.pngand.jsonnext to the file being proved (proof_controller.py:280).They're named after the theorem, not the scratch copy — so
ScratchProof's cleanup, which works fromself.path, never matched them. Five benchmark goals left ten files inAutoRocq-bench, untracked and not gitignored.That undercuts the whole promise of the scratch copy: your tree comes back untouched.
What changed
Deleting by name pattern would risk removing output from an earlier run. So instead:
open()records which*_proof_tree_final.*already existclose()removes only the ones this run addedSame shape as the
_CoqProjectbackup already in the class.Result
Same five goals re-run. Afterwards the benchmark tree is empty on both checks: