Repository navigation
Description
Context
The benchmark workflow in .github/workflows/benchmark-stats.yml currently contains substantial platform setup, artifact layout, history carry-forward, per-target aggregation, and publishing logic inline as shell/PowerShell steps. This makes the YAML difficult to review and prevents the same orchestration from being invoked locally or tested hermetically.
The benchmark parser and renderer already live in ci/benchmark_stats.py, while reld-bench emits one target-labelled markdown table. The 3-OS benchmark work in #45/#47 increases the amount of workflow logic and makes this boundary more urgent.
Proposal
Move benchmark orchestration into one or more invokable Python modules under ci/ (for example, a ci/benchmark_pipeline.py entry point). The GitHub Actions YAML should remain a thin runner adapter that installs platform tools, invokes the Python entry point, uploads artifacts, and performs only the minimal credentialed publish step. The Python entry point should own target configuration, log paths, history carry-forward, per-target rendering, artifact directory layout, and validation of expected outputs.
The script must support local invocation with explicit input/output paths and a no-publish mode, so contributors can exercise the aggregation and verify generated artifacts without GitHub Actions.
Acceptance criteria
- The benchmark workflow YAML contains only thin platform adapters and calls the Python entry point for benchmark/aggregation orchestration; duplicated target lists and output-layout logic are removed from YAML.
- The Python entry point supports all three targets currently defined by the benchmark matrix: Linux, Windows MSVC, and macOS arm64.
- Local invocation can consume supplied raw logs and history directories, render each target into its own output directory, and run without GitHub credentials or publishing.
- The script validates that every target produces
latest.json,history.jsonl,benchmark-link.jpg, andindex.html, and fails clearly when a raw log is missing or malformed. - The default-branch publish guard remains intact and no branch push occurs in local/no-publish mode.
- Add focused Python tests that demonstrate RED on the current inline-only workflow contract and GREEN after the refactor, including target isolation and missing-input failures.
- Run the focused tests plus the existing benchmark-statistics test suite, and document a local command that exercises the aggregation path.
Open questions
- Whether platform installation should remain entirely in YAML or be represented by a small Python command abstraction; the implementation should keep OS-native package installation readable and secure.
- Whether to retain
benchmark_stats.pyas the renderer API or split orchestration and rendering into separate modules; avoid changing the published JSON schema unless required.
Related issues
- Benchmarks on all three platforms: 3-OS matrix + per-target publish (Windows + macOS graphs) #45 — 3-OS matrix and per-target benchmark publishing.
- Meta: per-OS benchmark graphs — separate Windows / Linux / macOS charts #47 — parent tracker for separate per-OS benchmark graphs.
Activity
zackees commentedon Sep 17, 2026
Done in PR #162, which merged into #161's branch and landed on
mainas bf69781 — GitHub did not auto-close it because the PR's base was the stacked branch rather thanmain.ci/benchmark_pipeline.pynow owns target configuration, thebenchmark-log-<target>/input layout, history carry-forward, per-target rendering, the combined page, and validation that every target producedlatest.json,history.jsonl,benchmark-link.jpgandindex.html. The workflow step is one call; publishing and its default-branch guard stay in YAML, where the token is.Local command, no credentials and no network:
The two workflow-contract tests that asserted the old inline shell were the RED half and now assert the new contract.