fix(runtime): 強化健康檢查監控韌性
All checks were successful
CD Pipeline / deploy (push) Successful in 2m29s

This commit is contained in:
OoO
2026-05-01 14:46:49 +08:00
parent 77b085f813
commit 6bce46bbc7
18 changed files with 130 additions and 19 deletions

View File

@@ -2,7 +2,7 @@
> 本文件定義專案開發的核心準則與不可違反的規範
> **建立日期**: 2026-01-12
> **當前版本**: V10.55 (Cache dashboard competitor decision overview)
> **當前版本**: V10.56 (Health-safe monitoring runtime)
> **最後更新**: 2026-05-01
---
@@ -164,6 +164,11 @@
- ✅ **正確**: 日誌格式必須包含 `[模組] [功能] 狀態 | 詳細資訊`
- ❌ **禁止**: 使用 `print()` 輸出日誌
### 第 18.1 條:健康檢查與監控目標(強制要求)
- ✅ **正確**: Docker healthcheck、CD health check、Blackbox HTTP 監控必須打 `/health`,不可打 Dashboard 首頁 `/` 作為可用性探測。
- ✅ **正確**: Gunicorn runtime 必須保留可併發回應輕量 health check 的 worker 設定,例如 `gthread` + `GUNICORN_THREADS`。
- ❌ **禁止**: 用會觸發大量 DB 查詢或模板渲染的頁面作為探測目標,避免監控流量本身造成 worker starvation。
---
## 第六章:版本管理規範