diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 1b78a639..d2811a80 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -500,3 +500,9 @@ commits follow Conventional Commits (release notes are generated from them by `T - Scans of an archive shared by two Titano indexes (a desktop and its server): one index could write a sidecar at the frames version the other held for other frames. The other index then took the frames as unchanged. When the versions match, a scan now also compares the frames themselves and writes changed ones one version past its row. +- Orphans fix and scans: a photo that could not be read yet (held open by another program, no read permission, a + OneDrive placeholder offline) made the folder count as changed, so every fix rewrote the sidecar, cleared the + thumbnails, proxies and analysis status and queued the analyses again. It now changes nothing until the photo can be + read. +- Deep analysis: a pass that started before a proxy arrived could overwrite the report a later pass made from the + proxies and drop the sequence's deep status. It now leaves a report that describes the frames as they are in place. diff --git a/docs/DECISIONS.md b/docs/DECISIONS.md index c9c1ed55..8df15533 100644 --- a/docs/DECISIONS.md +++ b/docs/DECISIONS.md @@ -393,3 +393,5 @@ One line per decision: date · decision · alternative · reason. | 2026-10-12 | The Archive screen's orphans fix (`ArchiveService.ReconcileAsync`) clears AnalyzedLight, ThumbsBuilt and ProxiesBuilt in the sidecar and the row when photos were added, gone or back, as a scan's reconcile does. It then queues on the host's engine what a scan's follow-ups would. That is the light analysis, plus a background deep analysis when the host asks for one after scans (desktop: Settings › Analysis › After a scan). On a server (`ImagesAfterScan`) it is also the Thumbs pass and, unless proxies are disabled, the Proxies pass. A kind the engine does not run is left out. So is a kind for which a queued job already covers the sequence, whatever else that job targets. | Keep the flags; clear them and leave the queueing to the next scan; run the fix as a job; queue the light analysis only | The fix records the folder's stamps, so incremental scans skip the folder, and a full scan's reconcile finds nothing new; cleared flags alone would wait for the next change of the folder. With the flags kept, the light analysis was never redone: Auto values, warnings and preview-only tiers stayed those of the old frames, and the Analyse health line did not list the sequence. Without the deep analysis, the light analysis drops the deep status when the frame count changes, and nothing redid the deep analysis, while the same photos found by a scan got one. A queued job runs after the fix on the frames as they are; a scan's follow-ups target several sequences, so checking only single-target jobs would queue a second deep analysis of hours. Cleared in the sidecar, the flags also tell a server sharing the archive to draw the new frames after its next scan. | | 2026-10-12 | A deep analysis saves `analysis.json` under the sequence lock, after it has checked its frames (`SequenceAnalyser.SaveReport`). It replaces the saved report when the frames it measured are still the sequence's: no change found, and the sidecar at the frames version the pass read. Otherwise it replaces only a report that describes the frames as they are no better: none, unreadable, or of another frame count than the sidecar's. Its checkpoint is deleted only then. A pass that leaves the saved report in place and still records (a light analysis is queued) records that report, read as a light analysis reads it, not its own. Refines 2026-10-12 'An analysis records nothing…'. | Save before the check (as before); never save an overtaken pass's report; name the report by its frames version; record the pass's own report, or no report, when it did not save | A pass overtaken by an upload, or by another Titano sharing the archive, replaced the report that a later pass had made of the frames as they are. GET /report then answered 404, and the next light analysis cleared that pass's deep status. Keeping a report when no better one exists keeps what the refined row keeps. Recording the unsaved report put a summary, warning count and Auto values in the index that no file holds, and the queued light analysis keeps the stored summary. Recording none would drop the deep status of the report on disk until that light analysis ran. A versioned name would change the file that every reader and the server's report endpoint open. Deleting the checkpoint only after the save lets a pass stopped while waiting for the lock resume. | | 2026-10-12 | Equal frames versions in a sidecar and an index row mean the same frames only when the row's frame ids and order are the sidecar's (`ArchiveIndexer.OtherFramesAsync`). Otherwise the scan treats it as any frames change: it reads the sidecar again under the lease, writes it one version past the row, moves the project's positions and, on a server, clears what covered the frames. Refines 2026-10-12 'The index's frames version never goes back.' | Compare versions only; make the bump unique (a counter kept in the sidecar, a timestamp) | Each index of a shared archive bumps a sidecar put back behind its own row to one past that row. That can be the version another index already holds for other frames, for example a desktop rebuilding a damaged sidecar while the server is one upload ahead. That index then kept its positions, statuses, sync diff and proxy cache, and accepted editors' saves made against frames that had changed. A counter in the sidecar goes back with the sidecar it is put back with. The frame list is read only when the versions match, and the scan writes every frame row in that case anyway. | +| 2026-10-13 | `SequenceAdopter.Reconcile` returns null, and the sidecar is left as it was, when the photos it found could not be read and no frame's missing flag changed. | Index the photo without metadata; flag it | A photo held open by another program, without read permission or not downloaded yet is read at the next scan or fix. Treating its folder as changed rewrote the sidecar, cleared the covering flags and queued the analyses (with a deep analysis, hours) again at every orphans fix. | +| 2026-10-13 | A deep pass counts as current only when its report describes the frames as this host reads them under the lock, proxies included (`SequenceAnalyser.Describes`), besides an unchanged frames version. Otherwise it replaces only a saved report that does not describe them either (`ReadReport` of the frames as they are). Refines 2026-10-12 'A deep analysis saves `analysis.json` under the sequence lock…'. | Compare frames versions only | A proxy arriving moves no frames version but makes an unreadable verdict on that frame's original stale. A pass that started before it overwrote the report a later pass made from the proxies, then dropped the deep status. |