V10.411 rescue focused marketplace matches
All checks were successful
CD Pipeline / deploy (push) Successful in 1m3s

This commit is contained in:
OoO
2026-05-24 13:54:53 +08:00
committed by AiderHeal Bot
parent 5ea556d406
commit 8d9984dc04
4 changed files with 72 additions and 1 deletions

View File

@@ -325,7 +325,7 @@ YOUTUBE_API_KEY = os.getenv('YOUTUBE_API_KEY', '')
# ==========================================
# 系統版本與路徑
# ==========================================
SYSTEM_VERSION = "V10.410"
SYSTEM_VERSION = "V10.411"
LOG_FILE_PATH = os.path.join(BASE_DIR, 'logs/system.log')
public_url = PUBLIC_URL # 用於模板顯示

View File

@@ -13,6 +13,7 @@
## 📅 詳細更新日誌 (考古存檔)
### 2026-05-24PChome 近門檻身份回收第二輪
- **V10.411 rom&nd / Summers Eve / Solone 近門檻 review-only 回收**: marketplace matcher 追加三條窄範圍 focused identityrom&nd 果汁唇釉 2.0 catalog、Summers Eve 舒摩兒全肌防護浴潔露 2入、Solone 持久眼線筆;皆只進 `identity_review` / manual-review不直接價格告警。production pilot 已回刷 3/3`matched` 1616→1619、`true_low_confidence` 763→760rom&nd 染眉膏 ZO&FRIENDS 色號、Summers Eve 雙天王任選、Lactacyd 清新舒涼 vs 生理呵護、MAC 柔霧 vs 緞光、NIVEA / 曼秀雷敦包數差異仍不自動救回,維持準確率優先。
- **V10.410 Code Review timeout 梯度改為保護 111**: 部署後實測顯示 GCP-A 從 188 失聯時Code Review 仍會先等 primary 45sGCP-B 完整審查 prompt 又常因 25s 太短而 timeout最後轉落 111。`CODE_REVIEW_OLLAMA_TIMEOUT` 預設收斂為 `15s``CODE_REVIEW_OLLAMA_SECONDARY_TIMEOUT` 放寬為 `60s`Hermes LLM scan 若啟用則 primary `15s`、secondary `45s`。目標是 A 掛時更快讓位給 B並給 B 足夠時間完成,避免過早壓到 111。
- **V10.409 MCP fetch target review gate**: 新增 `mcp_fetch_target_review` read-only builder、GET/POST endpoint、UI target review 審核面板與 deployment readiness smoke target讓 manual fetch handoff 通過後,先審核 adapter registry 公開入口、每平台節流、樣本數、timeout 與 rollback planAPI/UI 不保存 payload、不發外部 request、不開 DB、不寫入、不掛 scheduler也不會自動打開 manual fetch。
- **V10.408 OPI 指甲油 catalog review-only 回收**: marketplace matcher 針對 OPI 類光繚指甲油加入同系列 catalog focused identity只在「白日夢遊」或「驕傲果凍」系列名雙方一致時進 `identity_review`12色/11色視為可選色號數差異不當作販售件數跨系列仍維持 suppress。production pilot 已回刷 KATE 怪獸級持色唇膏限量款與兩個 OPI SKU 共 3/3`matched` 1613→1616、`true_low_confidence` 766→763三筆皆為 `alert_tier_identity_review` / `price_basis_manual_review`,不進 Hermes 直接價格告警。

View File

