Skip to content

ci: docs-only skip, oldest+newest on PRs, path-scoped benchmarks; README benchmark charts; dz cadence - #44

Merged
sebyx07 merged 3 commits into
mainfrom
ci/cost-sweep
Nov 28, 2026
Merged

sebyx07 merged 3 commits into
mainfrom
ci/cost-sweep

Conversation

@sebyx07

@sebyx07 sebyx07 commented Nov 28, 2026 •

Copy link
Copy Markdown
Owner

What

Cheaper, faster CI; benchmark charts in the README's Performance section, generated from a committed run; the dz cadence standard.

Why

Measured 2026-11-21..28 (Actions API): CI 29 runs x 28 jobs for any change (more jobs than the 20 a free account runs at once, so every run queued behind itself); Benchmarks 29 runs x 2 jobs of ~2.5 min (19 on pull requests), whether or not anything measured had changed. The README's Performance section had prose and no chart.

Changes

CI

  • ci.yml: new changes job. When every changed file is *.md or under docs/, only workflows and check (bin/check) run; CI OK (the required check, name unchanged) still reports. It classifies the checked-out commit against the base, counts a rename under both names, tests whole paths, and treats anything unreadable as code.
  • ci.yml: a pull request tests the oldest and the newest Ruby (gem-specs, package) and the oldest and the newest Rails line; the full generated matrices run on every push to main that is not docs-only and on manual runs. 28 jobs -> 23 on a code PR (measured on this PR), 4 on a docs-only PR.
  • ci.yml / benchmark.yml: a main run is never cancelled (it was cancel-in-progress: true everywhere); every non-PR run has its own concurrency group.
  • benchmark.yml: runs only when something a benchmark measures changed (lib/, ext/, bench/, bin/bench-report, app/, config/, the bundle, .ruby-version). Not a required check, so a path filter is safe.

