Draft
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
This PR adds coverage for a recent
rm --purgepath that was still untested: running the command with--dry-runagainst a versioned object. Without this test, the purge feature only had assertions for real deletes, not for the safety path that should avoid both permanent deletion and delete-marker creation.The branch also adds a minimal root
Makefilewith apre-committarget because this repository did not exposemake pre-commit, while the documented local validation steps already existed as standalone cargo commands. The new target simply wraps the existing required checks.Root Cause
The recent purge work added permanent-delete behavior, but the dry-run interaction lived on a separate execution path and did not have focused regression coverage. That left a gap where a future change could accidentally route dry-run purge requests into the destructive path without a targeted test failing.
Fix
The new integration test enables versioning, uploads a single object, runs
rc rm --purge --dry-run --json, and then verifies that the object still has exactly one non-delete-marker version. This keeps the scope on the changedrm purgearea and exercises the user-visible behavior directly.Validation
cargo test --features integration --test integration option_behavior_operations::test_rm_purge_dry_run_does_not_delete_versioned_object -- --exact --nocapturemake pre-commit