Owner review 2, phase 4b, fix round 1 (trash, undo, recovery, sync and ingest).
- Replace journal: records a phase (moving, written, undoing) and the name each swapped
frame is filed under. Recovery decides "sidecar written" by what the sidecar lists, not
by the frames version any writer moves; a failed rollback stays undoing and its failure
now stops the writer (as a photo deletion's recovery does). The ingest settles restores
and replacements first, so an upload can no longer complete a swap that never happened.
- Emptying a Replaced entry re-verifies each replacement where it is now: in the sequence
through later conversions (a second conversion no longer strands the first originals),
or, when the conversion was deleted, its copy in the trash. The dry run marks such
entries "conversion deleted" (fingerprinted, shown on the desktop and the panel), and
the confirmed emptying may then erase them instead of keeping them forever.
- Undo of a conversion takes exactly the entries its job made (the job id is recorded on
the entry), never entries found by time window.
- Project positions translated by photo use the sidecar's photo of every frame still
there, so positions on a converted frame stay put when another frame went meanwhile.
- Sync aliases are equivalence classes: an original converted on both sides is one photo;
link-by-content, proxy counting and proxy upload follow aliases; a download into a
frame missing here swaps the other encoding into that frame instead of adding a frame.
- The ingest answers a converted photo's original (a card or folder imported again, a
download) as a duplicate of its conversion and keeps the alias tombstone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 3341a2f845753fc4c5bcba51a3b645f126c95eaf)