From e194cb90df750819e17a698e1e5e6f31c8889c7f Mon Sep 17 00:00:00 2001 From: Aditya Mukhopadhyay Date: Tue, 13 Oct 2026 10:25:57 +0530 Subject: [PATCH] ci(bench): name the branch in every regression issue Issues for main were titled "Benchmark regression: " with no branch, while v3 issues carried "(v3)". Title every issue "Benchmark regression: ()", like the nightly fuzz issue, and add a Branch line to the body. An open issue with the old main title is still matched, renamed and commented on. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01HyLscCUuJ1GQpdAeX79EdR --- .github/workflows/bench.yml | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index 05af0de9f..6a46e9120 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -266,10 +266,11 @@ jobs: # Shared CI runners are noisy, so one alert on its own is usually a slow # runner, not a regression. Report only benchmarks that also alerted in - # this suite on the previous run. Each suite has its own issue: if one is - # open, add a comment to it instead of skipping. Every outcome, including - # an alert that is not reported, goes in the job summary, because the - # Bencher step is continue-on-error and the run stays green (#393). + # this suite on the previous run. Each suite and branch has its own issue, + # titled with the branch like the nightly fuzz issue: if one is open, add + # a comment to it instead of skipping. Every outcome, including an alert + # that is not reported, goes in the job summary, because the Bencher step + # is continue-on-error and the run stays green (#393). - name: Report regression if: steps.bencher.outcome == 'failure' uses: actions/github-script@v9 @@ -282,8 +283,7 @@ jobs: const suite = process.env.SUITE; const ref = process.env.BENCH_REF; const jobName = `bench / ${suite}`; - // main keeps its existing issue titles; other branches get their own. - const label = ref === 'main' ? suite : `${suite}, ${ref}`; + const label = `${suite}, ${ref}`; // Bencher lists each alert as "- (Latency): <.../alerts/>". // The "View results" lines use /perf? URLs, so they do not match. @@ -300,6 +300,7 @@ jobs: body = [ `Bencher failed in the nightly benchmark run (${label}) but listed no alerts. This is likely an API or upload error.`, '', + `**Branch:** \`${ref}\``, `**Run:** ${runUrl}`, ].join('\n'); } else { @@ -358,6 +359,7 @@ jobs: '', ...repeated.map(b => `- \`${b}\``), '', + `**Branch:** \`${ref}\``, `**Run:** ${runUrl}`, `**Previous run:** ${previousUrl}`, '', @@ -371,12 +373,20 @@ jobs: state: 'open', per_page: 100, }); - const title = ref === 'main' - ? `Benchmark regression: ${suite}` - : `Benchmark regression: ${suite} (${ref})`; - const existing = openIssues.find(i => !i.pull_request && i.title === title); + const title = `Benchmark regression: ${suite} (${ref})`; + // Issues for main used to be titled without the branch. Keep + // commenting on such an open issue, and give it the new title. + const legacyTitle = ref === 'main' ? `Benchmark regression: ${suite}` : null; + const existing = + openIssues.find(i => !i.pull_request && i.title === title) || + openIssues.find(i => !i.pull_request && legacyTitle && i.title === legacyTitle); let reported; if (existing) { + if (existing.title !== title) { + await github.rest.issues.update({ + owner, repo, issue_number: existing.number, title, + }); + } await github.rest.issues.createComment({ owner, repo, issue_number: existing.number, body, });