fix(cd): persist controlled profile before b5 gate
Some checks failed
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 7m19s
CD Pipeline / post-deploy-checks (push) Has been cancelled

This commit is contained in:
Your Name
2026-07-02 11:02:35 +08:00
parent 4558ac9563
commit d8366abaf1
3 changed files with 31 additions and 0 deletions

View File

@@ -1,3 +1,21 @@
## 2026-07-02 — 11:01 Gitea CD B5 profile 跨 step 漂移修正
**照主線修正的問題**
- Gitea CD `#4355` latest main `67c22f0a` 失敗於 tests jobAPI tests 前段已選到 `controlled-runtime`,並完成 `3665 passed, 23 skipped`;但後續 B5 step 沒有讀到跨 step 的 `AWOOOI_CD_TEST_PROFILE`,重新落回 full最後打到 `BLOCKER b5_docker_socket_unavailable`
- 這不是 110 CPU / runner label / host pressure blocker`#4355` log 顯示 `no host web/build/smoke pressure detected`、無 no-matching runner而是 Gitea/act `GITHUB_ENV` 在該 step 沒可靠帶過去。
- `.gitea/workflows/cd.yaml` 現在於 profile selector 同步寫入 `.awoooi-cd-test-profile`B5 step 先從此檔讀回 effective profile再判斷是否跳過 B5避免 controlled-runtime 窄發布因 env 漂移誤跑 Docker socket path。
- `ops/runner/test_cd_controlled_runtime_profile.py` 鎖定 persisted profile 必須在 B5 gate 前讀取,且 B5 skip 必須在 Docker socket mount 前發生。
**驗證**
- `python3.11 -c "import yaml; yaml.safe_load(open('.gitea/workflows/cd.yaml')); print('cd YAML OK')"`:通過。
- `python3.11 -m pytest ops/runner/test_cd_controlled_runtime_profile.py -q``43 passed`
- `python3.11 ops/runner/guard-gitea-runner-pressure.py --root .``GITEA_RUNNER_PRESSURE_GUARD_OK workflow_files=12 scheduled_workflows=4 auto_branch_events_on_110=0 generic_runner_labels=0`
- `git diff --check`:通過。
**邊界**:未使用 GitHub / `gh` / GitHub API未讀 secret / token / `.env` / raw sessions / SQLite / auth未重啟主機未 restart Docker / Nginx / K3s / DB / firewall未 workflow_dispatch未恢復 generic runner。
**下一步**commit / push Gitea `main`,讀回新 CD預期 tests job 顯示 `B5 effective test profile=controlled-runtime` 並跳過 B5之後才進 build / deploy / post-deploy readback。
## 2026-07-02 — 10:52 110 startup SSH control path metadata 自動修復
**照主線修正的問題**