Files
ewoooc/docs/memory/project_phase3f_cleanup_roadmap.md
OoO c2e38be43d
All checks were successful
CD Pipeline / deploy (push) Successful in 1m36s
docs(modularization): 建立模組化治理守門
2026-04-30 14:07:10 +08:00

31 lines
1.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Phase 3f 模組化收尾任務矩陣
> 來源ADR-017。此檔只保存執行矩陣與紅線完整背景與決策以 `docs/adr/ADR-017-modularization-cleanup-roadmap.md` 為準。
## 紅線
1. 每個 sub-phase 獨立 commit。
2. 進下一階段前必須完成 critic review、本機 self-check、188 SSH 健康檢查。
3. ADR-011 永遠有效:部署與修復不得使用 `--remove-orphans`,不得影響 `momo-db`
## 時序
| Phase | 目標 | 風險 | 預估 |
|---|---|---|---|
| 3f-0 | DB metadata 救急create_all 新環境零漏表 | 最高 | 30m |
| 3f-1 | 路由雙註冊徹底解除,保 Blueprint、刪 app.py duplicate | 高 | 4-6h |
| 3f-2 | Cache 統一至 fingerprint managergunicorn 加 `--preload` | 中 | 2-3h |
| 3f-3 | scheduler 裸 `except`、EventRouter 同步告警、compose mount、vendor template_folder | 中 | 1-2h |
| 3f-4 | 模板統一至 `templates/``web/templates/vendor_stockout/` | 低 | 2-3h |
| 3f-5 | 孤兒 service 與 `.env.example` 收尾 | 極低 | 30m |
| 3f-6 | 模組化治理守門:大檔 inventory、分層 guide、測試防新增巨檔 | 低 | 30m |
## 已校正事項
- 3f-0 metadata 驗收為 34 張表,不是 33 張。
- 3f-1 的公開 `/health``/metrics``/settings` 等不能直接遷進現有 `system_bp`,因它有 `/api/system` prefix。
- 3f-2 的 `--preload` 只降低 copy-on-write 記憶體成本,一致性仍以 DB fingerprint 為準。
- 3f-3 必須先補 `EventRouter` 同步 facade再把 scheduler P1/P2 失敗導入告警。
- 3f-4 移除 ChoiceLoader fallback 前,需先清 docker-compose 舊 mount 與根目錄模板。
- 3f-6 已將 >800 行 Python 檔案列入 `docs/memory/code_modularization_inventory_20260430.md`;未來新增巨檔需更新 inventory否則 `tests/test_modularization_governance.py` 會失敗。