Promote Mustela lotion identity anchor

This commit is contained in:
OoO
2026-05-24 17:46:30 +08:00
parent c5db3eb0da
commit 48c5db3b85
5 changed files with 26 additions and 3 deletions

View File

@@ -1759,16 +1759,35 @@ def test_marketplace_matcher_promotes_safe_exact_spec_near_threshold():
"【Mustela 慕之恬廊】慕之幼 爽身潤膚乳500mlX2",
"Mustela慕之恬廊 慕之幼爽身潤膚乳500mlX2",
)
mustela_lotion_2pack_production_title = score_marketplace_match(
"【Mustela 慕之恬廊】慕之幼 加量版爽身潤膚乳 500mlX2入(寶寶 嬰兒乳液 公司貨 台灣獨家總代理)",
"【慕之恬廊】慕之幼爽身潤膚乳(500毫升X2入)",
momo_price=1390,
competitor_price=1210,
)
herbacin_hand_cream = score_marketplace_match(
"【Herbacin 德國小甘菊】小甘菊1號護手霜20ml",
"Herbacin 小甘菊經典護手霜20ml",
)
for diagnostics in (opi, mustela, romand, muji_hand_cream, mustela_lotion_2pack, herbacin_hand_cream):
for diagnostics in (
opi,
mustela,
romand,
muji_hand_cream,
mustela_lotion_2pack,
mustela_lotion_2pack_production_title,
herbacin_hand_cream,
):
assert diagnostics.score >= 0.76
assert diagnostics.hard_veto is False
assert "strong_exact_spec_match" in diagnostics.reasons
assert any(
reason.startswith("shared_identity_anchor")
for reason in mustela_lotion_2pack_production_title.reasons
)
assert muji_brandless_hand_cream.score >= 0.76
assert muji_brandless_hand_cream.hard_veto is False
assert "focused_exact_identity_muji_aroma_hand_cream_brandless" in muji_brandless_hand_cream.reasons