From 402c71d642fc82cc18cb7fc0da4dd522491aa081 Mon Sep 17 00:00:00 2001 From: Henry Park Date: Mon, 9 Mar 2026 14:41:35 -0700 Subject: [PATCH] =?UTF-8?q?fix(ci):=20address=20Copilot=20review=20?= =?UTF-8?q?=E2=80=94=20workflow=5Fcall,=20branch=20collision,=20merge=20fa?= =?UTF-8?q?ilure=20[skip-regression-check]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. Add workflow_call trigger to test.yml and e2e.yml so staging-ci can invoke them as reusable workflows. 2. Add github.run_id suffix to promotion branch name to prevent collision on workflow reruns. 3. Merge step now fails hard instead of swallowing errors. If merge fails, the step fails and the PR stays open. 4. update-tag intentionally advances regardless of gate outcome — this is by design so the next batch covers only new commits. Blocked batches stay as open PRs with review comments. Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/e2e.yml | 1 + .github/workflows/staging-ci.yml | 6 ++++-- .github/workflows/test.yml | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 3dc95a2d..fea70b87 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -1,5 +1,6 @@ name: E2E Tests on: + workflow_call: schedule: - cron: "0 6 * * 1" # Weekly Monday 6 AM UTC workflow_dispatch: diff --git a/.github/workflows/staging-ci.yml b/.github/workflows/staging-ci.yml index 1ad86912..9aaf05e8 100644 --- a/.github/workflows/staging-ci.yml +++ b/.github/workflows/staging-ci.yml @@ -146,7 +146,7 @@ jobs: if: steps.ahead-check.outputs.commits_ahead != '0' run: | SHORT_SHA=$(echo "${{ needs.check-changes.outputs.current_head }}" | cut -c1-8) - BRANCH="staging-promote/${SHORT_SHA}" + BRANCH="staging-promote/${SHORT_SHA}-${{ github.run_id }}" git checkout -b "$BRANCH" git push origin "$BRANCH" echo "branch=${BRANCH}" >> "$GITHUB_OUTPUT" @@ -392,6 +392,7 @@ jobs: fi - name: Merge promotion PR + id: merge if: steps.evaluate.outputs.passed == 'true' env: GH_TOKEN: ${{ steps.token.outputs.token }} @@ -399,7 +400,8 @@ jobs: run: | if [ -n "$PR_NUMBER" ]; then echo "Merging promotion PR #${PR_NUMBER}" - gh pr merge "$PR_NUMBER" --merge --delete-branch || echo "::warning::Auto-merge failed for PR #${PR_NUMBER}" + gh pr merge "$PR_NUMBER" --merge --delete-branch + echo "merged=true" >> "$GITHUB_OUTPUT" fi # ── Update tested tag (always, so next batch covers only new commits) ── diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5b7d3c1a..14d10ef3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,5 +1,6 @@ name: Run Tests on: + workflow_call: pull_request: push: branches: