Skip to content

Fix vault data loss when hiding videos#1834

Open
anilbeesetti wants to merge 1 commit into
mainfrom
codex/fix-issue-1828-vault-data-loss
Open

Fix vault data loss when hiding videos#1834
anilbeesetti wants to merge 1 commit into
mainfrom
codex/fix-issue-1828-vault-data-loss

Conversation

@anilbeesetti

Copy link
Copy Markdown
Owner

Summary

  • generate unique UUID-backed vault destinations to prevent same-name collisions
  • reserve database rows before destructive file operations and reconcile failed or cancelled moves
  • copy, sync, and verify each vault file before deleting its source, preserving originals on every failure path
  • retain committed batch results while leaving uncommitted sources untouched on cancellation

Reproduction

Issue #1828 was reproduced with two hash-distinct videos sharing the same filename. The old flow overwrote the first vault path and then crashed on the hidden_video.vault_path unique constraint after moving the source.

Testing

  • ktlintCheck
  • testDebugUnitTest
  • app assembleDebug
  • 5 core:data instrumentation tests on a disposable Android 16 emulator
  • 5 core:media instrumentation tests on a disposable Android 16 emulator
  • manual permission-denial and same-name vault QA

Closes #1828

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.

The app crashed when a video was hidden.

1 participant