fix(api): retry slow stockplatform freshness readback
All checks were successful
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 51s
CD Pipeline / build-and-deploy (push) Successful in 5m28s
AWOOOI Harbor 110 Local Repair / workflow-shape (push) Successful in 0s
AWOOOI Harbor 110 Local Repair / harbor-110-local-repair (push) Successful in 55s
CD Pipeline / post-deploy-checks (push) Successful in 2m10s

This commit is contained in:
Your Name
2026-07-02 13:12:21 +08:00
parent e206a9e91d
commit 75626305f5
3 changed files with 112 additions and 22 deletions

View File

@@ -1,3 +1,21 @@
## 2026-07-02 — 13:18 StockPlatform freshness 慢回應 false-blocker 修正
**完成內容**
- `stockplatform_public_api_runtime_readback``/api/v1/system/freshness``/api/v1/system/ingestion` 改用 data endpoint timeout 10 秒與 2 次 probe attemptspublic route health 仍維持 4 秒,避免正常但約 4 秒才回的資料 readback 被 AWOOOI priority 誤判為 `stockplatform_*_unreachable`
- 新增 regressiondata endpoint 首次 timeout / unreachable、第二次回 `status=ok`runtime readback 必須判定 `stockplatform_public_api_runtime_ready` 且 active blockers 為空。
**live readback 證據**
- StockPlatform public `/healthz=200``/api/healthz=200``freshness status=ok latest_trading_date=2026-07-01 blockers=[]``ingestion status=ok coverage=100% blockers=[]`
- 本地套用修正後AWOOOI priority 回到 `p0_006_blocked_reboot_auto_recovery_slo_not_ready``stock_blockers=[]`,剩餘 blocker 為 reboot SLO / host / backup / Wazuh 類 P0-006 主線。
**驗證**
- `python -m py_compile apps/api/src/services/stockplatform_public_api_runtime_readback.py apps/api/src/services/stockplatform_public_api_controlled_recovery_preflight.py apps/api/src/services/awoooi_priority_work_order_readback.py`:通過。
- `DATABASE_URL=sqlite:////tmp/awoooi-test.db pytest apps/api/tests/test_stockplatform_public_api_runtime_readback.py apps/api/tests/test_stockplatform_public_api_controlled_recovery_preflight.py apps/api/tests/test_awoooi_priority_work_order_readback_api.py -q``23 passed`
- `git diff --check`:通過。
**仍維持**
- 未使用 GitHub / `gh` / GitHub API未讀 secret / token / `.env` / raw sessions / SQLite / auth未觸發 workflow未重啟主機 / Docker / Nginx / K3s / DB / firewall未寫 StockPlatform DB。
## 2026-07-02 — 13:10 Telegram 告警 receipt 與 AI controlled readback 補強
**完成內容**