Skip to content

[WIP] Add dedupe-before-write behavior for collection and junction-table paths - #1015

Closed
dgee2 with Codex wants to merge 1 commit into
mainfrom
codex/prevent-duplicate-inserts
Closed

[WIP] Add dedupe-before-write behavior for collection and junction-table paths#1015
dgee2 with Codex wants to merge 1 commit into
mainfrom
codex/prevent-duplicate-inserts

Conversation

@Codex

@Codex Codex AI commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.


This section details on the original issue you should resolve

<issue_title>Prevent duplicate inserts for set-like child/link rows</issue_title>
<issue_description>## Summary
Add dedupe-before-write behavior for collection and junction-table paths where duplicates are semantically equivalent.

Scope

  • Deduplicate repeated items within a single request
  • Prevent re-adding rows already linked to the parent aggregate
  • Apply changes in service/repository layers
  • Preserve existing API responses

Deliverables

  • Updated write logic for set-like/link-table paths
  • Unit and integration coverage for silent duplicate handling

Acceptance criteria

  • Duplicate-equivalent requests do not attempt duplicate inserts
  • Existing success responses remain unchanged
  • No duplicate rows are created for covered paths

Testing

  • Unit tests for request-level dedupe
  • Unit tests for update flows that previously re-added existing links
  • Integration tests proving duplicate-equivalent requests remain successful

Dependencies

  • Depends on the duplicate-handling policy sub-issue

Parent: #887</issue_description>

Comments on the Issue (you are @codex[agent] in this section)

@Codex Codex AI assigned Codex and dgee2 Apr 23, 2026
@Codex Codex AI linked an issue Apr 23, 2026 that may be closed by this pull request
@Codex
Codex AI requested a review from dgee2 April 23, 2026 22:44
@sonarqubecloud

Copy link
Copy Markdown

@dgee2 dgee2 closed this Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prevent duplicate inserts for set-like child/link rows

2 participants