README benchmark charts

  • bin/bench-charts (next to bin/bench-report) draws docs/benchmarks/*.svg (light and dark, chosen with <picture>) and writes the tables under them into the README, from one committed run: docs/benchmarks/x86_64-linux.json. Nothing is typed by hand. bin/bench-charts --check fails when the charts or the README block drift from the JSON; spec/ci/bench_charts_spec.rb runs it, so bin/check and CI do.
  • Regenerate: BENCH_TIME=5 bundle exec bin/bench-report run docs/benchmarks/x86_64-linux.json && bin/bench-charts.
  • The run: 2026-11-28, AMD Ryzen 7 5700X3D (16 threads), x86_64 Linux, ruby 4.0.10, benchmark processes with YJIT, 5 s per benchmark. bin/bench-report now records the CPU model, thread count, load average and YJIT state, so the README states them from the JSON.
  • Honesty note: the workstation was shared with other jobs. I ran the suite several times and kept the quietest run (worst charted row ±6.5%, load average 5.4 on 16 threads); the selection was on noise, never on a result. Each row's own ± is in the tables. Standalone results repeated within a few percent across the quiet runs; the Rails variants changed order between runs, and the README says so.
  • The prose that quoted ranges from older runs is replaced by the tables; the closing summary and llms.txt were adjusted to what this run shows (Erubi ahead by 1.6x on the standalone page here; the six Rails variants close together, Slim first). CLAUDE.md and docs/idea/principles.md now say the README block is the one generated exception to "no benchmark numbers in docs".

dz cadence

  • schedules: security-release and schedules: health deleted, with their briefs; every sentence that named them (briefs, .dz/README.md, .github/CLAUDE.md, docs/, README) rewritten.
  • devops.watch: advisories replaces the daily security-release. This supersedes the off written on 2026-11-26; the comment says so.
  • care.docs_drift: off. review: untouched. release-due stays weekly on Monday, improve monthly.

Evidence (platform census, 30 days, both accounts): security-release 170 firings -> 3 product merges + 17 REPORT.md-only PRs (4 here); health 270 firings -> 8 asks -> 0 merges (cron.base_red_ask already files a fix when main is red); devops.watch 91 merged in 14 days, 83 product; care.docs_drift 47 tasks -> 8 docs-only merges, 33 failed.

Verification

  • bin/check green locally (repo guards, bundle-audit, compile, RuboCop, full RSpec including the new spec, Brakeman, smoke). actionlint 1.7.12, zizmor, bin/repo-guards and bun run policy-cli on the policy file: ok.
  • This PR exercises the PR code path (reduced matrices, changes -> code=true) and the benchmark workflow (it touches bin/bench-report). The docs-only path and the full matrices first run on the next such PR / on the merge to main.
  • Risk accepted: a break on a middle Ruby or Rails version is found on the main push instead of the PR.

Branch is cut from the current main tip.

🤖 Generated with Claude Code

sebyx07 and others added 2 commits November 28, 2026 02:20
…arks run when measured code changes

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…op health and security-release

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

Benchmarks: x86_64 (linux)

ruby 4.0.10 (2026-11-19 revision a704b7cd95) +PRISM [x86_64-linux] · commit fd0a7c08da · 2.0s per report
Δ is against main 47ee601403 (same runner type; expect a few % noise).

escape_bench (C ext) · peak RSS 119 MB

Benchmark i/s ms / call allocs / call vs fastest Δ vs main
escape_html short clean (10B) 934,383 ± 0.6% 0.0011 0.00 fastest +41.7%
escape_html medium clean (200B) 559,159 ± 0.5% 0.0018 0.00 1.67x slower +40.6%
append short clean (10B) 386,191 ± 0.3% 0.0026 0.02 2.42x slower +47.2%
append short dirty (10B) 266,711 ± 0.3% 0.0037 0.00 3.50x slower +42.0%
append medium clean (200B) 260,796 ± 0.4% 0.0038 0.00 3.58x slower +45.0%
escape_html short dirty (10B) 167,985 ± 0.5% 0.0060 100 5.56x slower +42.4%
append medium dirty (200B) 122,880 ± 0.3% 0.0081 0.00 7.60x slower +39.4%
escape_html medium dirty (200B) 91,204 ± 0.4% 0.0110 100 10.24x slower +32.0%
escape_html long clean (10KB) 21,787 ± 0.3% 0.0459 0.00 42.89x slower +34.6%
append long clean (10KB) 15,715 ± 0.3% 0.0636 0.00 59.46x slower +40.1%
append long dirty (10KB) 1,772 ± 0.2% 0.5643 0.00 527.27x slower +13.1%
escape_html long dirty (10KB) 1,674 ± 2.3% 0.5975 100 558.29x slower +14.3%

escape_bench (pure Ruby) · peak RSS 148 MB

Benchmark i/s ms / call allocs / call vs fastest Δ vs main
escape_html short clean (10B) 242,833 ± 0.4% 0.0041 0.00 fastest +38.4%
append short clean (10B) 206,235 ± 0.6% 0.0048 0.02 1.18x slower +36.1%
escape_html short dirty (10B) 105,736 ± 0.4% 0.0095 100 2.30x slower +52.6%
escape_html medium clean (200B) 96,480 ± 0.3% 0.0104 0.00 2.52x slower +75.1%
append short dirty (10B) 90,890 ± 0.6% 0.0110 100 2.67x slower +39.2%
append medium clean (200B) 85,456 ± 0.4% 0.0117 0.00 2.84x slower +71.1%
escape_html medium dirty (200B) 36,722 ± 0.3% 0.0272 200 6.61x slower +55.6%
append medium dirty (200B) 33,794 ± 0.3% 0.0296 200 7.19x slower +57.3%
escape_html long clean (10KB) 3,647 ± 0.5% 0.2742 0.00 66.59x slower +136.2%
append long clean (10KB) 3,404 ± 0.3% 0.2937 0.00 71.33x slower +130.1%
escape_html long dirty (10KB) 1,158 ± 1.0% 0.8636 200 209.70x slower +15.0%
append long dirty (10KB) 1,027 ± 2.3% 0.9736 200 236.42x slower +15.9%

render_bench (C ext) · peak RSS 132 MB

Benchmark i/s ms / call allocs / call vs fastest Δ vs main
erubi 11,160 ± 1.1% 0.0896 713 fastest +43.6%
ruby2html 7,858 ± 0.7% 0.1273 419 1.42x slower +46.3%
phlex 825 ± 1.6% 1.2114 6,374 13.52x slower +68.3%

render_bench (pure Ruby) · peak RSS 132 MB

Benchmark i/s ms / call allocs / call vs fastest Δ vs main
erubi 11,175 ± 1.7% 0.0895 713 fastest +44.6%
ruby2html 3,608 ± 0.7% 0.2771 1,029 3.10x slower +64.5%
phlex 852 ± 0.9% 1.1738 6,374 13.12x slower +82.4%

tag_bench (C ext) · peak RSS 40 MB

Benchmark i/s ms / call allocs / call vs fastest Δ vs main
br 392,382 ± 1.0% 0.0025 7.00 fastest +54.6%
li(text) 246,751 ± 1.3% 0.0041 7.02 1.59x slower +43.7%
li(dirty text) 195,995 ± 0.7% 0.0051 7.00 2.00x slower +51.2%
div { block } 181,473 ± 1.0% 0.0055 7.00 2.16x slower +56.0%
span(text, class:) 45,087 ± 0.4% 0.0222 207 8.70x slower +50.1%
div(class:) { block } 42,753 ± 0.2% 0.0234 207 9.18x slower +54.3%
a(text, href:, class:) 32,869 ± 0.4% 0.0304 207 11.94x slower +46.5%

tag_bench (pure Ruby) · peak RSS 27 MB

Benchmark i/s ms / call allocs / call vs fastest Δ vs main
br 131,049 ± 0.4% 0.0076 107 fastest +35.8%
div { block } 99,612 ± 0.5% 0.0100 107 1.32x slower +49.6%
li(text) 87,772 ± 0.4% 0.0114 107 1.49x slower +34.6%
li(dirty text) 61,619 ± 0.4% 0.0162 207 2.13x slower +26.7%
span(text, class:) 23,900 ± 0.4% 0.0418 207 5.48x slower +70.7%
div(class:) { block } 23,497 ± 0.3% 0.0426 207 5.58x slower +76.3%
a(text, href:, class:) 15,301 ± 0.3% 0.0654 207 8.56x slower +67.2%

Rails request (C ext) · peak RSS 238 MB

Benchmark i/s ms / call allocs / call vs fastest Δ vs main
Slim 776 ± 2.2% 1.2891 3,922 fastest +60.3%
ruby2html .html.rb templates 745 ± 1.7% 1.3423 4,354 1.04x slower +65.0%
Ruby2html::Component 740 ± 2.0% 1.3522 4,228 1.05x slower +61.7%
ViewComponent + ruby2html 713 ± 2.1% 1.4035 4,085 1.09x slower +76.3%
ERB 689 ± 15.1% 1.4519 2,813 1.13x slower +59.4%
Phlex 656 ± 2.0% 1.5253 5,490 1.18x slower +66.7%

@github-actions

github-actions Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

Benchmarks: aarch64 (linux)

ruby 4.0.10 (2026-11-19 revision a704b7cd95) +PRISM [aarch64-linux] · commit fd0a7c08da · 2.0s per report
Δ is against main 47ee601403 (same runner type; expect a few % noise).

escape_bench (C ext) · peak RSS 104 MB

Benchmark i/s ms / call allocs / call vs fastest Δ vs main
escape_html short clean (10B) 586,845 ± 0.7% 0.0017 0.00 fastest +0.3%
escape_html medium clean (200B) 322,772 ± 0.2% 0.0031 0.00 1.82x slower +0.4%
append short clean (10B) 207,924 ± 0.2% 0.0048 0.02 2.82x slower +0.0%
append short dirty (10B) 165,595 ± 0.2% 0.0060 0.00 3.54x slower -0.2%
append medium clean (200B) 145,570 ± 0.2% 0.0069 0.00 4.03x slower -0.4%
escape_html short dirty (10B) 109,220 ± 0.3% 0.0092 100 5.37x slower -0.1%
append medium dirty (200B) 74,234 ± 0.2% 0.0135 0.00 7.91x slower -0.1%
escape_html medium dirty (200B) 58,362 ± 3.0% 0.0171 100 10.06x slower -0.9%
escape_html long clean (10KB) 11,463 ± 0.2% 0.0872 0.00 51.20x slower -0.0%
append long clean (10KB) 9,118 ± 0.4% 0.1097 0.00 64.36x slower +0.6%
append long dirty (10KB) 1,203 ± 0.3% 0.8311 0.00 487.74x slower -0.3%
escape_html long dirty (10KB) 1,140 ± 2.0% 0.8768 100 514.57x slower -2.0%

escape_bench (pure Ruby) · peak RSS 151 MB

Benchmark i/s ms / call allocs / call vs fastest Δ vs main
escape_html short clean (10B) 135,699 ± 0.3% 0.0074 0.00 fastest -0.0%
append short clean (10B) 104,667 ± 0.2% 0.0096 0.02 1.30x slower +0.1%
escape_html short dirty (10B) 64,458 ± 0.5% 0.0155 100 2.11x slower -1.1%
append short dirty (10B) 56,137 ± 1.0% 0.0178 100 2.42x slower -1.3%
escape_html medium clean (200B) 52,968 ± 0.2% 0.0189 0.00 2.56x slower -0.0%
append medium clean (200B) 45,451 ± 0.2% 0.0220 0.00 2.99x slower +0.2%
escape_html medium dirty (200B) 24,496 ± 0.5% 0.0408 200 5.54x slower -0.8%
append medium dirty (200B) 22,250 ± 0.9% 0.0449 200 6.10x slower -0.4%
escape_html long clean (10KB) 1,628 ± 0.2% 0.6141 0.00 83.33x slower +0.1%
append long clean (10KB) 1,567 ± 0.3% 0.6383 0.00 86.62x slower +0.4%
escape_html long dirty (10KB) 1,086 ± 0.5% 0.9207 200 124.94x slower +0.3%
append long dirty (10KB) 974 ± 3.1% 1.0269 200 139.35x slower +0.6%

render_bench (C ext) · peak RSS 131 MB

Benchmark i/s ms / call allocs / call vs fastest Δ vs main
erubi 7,352 ± 0.8% 0.1360 713 fastest -2.9%
ruby2html 5,726 ± 0.7% 0.1746 419 1.28x slower +2.3%
phlex 558 ± 1.1% 1.7916 6,374 13.17x slower +1.7%

render_bench (pure Ruby) · peak RSS 131 MB

Benchmark i/s ms / call allocs / call vs fastest Δ vs main
erubi 7,356 ± 1.5% 0.1359 713 fastest -2.6%
ruby2html 2,155 ± 0.8% 0.4640 1,029 3.41x slower +3.6%
phlex 563 ± 0.9% 1.7761 6,374 13.07x slower +1.7%

tag_bench (C ext) · peak RSS 39 MB

Benchmark i/s ms / call allocs / call vs fastest Δ vs main
br 222,442 ± 0.5% 0.0045 7.00 fastest -1.7%
li(text) 155,628 ± 0.5% 0.0064 7.02 1.43x slower -1.4%
li(dirty text) 125,866 ± 0.5% 0.0079 7.00 1.77x slower -1.6%
div { block } 99,089 ± 0.5% 0.0101 7.00 2.24x slower -1.3%
span(text, class:) 30,727 ± 0.4% 0.0325 207 7.24x slower +3.4%
div(class:) { block } 28,915 ± 0.4% 0.0346 207 7.69x slower +6.3%
a(text, href:, class:) 23,468 ± 0.3% 0.0426 207 9.48x slower +0.1%

tag_bench (pure Ruby) · peak RSS 26 MB

Benchmark i/s ms / call allocs / call vs fastest Δ vs main
br 78,158 ± 0.4% 0.0128 107 fastest +1.4%
div { block } 55,414 ± 0.3% 0.0180 107 1.41x slower +0.7%
li(text) 51,924 ± 0.5% 0.0193 107 1.51x slower +0.7%
li(dirty text) 39,875 ± 0.4% 0.0251 207 1.96x slower +0.7%
span(text, class:) 13,887 ± 0.3% 0.0720 207 5.63x slower +8.3%
div(class:) { block } 13,671 ± 0.5% 0.0731 207 5.72x slower +8.0%
a(text, href:, class:) 8,667 ± 0.4% 0.1154 207 9.02x slower +5.2%

Rails request (C ext) · peak RSS 242 MB

Benchmark i/s ms / call allocs / call vs fastest Δ vs main
Ruby2html::Component 491 ± 2.9% 2.0387 4,231 fastest +3.7%
Slim 490 ± 5.9% 2.0423 3,913 1.00x slower +2.5%
ruby2html .html.rb templates 484 ± 2.3% 2.0642 4,363 1.01x slower +3.4%
ViewComponent + ruby2html 462 ± 2.8% 2.1622 4,088 1.06x slower +4.1%
ERB 433 ± 15.7% 2.3094 2,803 1.13x slower +2.3%
Phlex 423 ± 1.4% 2.3615 5,502 1.16x slower +2.9%

@developerz-ai

developerz-ai Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

🟡 Reviewed (latest push only: 1 commit(s) since 46e6637, not the full PR)

2 actionable comment(s) · 4 suppressed (anti-noise) · grounded on your code (related code incomplete)

Grounding was partial: the code index found no definition or call site outside the files this diff changes.

⚠️ 1 config note(s): test files were not shown to the reviewer: this diff touched no path recognised as a test, so no assertion was available to read the change against

@developerz-ai developerz-ai 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.

Verdict: Approved. Posted as a comment: this repository's review settings turn approvals off.

Review summary: 27 file(s), 8 finding(s).

Critical 0 · Major 0 · Minor 8 · Nit 0

The PR trims CI, publishes generated benchmark charts, and changes maintenance cadence. The benchmark workflow misses build inputs, the chart generator can mislabel runs, and the docs overstate CI coverage and benchmark conclusions while understating off-cycle release eligibility.

File Findings
.github/CLAUDE.md 2 minor
.github/workflows/benchmark.yml 2 minor
.github/workflows/ci.yml 1 minor
README.md 1 minor
bin/bench-charts 1 minor
spec/ci/bench_charts_spec.rb 1 minor

Reviewed with gpt-6.2-sol

Comment thread .github/CLAUDE.md Resolved
Comment thread .github/CLAUDE.md Resolved
Comment thread .github/workflows/benchmark.yml Resolved
Comment thread .github/workflows/benchmark.yml Resolved
Comment thread .github/workflows/ci.yml Resolved
Comment thread README.md Resolved
Comment thread bin/bench-charts Resolved
Comment thread spec/ci/bench_charts_spec.rb Resolved
… benchmark paths)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

@developerz-ai developerz-ai 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.

Verdict: Approved. Posted as a comment: this repository's review settings turn approvals off.

Review summary: 16 file(s), 2 finding(s).

Critical 0 · Major 0 · Minor 2 · Nit 0

This update refines benchmark triggers, refreshes the README charts, and revises CI and release guidance. Benchmark reports can misstate YJIT usage, and two guides overstate docs-only PR coverage. The PR trims CI and benchmark runs, adds generated README charts, and changes maintenance cadence.

2 non-blocking finding(s) below major (no thread on a re-review, only blocking findings open threads)
  • .dz/schedules/devops.md:26 minor · docs This guide and README.md:273 imply a green CI OK on a docs-only PR proves endpoint compatibility, even though those jobs are skipped. Scope that coverage to code PRs in both guides.
  • bin/bench-report:176 minor · bug With BENCH_NO_YJIT=1 and RUBY_YJIT_ENABLE=1, benchmark subprocesses inherit the enable setting, but the generated caption says they ran without YJIT. Record RubyVM::YJIT.enabled? in the benchmark subprocesses and use the observed state in the report.
  • test files were not shown to the reviewer: this diff touched no path recognised as a test, so no assertion was available to read the change against

Reviewed with gpt-6.2-sol

@sebyx07
sebyx07 merged commit 70d371a into main Nov 28, 2026
26 checks passed
@sebyx07
sebyx07 deleted the ci/cost-sweep branch November 28, 2026 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant