Per v1.5.0 Phase 4: - Generate variants to temp directory first - Perform database inserts in transaction - Move files to final location before commit - Clean up temp files on any failure - Add startup recovery for orphaned temp files - All media operations now fully atomic Changes: - Modified generate_all_variants() to return file moves - Modified save_media() to handle full atomic operation - Add cleanup_orphaned_temp_files() for startup recovery - Added 4 new tests for atomic behavior - Fixed HEIC variant format detection - Updated variant failure test for atomic behavior Fixes: - No orphaned files on database failures - No orphaned DB records on file failures - Startup recovery detects and cleans orphans 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
40 KiB
40 KiB