[$25 BOUNTY] Add stale diagnostic cleanup dry run - #123
Open
Saiaaax wants to merge 3 commits into
Open
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.
Summary
Add a
--diagnostic-cleanupflag tobuild.pythat lists stale diagnostic artifacts (those not belonging to the current commit) without deleting them. An explicit--force-cleanupflag is required to actually perform the deletion. Current commit artifacts are always preserved.Closes #68
Changes
--diagnostic-cleanupflag (dry-run by default) and--force-cleanupflag for actual deletionfind_stale_diagnostic_artifacts()scans thediagnostic/directory for artifacts whose embedded commit ID differs from the current HEADrun_diagnostic_cleanup()handles both dry-run listing and force deletion with size reporting.logdparts) are never removed.logdparts detected as stale for old commitsTesting
All 10 tests pass using temporary diagnostic directories (no real files are modified).
Diagnostic Artifacts
.logdreference:diagnostic/build-ec966bc5.logddiagnostic/build-ec966bc5.jsonChecklist
Payout address: 0x5253757322092903C2F0a8EfEed592344216CC7E