Files
Chronos/tests
Alby96andClaude Opus 5.5 5012c3bbd2 fix(archive): erase replaced originals only on the archive's own word
A conversion counted as deleted when no frame of the sidecar held it, no
tombstone ended its chain and every frame was hashed. A sidecar rebuilt by
adoption meets that after a routine verify although it never knew the
conversion, so the originals were erased, the dry run calling them the last
copy, while the damaged conversion was still in the folder. A sequence found
nowhere and missing from this index counted as gone in the same way, even
when the walk had only skipped its folder (photos without a sidecar), and its
live conversion was never hashed.

A conversion is now deleted only on positive evidence: a Deleted tombstone
ending its chain in the sequence's sidecar, the sequence in the trash, or the
trash's record of erasing it (.chronos/trash/.erased/<id>.json, written
before a deleted sequence's folder goes while a replaced entry of it stays,
swept once none does). Anything else keeps the entry, and its job log line
says what settles it: verify the sequence (a frame never hashed), scan the
archive (a sidecar missing or unreadable), rebuild the index (a row the
archive does not bear out), or restore the entry to keep its photos.

Also:
- a dry run or an emptying walks the archive once for every sequence that
  moved, and again only when a folder it found no longer holds it;
- a download queues the passes a frame swap cleared whatever stops the job
  (JobContext.EnqueueFollowUpAsync with a token), as a restore does;
- the confirmation's detail takes Tab and scrolls from the keyboard when it
  is longer than its card.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 09:36:01 +01:00
..