fix: hide raw review reason codes
All checks were successful
CD Pipeline / deploy (push) Successful in 1m1s

This commit is contained in:
ogt
2026-06-25 14:11:01 +08:00
parent c351bd51b5
commit 92c8f3776f
4 changed files with 4 additions and 2 deletions

View File

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

View File

@@ -749,3 +749,4 @@ POSTGRES_HOST=momo-db
| 2026-06-25 | 可見操作頁不可把權杖、DB、Agent、Pipeline 當成主語 | V10.670 起 AI 助手、日報、銷售分析、缺貨、部署監控與觀測台頁面進一步改用「用量、產出紀錄、AI 分工、部署流程、知識命中」等營運可讀語言。 |
| 2026-06-25 | Google Drive 自動匯入不可在正式排程開瀏覽器 | V10.671 起背景匯入缺少 `config/google_token.json` 時 fail-closed 並提示一次性授權檔轉換;正式 scheduler 不再嘗試 `run_local_server()`,且 token refresh 必須能寫回共用 `config/` 掛載,避免主機重啟後再次出現 `could not locate runnable browser` 或授權檔遺失。 |
| 2026-06-25 | 待確認候選必須能一眼比對雙平台賣場 | V10.672 起 MOMO 待確認候選回傳 PChome/MOMO 兩個賣場連結與白話檢核點,前台改成雙欄比對並提供「同時開兩個賣場」,不再顯示 `variant_selection_review` 等工程 matcher tag。 |
| 2026-06-25 | 待確認候選 API 不可回傳 raw matcher code | V10.673 起 `match_reasons` 相容欄位也改回白話理由,避免前台或檢視 payload 時再次看到 `variant_selection_review``focused_exact_identity_*` 等工程代碼。 |

View File

@@ -1584,7 +1584,7 @@ def list_momo_review_candidates(engine, *, limit: int = 20) -> dict[str, Any]:
"alert_tier": raw_payload.get("alert_tier") or "identity_review",
"price_basis": raw_payload.get("price_basis") or "manual_review",
"gap_pct": gap_pct,
"match_reasons": reasons[:5],
"match_reasons": reason_labels,
"match_reason_labels": reason_labels,
"reason_summary": "".join(reason_labels),
"observed_at": str(row.get("observed_at") or ""),

View File

@@ -220,6 +220,7 @@ def test_momo_review_candidates_return_dual_store_links_and_plain_reasons():
assert row["momo_url"] == "https://www.momoshop.com.tw/goods/GoodsDetail.jsp?i_code=MOMO-REVIEW"
assert row["match_reason_labels"]
assert all("_" not in label for label in row["match_reason_labels"])
assert all("_" not in label for label in row["match_reasons"])
assert "色號" in row["reason_summary"] or "款式" in row["reason_summary"]