From a61166f48aa4a4620bc31767e1b926b3d21cf96e Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Fri, 27 Mar 2026 01:07:42 -0700 Subject: [PATCH] fix(trust): suppress duplicate_photo for established retailers (1000+ feedback) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Large retailers like Newegg legitimately reuse manufacturer stock photos across listings. Duplicate photo hash is not a scam signal for sellers with 1000+ feedback — suppress the red flag for them. --- app/trust/aggregator.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/trust/aggregator.py b/app/trust/aggregator.py index 934f0db..5fd6ec0 100644 --- a/app/trust/aggregator.py +++ b/app/trust/aggregator.py @@ -9,6 +9,11 @@ HARD_FILTER_AGE_DAYS = 7 HARD_FILTER_BAD_RATIO_MIN_COUNT = 20 HARD_FILTER_BAD_RATIO_THRESHOLD = 0.80 +# Sellers above this feedback count are treated as established retailers. +# Stock photo reuse (duplicate_photo) is suppressed for them — large retailers +# legitimately share manufacturer images across many listings. +_ESTABLISHED_RETAILER_FEEDBACK_THRESHOLD = 1000 + # Title keywords that suggest cosmetic damage or wear (free-tier title scan). # Description-body scan (paid BSL feature) runs via BTF enrichment — not implemented yet. _SCRATCH_DENT_KEYWORDS = frozenset([ @@ -103,7 +108,11 @@ class Aggregator: red_flags.append("low_feedback_count") if signal_scores.get("price_vs_market") == 0: # only flag when data exists and price is genuinely <50% of market red_flags.append("suspicious_price") - if photo_hash_duplicate: + is_established_retailer = ( + seller is not None + and seller.feedback_count >= _ESTABLISHED_RETAILER_FEEDBACK_THRESHOLD + ) + if photo_hash_duplicate and not is_established_retailer: red_flags.append("duplicate_photo") if listing_title and _has_damage_keywords(listing_title): red_flags.append("scratch_dent_mentioned")