Skip to content

ci(bench): make the stacked chart layout the generated default (reld#54) - #161

Merged
zackees merged 2 commits into
mainfrom
feat/54-stacked-benchmark-charts
Sep 17, 2026
Merged

zackees merged 2 commits into
mainfrom
feat/54-stacked-benchmark-charts

Conversation

@zackees

@zackees zackees commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Closes #54. Wave 3 of #153.

Two of the four acceptance boxes were already ticked by #53: the README BENCHMARK block is workflow-generated and checked. What was missing was the part that keeps it that way, and the combined view.

The check did not check the thing

--check-readme compares the committed block against render_readme_block() — the same function that wrote it. Change the generator back to a 3-column table of thumbnails and the check still passes, because both sides agree. The layout was drift-proof against hand edits and wide open to a generator change.

ci/tests/test_benchmark_layout.py asserts the property instead: exactly one panel per target, in the manifest's order, each width="100%", no <table> — on the generator output and on the committed README.

There was no combined page

The published branch has three per-target directories and nothing showing them together, so the "one large chart per OS" layout existed only in the README. --write-combined-index writes index.html above the per-target directories with the same rule — one <section class="chart"> per OS, display:block; width:100%, each linking its target directory — and the aggregate job emits it after rendering the targets. The tests also reject grid-template-columns and float:, the two ways a stack quietly becomes a grid.

Links are relative, so the page works both on the published branch and inside a downloaded artifact.

Verification

  • uv run --no-sync python -m pytest ci/tests -q — 264 passed (4 new).
  • python -m ci.benchmark_stats --write-combined-index <dir> locally renders the three stacked sections in manifest order.

🤖 Generated with Claude Code

The README block is already generated and stacked, but nothing asserted the
property: `--check-readme` compares the file against the same generator that
wrote it, so a change back to a column of thumbnails would pass with both sides
agreeing. `ci/tests/test_benchmark_layout.py` now pins the layout itself — one
full-width chart per OS, in the manifest's order, no table — on the generator
and on the committed README.

The published branch had no combined view at all: three per-target directories
and nothing showing them together. `--write-combined-index` writes one at the
root, using the same rule, and the aggregate job now emits it. A chart shrunk
into a thumbnail grid is a chart nobody reads, so each OS gets the full width
and its own row, with the per-target page one click away.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…48) (#162)

The per-target measurement steps were already Python. Aggregation was not: a
shell loop in the aggregate job knew the target list, where each raw log lands,
how history is carried forward, and what the published directory looks like.
Nobody could run it locally, and it drifted from the target manifest by
construction — it re-derived the list through `--print-targets` and the layout
by hand.

`ci/benchmark_pipeline.py` owns all of it, and checks what the shell never did:
that every target produced `latest.json`, `history.jsonl`, `benchmark-link.jpg`
and `index.html`, failing with the target named rather than publishing a
half-written directory. A missing or unparseable raw log fails the same way
instead of rendering an empty chart.

The workflow step is now one call. Publishing stays in YAML, where the token is;
nothing in the pipeline can push.

Local run against logs downloaded from a CI run:

    uv run --no-sync python -m ci.benchmark_pipeline \
        --input-root benchmark-input --output-root benchmark-stats --no-history-fetch

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
@zackees
zackees merged commit bf69781 into main Sep 17, 2026
18 checks passed
@zackees
zackees deleted the feat/54-stacked-benchmark-charts branch September 17, 2026 22:27
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.

ci(bench): render benchmark charts vertically stacked (full width) as the generated default

1 participant