fix(cd): reconcile blocked ui with deploy evidence
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 54s
CD Pipeline / build-and-deploy (push) Successful in 4m52s
CD Pipeline / post-deploy-checks (push) Successful in 2m7s

This commit is contained in:
Your Name
2026-07-02 23:46:47 +08:00
parent 14768cf6fa
commit c18723cc5c
3 changed files with 156 additions and 3 deletions

View File

@@ -53465,3 +53465,28 @@ production browser smoke:
**下一步**
- 轉回 P0 reboot SLO 主線99 Windows / VMware autostart readback、111 reachability、backup full-dump coverage、service green 與 Wazuh degraded 依 scorecard blockers 順序收斂。
## 2026-07-02 — Gitea CD queue readback residual blocked-noise hardening
**完成內容**
- 修正 `ops/runner/read-public-gitea-actions-queue.py`:當 Gitea run-level UI 曾短暫顯示 `Blocked`,但 build log 已同時具備 `Job succeeded`、deploy marker pushed、`Production deploy readback matches this build` 與 build-deploy success notification 時,不再把 current main CD 誤判為 blocked。
- 新增分層欄位:`latest_visible_cd_run_ui_blocked` 保留 UI 殘留訊號,`latest_visible_cd_run_blocked` 只代表仍缺成功部署證據的實際 blocker另回傳 deploy marker SHA、source SHA、production deploy readback matched 與 notification receipt。
- 新增單元測試固定今天的 false-blocked 模式,避免「成功部署但 Gitea UI residual blocked」再次干擾 reboot / CD readiness scorecard。
**live readback**
- CD `#4467` 已讀回 `Success`deploy marker 為 `14768cf6f chore(cd): deploy af3a289 [skip ci]`
- queue readback 讀回 `current_main_cd_run_blocked=false``latest_visible_cd_run_status=Success``latest_visible_cd_deploy_marker_sha_from_log=14768cf``latest_visible_cd_production_deploy_readback_matched_from_log=true``latest_visible_cd_build_deploy_success_notification_from_log=true`
- 歷史 `#4466` Harbor repair failure 保留為 `harbor_110_repair_blocked_raw=true`,但因 `harbor_110_repair_historical_after_latest_cd_success=true`,不再阻擋 current CD。
**本地驗證結果**
- `python3.11 -m pytest ops/runner/test_read_public_gitea_actions_queue.py -q -p no:cacheprovider``40 passed`
- `python3.11 -m py_compile ops/runner/read-public-gitea-actions-queue.py`:通過。
- `git diff --check`:通過。
**仍維持**
- 沒有讀 secret / runner token / `.runner` 內容 / `.env` / raw sessions / SQLite / auth。
- 沒有使用 GitHub / gh / GitHub API / GitHub Actions。
- 沒有重啟主機,沒有 Docker / Nginx / K3s / DB / firewall restart沒有 workflow_dispatch沒有 DROP / TRUNCATE / restore / prune。
**下一步**
- commit / push 到 Gitea main 並讀回 CDdeploy 後回到 P0 reboot SLO scorecard blockers99 VMware autostart readback、111 reachability、full Gitea dump/DB/issues/packages/LFS backup contract、service green 與 Wazuh degraded。