Repository navigation
feat: add duplicate-transaction-scanner feature slice - #300
Merged
BigDella merged 1 commit intoOct 19, 2026
Merged
Conversation
Implements a full vertical slice for deterministic duplicate detection
and audited merge review workflow.
Detection
- SHA-256 fingerprint over source_account + op_types_sorted + fee +
memo + network + 5-minute time bucket (TIME_BUCKET_SECONDS = 300)
- groupByFingerprint returns only groups with 2+ matches
- Deterministic: same inputs → same group IDs across re-scans
Review workflow
- Three actions: confirm (terminal), dismiss (terminal), defer (reversible)
- applyReview drives a strict state machine:
pending → confirm | dismiss | defer
deferred → confirm | dismiss | defer
confirmed → (no transitions)
dismissed → (no transitions)
- Every successful transition emits record.state_changed via core/audit
- Every refused transition emits record.transition_denied
- All review ops are wrapped in measure() for telemetry
Persistence
- Groups survive page reloads via localStorage (utix:dup-scan:v1:groups)
- mergeIntoStore preserves existing review decisions on re-scan
Tests
- schema.test.ts — parse/validate input (10 cases)
- fingerprint.test.ts — determinism, bucketing, grouping (15 cases)
- review.test.ts — state machine, mergeIntoStore (15 cases)
- scanner.test.ts — Horizon fetch + MSW (7 cases, incl. 404/429)
- format.test.ts — presentation helpers
No shared files modified.
|
@Alfredzee Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Implements a full vertical slice for deterministic duplicate detection and audited merge review workflow.
Detection
Review workflow
pending → confirm | dismiss | defer
deferred → confirm | dismiss | defer
confirmed → (no transitions)
dismissed → (no transitions)
Persistence
Tests
No shared files modified.
Summary
Describe what changed and why. One pull request must implement exactly one
issue and one independent feature slice.
Scope proof
Issue: Closes #
Feature directory:
features/<slug>/Changed file count:
git diff --name-only origin/main...HEAD | wc -lHow to Test
Describe the exact happy path, one validation failure, one transport failure,
and the network(s) a reviewer should use.
Evidence
Add screenshots for idle, loading, success and error states. Include the result
of the slice-specific contract check:
Checklist
npm run checkpasses locallyResult<T, Code>for every expected failurecopy.tsBigInt, never floating pointREADME.mdrecords the feature's non-obvious technical decisiondocs/FEATURE_CONTRACT.md, it adds or supersedes an ADR indocs/adr/Follow-Up
Call out known limitations only. Do not make this pull request depend on future
work; anything required by the acceptance criteria belongs in this slice.
closes #220