fix: trim internal monitor source fields
Some checks failed
CD Pipeline / deploy (push) Has been cancelled

This commit is contained in:
ogt
2026-06-27 19:48:59 +08:00
parent 8861cbc3ac
commit bb87eaaf7f
4 changed files with 6 additions and 3 deletions

View File

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

View File

@@ -2,7 +2,7 @@
> **最後更新**: 2026-06-27 (台北時間)
> **狀態**: 🟢 四 AI Agent 自動化閉環已落地LLM 路由紅線升級為 Ollama-first 三主機級聯PChome 後台業績匯入韌性已補強產品定位正名為「PChome 業績成長自動化作戰系統」外部市場來源正規化層、自動同步、作戰清單與價格參考表優先讀取、CSV 備援預檢、前台操作入口、高可見頁面繁中化守門、比價/作戰 UI 工作台化、跨平台來源治理與商品身份 UI 契約已建立GCP embedding 熔斷延後處理、110 proxy rescue 與 direct host health skip 已建立
> **適用版本**: V10.720
> **適用版本**: V10.721
---
@@ -805,3 +805,4 @@ POSTGRES_HOST=momo-db
| 2026-06-26 | AI 觀測頁不得外露 caller key | V10.718 起 AI 品質診斷與知識召回頁使用「使用情境」作為可見主語,並透過 `obs_label.caller()` 顯示營運名稱;前台不得直接顯示 `<code>{{ caller }}</code>``top_k` 或「全部呼叫端」等工程語言。 |
| 2026-06-26 | 商品來源頁不得提供 raw JSON 匯出 | V10.719 起 `/pchome_crawler` 改為「PChome 商品監控」營運清單,只提供表格與賣場清單 CSV前台不得出現 `exportJson``JSON.stringify(currentProducts)``圖片URL``商品URL` 或 raw JSON 檔名。 |
| 2026-06-27 | 設定頁監控來源不得直接外露 crawler 命名 | V10.720 起 `/settings` 的商品監控來源由 API 邊界轉為營運名稱與說明,前端卡片再以 `escapeHtml(monitorText(...))` 顯示;啟停與頻率更新訊息統一使用「監控來源」,不得回傳「爬蟲 XXX 已啟用」這類工程主語。 |
| 2026-06-27 | 監控來源 API 不回傳前台不需要的內部設定欄位 | V10.721 起 `/api/crawlers` 的設定頁 response 會移除 `function``page_type``status``paused_date`,只保留前台需要的名稱、說明、啟用狀態、頻率、活動代碼與營運提示。 |

View File

@@ -60,7 +60,8 @@ def _sanitize_source_info(crawler_key, info):
for field in ('pause_reason', 'notes', 'activity_name'):
if field in sanitized:
sanitized[field] = _operator_text(sanitized.get(field))
sanitized.pop('function', None)
for internal_field in ('function', 'page_type', 'status', 'paused_date'):
sanitized.pop(internal_field, None)
return sanitized

View File

@@ -228,6 +228,7 @@ def test_growth_workflow_pages_hide_raw_export_and_fallback_content():
assert "每 ${scheduleHours} 小時更新" in settings_js
assert "監控來源「" in crawler_routes
assert "CRAWLER_CONFIG_PATH" in crawler_routes
assert "'function', 'page_type', 'status', 'paused_date'" in crawler_routes
assert '"message": f"爬蟲' not in crawler_routes
assert "商品監控" in navbar
assert "商品監控狀態" in shell