fix(client): refine T-103 prefix diagnostics

This commit is contained in:
QiuSW
2026-08-04 15:16:30 +08:00
parent f7efa4a161
commit 6e001b2729
2 changed files with 27 additions and 2 deletions
@@ -423,8 +423,10 @@ def _crossing_price_text_mismatch_reason(text: str) -> str:
return "non_ascii_whitespace"
if any(marker in text for marker in ("提交订单", "支付", "下单", "优惠")):
return "extra_or_order"
without_leading_space = text.lstrip(" ")
if without_leading_space.startswith("快") and not without_leading_space.startswith("快卖光"):
without_one_leading_space = text[1:] if text.startswith(" ") else text
if without_one_leading_space.startswith("快要抢光"):
return "observed_prefix_kuaiyaoqiangguang"
if without_one_leading_space.startswith("快") and not without_one_leading_space.startswith("快卖光"):
return "known_prefix_missing"
if "¥" not in text and "¥" not in text:
return "currency_missing"