From b0f88a85eb265368738db2a35fdb8e006f4c04fa Mon Sep 17 00:00:00 2001 From: FBumann <117816358+FBumann@users.noreply.github.com> Date: Thu, 23 Jul 2026 22:27:03 +0200 Subject: [PATCH 1/2] fix: reset uv.lock before the base benchmark run MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The head run leaves an untracked uv.lock behind, and uv keeps a satisfying lockfile as-is — so a head that changes dependencies leaked its resolution into the base run (both sides benchmarked the head's deps). Remove it before the base run and log each side's resolved tsam version for transparency. Co-Authored-By: Claude Fable 5 --- .github/workflows/benchmarks.yaml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/benchmarks.yaml b/.github/workflows/benchmarks.yaml index df3e10e..e83b35f 100644 --- a/.github/workflows/benchmarks.yaml +++ b/.github/workflows/benchmarks.yaml @@ -42,19 +42,25 @@ jobs: enable-cache: true - name: Benchmark head - run: > - uv run --with "$BENCHMEM" pytest benchmarks/ $BENCH_ARGS - --benchmark-json "$RUNNER_TEMP/head.json" + run: | + uv run --with "$BENCHMEM" pytest benchmarks/ $BENCH_ARGS \ + --benchmark-json "$RUNNER_TEMP/head.json" + uv run --no-sync python -c "import tsam; print('head tsam:', tsam.__version__)" - name: Benchmark base (${{ github.event.pull_request.base.ref }}) if: github.event_name == 'pull_request' # Base src with the head's benchmark suite overlaid, so test IDs match # and suite edits in the PR still compare against the same cases. + # Drop the head run's uv.lock (untracked — the repo commits none): + # uv keeps a satisfying lock as-is, so without this a head that + # changes dependencies leaks its resolution into the base run. run: | git checkout --detach ${{ github.event.pull_request.base.sha }} git checkout ${{ github.sha }} -- benchmarks/ + rm -f uv.lock uv run --with "$BENCHMEM" pytest benchmarks/ $BENCH_ARGS \ --benchmark-json "$RUNNER_TEMP/base.json" + uv run --no-sync python -c "import tsam; print('base tsam:', tsam.__version__)" - name: Render report and plot run: | From 50fa348a53be3c4ed1d948cef4733d13963abe5a Mon Sep 17 00:00:00 2001 From: FBumann <117816358+FBumann@users.noreply.github.com> Date: Thu, 23 Jul 2026 22:44:14 +0200 Subject: [PATCH 2/2] fix: exact-sync the base benchmark environment uv run syncs inexactly by default and leaves extraneous packages from the head resolution installed; --exact removes them so the base runs on exactly its own dependency set. Co-Authored-By: Claude Fable 5 --- .github/workflows/benchmarks.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/benchmarks.yaml b/.github/workflows/benchmarks.yaml index e83b35f..d3ae7ac 100644 --- a/.github/workflows/benchmarks.yaml +++ b/.github/workflows/benchmarks.yaml @@ -58,7 +58,7 @@ jobs: git checkout --detach ${{ github.event.pull_request.base.sha }} git checkout ${{ github.sha }} -- benchmarks/ rm -f uv.lock - uv run --with "$BENCHMEM" pytest benchmarks/ $BENCH_ARGS \ + uv run --exact --with "$BENCHMEM" pytest benchmarks/ $BENCH_ARGS \ --benchmark-json "$RUNNER_TEMP/base.json" uv run --no-sync python -c "import tsam; print('base tsam:', tsam.__version__)"