Skip to content

Perf/436 release benchmark workflow#514

Merged
acgetchell merged 3 commits into
mainfrom
perf/436-release-benchmark-workflow
Jul 8, 2026
Merged

Perf/436 release benchmark workflow#514
acgetchell merged 3 commits into
mainfrom
perf/436-release-benchmark-workflow

Conversation

@acgetchell

Copy link
Copy Markdown
Owner

No description provided.

- Add release-signal benchmark recipes for saved Criterion baselines, local
  release comparisons, GitHub Release asset comparisons, and curated report
  promotion.
- Package release benchmark artifacts with raw Criterion data, metadata,
  baseline results, and human-readable performance summaries.
- Document the invariant-first benchmarking model so performance evidence is
  only publishable when scientific invariants are maintained.

Refs #436
- Reject non-finite, zero, and negative Criterion point estimates before rendering saved-baseline reports.
- Clarify saved-baseline docs so `bench-save-last` pairs with `bench-compare last`, while explicit tag baselines remain opt-in.
@acgetchell acgetchell self-assigned this Jul 8, 2026
@acgetchell acgetchell linked an issue Jul 8, 2026 that may be closed by this pull request
11 tasks
@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: e3da8323-ef9a-4991-a84e-8528db021f60

📥 Commits

Reviewing files that changed from the base of the PR and between aba0c8a and 178e9a1.

📒 Files selected for processing (3)
  • benches/README.md
  • justfile
  • scripts/tests/test_benchmark_utils.py
✅ Files skipped from review due to trivial changes (1)
  • benches/README.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • justfile
  • scripts/tests/test_benchmark_utils.py

Walkthrough

The PR reframes benchmarking around scientific invariants, extends benchmark CI execution, adds new benchmark and release-performance commands, implements report generation and archiving, and updates tests and documentation to match the new workflow.

Changes

Release-performance benchmarking workflow

Layer / File(s) Summary
Invariant-first guidance updates
AGENTS.md, README.md, docs/dev/perf-tuning.md, docs/dev/commands.md
Rewords benchmarking guidance to prioritize scientific invariants and treats invariant-violating runs as invalid evidence.
Benchmark workflow documentation
benches/README.md, docs/RELEASING.md, docs/archive/performance/README.md, docs/dev/tooling-alignment.md, scripts/README.md, docs/dev/commands.md
Expands command references, release evidence requirements, archive notes, and tooling-alignment guidance for the benchmark and performance flows.
CI benchmark surface and recipes
.github/workflows/release-benchmarks.yml, benches/ci_performance_suite.rs, justfile
Increases benchmark timeout, adds more cargo bench targets, updates validation wording, and introduces new bench-* and performance-* recipes.
Reporting engine and CLI wiring
scripts/benchmark_utils.py
Adds release-target configuration, Criterion comparison/report generation, archive promotion, worktree-based release reporting, and command dispatch for the new benchmark/performance subcommands.
Release-performance tests
scripts/tests/test_benchmark_utils.py
Adds coverage for comparison collection, report rendering, release tag parsing, promotion, tar safety, worktree reporting, and CLI parsing.

Estimated code review effort: 4 (Complex) | ~75 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Maintainer
  participant justfile
  participant benchmark_utils
  participant Git
  participant Criterion
  participant docs_archive

  Maintainer->>justfile: just performance-release current_tag baseline_tag
  justfile->>benchmark_utils: dispatch performance-release
  benchmark_utils->>Git: resolve tags and create worktree
  benchmark_utils->>Criterion: run benchmarks and compare estimates
  benchmark_utils->>docs_archive: promote report and update archive index
  docs_archive-->>Maintainer: archived release comparison
Loading

Possibly related issues

Possibly related PRs

  • acgetchell/delaunay#349: Related Criterion benchmark pipeline changes feed the ci_performance_suite outputs that this PR’s reporting code consumes.

Suggested labels: documentation, enhancement

Poem

A rabbit tapped the benchmark drum,
With invariants first, the changes come. 🐇
New reports in tidy archive rows,
And release-signal wisdom softly glows.
No false speed wins, no evidence bent—
Just Criteria, carrots, and contentment.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive No pull request description was provided, so the changeset can't be validated against a meaningful summary. Add a brief description of the workflow and documentation changes, plus any key implementation notes.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main change: a release benchmark workflow update.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch perf/436-release-benchmark-workflow

Comment @coderabbitai help to get the list of available commands.

@codacy-production

codacy-production Bot commented Jul 8, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity

Metric Results
Complexity 0

View in Codacy

🟢 Coverage ∅ diff coverage · +0.00% coverage variation

