You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Re-link moved/renamed files and refresh LastSeenOnNas on every crawl #35
A file that is moved or renamed on the NAS keeps its old FilePath in the database.
IdempotencyCheckMiddleware finds the existing row by (StorageConfigId, ContentHash) and returns without doing anything.
LastSeenOnNas is set only at first ingest (PersistenceMiddleware, PairedMovResolver) and never refreshed.
Once originals are served (#44), every moved photo will 404. Reconciliation (#33, #34, #37) also needs LastSeenOnNas to be current. This is why the issue is pulled ahead of the rest of Epic 4.
Behaviour
In the idempotency step, when an active row with the same (StorageConfigId, ContentHash) exists:
Situation
Action
Same FilePath
Refresh LastSeenOnNas.
Different FilePath, and the stored path no longer exists under the config root
Moved: update FilePath to the new path and refresh LastSeenOnNas.
Different FilePath, and the stored path still exists
Duplicate copy: leave the row alone. #36 reports it. Do not ingest a second row; the partial unique index forbids one.
In every case, ingestion of that item stops there: no metadata extraction, no proxy regeneration.
Proxies need no move. Their directory is keyed by content and config, not by path (IProxyDirectoryStrategy). A Live Photo pair moved together keeps its PairedAssetId link, because each half is matched by its own hash.
Acceptance
A moved file updates FilePath on its existing row. Its Id, its interactions and its proxies are unchanged.
A re-crawled, unchanged file refreshes LastSeenOnNas and nothing else.
A second copy at another path leaves the row unchanged and logs it at debug level.
The persistence write goes through IUnitOfWork as it does today. A concurrent consumer racing on the same hash must not throw. PersistenceMiddleware already tolerates the unique-index race; mirror that.
Tests at the middleware seam, with MockFileSystem for path existence.
changed the title [-]Detect moved/renamed files via content_hash[/-][+]Re-link moved/renamed files and refresh LastSeenOnNas on every crawl[/+]on Oct 16, 2026
Activity
[-]4.3 Detect moved/renamed files via content_hash[/-][+]Detect moved/renamed files via content_hash[/+][-]Detect moved/renamed files via content_hash[/-][+]Re-link moved/renamed files and refresh LastSeenOnNas on every crawl[/+]feat: Re-link moved files and refresh LastSeenOnNas on every crawl (#35…