Duplicate Resolution Service
Component Detail
Description
Handles administrator decisions on duplicate candidates with two resolution paths: confirm-duplicate performs a soft-delete of the secondary record while preserving the primary, and mark-as-false-positive clears the similarity score and duplicate flag. All decisions are written to the audit log and the resolution state is propagated back to the activities table.
duplicate-resolution-service
Sources & reasoning
Resolution logic is intentionally separate from detection to maintain single responsibility. Handling soft-delete, false-positive clearing, and audit logging for administrator decisions involves distinct transactional concerns from the similarity computation pipeline.
No source references — this artifact was included based on reasoning alone (see above).
Responsibilities
- Process confirm-duplicate decisions with soft-delete of secondary activity record
- Process false-positive decisions to clear similarity score and duplicate flag
- Write all resolution decisions to the audit log with admin identity and timestamp
- Update activity records to reflect final resolution state
Interfaces
confirmDuplicate(primaryId: string, duplicateId: string, adminId: string): Promise<void>
markFalsePositive(activityId: string, adminId: string): Promise<void>
getResolutionHistory(organizationId: string, filters: ResolutionFilters): Promise<Resolution[]>
Relationships
Dependencies (3)
Components this component depends on