@@ -471,7 +471,10 @@ FOCUSED_IDENTITY_REVIEW_ONLY_REASONS = {
"so_natural_fixx_setting_spray_catalog",
"kate_monster_lipstick_catalog",
"opi_gel_polish_series_catalog",
"romand_juicy_lip_tint_2_catalog",
"solone_longlasting_eyeliner",
"shu_auto_hard_formula_refill_catalog",
"summer_eve_full_skin_wash_2pack",
"the_forest_maple_diffuser_flower_brandless",
}
@@ -2753,6 +2756,8 @@ def _has_focused_low_score_exact_identity_line(left: ProductIdentity, right: Pro
left_text = left.searchable_name
right_text = right.searchable_name
pair_text = f"{left_text} {right_text}"
left_raw = left.original_name.lower()
right_raw = right.original_name.lower()
brand_tokens = left.brand_tokens | right.brand_tokens
if (
@@ -2959,6 +2964,20 @@ def _has_focused_low_score_exact_identity_line(left: ProductIdentity, right: Pro
and any(series in left_text and series in right_text for series in ("白日夢遊", "驕傲果凍"))
):
return "opi_gel_polish_series_catalog"
if (
("rom" in (left.brand_tokens & right.brand_tokens) or "romand" in (left.brand_tokens & right.brand_tokens))
and "果汁唇釉" in left_text
and "果汁唇釉" in right_text
and "2.0" in left_text
and "2.0" in right_text
):
return "romand_juicy_lip_tint_2_catalog"
if (
"solone" in (left.brand_tokens & right.brand_tokens)
and "持久眼線筆" in left_text
and "持久眼線筆" in right_text
):
return "solone_longlasting_eyeliner"
if (
{"shu uemura", "植村秀"} & (left.brand_tokens & right.brand_tokens)
and "自動武士刀眉筆" in left_text
@@ -2967,6 +2986,15 @@ def _has_focused_low_score_exact_identity_line(left: ProductIdentity, right: Pro
and "筆蕊" in right_text
):
return "shu_auto_hard_formula_refill_catalog"
if (
{"summer", "eve", "舒摩兒"} & (left.brand_tokens & right.brand_tokens)
and "浴潔露" in left_text
and "浴潔露" in right_text
and "全肌防護" in left_raw
and "全肌防護" in right_raw
and _has_exact_count_alignment(left, right)
):
return "summer_eve_full_skin_wash_2pack"
if (
"焦糖楓葉香氛擴香花禮盒" in left_text
and "焦糖楓葉香氛擴香花禮盒" in right_text

View File

@@ -895,6 +895,18 @@ def test_marketplace_matcher_keeps_catalog_variant_recoveries_in_identity_review
"【O.P.I】類光繚指甲油 12色任選1瓶(小銀蓋/如膠似漆驕傲果凍系列指彩/官方直營)",
"OPI 如膠似漆驕傲果凍系列 類光繚指甲油11色任選",
),
(
"即期品【Summers Eve 舒摩兒】全肌防護浴潔露2入(私密清潔 經典防護王)無外盒裸瓶包裝",
"eve舒摩兒 賦活美學浴潔露-全肌防護 2入組",
),
(
"【rom&nd】果汁唇釉 2.0(the juicy 果汁唇釉 romand)",
"rom&nd 果汁唇釉2.0_3.5g_多款可選",
),
(
"【Solone】持久眼線筆(眼線膠 超防暈推薦)",
"Solone 持久眼線筆 1.5g",
),
]
for momo_name, competitor_name in cases:
@@ -1217,6 +1229,21 @@ def test_marketplace_matcher_promotes_focused_low_score_exact_identity_lines():
"OPI 如膠似漆驕傲果凍系列 類光繚指甲油11色任選",
"focused_exact_identity_opi_gel_polish_series_catalog",
),
(
"即期品【Summers Eve 舒摩兒】全肌防護浴潔露2入(私密清潔 經典防護王)無外盒裸瓶包裝",
"eve舒摩兒 賦活美學浴潔露-全肌防護 2入組",
"focused_exact_identity_summer_eve_full_skin_wash_2pack",
),
(
"【rom&nd】果汁唇釉 2.0(the juicy 果汁唇釉 romand)",
"rom&nd 果汁唇釉2.0_3.5g_多款可選",
"focused_exact_identity_romand_juicy_lip_tint_2_catalog",
),
(
"【Solone】持久眼線筆(眼線膠 超防暈推薦)",
"Solone 持久眼線筆 1.5g",
"focused_exact_identity_solone_longlasting_eyeliner",
),
(
"【GATSBY】爆水擦澡濕巾24張入(涼感乾洗澡)",
"GATSBY 爆水擦澡濕巾24張入(240g)",
@@ -1274,6 +1301,18 @@ def test_marketplace_matcher_keeps_high_variant_low_score_lines_outside_focused_
"【O.P.I】類光繚指甲油 12色任選1瓶(小銀蓋/如膠似漆白日夢遊系列指彩/官方直營)",
"OPI 如膠似漆驕傲果凍系列 類光繚指甲油11色任選",
)
romand_line_gap = score_marketplace_match(
"【rom&nd】水感唇釉",
"rom&nd 果汁唇釉5.5g_多款可選",
)
summer_eve_variant_gap = score_marketplace_match(
"即期品【Summers Eve 舒摩兒】全肌防護浴潔露2入(私密清潔 經典防護王)無外盒裸瓶包裝",
"eve舒摩兒 生理呵護浴潔露 2入組",
)
solone_type_gap = score_marketplace_match(
"【Solone】持久眼線筆(眼線膠 超防暈推薦)",
"Solone 斜角眉筆 0.35g",
)
for diagnostics in (
lush,
@@ -1286,6 +1325,9 @@ def test_marketplace_matcher_keeps_high_variant_low_score_lines_outside_focused_
mac_finish_gap,
ysl_powder_variant_guard,
opi_series_gap,
romand_line_gap,
summer_eve_variant_gap,
solone_type_gap,
):
assert diagnostics.score < 0.76
assert not any(reason.startswith("focused_exact_identity_") for reason in diagnostics.reasons)