Skip to content

fix(move): restore rollback file contents on failure#51

Merged
DivyamTalwar merged 1 commit into
mainfrom
codex/fix-move-rollback-integrity
Mar 28, 2026
Merged

fix(move): restore rollback file contents on failure#51
DivyamTalwar merged 1 commit into
mainfrom
codex/fix-move-rollback-integrity

Conversation

@DivyamTalwar

Copy link
Copy Markdown
Owner

Summary

  • restore original moved-file contents during rollback after a failed write later in the move flow
  • restore original moved-directory file contents during rollback after failed external rewrites
  • add regression coverage for both file-move and directory-move rollback paths

Root Cause

app.commands.move.move_apply was moving files/directories and then rewriting contents, but it no longer snapshotted the moved target contents before those rewrites. If a later write failed, rollback moved the target back to the source path without restoring the original contents first, which could leave a failed move with mutated source files.

Validation

  • make ci
  • targeted rollback regression tests in tests/commands/test_transitive_engine.py
  • package smoke from make ci

@DivyamTalwar DivyamTalwar marked this pull request as ready for review March 28, 2026 14:34
@DivyamTalwar DivyamTalwar merged commit 9248587 into main Mar 28, 2026
13 checks passed
@DivyamTalwar DivyamTalwar deleted the codex/fix-move-rollback-integrity branch March 28, 2026 14:35
@DivyamTalwar DivyamTalwar changed the title [codex] fix(move): restore rollback file contents on failure fix(move): restore rollback file contents on failure Mar 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant