Skip to content
This repository was archived by the owner on Jun 19, 2026. It is now read-only.

feat: intelligent transaction deduplication with fuzzy matching#1118

Open
yoshiha-ji wants to merge 1 commit into
rohitdash08:mainfrom
yoshiha-ji:fix-bounty-issue-113
Open

feat: intelligent transaction deduplication with fuzzy matching#1118
yoshiha-ji wants to merge 1 commit into
rohitdash08:mainfrom
yoshiha-ji:fix-bounty-issue-113

Conversation

@yoshiha-ji

Copy link
Copy Markdown

Summary

Enhance transaction deduplication to use configurable fuzzy matching, reducing duplicate transactions during imports and syncs.

Root Cause

Current deduplication logic relied on exact field matching, which missed duplicates with minor variations (e.g., typos, amount rounding).

Fix

  • Introduced deduplicateTransactions utility using string similarity with configurable threshold and fields.
  • Updated import and sync services to call the new deduplication function.
  • Added environment variable configuration for threshold and field list.
  • Wrote unit tests covering exact matches, similar matches, distinct transactions, and edge cases.
  • Documented the feature in docs/deduplication.md.

Test Plan

  1. Run unit tests: npm test tests/utils/deduplication.test.ts – all should pass.
  2. Manual test: import a CSV with a transaction that differs only by spelling from an existing one; verify it is flagged as duplicate.
  3. Adjust DEDUPLICATION_THRESHOLD and confirm that borderline cases are handled accordingly.
  4. Verify that non-duplicate transactions are still imported normally.

Automated fix generated by Bounty Sniffer + DeepSeek analysis.
Target: rohitdash08#113
Files: src/utils/deduplication.ts, src/config/deduplicationConfig.ts, src/services/transactionService.ts, tests/utils/deduplication.test.ts, docs/deduplication.md
@yoshiha-ji yoshiha-ji requested a review from rohitdash08 as a code owner May 29, 2026 02:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant