diff --git a/docs/LOGBOOK.md b/docs/LOGBOOK.md index da16128e3..2eee4eee8 100644 --- a/docs/LOGBOOK.md +++ b/docs/LOGBOOK.md @@ -50733,3 +50733,29 @@ production browser smoke: **下一步**: - 持續讀回 `#4095` / `#4092`;若 runtime 仍卡 `awoooi-host` no-matching,P0 不切支線,下一個 controlled apply target 仍是 110 control channel:在 110 local console / root shell 或恢復 `awoooi-host` controlled runner 後跑 `recover-110-control-path-and-harbor-local.sh --check` / `--apply-all`,再重讀 public/internal `/v2`、Gitea queue、full-stack cold-start、Stock freshness、backup-status,並把 post-apply verifier receipt 回寫成下一筆 AI Loop sample。 + +## 2026-06-30 — 22:30 P0 110 / Harbor queue blocker readback 正規化 + +**完成內容**: +- Gitea CD `#4095` / `230ee54f` tests job 已通過 `366 passed`,B5 正確因 controlled-runtime 窄 profile 跳過;source-side LOG / writeback sample count blocker 已清除。 +- build-and-deploy job 仍在 Harbor login 前置失敗:`harbor_login_attempt=12 registry_v2_status=502`,`BLOCKER harbor_registry_public_route_unavailable registry_v2_status=502`。 +- CD 在 non-110 runner 上正確拒絕修 Harbor:`harbor_controlled_repair_skipped=not_110_host`,未繞過 110 runner 壓力硬閘。 +- 最新 `harbor-110-local-repair` run `#4096` 維持 `Waiting`,workflow filter 顯示 `No matching online runner with label: awoooi-host`;這是目前 deploy closure 的 P0 runtime / runner blocker。 +- 修正 `ops/runner/read-public-gitea-actions-queue.py`:保留 visible status 的 `latest_visible_harbor_110_repair_status_blocked`,並把 no-matching `awoooi-host` 或 CD Harbor 502 後的 repair waiting 升格為 actionable `latest_visible_harbor_110_repair_blocked=true` / `rollups.harbor_110_repair_blocked=true`。 +- 補 `ops/runner/test_read_public_gitea_actions_queue.py`,鎖住單純 waiting 不算 blocked、CD Harbor blocker 後 waiting 算 blocked、no-matching `awoooi-host` 算 blocked。 + +**本地驗證結果**: +- `python3.11 -m pytest ops/runner/test_read_public_gitea_actions_queue.py -q`:`21 passed`。 +- `python3.11 -m py_compile ops/runner/read-public-gitea-actions-queue.py ops/runner/test_read_public_gitea_actions_queue.py`:通過。 +- `python3.11 -m ruff check ops/runner/read-public-gitea-actions-queue.py ops/runner/test_read_public_gitea_actions_queue.py`:通過。 +- `python3.11 ops/runner/guard-gitea-runner-pressure.py --root .`:通過,`auto_branch_events_on_110=0`、`generic_runner_labels=0`。 +- `node scripts/ci/check-gitea-step-env-secrets.js`、`git diff --check`:通過。 +- live public queue readback:`status=blocked_harbor_110_repair_no_matching_runner`、`current_main_cd_failure_classifier=harbor_registry_public_route_unavailable`、`current_main_cd_harbor_controlled_repair_skip_reason=not_110_host`、`harbor_110_repair_blocked=true`、`harbor_110_repair_waiting_after_cd_harbor_blocker=true`。 + +**仍維持**: +- 沒有讀 secret / token / `.env` / raw sessions / SQLite / auth;沒有讀 `.runner` 內容。 +- 沒有使用 GitHub / gh / GitHub API / GitHub Actions。 +- 沒有重啟主機,沒有 Docker / Nginx / K3s / DB restart,沒有 workflow_dispatch,沒有 runtime write。 + +**下一步**: +- commit/push 後讀回 Gitea CD;若仍卡 Harbor 502,主線下一步仍是恢復 110 `awoooi-host` controlled lane / local recovery package readback,通過後再讓 `harbor-110-local-repair` 承接 queue。 diff --git a/ops/runner/read-public-gitea-actions-queue.py b/ops/runner/read-public-gitea-actions-queue.py index 8a27dcbb1..025446e23 100644 --- a/ops/runner/read-public-gitea-actions-queue.py +++ b/ops/runner/read-public-gitea-actions-queue.py @@ -309,7 +309,7 @@ def build_readback( ) harbor_110_repair_waiting = harbor_110_repair_status == "Waiting" harbor_110_repair_running = harbor_110_repair_status == "Running" - harbor_110_repair_blocked = harbor_110_repair_status == "Blocked" + harbor_110_repair_status_blocked = harbor_110_repair_status == "Blocked" harbor_110_repair_jobs_run_id_matches_visible = ( bool(harbor_110_repair_run_id) and harbor_110_repair_run_id in harbor_job_run_ids @@ -341,6 +341,11 @@ def build_readback( build_log_classifier["harbor_public_route_blocked"] and harbor_110_repair_waiting ) + harbor_110_repair_blocked = ( + harbor_110_repair_status_blocked + or bool(harbor_110_repair_no_matching_runner_label) + or harbor_110_repair_waiting_after_cd_harbor_blocker + ) readback = { "actions_page_visible_run_count": len(visible_runs), @@ -414,6 +419,9 @@ def build_readback( ), "latest_visible_harbor_110_repair_waiting": harbor_110_repair_waiting, "latest_visible_harbor_110_repair_running": harbor_110_repair_running, + "latest_visible_harbor_110_repair_status_blocked": ( + harbor_110_repair_status_blocked + ), "latest_visible_harbor_110_repair_blocked": harbor_110_repair_blocked, "harbor_110_repair_waiting_after_cd_harbor_blocker": ( harbor_110_repair_waiting_after_cd_harbor_blocker diff --git a/ops/runner/test_read_public_gitea_actions_queue.py b/ops/runner/test_read_public_gitea_actions_queue.py index 16537d47b..30318fb96 100644 --- a/ops/runner/test_read_public_gitea_actions_queue.py +++ b/ops/runner/test_read_public_gitea_actions_queue.py @@ -302,8 +302,14 @@ def test_build_readback_surfaces_harbor_110_repair_waiting_run() -> None: ) assert payload["readback"]["latest_visible_harbor_110_repair_waiting"] is True assert payload["readback"]["latest_visible_harbor_110_repair_running"] is False + assert ( + payload["readback"]["latest_visible_harbor_110_repair_status_blocked"] + is False + ) + assert payload["readback"]["latest_visible_harbor_110_repair_blocked"] is False assert payload["rollups"]["harbor_110_repair_run_visible"] is True assert payload["rollups"]["harbor_110_repair_waiting"] is True + assert payload["rollups"]["harbor_110_repair_blocked"] is False assert payload["rollups"]["harbor_110_repair_run_status"] == "Waiting" assert payload["operation_boundaries"]["workflow_dispatch_performed"] is False @@ -410,6 +416,12 @@ def test_build_readback_surfaces_harbor_110_repair_no_matching_runner() -> None: "harbor-110-local-repair.yaml": "awoooi-host" } assert payload["readback"]["no_matching_online_runner_visible"] is True + assert ( + payload["readback"]["latest_visible_harbor_110_repair_status_blocked"] + is False + ) + assert payload["readback"]["latest_visible_harbor_110_repair_blocked"] is True + assert payload["rollups"]["harbor_110_repair_blocked"] is True assert ( payload["rollups"]["harbor_110_repair_no_matching_runner_label"] == "awoooi-host" @@ -644,6 +656,12 @@ def test_harbor_repair_waiting_takes_actionable_precedence_after_harbor_blocker( payload["rollups"]["harbor_110_repair_waiting_after_cd_harbor_blocker"] is True ) + assert ( + payload["readback"]["latest_visible_harbor_110_repair_status_blocked"] + is False + ) + assert payload["readback"]["latest_visible_harbor_110_repair_blocked"] is True + assert payload["rollups"]["harbor_110_repair_blocked"] is True def test_derive_jobs_api_url_tracks_latest_visible_run_id() -> None: