放行品牌缺失的強錨點同款
All checks were successful
CD Pipeline / deploy (push) Successful in 1m19s

This commit is contained in:
OoO
2026-05-21 15:18:22 +08:00
committed by AiderHeal Bot
parent 1f0d37a1fe
commit 52790f3f6d
4 changed files with 32 additions and 1 deletions

View File

@@ -442,6 +442,20 @@ def test_marketplace_matcher_ignores_generic_variant_noise_for_peripera_brow_pen
assert diagnostics.score < 0.76
def test_marketplace_matcher_promotes_brandless_exact_identity_when_anchor_is_strong():
from services.marketplace_product_matcher import score_marketplace_match
diagnostics = score_marketplace_match(
"【小米有品】小浪智能感應自動噴香機(三種噴香模式 霧化噴香 芳香除臭)",
"小浪智能感應自動噴香機 三種噴香模式 霧化噴香 芳香除臭 芳香劑 去異味",
momo_price=539,
competitor_price=539,
)
assert diagnostics.score >= 0.76
assert "brandless_exact_identity" in diagnostics.reasons
def test_marketplace_matcher_rejects_same_count_different_unit_family():
from services.marketplace_product_matcher import score_marketplace_match