Repository navigation
STE-113: Fix shared-content deletion bug in attachment storage - #32
Merged
Merged
Conversation
…Endpoints, add CountByStorageRefAsync - Fixed deleteAttachmentHandler to delete DB row first, then CountByStorageRefAsync, then conditionally delete the file. - Added AttachmentResponse.storageRef to enable test assertions. - Added CountByStorageRefAsync to IAttachmentRepository and AttachmentRepository (tenant-scoped, RLS-aware). - New endpoint test: shared file survives deletion of duplicate attachment referencing same storage_ref. - New repository test: CountByStorageRefAsync returns correct counts before/after deletions. - Fixed pre-existing master issues: - TransferEndpoints: missing DeletedAt field on Transaction records - ReconciliationEndpointsTests: extra userId argument typo - Program.fs: leftover conflict markers from STE-25 merge Co-Authored-By: Paperclip <noreply@paperclip.ing>
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.
Fixes the attachment storage bug where deleting one attachment that shares a content-addressed file with another leaves the second with a dangling reference.
Changes:
Also fixes pre-existing master build issues (merge conflict markers, missing DeletedAt fields, stray userId argument).