Skip to content

fix(cleanup): re-snapshot tombstone after cross-device move - #5

Merged
rldyourmnd merged 1 commit into
mainfrom
fix/cross-device-resnapshot-tombstone
Aug 4, 2026
Merged

fix(cleanup): re-snapshot tombstone after cross-device move#5
rldyourmnd merged 1 commit into
mainfrom
fix/cross-device-resnapshot-tombstone

Conversation

@rldyourmnd

Copy link
Copy Markdown
Contributor

Problem

After the EXDEV fix (shutil.move), install-cli failed with:

cleanup tombstone object identity changed: .

Root cause

A cross-device shutil.move falls back to copy+unlink, creating new inodes. The pre-move snapshot (captured for the intent document) was reused for the pending document, so drain_cleanup's validate_cleanup_object compared the tombstone's new dev/ino against the original pre-move record and failed.

Fix

Re-snapshot the tombstone after the move and publish that as the pending document (the one drain_cleanup validates against). The prepare/intent document keeps the pre-move snapshot; only the pending document is refreshed.

Verification

python3 scripts/run_harnesses.py --module nddev-qwen-code-app --lane fast
# 60 tests OK (1 skipped), validate_fast.sh PASS
install-cli --target <isolated-target> --json
# { "version": "0.21.2" }

Building on the shutil.move EXDEV fix, a cross-device copy creates new
inodes, so the pre-move snapshot no longer matches the tombstone. The
pending document therefore recorded the original (pre-move) dev/ino and
drain_cleanup's validate_cleanup_object failed:

  cleanup tombstone object identity changed: .

Re-snapshot the tombstone after the move and publish that as the pending
document (the one drain_cleanup validates against). The prepare/intent
document keeps the pre-move snapshot; only the pending document is
refreshed, preserving the cleanup state machine.
@rldyourmnd
rldyourmnd merged commit 4ec84da into main Aug 4, 2026
9 checks passed
@rldyourmnd
rldyourmnd deleted the fix/cross-device-resnapshot-tombstone branch August 4, 2026 15:13
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