Repository navigation
fix(worker): A Live Photo's photo soft-deleted at classification takes its video along (#350) - #371
Merged
Merged
Conversation
…s its video along (#350) A video has one photo: pairing hands it over (PairedMovResolver.PairAsync, used by LivePhotoPairer and ProcessedContentWriter) and a unique index on PairedAssetId pins it. Retiring at classification goes through StoredContent.RetireAsync, which soft-deletes the photo's video in the item's one save and counts each row once. MissingFileSweep no longer retires the video of a soft-deleted photo, and KnownFileReconciler no longer drops a moved row's pointer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…le out of summaries (#350) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #350
Summary
A video has one photo (design note, option 2): pairing hands it over, retiring takes it along, and a unique index pins it.
Evidence
cp B.heic A.heiconto Live Photo A → A soft-deleted, A's video active until a complete crawl (never, with an unreadable folder); the testLivePhotoCopiedOverAnother_…RetiresOnlyTheOverwrittenPhotoasserted exactly that.After: A and its video soft-deleted in the same save,
softDeleted= 2, even when the item never loaded the video (LivePhotosPhotoCopiedOverWithItsVideoUnread); the next crawl leaves both soft-deleted (CopyOverARetiredLivePhotoCrawledAgain).mv B.* A.*onto a Live Photo:softDeleted= 2 (B and its video), not 3. Onto a still photo: B's video stays active, A points at it, B's pointer is null,softDeleted= 1 (pins the pairer running before the reconciler).IngestionSaverTests, real migrated PostgreSQL): the hand-off ofmv B.* A.*onto a still photo saves under the unique index afterRetiredFirst, for both id orderings, so EF orders the twoUPDATEs itself; no fallback needed.scripts/mutation-changed.sh100.00% for Core and Worker.Merge Danger
Door: two-way
The unique index is the only hard-to-reverse part, and only once there is data; nothing is deployed, so it is reversible now.
Blast Radius: ingestion
A path that would make two photos share a video now fails the item's save instead of sharing silently (
LostIngestionRacedoes not match this index). #370 (the video a photo lets go of) is unchanged.🤖 Generated with Claude Code