feat(parser): de-duplicate repeated receipt copies #100

Closed
opened 2026-07-07 09:26:37 +01:00 by TimCane · 0 comments
TimCane commented 2026-07-07 09:26:37 +01:00 (Migrated from github.com)

Parent: #77 (Phase B, capability - lowest priority). Invariants live in the epic.

Drop duplicated item blocks from multi-copy receipts.

Anchors

  • Item list assembled at ReceiptParser.cs:197-209; de-dupe after items exist.
  • ParsedItem (ParsedReceipt.cs:15) - Name, Quantity, PriceMinor for
    the equality check.

Steps

  1. Detect a repeated block of items (merchant/customer/kitchen copies) and keep
    one.
  2. Do not collapse a genuinely repeated order of the same item (two of the same
    dish is not a duplicate copy).

Done

  • New fixture with a duplicated copy.
  • Existing corpus green - legitimately repeated items preserved.
Parent: #77 (Phase B, capability - lowest priority). Invariants live in the epic. Drop duplicated item blocks from multi-copy receipts. ## Anchors - Item list assembled at `ReceiptParser.cs:197-209`; de-dupe after items exist. - `ParsedItem` (`ParsedReceipt.cs:15`) - `Name`, `Quantity`, `PriceMinor` for the equality check. ## Steps 1. Detect a repeated block of items (merchant/customer/kitchen copies) and keep one. 2. Do not collapse a genuinely repeated order of the same item (two of the same dish is not a duplicate copy). ## Done - [ ] New fixture with a duplicated copy. - [ ] Existing corpus green - legitimately repeated items preserved.
Sign in to join this conversation.
No description provided.