From 840afd21a7c64d30157e9b96321d5831d9aaa18e Mon Sep 17 00:00:00 2001 From: "Henry Q. Dineen" Date: Sat, 10 Oct 2026 01:49:14 -0400 Subject: [PATCH 1/3] [ci] Skip benchmark PR comments on fork PRs and show results in the job summary Fork PRs get a read-only GITHUB_TOKEN under `pull_request`, so the `Post comment` step 403s and fails the perf and size jobs on every external PR even though the benchmarks themselves succeed. Guard the comment step to same-repo PRs and write the comparison table to the job summary so fork PRs still surface results. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/benchmarks.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 4d09d68bf..e46ac3aaa 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -44,7 +44,9 @@ jobs: yarn workspace benchmarks run compare -- ${{ env.BASE_JSON }} ${{ env.PATCH_JSON }} >> markdown cat markdown >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT + cat markdown >> $GITHUB_STEP_SUMMARY - name: 'Post comment' + if: github.event.pull_request.head.repo.full_name == github.repository uses: edumserrano/find-create-or-update-comment@v3 with: issue-number: ${{ github.event.pull_request.number }} @@ -98,7 +100,9 @@ jobs: yarn workspace benchmarks run compare -- ${{ env.BASE_JSON }} ${{ env.PATCH_JSON }} >> markdown cat markdown >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT + cat markdown >> $GITHUB_STEP_SUMMARY - name: 'Post comment' + if: github.event.pull_request.head.repo.full_name == github.repository uses: edumserrano/find-create-or-update-comment@v3 with: issue-number: ${{ github.event.pull_request.number }} From b71a9eff76ad601bc91a2a7ca22c5a7c9aaaa4de Mon Sep 17 00:00:00 2001 From: "Henry Q. Dineen" Date: Sat, 10 Oct 2026 13:32:06 -0400 Subject: [PATCH 2/3] [ci] Silence yarn in the benchmark compare step MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit yarn's own banner, "$ node ./compare.js …", and "Done in …" lines were captured along with the table into the PR comment and now the job summary. Dropping the `--` also removes yarn's deprecation warning from the step log. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/benchmarks.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index e46ac3aaa..929492432 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -41,7 +41,7 @@ jobs: id: collect run: | echo "table<> $GITHUB_OUTPUT - yarn workspace benchmarks run compare -- ${{ env.BASE_JSON }} ${{ env.PATCH_JSON }} >> markdown + yarn -s workspace benchmarks run -s compare ${{ env.BASE_JSON }} ${{ env.PATCH_JSON }} >> markdown cat markdown >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT cat markdown >> $GITHUB_STEP_SUMMARY @@ -97,7 +97,7 @@ jobs: id: collect run: | echo "table<> $GITHUB_OUTPUT - yarn workspace benchmarks run compare -- ${{ env.BASE_JSON }} ${{ env.PATCH_JSON }} >> markdown + yarn -s workspace benchmarks run -s compare ${{ env.BASE_JSON }} ${{ env.PATCH_JSON }} >> markdown cat markdown >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT cat markdown >> $GITHUB_STEP_SUMMARY From f29694867184a9deebf9166038ed6bdf147be737 Mon Sep 17 00:00:00 2001 From: "Henry Q. Dineen" Date: Sat, 10 Oct 2026 13:33:30 -0400 Subject: [PATCH 3/3] [ci] Drop redundant `--` from benchmark runs yarn 1 forwards script args without `--` and warns when it's present, so every benchmark step logged a deprecation warning. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/benchmarks.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 929492432..8484f58d1 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -24,7 +24,7 @@ jobs: git checkout -f ${{ github.event.pull_request.base.sha }} git clean -fdx yarn install --frozen-lockfile --silent - if yarn workspace benchmarks run perf -- -o ${{ env.BASE_JSON }}; then + if yarn workspace benchmarks run perf -o ${{ env.BASE_JSON }}; then echo "Ran successfully on base branch" else echo "{}" > ${{ env.BASE_JSON }} # Empty JSON as default @@ -35,7 +35,7 @@ jobs: git checkout -f ${{ github.event.pull_request.head.sha }} git clean -fdx yarn install --frozen-lockfile --silent - yarn workspace benchmarks run perf -- -o ${{ env.PATCH_JSON }} + yarn workspace benchmarks run perf -o ${{ env.PATCH_JSON }} echo "Ran successfully on patch branch" - name: 'Collect results' id: collect @@ -80,7 +80,7 @@ jobs: git checkout -f ${{ github.event.pull_request.base.sha }} git clean -fdx yarn install --frozen-lockfile --silent - if yarn workspace benchmarks run size -- -o ${{ env.BASE_JSON }}; then + if yarn workspace benchmarks run size -o ${{ env.BASE_JSON }}; then echo "Ran successfully on base branch" else echo "{}" > ${{ env.BASE_JSON }} # Empty JSON as default @@ -91,7 +91,7 @@ jobs: git checkout -f ${{ github.event.pull_request.head.sha }} git clean -fdx yarn install --frozen-lockfile --silent - yarn workspace benchmarks run size -- -o ${{ env.PATCH_JSON }} + yarn workspace benchmarks run size -o ${{ env.PATCH_JSON }} echo "Ran successfully on patch branch" - name: 'Collect results' id: collect