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>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-11-03 09:36:01 +01:00
1 parent 8ea25228eb
commit 5012c3bbd2
12 files changed
+657 -108

No files matched your search

+4 -1
View File
@@ -267,7 +267,10 @@
<data name="Archive.Log.TrashKept" xml:space="preserve"><value>Mantenuto nel cestino, cambiato dopo il piano: {0}</value></data>
<data name="Archive.Log.TrashKeptBusy" xml:space="preserve"><value>Mantenuto nel cestino, la sua sequenza era occupata: {0}</value></data>
<data name="Archive.Log.TrashKeptMismatch" xml:space="preserve"><value>Mantenuto nel cestino, una conversione dei suoi originali non corrisponde più: {0}</value></data>
<data name="Archive.Log.TrashKeptUnknown" xml:space="preserve"><value>Mantenuto nel cestino, la conversione dei suoi originali non è stata trovata; esegui una scansione dell'archivio: {0}</value></data>
<data name="Archive.Log.TrashKeptStaleIndex" xml:space="preserve"><value>Mantenuto nel cestino, l'indice elenca la sua sequenza, che l'archivio non contiene più; ricostruisci l'indice: {0}</value></data>
<data name="Archive.Log.TrashKeptUnhashed" xml:space="preserve"><value>Mantenuto nel cestino, una foto della sua sequenza non è mai stata verificata; verifica la sequenza: {0}</value></data>
<data name="Archive.Log.TrashKeptUnknown" xml:space="preserve"><value>Mantenuto nel cestino, l'archivio non mostra che fine abbia fatto la conversione dei suoi originali; ripristinalo per conservarli: {0}</value></data>
<data name="Archive.Log.TrashKeptUnreadable" xml:space="preserve"><value>Mantenuto nel cestino, il sidecar di una cartella che potrebbe contenere la sua sequenza manca o non è leggibile; esegui una scansione dell'archivio: {0}</value></data>
<data name="Archive.Log.TrashOffline" xml:space="preserve"><value>Cestino non controllato: l'archivio non è raggiungibile</value></data>
<data name="Archive.Log.TrashReport" xml:space="preserve"><value>Voci vecchie nel cestino: {0}, dimensione: {1}; nulla è stato eliminato</value></data>
<data name="Archive.Log.VerifyDone" xml:space="preserve"><value>Foto controllate: {0}, integre: {1}, con impronta nuova: {2}, con problemi: {3}</value></data>