fix: lock pchome growth ui copy guardrails
All checks were successful
CD Pipeline / deploy (push) Successful in 1m11s
All checks were successful
CD Pipeline / deploy (push) Successful in 1m11s
This commit is contained in:
@@ -64,6 +64,9 @@ def test_high_visibility_pages_use_traditional_chinese_labels():
|
||||
page_paths = [
|
||||
"templates/code_review.html",
|
||||
"templates/ai_automation_smoke.html",
|
||||
"templates/login.html",
|
||||
"templates/admin/budget.html",
|
||||
"templates/admin/agent_orchestration.html",
|
||||
"templates/admin/ppt_audit_history.html",
|
||||
"templates/admin/host_health.html",
|
||||
"templates/dashboard_v2.html",
|
||||
@@ -84,8 +87,29 @@ def test_high_visibility_pages_use_traditional_chinese_labels():
|
||||
assert "最新更新流程" in combined
|
||||
assert "執行環境正常" in combined
|
||||
assert "視覺檢查" in combined
|
||||
assert "下載檢查紀錄" in combined
|
||||
assert "健康檢查服務" in combined
|
||||
assert "資料服務" in combined
|
||||
assert "Top 5 成本使用情境" in combined
|
||||
assert "工具協作 × 使用情境" in combined
|
||||
|
||||
forbidden_visible_text = [
|
||||
"工作視窗",
|
||||
"Codex",
|
||||
"Claude",
|
||||
"推到 Gitea",
|
||||
"本輪已完成",
|
||||
"剛剛修正",
|
||||
"後續 session",
|
||||
"JSONL",
|
||||
"健康檢查 API",
|
||||
"JSON.stringify(item.details",
|
||||
"PostgreSQL",
|
||||
"CSRF 防護",
|
||||
"Session 2h",
|
||||
"燒錢呼叫端",
|
||||
"<code>{{ m.caller }}</code>",
|
||||
"<code>{{ m.server }}</code>",
|
||||
"AI Code Review",
|
||||
"Smoke Dashboard",
|
||||
"FOUR-AGENT CONTROL PLANE",
|
||||
@@ -166,7 +190,8 @@ def test_frontend_v2_syncs_latest_momo_pro_prototype_tokens_and_shell():
|
||||
tokens = (ROOT / "web/static/css/ewoooc-tokens.css").read_text(encoding="utf-8")
|
||||
shell = (ROOT / "web/static/css/ewoooc-shell.css").read_text(encoding="utf-8")
|
||||
|
||||
assert "MOMO Pro × Nothing × Claude" in tokens
|
||||
assert "MOMO Pro × minimal grid × operational clarity" in tokens
|
||||
assert "Claude" not in tokens
|
||||
assert "--momo-warm-caramel" in tokens
|
||||
assert "--momo-tag-honey-bg" in tokens
|
||||
assert "--momo-text-body" in tokens
|
||||
@@ -624,6 +649,11 @@ def test_utility_pages_keep_operator_copy_professional():
|
||||
host_health = (ROOT / "templates/admin/host_health.html").read_text(encoding="utf-8")
|
||||
cicd_dashboard = (ROOT / "templates/cicd_dashboard.html").read_text(encoding="utf-8")
|
||||
observability_js = (ROOT / "web/static/js/observability-charts.js").read_text(encoding="utf-8")
|
||||
budget = (ROOT / "templates/admin/budget.html").read_text(encoding="utf-8")
|
||||
agent_orchestration = (ROOT / "templates/admin/agent_orchestration.html").read_text(encoding="utf-8")
|
||||
ai_automation = (ROOT / "templates/ai_automation_smoke.html").read_text(encoding="utf-8")
|
||||
code_review = (ROOT / "templates/code_review.html").read_text(encoding="utf-8")
|
||||
login = (ROOT / "templates/login.html").read_text(encoding="utf-8")
|
||||
combined = "\n".join([
|
||||
ppt_history,
|
||||
ppt_preview,
|
||||
@@ -637,6 +667,11 @@ def test_utility_pages_keep_operator_copy_professional():
|
||||
host_health,
|
||||
cicd_dashboard,
|
||||
observability_js,
|
||||
budget,
|
||||
agent_orchestration,
|
||||
ai_automation,
|
||||
code_review,
|
||||
login,
|
||||
])
|
||||
|
||||
assert "簡報線上預覽" in ppt_preview
|
||||
@@ -652,8 +687,30 @@ def test_utility_pages_keep_operator_copy_professional():
|
||||
assert "供貨風險" in stockout_index
|
||||
assert "無服務資料 / 未連線" in host_health
|
||||
assert "部署檢查已排入背景處理" in observability_js
|
||||
assert "Top 5 成本使用情境" in budget
|
||||
assert "工具協作 × 使用情境" in agent_orchestration
|
||||
assert "下載檢查紀錄" in ai_automation
|
||||
assert "健康檢查服務" in ai_automation
|
||||
assert "上線證據" in code_review
|
||||
assert "資料服務" in login
|
||||
|
||||
forbidden = [
|
||||
"工作視窗",
|
||||
"Codex",
|
||||
"Claude",
|
||||
"推到 Gitea",
|
||||
"本輪已完成",
|
||||
"剛剛修正",
|
||||
"後續 session",
|
||||
"JSONL",
|
||||
"健康檢查 API",
|
||||
"JSON.stringify(item.details",
|
||||
"PostgreSQL",
|
||||
"CSRF 防護",
|
||||
"Session 2h",
|
||||
"燒錢呼叫端",
|
||||
"<code>{{ m.caller }}</code>",
|
||||
"<code>{{ m.server }}</code>",
|
||||
"PPT Online Preview",
|
||||
"Preview unavailable",
|
||||
"原始 PPTX",
|
||||
|
||||
@@ -812,9 +812,16 @@ def test_governance_and_low_frequency_pages_avoid_engineering_status_copy():
|
||||
"templates/external_tool_status.html": ["共用預覽"],
|
||||
"templates/market_intel/disabled.html": ["市場情報", "操作入口"],
|
||||
"templates/brand_assets.html": ["EwoooC 品牌資產庫", "品牌資產混用"],
|
||||
"templates/code_review.html": ["部署守門與程式碼審查", "業績流程上線前檢查", "部署證據"],
|
||||
"templates/code_review.html": ["部署守門與程式碼審查", "業績流程上線前檢查", "上線證據"],
|
||||
}
|
||||
forbidden = [
|
||||
"工作視窗",
|
||||
"Codex",
|
||||
"Claude",
|
||||
"推到 Gitea",
|
||||
"本輪已完成",
|
||||
"剛剛修正",
|
||||
"後續 session",
|
||||
"MIGRATED PAGE",
|
||||
"V3 READY",
|
||||
"Growth workflow active",
|
||||
@@ -904,10 +911,14 @@ def test_visible_operations_pages_hide_internal_runtime_terms():
|
||||
"templates/vendor_stockout_vendor_management_v2.html": ["匯入供應商窗口名單", "確認窗口清單"],
|
||||
"templates/vendor_stockout_import_v2.html": ["會先停止匯入", "處理缺貨清單"],
|
||||
"templates/admin/ppt_audit_history.html": ["產出紀錄", "最近產出", "保存紀錄"],
|
||||
"templates/admin/agent_orchestration.html": ["AI 分工指揮台", "建議路徑、工具與知識命中矩陣", "工具服務明細"],
|
||||
"templates/admin/agent_orchestration.html": ["AI 分工指揮台", "建議路徑、工具與知識命中矩陣", "工具協作明細", "工具協作 × 使用情境"],
|
||||
"templates/admin/ai_calls_dashboard.html": ["用量", "最近作戰素材", "情境 × 知識命中矩陣"],
|
||||
"templates/admin/observability_overview.html": ["用量", "知識與工具矩陣"],
|
||||
"templates/cicd_dashboard.html": ["最新更新流程", "更新歷史", "修復服務", "查看更新紀錄"],
|
||||
"templates/admin/budget.html": ["Top 5 成本使用情境", "尚未建立預算線"],
|
||||
"templates/ai_automation_smoke.html": ["下載檢查紀錄", "健康檢查服務"],
|
||||
"templates/login.html": ["安全登入", "工作階段", "資料服務"],
|
||||
"templates/code_review.html": ["上線證據", "已收到上線檢查資料"],
|
||||
}
|
||||
forbidden_by_path = {
|
||||
"templates/ai_recommend.html": ["權杖:", "AI 模型", "分析模型", "AI 路徑", "Gemini 備援", "Ollama 主路徑"],
|
||||
@@ -920,10 +931,22 @@ def test_visible_operations_pages_hide_internal_runtime_terms():
|
||||
"templates/vendor_stockout_vendor_management_v2.html": ["拖曳檔案到此處或點擊選擇檔案", "查看廠商清單"],
|
||||
"templates/vendor_stockout_import_v2.html": ["API 會拒絕匯入", "查看缺貨清單"],
|
||||
"templates/admin/ppt_audit_history.html": ["DB 紀錄", "DB / 預覽", "寫入 DB", "DB 產出紀錄", "資料庫快取", "本月尚無 DB"],
|
||||
"templates/admin/agent_orchestration.html": ["Agent 指揮矩陣", "四 Agent 矩陣", "LLM × MCP × RAG 編排矩陣", "權杖"],
|
||||
"templates/admin/agent_orchestration.html": [
|
||||
"Agent 指揮矩陣",
|
||||
"四 Agent 矩陣",
|
||||
"LLM × MCP × RAG 編排矩陣",
|
||||
"權杖",
|
||||
"<code>{{ m.caller }}</code>",
|
||||
"<code>{{ m.server }}</code>",
|
||||
"呼叫端工作量",
|
||||
],
|
||||
"templates/admin/ai_calls_dashboard.html": ["權杖量", "權杖/次", ">權杖<", "Agent 上下文", "RAG × MCP"],
|
||||
"templates/admin/observability_overview.html": ["權杖量", "RAG × MCP"],
|
||||
"templates/cicd_dashboard.html": ["Pipeline Flow", "Pipeline History", "完整修復", "一鍵修復", "重啟 Registry", "舊叢集"],
|
||||
"templates/admin/budget.html": ["燒錢呼叫端", "migrations/025", "<code>{{ c.caller }}</code>"],
|
||||
"templates/ai_automation_smoke.html": ["JSONL", "健康檢查 API", "JSON.stringify(item.details"],
|
||||
"templates/login.html": ["CSRF 防護", "Session 2h", "PostgreSQL"],
|
||||
"templates/code_review.html": ["<b>提交</b>", "<b>分支</b>", "提交 ${h.commit_sha}", "🌿 ${h.branch}", "<code>${state.commit_sha"],
|
||||
}
|
||||
|
||||
for path, markers in expected.items():
|
||||
|
||||
Reference in New Issue
Block a user