Conservative cleanup of provisional scratch files after successful verification#313
Open
mmprotest wants to merge 1 commit into
Open
Conservative cleanup of provisional scratch files after successful verification#313mmprotest wants to merge 1 commit into
mmprotest wants to merge 1 commit into
Conversation
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.
Motivation
Description
Bashas provisional scratch candidates while recording explicitWrite/Patchcreations separately; added helpers_snapshot_repo_filesand_new_files_sinceinvillani_code/state.pyand new runner fields to hold this provenance._cleanup_provisional_scratch_after_successinvillani_code/state_runtime.pythat filters candidates by newly-created-only, excludes modified existing files, avoids files inside detected source/test/package roots, aborts when roots cannot be detected, and only proceeds when there is exactly one visible verification command to rerun.scratch_cleanup_appliedand setrunner._cleaned_scratch_filesso downstream validation sees the reduced changed-file set.villani_code/state.py,villani_code/state_runtime.py, and tests.Testing
tests/test_state_runtime.pycovering removal-on-success, restore-on-failure, explicit-write-created source/test file exclusion, preservation of modified existing files, preservation of files inside detected source roots, and skipping cleanup when root detection is uncertain.pytest -q tests/test_state_runtime.py -k 'cleanup or explicit_write_created'and the selection passed (7 passed, 32 deselected).Codex Task