From 97d3ba642907a4862b4e93ef262a573ee7bbfa12 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 18 Mar 2026 02:00:50 +0000 Subject: [PATCH 1/2] Initial plan From 9d60b2ec0c5390d94d02984edbc5b7c7019c2f35 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 18 Mar 2026 02:11:52 +0000 Subject: [PATCH 2/2] Fix bench-compare workflow for fork PRs Use github.event.pull_request.head.sha instead of github.head_ref for the checkout ref, since head_ref is a branch name that only exists on the fork remote and causes checkout to fail for fork PRs. Also guard post-bench steps with steps.checkout.outcome == 'success' so they don't fail when checkout itself fails. Co-authored-by: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> --- .github/workflows/bench-compare.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/bench-compare.yml b/.github/workflows/bench-compare.yml index 66716a9..7f9cd33 100644 --- a/.github/workflows/bench-compare.yml +++ b/.github/workflows/bench-compare.yml @@ -18,10 +18,13 @@ jobs: steps: - uses: actions/checkout@v6 + id: checkout with: # Full history so the script can git-archive the base branch. fetch-depth: 0 - ref: ${{ github.head_ref }} + # Use the PR head SHA so fork PRs resolve correctly + # (github.head_ref is a branch name that only exists on the fork remote). + ref: ${{ github.event.pull_request.head.sha }} - uses: wyvox/action-setup-pnpm@v3 @@ -33,7 +36,7 @@ jobs: pnpm bench:compare | sed 's/\x1b\[[0-9;]*m//g' > "$RUNNER_TEMP/bench-output.txt" - name: Format PR comment - if: always() + if: always() && steps.checkout.outcome == 'success' env: BENCH_OUTPUT_FILE: ${{ runner.temp }}/bench-output.txt BENCH_JSON_OUTPUT: ${{ runner.temp }}/bench-results.json @@ -41,11 +44,11 @@ jobs: run: node scripts/format-bench-comment.mjs > "$RUNNER_TEMP/bench-comment.md" - name: Write job summary - if: always() + if: always() && steps.checkout.outcome == 'success' run: cat "$RUNNER_TEMP/bench-comment.md" >> "$GITHUB_STEP_SUMMARY" - name: Post PR comment - if: always() + if: always() && steps.checkout.outcome == 'success' uses: actions/github-script@v7 with: script: |