From b754e8a1a46a03bbbfb20f34bdef5fe4def2db90 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 28 Jun 2026 21:14:06 +0800 Subject: [PATCH] fix(runner): align workflows to non110 labels --- .gitea/workflows/agent-market-watch.yaml | 2 +- .gitea/workflows/ai-technology-watch.yaml | 2 +- .gitea/workflows/ansible-lint.yml | 2 +- .gitea/workflows/cd-dev.yaml | 2 +- .gitea/workflows/cd.yaml | 16 +++++----- .gitea/workflows/code-review.yaml | 2 +- .gitea/workflows/deploy-alerts.yaml | 2 +- .gitea/workflows/e2e-health.yaml | 2 +- .gitea/workflows/run-migration.yml | 2 +- .gitea/workflows/type-sync-check.yaml | 2 +- .../services/delivery_closure_workbench.py | 22 +++++++++++++ .../test_delivery_closure_workbench_api.py | 32 +++++++++++++++++-- docs/LOGBOOK.md | 13 ++++++++ ...tion-deploy-readback-blocker.snapshot.json | 11 ++++--- 14 files changed, 88 insertions(+), 24 deletions(-) diff --git a/.gitea/workflows/agent-market-watch.yaml b/.gitea/workflows/agent-market-watch.yaml index 7f2f1742..e989a0b4 100644 --- a/.gitea/workflows/agent-market-watch.yaml +++ b/.gitea/workflows/agent-market-watch.yaml @@ -18,7 +18,7 @@ env: jobs: market-watch: - runs-on: awoooi-ubuntu + runs-on: awoooi-non110-ubuntu timeout-minutes: 10 steps: - uses: actions/checkout@v4 diff --git a/.gitea/workflows/ai-technology-watch.yaml b/.gitea/workflows/ai-technology-watch.yaml index d6722d6b..89de1922 100644 --- a/.gitea/workflows/ai-technology-watch.yaml +++ b/.gitea/workflows/ai-technology-watch.yaml @@ -14,7 +14,7 @@ on: jobs: ai-technology-watch: - runs-on: awoooi-ubuntu + runs-on: awoooi-non110-ubuntu timeout-minutes: 10 steps: - uses: actions/checkout@v4 diff --git a/.gitea/workflows/ansible-lint.yml b/.gitea/workflows/ansible-lint.yml index 22814cd1..8b099b30 100644 --- a/.gitea/workflows/ansible-lint.yml +++ b/.gitea/workflows/ansible-lint.yml @@ -7,7 +7,7 @@ on: jobs: validate: - runs-on: awoooi-ubuntu + runs-on: awoooi-non110-ubuntu timeout-minutes: 15 steps: - uses: actions/checkout@v4 diff --git a/.gitea/workflows/cd-dev.yaml b/.gitea/workflows/cd-dev.yaml index 5de370a6..e39bcd6f 100644 --- a/.gitea/workflows/cd-dev.yaml +++ b/.gitea/workflows/cd-dev.yaml @@ -26,7 +26,7 @@ env: jobs: build-and-deploy-dev: - runs-on: awoooi-ubuntu + runs-on: awoooi-non110-ubuntu steps: - uses: actions/checkout@v4 diff --git a/.gitea/workflows/cd.yaml b/.gitea/workflows/cd.yaml index b186d818..d364f155 100644 --- a/.gitea/workflows/cd.yaml +++ b/.gitea/workflows/cd.yaml @@ -58,7 +58,7 @@ jobs: # 2026-06-28 Codex: Gitea 1.25 may mark a workflow invalid when every # root job has a job-level `if`. Keep one no-op root job without `if` so # cd.yaml stays parseable while deploy jobs remain guarded below. - runs-on: awoooi-host + runs-on: awoooi-non110-host timeout-minutes: 1 steps: - name: Confirm CD Workflow Shape @@ -69,7 +69,7 @@ jobs: # cancellation. If every job is skipped, Gitea may not create a run and # the stale pre-guard CD queue is not superseded by concurrency. if: ${{ github.event_name == 'push' && contains(github.event.head_commit.message, 'cancel-stale-cd') }} - runs-on: awoooi-host + runs-on: awoooi-non110-host timeout-minutes: 3 steps: - name: Confirm Stale CD Queue Cancellation @@ -86,14 +86,14 @@ jobs: # CI image explicitly. The act-managed job container can disappear mid-test # with Docker RWLayer=nil on the shared 110 daemon. timeout-minutes: 30 - runs-on: awoooi-host + runs-on: awoooi-non110-host # 2026-04-10 ogt: B5 改用 docker run 本地啟動,移除 services: 宣告 # Gitea act runner 的 services: container name 為空,導致 CI 失敗 steps: - name: Bootstrap Host Runner Tools - # 2026-05-05 Codex: awoooi-host maps to the long-lived act-runner - # container. After dirty reboots it may not contain node/curl/git, and - # actions/checkout@v4 fails before tests can start. + # 2026-06-28 Codex: awoooi-non110-host maps to the dedicated + # non-110 runner lane. Bootstrap tools defensively because host + # runners can start without the CI toolchain preinstalled. run: | if command -v apk >/dev/null 2>&1; then apk add --no-cache nodejs npm git curl bash coreutils python3 openssh-client docker-cli docker-cli-buildx @@ -467,7 +467,7 @@ jobs: # steps were killing the transient act job container with RWLayer=nil. needs: [tests] timeout-minutes: 60 - runs-on: awoooi-host + runs-on: awoooi-non110-host steps: - name: Bootstrap Host Runner Tools # 2026-05-05 Codex: keep the host-mode runner self-healing before @@ -1395,7 +1395,7 @@ jobs: timeout-minutes: 30 # 2026-04-30 Codex: keep post-deploy on the host runner too. Playwright # install-deps can also kill the act-managed job container with RWLayer=nil. - runs-on: awoooi-host + runs-on: awoooi-non110-host steps: - name: Bootstrap Host Runner Tools # 2026-05-05 Codex: post-deploy also uses checkout and curl-based diff --git a/.gitea/workflows/code-review.yaml b/.gitea/workflows/code-review.yaml index 9072f13f..16597834 100644 --- a/.gitea/workflows/code-review.yaml +++ b/.gitea/workflows/code-review.yaml @@ -21,7 +21,7 @@ jobs: # `[skip ci]`; `cancel-stale-cd` is a controlled no-op trigger. Skip both # at job level to avoid queued runner churn. if: ${{ github.event_name != 'push' || (!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, 'cancel-stale-cd')) }} - runs-on: awoooi-ubuntu + runs-on: awoooi-non110-ubuntu timeout-minutes: 8 steps: - uses: actions/checkout@v4 diff --git a/.gitea/workflows/deploy-alerts.yaml b/.gitea/workflows/deploy-alerts.yaml index 46ef82ee..e5fcdcdb 100644 --- a/.gitea/workflows/deploy-alerts.yaml +++ b/.gitea/workflows/deploy-alerts.yaml @@ -18,7 +18,7 @@ env: jobs: deploy-alerts: name: "Deploy Prometheus Alert Rules" - runs-on: awoooi-ubuntu + runs-on: awoooi-non110-ubuntu timeout-minutes: 5 steps: - uses: actions/checkout@v4 diff --git a/.gitea/workflows/e2e-health.yaml b/.gitea/workflows/e2e-health.yaml index 3f57c10f..388c2736 100644 --- a/.gitea/workflows/e2e-health.yaml +++ b/.gitea/workflows/e2e-health.yaml @@ -23,7 +23,7 @@ env: jobs: e2e-health: - runs-on: awoooi-ubuntu + runs-on: awoooi-non110-ubuntu steps: - uses: actions/checkout@v4 diff --git a/.gitea/workflows/run-migration.yml b/.gitea/workflows/run-migration.yml index 21ac946d..261b195f 100644 --- a/.gitea/workflows/run-migration.yml +++ b/.gitea/workflows/run-migration.yml @@ -22,7 +22,7 @@ env: jobs: migrate: - runs-on: awoooi-ubuntu # 或 self-hosted runner on 110 + runs-on: awoooi-non110-ubuntu steps: - name: Checkout diff --git a/.gitea/workflows/type-sync-check.yaml b/.gitea/workflows/type-sync-check.yaml index efb229c7..cdcd274c 100644 --- a/.gitea/workflows/type-sync-check.yaml +++ b/.gitea/workflows/type-sync-check.yaml @@ -16,7 +16,7 @@ on: jobs: check-type-sync: - runs-on: awoooi-ubuntu + runs-on: awoooi-non110-ubuntu steps: - uses: actions/checkout@v4 diff --git a/apps/api/src/services/delivery_closure_workbench.py b/apps/api/src/services/delivery_closure_workbench.py index 8777fb47..596f000b 100644 --- a/apps/api/src/services/delivery_closure_workbench.py +++ b/apps/api/src/services/delivery_closure_workbench.py @@ -164,6 +164,16 @@ def build_delivery_closure_workbench( "non110_runner_safe_registration_helper_ready" ) is True, + "non110_runner_workflow_labels_aligned": production_deploy_readback.get( + "non110_runner_workflow_labels_aligned" + ) + is True, + "non110_runner_host_label": str( + production_deploy_readback.get("non110_runner_host_label") or "" + ), + "non110_runner_ubuntu_label": str( + production_deploy_readback.get("non110_runner_ubuntu_label") or "" + ), "non110_runner_registration_condition_required": production_deploy_readback.get( "non110_runner_registration_condition_required" ) @@ -400,6 +410,18 @@ def build_delivery_closure_workbench( ) is True ), + "production_deploy_non110_runner_workflow_labels_aligned": ( + production_deploy_readback.get( + "non110_runner_workflow_labels_aligned" + ) + is True + ), + "production_deploy_non110_runner_host_label": str( + production_deploy_readback.get("non110_runner_host_label") or "" + ), + "production_deploy_non110_runner_ubuntu_label": str( + production_deploy_readback.get("non110_runner_ubuntu_label") or "" + ), "production_deploy_non110_runner_registration_condition_required": ( production_deploy_readback.get( "non110_runner_registration_condition_required" diff --git a/apps/api/tests/test_delivery_closure_workbench_api.py b/apps/api/tests/test_delivery_closure_workbench_api.py index 5cc29380..ec99db4c 100644 --- a/apps/api/tests/test_delivery_closure_workbench_api.py +++ b/apps/api/tests/test_delivery_closure_workbench_api.py @@ -56,13 +56,25 @@ def test_delivery_closure_workbench_endpoint_returns_product_summary(): ] is True ) + assert ( + data["summary"]["production_deploy_non110_runner_workflow_labels_aligned"] + is True + ) + assert ( + data["summary"]["production_deploy_non110_runner_host_label"] + == "awoooi-non110-host" + ) + assert ( + data["summary"]["production_deploy_non110_runner_ubuntu_label"] + == "awoooi-non110-ubuntu" + ) assert ( data["summary"][ "production_deploy_non110_runner_registration_condition_required" ] is True ) - assert data["summary"]["production_deploy_non110_runner_ready_config_count"] == 2 + assert data["summary"]["production_deploy_non110_runner_ready_config_count"] == 1 assert data["summary"]["production_deploy_non110_runner_ready_service_count"] == 1 assert ( data["summary"]["production_deploy_non110_runner_ready_registration_count"] @@ -115,7 +127,7 @@ def test_delivery_closure_workbench_endpoint_returns_product_summary(): assert lanes["production_deploy"]["blocker_count"] == 3 assert lanes["production_deploy"]["metric"][ "observed_source_control_main_short_sha" - ] == "c18200c23ca2" + ] == "666454212ac9" assert lanes["production_deploy"]["metric"][ "production_image_tag_short_sha" ] == "af45811e87" @@ -152,13 +164,27 @@ def test_delivery_closure_workbench_endpoint_returns_product_summary(): ] is True ) + assert ( + lanes["production_deploy"]["metric"][ + "non110_runner_workflow_labels_aligned" + ] + is True + ) + assert ( + lanes["production_deploy"]["metric"]["non110_runner_host_label"] + == "awoooi-non110-host" + ) + assert ( + lanes["production_deploy"]["metric"]["non110_runner_ubuntu_label"] + == "awoooi-non110-ubuntu" + ) assert ( lanes["production_deploy"]["metric"][ "non110_runner_registration_condition_required" ] is True ) - assert lanes["production_deploy"]["metric"]["non110_runner_ready_config_count"] == 2 + assert lanes["production_deploy"]["metric"]["non110_runner_ready_config_count"] == 1 assert lanes["production_deploy"]["metric"]["non110_runner_ready_service_count"] == 1 assert ( lanes["production_deploy"]["metric"][ diff --git a/docs/LOGBOOK.md b/docs/LOGBOOK.md index adf65923..da9a720b 100644 --- a/docs/LOGBOOK.md +++ b/docs/LOGBOOK.md @@ -22,6 +22,19 @@ **邊界**:只改 committed source / snapshot / API 欄位;未讀 runner token 或 `.runner` 內容;未操作 host / Docker / K8s / runner service;未使用 GitHub。 +## 2026-06-28 — 21:08 Gitea workflow labels 對齊 non-110 runner + +**完成內容**: +- `.gitea/workflows` 全部 AWOOI 專用 `runs-on` 從 110 incident labels 對齊到 188 non-110 labels:host job 使用 `awoooi-non110-host`,ubuntu/container job 使用 `awoooi-non110-ubuntu`。 +- `docs/operations/awoooi-production-deploy-readback-blocker.snapshot.json` 更新 non-110 readiness source:final verifier 為 `READY_CONFIG_COUNT=1`、`READY_BINARY_COUNT=1`、`READY_SERVICE_COUNT=1`、registration / active service 仍為 `0`,並記錄 workflow labels aligned。 + +**驗證結果**: +- `python3 ops/runner/guard-gitea-runner-pressure.py --root .`:通過。 +- `python3.11 -m pytest ops/runner/test_guard_gitea_runner_pressure.py -q`:`4 passed`。 +- Gitea workflow YAML parse:10 個 workflow 通過。 + +**邊界**:未讀 runner token、`.runner`、secret、raw session、SQLite、auth 或 `.env`;未啟動 188 runner service;未重開 110 runner;未使用 GitHub;沒有 force push。 + ## 2026-06-28 — 20:44 non-110 runner service registration condition verifier **完成內容**: diff --git a/docs/operations/awoooi-production-deploy-readback-blocker.snapshot.json b/docs/operations/awoooi-production-deploy-readback-blocker.snapshot.json index 11e60cd8..322613c9 100644 --- a/docs/operations/awoooi-production-deploy-readback-blocker.snapshot.json +++ b/docs/operations/awoooi-production-deploy-readback-blocker.snapshot.json @@ -5,8 +5,8 @@ "priority": "P0", "scope": "awoooi_production_truth", "readback": { - "observed_source_control_main_sha": "c18200c23ca285e1342193601bc0418db7364fda", - "observed_source_control_main_short_sha": "c18200c23ca2", + "observed_source_control_main_sha": "666454212ac9c3e10c3db927ebcf534f18203864", + "observed_source_control_main_short_sha": "666454212ac9", "governance_closure_merge_sha": "27b96f0450d0e3ca6651d6b5f274a341dd727ef2", "governance_closure_commit_sha": "9e3e7fbb6ba3ffd324b45abf3ad1e7b6ec826b22", "production_image_tag_sha": "af45811e876fda322ee63c036fbc39c9f07ffd76", @@ -28,10 +28,13 @@ "authorized_dispatch_channel_ready": false, "non110_runner_prepare_only_source_ready": true, "non110_runner_safe_registration_helper_ready": true, + "non110_runner_workflow_labels_aligned": true, + "non110_runner_host_label": "awoooi-non110-host", + "non110_runner_ubuntu_label": "awoooi-non110-ubuntu", "non110_runner_registration_condition_required": true, "non110_runner_ready": false, - "non110_runner_ready_config_count": 2, - "non110_runner_ready_binary_count": 2, + "non110_runner_ready_config_count": 1, + "non110_runner_ready_binary_count": 1, "non110_runner_ready_service_count": 1, "non110_runner_ready_registration_count": 0, "non110_runner_ready_active_service_count": 0,