docs: record the fifth verification pass in DECISIONS, CHANGELOG and STATUS

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
Claude committed 2026-10-13 00:02:02 +00:00
1 parent bd9f4a2869
commit 00823b0328
3 files changed
+25 -6

No files matched your search

+14
View File
@@ -486,3 +486,17 @@ commits follow Conventional Commits (release notes are generated from them by `T
- Verify: flags recorded while a verify ran (a preview-only or undecodable photo, a duplicate) were undone by it. A
photo an upload repaired during the run was flagged missing again, so the next copy moved the good file aside. A
verify now writes only the missing and corrupt flags, and only for files still as it checked them.
- Tags: on PostgreSQL, two writers of sequences sharing tags could deadlock, and one of them failed. This happened
when an edit through the API listed the tags in another order than an upload, a scan or another edit. Tags are now
written in one order, and an unchanged set is not written again.
- Archive › Orphans: photos the fix indexed were never analysed, so the Auto values, warnings and preview-only count
stayed those of the old frames. The fix now clears the analysis and image flags as a scan does, and queues the light
analysis. When Settings › Analysis › After a scan is on, it also queues the background deep analysis, as a scan
does.
- Deep analysis: a pass overtaken by new photos replaced the current `analysis.json` that a later pass had made. The
report endpoint then answered 404, and the next light analysis dropped the deep status. The report is now saved
under the sequence's lock, and never over a more current one. A pass that leaves the saved report in place records
that report's summary and warnings, not its own.
- 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.
+4
View File
@@ -389,3 +389,7 @@ One line per decision: date · decision · alternative · reason.
| 2026-10-12 | An upload's batch asks `ArchiveIndexer.InStepAsync` under the lease before it changes the folder. It appends its frame rows and records the folder's stamps only when that held and its frames went at the end. Otherwise it writes the whole row and every frame from the sidecar. This extends the partial-writer stamps row above to `ArchiveIngest`. | Keep the frame-count check alone; append and leave the stamps unrecorded | A desktop's verify, decode tiers, duplicates or title change only existing frames or fields, so the frame count still matched. The appended rows and the recorded stamps then hid those changes from the server's index until a full scan, and a sequence that keeps receiving uploads never healed. Appending without recording stamps would still leave the server's frames stale until its next poll. |
| 2026-10-12 | Before an upload's batch files its photos, it asks under the lease whether the photo directory still has the stamp the index recorded (`ArchiveIndexer.PhotosChangedAsync`). The photo directory is `originals/`, or the folder for a sequence adopted in place. If it changed, because photos were copied in or removed by hand or by another process since the last scan, the resync from the sidecar records the photo stamp the index held before, or none when none was recorded. The folder's new stamp is not recorded, so the next incremental scan reconciles the folder with its photos. | Reconcile the photos in the upload under the lease; record the new stamp as before | The batch's own files change the photo directory's stamp. Recording it hid the copied photos from every incremental scan, so only a full scan or the orphans check found them. A reconcile in the upload would read new photos while uploads to the sequence wait. The scan's reconcile already clears and queues what covers the frames. Until that scan, which server and desktop run every 10 minutes, every upload batch to that sequence writes all its frames instead of appending. |
| 2026-10-12 | A verify writes only `Missing` and `Corrupt`, merged into the frame's flags as the sidecar has them under the lease. The index sets and clears only those bits, with the new hash. A check is written only while the sidecar lists the frame with the file, size and hash that were checked, and the file still has the size and modification time it had before it was read. Otherwise the next verify checks it. | Write every flag computed from the frame read at the start (as before); merge the bits but write every verdict; hash the file again under the lease | A verify reads each sidecar once, possibly hours before it writes. Tiers, duplicates and repairs recorded meanwhile were reverted. A photo an upload repaired during the run was flagged missing, so the next copy moved the good file aside. Hashing again under the lease would hold uploads back for as long as the files take to read. One case remains: during the run, a good copy with the same size and modification time is put back over a same-size corrupt file, and it is still flagged corrupt. A card import keeps the camera file's time, so it can do this. The next verify clears the flag. |
| 2026-10-12 | On PostgreSQL a sequence's tags are written in the order of their keys (`TagRepository.Key`), whatever order the caller listed them in. A tag set the sequence already carries (compared by key) is not written again (`SequenceRepository.ReplaceTagsAsync`). | Keep the caller's order; retry transactions PostgreSQL aborts with 40P01; lock every tag of the set in one statement | Each tag upsert locks its row until commit. A PATCH may list tags in any order, while ingest batches, scans and the trash wrote them sorted. Two writers of sequences sharing two tags could then take the rows in opposite orders, and PostgreSQL aborted one with a deadlock that nothing retries (row 'Every transaction that writes a sequence's frames…'). One order closes the cycle. Ingest batches and scans rewrote unchanged tags at every write; skipping them takes no tag lock at all. SQLite serialises writers and was not affected. |
| 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. |
+7 -6
View File
@@ -21,12 +21,13 @@ A full audit against the brief, `CLAUDE.md`, the UI kit, the tests and the Docke
defects with independent verifiers. A second pass over the fixes confirmed 37 more (proxies and decode tiers, project
positions crossing copies through sync, server scans and maintenance, desktop settings and polling, a portable copy
inside OneDrive, setup and deployment guidance), a third pass 16 more (editors open while photos arrive, partial
writers of the index row, image passes after another writer's import, smaller error-text and documentation gaps), and
a fourth pass 7 more (lock order of index writes, analyses and scans racing another writer). All are fixed, each with
tests (rows dated 2026-10-12 in DECISIONS and CHANGELOG), except that the screenshot diff (BRIEF §20.2 visual
regression) gates nothing until its first baselines are committed (Next steps). The Docker image was built and run
with PostgreSQL 17, a fresh archive folder and remapped ports; the client installers are installed, run, upgraded and
removed on `windows-latest` by the `installer` CI job.
writers of the index row, image passes after another writer's import, smaller error-text and documentation gaps), a
fourth pass 7 more (lock order of index writes, analyses and scans racing another writer), and a fifth pass 4 more
(tag lock order on PostgreSQL, the orphans fix's follow-up analyses, deep reports saved over newer ones, frames
versions shared by two indexes). All are fixed, each with tests (rows dated 2026-10-12 in DECISIONS and CHANGELOG),
except that the screenshot diff (BRIEF §20.2 visual regression) gates nothing until its first baselines are committed
(Next steps). The Docker image was built and run with PostgreSQL 17, a fresh archive folder and remapped ports; the
client installers are installed, run, upgraded and removed on `windows-latest` by the `installer` CI job.
## How to try it