From 7705810ffd360956ac689d7cc62f3778c329068c Mon Sep 17 00:00:00 2001 From: ranxianglei Date: Fri, 23 Oct 2026 22:28:31 +0800 Subject: [PATCH 1/2] ci: run boundary guards on workflow_dispatch too (release-lane coverage gap) --- .github/workflows/ci.yml | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f9498ebe45..af52753433 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -205,14 +205,14 @@ jobs: # #2637 plan #8 (owner-approved): fail-fast tiering — the ~0-1m guards gate # the four platform legs so a broken commit stops in tier 1 instead of # paying 4x(install+typecheck+suites+build). Guards with `if: pull_request` - # skip on push/dispatch — and a SKIPPED need cascades the skip to dependents + # skip on push — and a SKIPPED need cascades the skip to dependents # (the GitHub-documented behavior; the old comment here wrongly assumed # "skipped needs count as satisfied" — the master-push run evidence # (#3145/#3035/#3027 all slipped red to master with `test: skipped`) # disproved it). The explicit `if` below tolerates skipped guards so: # - pull_request: guards run; guard failure -> failure() -> legs skip # (required checks show pending, merge blocked — #2637 semantics intact) - # - push/dispatch: PR-only guards skip harmlessly, legs RUN — master gets + # - push: PR-only guards skip harmlessly, legs RUN — master gets # a real post-merge test signal (the missing master-push hole, #3197 era) test: needs: [plan, version-guard, kernel-guard, pi-subagents-guard, lane-guard, docs-sync, docs-coverage, unused-exports, lock-sync, test-import-graph] @@ -352,7 +352,7 @@ jobs: version-guard: runs-on: ubuntu-latest - if: github.event_name == 'pull_request' + if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' steps: - uses: actions/checkout@v4 with: @@ -360,7 +360,10 @@ jobs: - name: Verify version field only changes on release branches run: | set -euo pipefail - BRANCH="${GITHUB_HEAD_REF}" + # GITHUB_HEAD_REF is PR-only; on workflow_dispatch (release-ci-gate + # dispatches this workflow at release/bugfix branch refs) fall back to + # GITHUB_REF_NAME so the branch-pattern exemptions below keep matching. + BRANCH="${GITHUB_HEAD_REF:-${GITHUB_REF_NAME}}" # Release + bugfix carve-out branches (#2851/#2853) may bump version — one isolated 'release v{VERSION}' commit each. if [[ "$BRANCH" == *_release-v* || "$BRANCH" == bugfix-release/* ]]; then echo "✓ release branch ($BRANCH) — version changes allowed" @@ -376,7 +379,7 @@ jobs: kernel-guard: runs-on: ubuntu-latest - if: github.event_name == 'pull_request' + if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' steps: - uses: actions/checkout@v4 with: @@ -386,7 +389,9 @@ jobs: PR_BODY: ${{ github.event.pull_request.body }} run: | set -euo pipefail - BRANCH="${GITHUB_HEAD_REF}" + # GITHUB_HEAD_REF is PR-only; on workflow_dispatch fall back to + # GITHUB_REF_NAME (same rationale as version-guard above). + BRANCH="${GITHUB_HEAD_REF:-${GITHUB_REF_NAME}}" # Kernel release branches bump kernel/package.json alone by design. if [[ "$BRANCH" == *_release-kernel-v* ]]; then echo "✓ kernel release branch ($BRANCH) — kernel version changes allowed" @@ -394,7 +399,13 @@ jobs: fi # Rule 1: any PR touching kernel/** must declare 'kernel-change:' in its body. if git diff --name-only origin/master...HEAD -- kernel/ | grep -q .; then - if ! printf '%s' "$PR_BODY" | grep -q 'kernel-change:'; then + # Rule 1 enforcement is PR-shaped: the declaration lives in a PR + # body. A workflow_dispatch has no PR body — dispatch is + # owner-fired (release fallback / bugfix carve-out lanes), so the + # human gate has already happened out-of-band; skip only the + # body check there. Version-discipline rules below still run. + if [[ "${GITHUB_EVENT_NAME}" != "workflow_dispatch" ]] \ + && ! printf '%s' "$PR_BODY" | grep -q 'kernel-change:'; then echo "::error::This PR modifies kernel/ but does not declare 'kernel-change: ' in its body." echo "Kernel changes are human-gated: owner approval plus explicit declaration required. See AGENTS.md 'Kernel Boundary'." exit 1 @@ -429,7 +440,7 @@ jobs: # load-bearing core compression). pi-subagents-guard: runs-on: ubuntu-latest - if: github.event_name == 'pull_request' + if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' steps: - uses: actions/checkout@v4 with: @@ -519,7 +530,7 @@ jobs: # mechanical: lane logic moves ⇔ a side-lane suite moves with it. lane-guard: runs-on: ubuntu-latest - if: github.event_name == 'pull_request' + if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' steps: - uses: actions/checkout@v4 with: From dfadc21b339bfa45c6ec03b2f13e723ce6bf0507 Mon Sep 17 00:00:00 2001 From: ci-check Date: Mon, 26 Oct 2026 15:22:50 +0800 Subject: [PATCH 2/2] fix(ci): sync lockfile recorded versions with acp-kernel 0.0.165 (#4599) master window commits 293ae6542/de5e03659 bumped kernel/package.json to 0.0.165 without regenerating the lockfiles; lock-sync re-resolution then rewrites the stale recorded versions (root 0.0.163, kernel 0.0.164) and fails. Pure recorded-version sync via npm install --package-lock-only; no dependency or semantic change. --- kernel/package-lock.json | 4 ++-- package-lock.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/package-lock.json b/kernel/package-lock.json index da011d94e1..4c5e2d79e9 100644 --- a/kernel/package-lock.json +++ b/kernel/package-lock.json @@ -1,12 +1,12 @@ { "name": "acp-kernel", - "version": "0.0.164", + "version": "0.0.165", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "acp-kernel", - "version": "0.0.164", + "version": "0.0.165", "license": "MIT", "devDependencies": { "@types/node": "^22.0.0", diff --git a/package-lock.json b/package-lock.json index 380212c96e..15a6e3f4e9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -50,7 +50,7 @@ }, "kernel": { "name": "acp-kernel", - "version": "0.0.163", + "version": "0.0.165", "dev": true, "license": "MIT", "devDependencies": {