Metric Results
Coverage variation +0.00% coverage variation (-1.00%)
Diff coverage diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (282a72d) 80105 72958 91.08%
Head commit (178e9a1) 80105 (+0) 72958 (+0) 91.08% (+0.00%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#514) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@coderabbitai coderabbitai Bot added documentation Improvements or additions to documentation enhancement New feature or request labels Jul 8, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (2)
justfile (1)

907-936: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Duplicate tag-pair validation logic between performance-github-assets and performance-release.

Both recipes repeat the identical "both-or-neither" check for current_tag/baseline_tag. Consider extracting the validation into a private helper recipe to avoid drift if the validation logic changes later.

♻️ Proposed refactor sketch
+_require-tag-pair current_tag baseline_tag:
+    #!/usr/bin/env bash
+    set -euo pipefail
+    current_tag="{{ current_tag }}"
+    baseline_tag="{{ baseline_tag }}"
+    if [[ -n "$current_tag" || -n "$baseline_tag" ]]; then
+        if [[ -z "$current_tag" || -z "$baseline_tag" ]]; then
+            echo "current_tag and baseline_tag must be provided together" >&2
+            exit 2
+        fi
+    fi

 performance-github-assets current_tag="" baseline_tag="": _ensure-uv
     #!/usr/bin/env bash
     set -euo pipefail
-    current_tag="{{ current_tag }}"
-    baseline_tag="{{ baseline_tag }}"
-    if [[ -n "$current_tag" || -n "$baseline_tag" ]]; then
-        if [[ -z "$current_tag" || -z "$baseline_tag" ]]; then
-            echo "current_tag and baseline_tag must be provided together" >&2
-            exit 2
-        fi
-        uv run benchmark-utils performance-github-assets "$current_tag" "$baseline_tag"
-    else
-        uv run benchmark-utils performance-github-assets
-    fi
+    just _require-tag-pair "{{ current_tag }}" "{{ baseline_tag }}"
+    if [[ -n "{{ current_tag }}" ]]; then
+        uv run benchmark-utils performance-github-assets "{{ current_tag }}" "{{ baseline_tag }}"
+    else
+        uv run benchmark-utils performance-github-assets
+    fi
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@justfile` around lines 907 - 936, Both justfile recipes duplicate the same
current_tag/baseline_tag “both-or-neither” validation, so extract that check
into a shared private helper recipe and call it from performance-github-assets
and performance-release. Keep the existing behavior and error message the same,
but centralize the tag-pair validation so future changes only need to be made
once.
scripts/tests/test_benchmark_utils.py (1)

268-276: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Dead collect_criterion_comparisons call in this test.

No estimates are written before Line 268, so collect_criterion_comparisons always returns an empty list and the if not comparisons fallback is always used. The call adds no coverage and makes the fixture setup misleading — either drop it and build the comparison list directly, or write matching new/last estimates so the collection path is actually exercised.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/tests/test_benchmark_utils.py` around lines 268 - 276, The test is
relying on a dead collect_criterion_comparisons call because no Criterion
estimates are created beforehand, so the fallback is always taken. In the
affected test, either remove the collect_criterion_comparisons invocation and
construct the CriterionComparison list directly, or update the fixture setup to
write matching new/last estimates before calling collect_criterion_comparisons
so the collection path is truly exercised. Use the existing test body around
benchmark_utils.CriterionComparison and collect_criterion_comparisons to locate
the change.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@justfile`:
- Around line 907-936: Both justfile recipes duplicate the same
current_tag/baseline_tag “both-or-neither” validation, so extract that check
into a shared private helper recipe and call it from performance-github-assets
and performance-release. Keep the existing behavior and error message the same,
but centralize the tag-pair validation so future changes only need to be made
once.

In `@scripts/tests/test_benchmark_utils.py`:
- Around line 268-276: The test is relying on a dead
collect_criterion_comparisons call because no Criterion estimates are created
beforehand, so the fallback is always taken. In the affected test, either remove
the collect_criterion_comparisons invocation and construct the
CriterionComparison list directly, or update the fixture setup to write matching
new/last estimates before calling collect_criterion_comparisons so the
collection path is truly exercised. Use the existing test body around
benchmark_utils.CriterionComparison and collect_criterion_comparisons to locate
the change.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: bf2a4714-55d4-487e-aa7c-99b194b74b49

📥 Commits

Reviewing files that changed from the base of the PR and between 282a72d and aba0c8a.

📒 Files selected for processing (14)
  • .github/workflows/release-benchmarks.yml
  • AGENTS.md
  • README.md
  • benches/README.md
  • benches/ci_performance_suite.rs
  • docs/RELEASING.md
  • docs/archive/performance/README.md
  • docs/dev/commands.md
  • docs/dev/perf-tuning.md
  • docs/dev/tooling-alignment.md
  • justfile
  • scripts/README.md
  • scripts/benchmark_utils.py
  • scripts/tests/test_benchmark_utils.py

@codecov

codecov Bot commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.05%. Comparing base (282a72d) to head (178e9a1).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #514   +/-   ##
=======================================
  Coverage   91.05%   91.05%           
=======================================
  Files          88       88           
  Lines       79884    79884           
=======================================
  Hits        72739    72739           
  Misses       7145     7145           
Flag Coverage Δ
unittests 91.05% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

- Centralize explicit tag-pair validation for release performance recipes.
- Clarify that `perf-no-regressions` reuses cached same-machine main baselines.
- Exercise GitHub Release asset comparisons through real Criterion samples.

Closes #436
@acgetchell
acgetchell enabled auto-merge (squash) July 8, 2026 20:24
@acgetchell
acgetchell merged commit ff74d7c into main Jul 8, 2026
23 checks passed
@acgetchell
acgetchell deleted the perf/436-release-benchmark-workflow branch July 8, 2026 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adapt release performance benchmarking workflow from la-stack

1 participant