移除 app 入口 stale TODO banner
All checks were successful
CD Pipeline / deploy (push) Successful in 57s

This commit is contained in:
OoO
2026-05-13 19:05:01 +08:00
parent 754dc60695
commit 46e819a020
3 changed files with 8 additions and 7 deletions

7
app.py
View File

@@ -1,10 +1,3 @@
# ================= TODO LIST (待辦事項 - 重開機後請依序執行) =================
# 1. [驗證] 重啟 app.py 後,重新匯入 Excel確認「自動去重」功能是否生效 (重複匯入應顯示 0 筆新增)。
# 2. [檢查] 前往 /sales_analysis 頁面,確認 '狀態' 欄位是否正確顯示 'F' (目前為原始匯入模式)。
# 3. [決策] 若資料顯示正常,評估是否需要恢復「智慧資料清理」邏輯 (目前程式碼第 1160 行左右已註解)。
# 4. [備份] 確認系統運作正常後,執行系統備份。
# =======================================================================
import os
import sys
import time

View File

@@ -62,6 +62,7 @@
- 未引用的根層 `templates/list.html` Phase 4 placeholder 已刪除,真實缺貨清單 route 使用 `vendor_stockout_list_v2.html`(或 `ui=legacy` 時的 `vendor_stockout/list.html``tests/test_phase3f_cleanup_contracts.py` 會防止根層 placeholder 回來。
- AI 觀測台 V3 排版規範已補強:`scripts/check_responsive_overflow.js` 會把視覺 overflow offenders 視為失敗,並允許表格/圖表在 `.obs-table-shell``.obs-chart-frame` 等局部容器內滾動;`observability-system.css` / `web/static/css/observability-system.css` 已同步新增 bounded table/chart/mobile containmentCSS mirror 與 `quick_review.sh --observability-qa --skip-production` 均通過。
- app.py/BP 路由雙寫已完成收斂active `@app.route` 為 0`USE_MODULAR_ROUTES` 與舊 routes registry shim 已不存在;`tests/test_phase3f_cleanup_contracts.py::test_app_py_stays_blueprint_only_for_routes` 會防止 route decorator 回到 `app.py`
- `app.py` 開頭的歷史「重開機後請依序執行」TODO banner 已移除;入口治理以 `AGENTS.md` / `CONSTITUTION.md` / ADR / memory 索引為準,`tests/test_phase3f_cleanup_contracts.py::test_app_py_does_not_start_with_stale_restart_todo_banner` 會防止 stale 操作清單回流。
- AI 觀測台 badge/chip 對比規範已補強:`.momo-observability-mode` 內的 badge、pill 與 nested surface 會改走亮底、8px radius、無負字距、可換行且不再殘留低對比 legacy dark-hero 樣式CSS mirror、`quick_review.sh --observability-ui``quick_review.sh --observability-qa --skip-production` 均通過。
- AI 觀測台 rendered visual contract 已入庫:`scripts/check_observability_visual_contract.sh` 會用 Playwright 檢查 10 頁 × desktop/tablet/mobile 的 title typography、surface radius/background、chip contrast、hero height 與水平 overflowV10.116 main 版 local server 驗證 30 項 PASS。測未部署變更時必須帶 localhost `--base-url`,打 production fail 可能只是正式站尚未部署該版。
- V10.117 已把 AI 觀測台背景語彙收斂為 tokenized dot-matrix合約會要求 hero/signal/panel surface 的 computed `background-image``radial-gradient`,並拒絕 legacy `linear-gradient` / `background-image: none` 回流;終端 dot-matrix layer 必須留在 CSS 檔尾以贏過舊 neutralizer。

View File

@@ -63,6 +63,13 @@ def test_app_py_stays_blueprint_only_for_routes():
assert "@app.route" not in app_source
def test_app_py_does_not_start_with_stale_restart_todo_banner():
app_source = (ROOT / "app.py").read_text(encoding="utf-8")
assert not app_source.startswith("# ================= TODO LIST")
assert "重開機後請依序執行" not in app_source
def test_active_guides_do_not_point_to_removed_ai_services():
active_guides = [
ROOT / "docs" / "ELEPHANT_ALPHA_SETUP.md",