From 45a9273b0c35c74c5e30abd2782a9c2ec943c2cf Mon Sep 17 00:00:00 2001 From: YiWang24 Date: Mon, 4 May 2026 20:11:58 -0400 Subject: [PATCH 1/4] fix(ci): guard all auto-release steps against skipped analyze outputs When the Guard step sets skip=true, downstream steps with conditions like 'steps.analyze.outputs.bump != none' would still run because an empty string is not equal to 'none'. This caused Calculate/Create/Summary to execute with empty LATEST_TAG, producing the invalid tag 'v..'. Add 'steps.guard.outputs.skip != true' to all four dependent steps. --- .github/workflows/auto-release.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml index 80c1644..066bba3 100644 --- a/.github/workflows/auto-release.yml +++ b/.github/workflows/auto-release.yml @@ -137,7 +137,7 @@ jobs: } >> "$GITHUB_OUTPUT" - name: Calculate new version - if: steps.analyze.outputs.bump != 'none' + if: steps.guard.outputs.skip != 'true' && steps.analyze.outputs.bump != 'none' id: version env: LATEST_TAG: ${{ steps.latest-tag.outputs.tag }} @@ -177,7 +177,7 @@ jobs: echo "tag=$NEW_TAG" >> "$GITHUB_OUTPUT" - name: Create and push tag - if: steps.analyze.outputs.bump != 'none' + if: steps.guard.outputs.skip != 'true' && steps.analyze.outputs.bump != 'none' env: NEW_TAG: ${{ steps.version.outputs.tag }} GH_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }} @@ -190,7 +190,7 @@ jobs: echo "Tag $NEW_TAG created successfully via GitHub API" - name: Summary - if: steps.analyze.outputs.bump != 'none' + if: steps.guard.outputs.skip != 'true' && steps.analyze.outputs.bump != 'none' env: NEW_TAG: ${{ steps.version.outputs.tag }} BUMP: ${{ steps.analyze.outputs.bump }} @@ -211,7 +211,7 @@ jobs: } >> "$GITHUB_STEP_SUMMARY" - name: No release needed - if: steps.analyze.outputs.bump == 'none' + if: steps.guard.outputs.skip != 'true' && steps.analyze.outputs.bump == 'none' run: | { echo "## No Release Needed" From 487026ff39335114ced2d4f0db5f0b852d4d1c24 Mon Sep 17 00:00:00 2001 From: YiWang24 Date: Mon, 4 May 2026 20:15:02 -0400 Subject: [PATCH 2/4] fix(ci): add guard to bump-self-sha run/commit steps When guard sets skip=true, steps.check never runs so its output is empty string. 'empty != true' evaluates to true in GitHub Actions, causing Run bump-self-sha.sh and Commit steps to execute despite the guard. Fix by adding steps.guard.outputs.skip != 'true' to both steps. --- .github/workflows/on-main-bump-sha.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/on-main-bump-sha.yml b/.github/workflows/on-main-bump-sha.yml index 591b6b3..32d721f 100644 --- a/.github/workflows/on-main-bump-sha.yml +++ b/.github/workflows/on-main-bump-sha.yml @@ -102,11 +102,11 @@ jobs: } >> "$GITHUB_OUTPUT" - name: Run bump-self-sha.sh - if: steps.check.outputs.skip != 'true' + if: steps.guard.outputs.skip != 'true' && steps.check.outputs.skip != 'true' run: bash scripts/bump-self-sha.sh - name: Commit, supersede older bumps, open PR - if: steps.check.outputs.skip != 'true' + if: steps.guard.outputs.skip != 'true' && steps.check.outputs.skip != 'true' env: # gh CLI uses GH_TOKEN; same PAT used for checkout above so the # push picks up workflow scope. From 7559621bd892f645f5b98d62e9451d427ccb6009 Mon Sep 17 00:00:00 2001 From: YiWang24 Date: Mon, 4 May 2026 20:24:13 -0400 Subject: [PATCH 3/4] chore(manifest): align SHA to main after bump PRs merged --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 9c63780..d5b572a 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -27,7 +27,7 @@ concurrency: jobs: docs: - uses: YiAgent/OpenCI/.github/workflows/reusable-docs.yml@4e1ecadc2505761f104f3fd8d255eee4eb369d90 + uses: YiAgent/OpenCI/.github/workflows/reusable-docs.yml@9bd9cf085ba9d3a199b701d42ea054e1625a65ce with: build-cmd: ${{ vars.DOCS_BUILD_CMD || '' }} docs-path: ${{ vars.DOCS_DIR || 'docs' }} From 493270feb8b9def87906d644e333604f0c37f332 Mon Sep 17 00:00:00 2001 From: YiWang24 Date: Mon, 4 May 2026 20:31:43 -0400 Subject: [PATCH 4/4] test(issue-ops): update bats tests to match cleaned-up issue-ops.yml The ingest job and repository_dispatch trigger were removed from issue-ops.yml in a previous cleanup commit but the tests were not updated. Align tests with the current 3-job structure (lifecycle, maintenance, manual) and remove assertions for the deleted ingest mode and its associated secrets (sentry-token, linear-token). --- tests/actions/issue-agent-workflow.bats | 1 - tests/actions/on-issue-routing.bats | 44 +++++-------------------- tests/actions/self-test-routing.bats | 8 ++--- 3 files changed, 13 insertions(+), 40 deletions(-) diff --git a/tests/actions/issue-agent-workflow.bats b/tests/actions/issue-agent-workflow.bats index d7d6891..4932be2 100644 --- a/tests/actions/issue-agent-workflow.bats +++ b/tests/actions/issue-agent-workflow.bats @@ -14,7 +14,6 @@ setup() { @test "issue workflow exposes the three consolidated modes" { grep -q 'lifecycle | maintenance | ingest' "$WORKFLOW" grep -q 'mode: lifecycle' "$ENTRY" - grep -q 'mode: ingest' "$ENTRY" grep -q 'mode: maintenance' "$ENTRY" } diff --git a/tests/actions/on-issue-routing.bats b/tests/actions/on-issue-routing.bats index 97fc236..db73bdf 100644 --- a/tests/actions/on-issue-routing.bats +++ b/tests/actions/on-issue-routing.bats @@ -30,12 +30,6 @@ setup() { grep -q '0 2 \* \* \*' "$ENTRY" } -@test "on-issue declares repository_dispatch with linear-issue-started and sentry-issue types" { - grep -q 'repository_dispatch:' "$ENTRY" - grep -q 'linear-issue-started' "$ENTRY" - grep -q 'sentry-issue' "$ENTRY" -} - @test "on-issue declares workflow_dispatch with mode choice input" { grep -q 'workflow_dispatch:' "$ENTRY" grep -q 'mode:' "$ENTRY" @@ -43,8 +37,8 @@ setup() { grep -q 'default: lifecycle' "$ENTRY" } -@test "on-issue workflow_dispatch mode options include lifecycle, maintenance, ingest" { - grep -q 'options: \[lifecycle, maintenance, ingest\]' "$ENTRY" +@test "on-issue workflow_dispatch mode options include lifecycle and maintenance" { + grep -q 'options: \[lifecycle, maintenance\]' "$ENTRY" } # --------------------------------------------------------------------------- @@ -56,10 +50,6 @@ setup() { grep -q "github.event_name == 'issue_comment'" "$ENTRY" } -@test "ingest job runs on repository_dispatch event" { - grep -q "github.event_name == 'repository_dispatch'" "$ENTRY" -} - @test "maintenance job runs on schedule and workflow_dispatch with maintenance mode" { grep -q "github.event_name == 'schedule'" "$ENTRY" grep -q "inputs.mode == 'maintenance'" "$ENTRY" @@ -79,10 +69,6 @@ setup() { grep -q 'mode: lifecycle' "$ENTRY" } -@test "ingest job passes mode: ingest" { - grep -q 'mode: ingest' "$ENTRY" -} - @test "maintenance job passes mode: maintenance" { grep -q 'mode: maintenance' "$ENTRY" } @@ -96,10 +82,10 @@ setup() { # Reusable workflow reference # --------------------------------------------------------------------------- -@test "all four jobs call the same reusable workflow issue.yml" { +@test "all three jobs call the same reusable workflow reusable-issue.yml" { local count count=$(grep -c 'uses: YiAgent/OpenCI/.github/workflows/reusable-issue\.yml' "$ENTRY") - [ "$count" -eq 4 ] + [ "$count" -eq 3 ] } # --------------------------------------------------------------------------- @@ -153,37 +139,25 @@ setup() { @test "all jobs pass anthropic-api-key secret" { local count count=$(grep -c 'anthropic-api-key:' "$ENTRY") - [ "$count" -eq 4 ] + [ "$count" -eq 3 ] } @test "all jobs pass api-base-url secret" { local count count=$(grep -c 'api-base-url:' "$ENTRY") - [ "$count" -eq 4 ] -} - -@test "all jobs pass sentry-token secret" { - local count - count=$(grep -c 'sentry-token:' "$ENTRY") - [ "$count" -eq 4 ] -} - -@test "all jobs pass linear-token secret" { - local count - count=$(grep -c 'linear-token:' "$ENTRY") - [ "$count" -eq 4 ] + [ "$count" -eq 3 ] } @test "all jobs pass slack-webhook-url secret" { local count count=$(grep -c 'slack-webhook-url:' "$ENTRY") - [ "$count" -eq 4 ] + [ "$count" -eq 3 ] } @test "all jobs pass mcp-dispatch-token secret" { local count count=$(grep -c 'mcp-dispatch-token:' "$ENTRY") - [ "$count" -eq 4 ] + [ "$count" -eq 3 ] } # --------------------------------------------------------------------------- @@ -193,5 +167,5 @@ setup() { @test "all jobs specify the same runner" { local count count=$(grep -c 'runner: blacksmith-2vcpu-ubuntu-2404' "$ENTRY") - [ "$count" -eq 4 ] + [ "$count" -eq 3 ] } diff --git a/tests/actions/self-test-routing.bats b/tests/actions/self-test-routing.bats index 4f8ef84..04f3e7d 100644 --- a/tests/actions/self-test-routing.bats +++ b/tests/actions/self-test-routing.bats @@ -220,9 +220,9 @@ setup() { grep -q 'schedule:' "$issue_entry" } -@test "issue-ops.yml declares repository_dispatch trigger" { +@test "issue-ops.yml declares workflow_dispatch trigger" { local issue_entry="${PROJECT_ROOT}/.github/workflows/issue-ops.yml" - grep -q 'repository_dispatch:' "$issue_entry" + grep -q 'workflow_dispatch:' "$issue_entry" } @test "issue-ops.yml calls reusable reusable-issue.yml" { @@ -235,9 +235,9 @@ setup() { grep -q 'lifecycle:' "$issue_entry" } -@test "issue-ops.yml has ingest job" { +@test "issue-ops.yml has manual job" { local issue_entry="${PROJECT_ROOT}/.github/workflows/issue-ops.yml" - grep -q 'ingest:' "$issue_entry" + grep -q 'manual:' "$issue_entry" } @test "issue-ops.yml has maintenance job" {