Feature request
Currently, Changes#execute_all applies changes sequentially. If change 3 of 5 fails, changes 1-2 are already applied — leading to a partial state.
Proposed behavior
Before executing any changes, run a validation pass that checks all changes are feasible:
- Target paths exist for renames
- Directories are empty for non-force deletes
- No conflicting renames (two files renamed to the same target)
- Any other foreseeable issues
If any change would fail, report all issues and make no changes at all.
Current state
Reen#request (dry run) already analyzes changes without executing — this is useful for --review but doesn't pre-validate feasibility
- Individual
Change objects reject non-empty dir deletes, but other changes still execute
- No rollback mechanism exists
Considerations
- Could be an opt-in flag (
--safe or --atomic) or the default behavior
- Rollback (undo applied changes on failure) is an alternative but more complex
Feature request
Currently,
Changes#execute_allapplies changes sequentially. If change 3 of 5 fails, changes 1-2 are already applied — leading to a partial state.Proposed behavior
Before executing any changes, run a validation pass that checks all changes are feasible:
If any change would fail, report all issues and make no changes at all.
Current state
Reen#request(dry run) already analyzes changes without executing — this is useful for--reviewbut doesn't pre-validate feasibilityChangeobjects reject non-empty dir deletes, but other changes still executeConsiderations
--safeor--atomic) or the default behavior