From 6f994c554516ecac46c4373ca1c11a92f47bc777 Mon Sep 17 00:00:00 2001 From: Luke Karrys Date: Wed, 12 Aug 2026 20:55:41 -0700 Subject: [PATCH 1/3] ci: add reprocess workflow to redeploy a run's results under an explicit date --- .github/workflows/reprocess.yml | 83 +++++++++++++++++++++++++++++++++ scripts/process-results.sh | 3 +- 2 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/reprocess.yml diff --git a/.github/workflows/reprocess.yml b/.github/workflows/reprocess.yml new file mode 100644 index 0000000000..575ec816f6 --- /dev/null +++ b/.github/workflows/reprocess.yml @@ -0,0 +1,83 @@ +name: Reprocess Benchmark Results + +# Re-runs process + deploy from an EXISTING benchmark run's artifacts, writing +# the results to an explicit date folder. Use case: a run whose process step +# crossed UTC midnight and stamped the wrong date. The date input must match +# the calendar day the run's benchmark jobs actually executed. +# +# Artifacts are retained for 7 days, so this only works on recent runs. +on: + workflow_dispatch: + inputs: + run-id: + description: "The benchmark workflow run ID whose artifacts to reprocess" + required: true + date: + description: "Date folder to write (YYYY-MM-DD; the day the benchmarks ran)" + required: true + +jobs: + reprocess: + name: "Reprocess & Deploy" + runs-on: ubuntu-24.04-arm + timeout-minutes: 15 + permissions: + contents: write + steps: + - uses: actions/checkout@v6 + - name: Install Node + uses: actions/setup-node@v6 + with: + node-version: "24" + - name: Download Results + uses: actions/download-artifact@v8 + with: + path: results + pattern: results-* + run-id: ${{ inputs.run-id }} + github-token: ${{ secrets.GITHUB_TOKEN }} + - name: Download Versions + uses: actions/download-artifact@v8 + with: + path: versions-temp + pattern: versions-* + run-id: ${{ inputs.run-id }} + github-token: ${{ secrets.GITHUB_TOKEN }} + - name: Process Results + env: + BENCH_DATE: ${{ inputs.date }} + run: | + ./bench process + - name: Summarize results in log + run: | + { + echo '```' + for f in results/results-*/benchmarks.json; do + [ -f "$f" ] || continue + node -e ' + const fs = require("fs") + const p = process.argv[1] + const name = p.split("/")[1].replace(/^results-/, "") + for (const r of JSON.parse(fs.readFileSync(p, "utf8")).results ?? []) { + const times = (r.times ?? []).map((t) => t.toFixed(1)).join(", ") + console.log(`${name} ${r.command}: mean=${(r.mean ?? 0).toFixed(1)}s times=[${times}]`) + } + ' "$f" + done + echo '```' + } | tee -a "$GITHUB_STEP_SUMMARY" + - name: Install vlt + run: | + npm install -g vlt@latest + - name: Build Charts View + run: | + pushd app + vlt install + vlt run build + popd + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: results + keep_files: true diff --git a/scripts/process-results.sh b/scripts/process-results.sh index 65a5239211..42d7662483 100644 --- a/scripts/process-results.sh +++ b/scripts/process-results.sh @@ -2,7 +2,8 @@ set -Eeuxo pipefail # Get current date for results directory -DATE=$(date +%Y-%m-%d) +# BENCH_DATE overrides the folder date (see .github/workflows/reprocess.yml) +DATE=${BENCH_DATE:-$(date +%Y-%m-%d)} # Create results directory structure mkdir -p "results/$DATE" From 69d7faaf5c6023d0f7ff1727d3f80e42fe72d28a Mon Sep 17 00:00:00 2001 From: Luke Karrys Date: Wed, 12 Aug 2026 20:57:35 -0700 Subject: [PATCH 2/3] ci: drop redundant summary step from reprocess workflow --- .github/workflows/reprocess.yml | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/.github/workflows/reprocess.yml b/.github/workflows/reprocess.yml index 575ec816f6..e16929b3fb 100644 --- a/.github/workflows/reprocess.yml +++ b/.github/workflows/reprocess.yml @@ -48,24 +48,6 @@ jobs: BENCH_DATE: ${{ inputs.date }} run: | ./bench process - - name: Summarize results in log - run: | - { - echo '```' - for f in results/results-*/benchmarks.json; do - [ -f "$f" ] || continue - node -e ' - const fs = require("fs") - const p = process.argv[1] - const name = p.split("/")[1].replace(/^results-/, "") - for (const r of JSON.parse(fs.readFileSync(p, "utf8")).results ?? []) { - const times = (r.times ?? []).map((t) => t.toFixed(1)).join(", ") - console.log(`${name} ${r.command}: mean=${(r.mean ?? 0).toFixed(1)}s times=[${times}]`) - } - ' "$f" - done - echo '```' - } | tee -a "$GITHUB_STEP_SUMMARY" - name: Install vlt run: | npm install -g vlt@latest From ca56bd297556bfa3f6ecc50ec7af0f80c6718fb2 Mon Sep 17 00:00:00 2001 From: Luke Karrys Date: Wed, 12 Aug 2026 20:59:09 -0700 Subject: [PATCH 3/3] ci: self-documenting commit message for reprocess deploys --- .github/workflows/reprocess.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/reprocess.yml b/.github/workflows/reprocess.yml index e16929b3fb..90ab0de278 100644 --- a/.github/workflows/reprocess.yml +++ b/.github/workflows/reprocess.yml @@ -63,3 +63,4 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: results keep_files: true + full_commit_message: "reprocess: run ${{ inputs.run-id }} -> ${{ inputs.date }} (dispatched via ${{ github.workflow }} run ${{ github.run_id }})"