Files
helexa/rpm/helexa-bench-prerelease.spec
rob thijssen f50f5531cf
Some checks are pending
build-prerelease / Publish to rpm.lair.cafe (unstable) (push) Blocked by required conditions
build-prerelease / Resolve version stamps + change detection (push) Successful in 31s
build-prerelease / Lint (fmt + clippy) (push) Successful in 2m21s
build-prerelease / Build cortex binary (push) Successful in 2m27s
build-prerelease / Build helexa-bench binary (push) Successful in 2m44s
build-prerelease / Test (push) Successful in 4m32s
build-prerelease / Build neuron-ampere (push) Successful in 2m7s
build-prerelease / Build neuron-ada (push) Successful in 2m28s
build-prerelease / Build neuron-blackwell (push) Successful in 2m59s
build-prerelease / Package cortex RPM (push) Successful in 1m20s
build-prerelease / Package helexa-bench RPM (push) Successful in 1m19s
build-prerelease / Package helexa-neuron-ada RPM (push) Successful in 1m39s
build-prerelease / Package helexa-neuron-ampere RPM (push) Successful in 1m39s
build-prerelease / Package helexa-neuron-blackwell RPM (push) Successful in 1m42s
feat(bench): read-only JSON API on bob + bench/ React visualisation app
Part A — helexa-bench read API:
- [api] config (enabled, listen :13132); WAL on the store so API reads
  never block the sweep writer.
- store read methods: summary, series (chronological per-build medians),
  runs (filtered), dimensions, run_count.
- api.rs: axum /api/health|dimensions|summary|series|runs, permissive
  CORS (UI is a separate origin). The `run` daemon binds the API
  alongside the sweep; new `serve` subcommand serves API-only.
- listener plumbing (bench gains a port): data/helexa-bench-firewalld.xml,
  spec install, deploy-bench /api/health probe + firewalld step, sudoers
  firewall-cmd grants, [api] in example + bob.toml.
- 5 API tests + serve smoke.

Part B — bench/ Vite + React-SWC-TS app (router, react-bootstrap,
recharts): Overview (summary table), Trends (decode tok/s & TTFT across
build SHAs), Runs (filterable explorer). Typed API client with
VITE_API_BASE + dev proxy to bob. npm build/typecheck clean. Hosted
separately from the API (per design); .gitignore excludes node_modules/dist.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14 11:26:55 +03:00

106 lines
3.5 KiB
RPMSpec

# Prebuilt-binary spec for helexa-bench.
#
# Wraps a pre-built `helexa-bench` binary produced by an upstream CI job
# and packages it for rpm.lair.cafe. The %build phase is a no-op.
# helexa-bench is a pure-Rust, non-CUDA daemon. It polls the neuron fleet
# (outbound) and also serves a read-only JSON API on tcp/13132 for the
# bench UI — hence the firewalld service.
#
# Required defines at rpmbuild time:
# bench_version e.g. "0.1.16"
# bench_prerelease e.g. "0.1.20260518140530.gitabcdef0"
# ^^^^^^^^^^^^^^^^^^ ^^^^^^^^
# commit time (sec) commit sha
# (used as Release; the timestamp prefix
# keeps same-day builds strictly ordered.)
%global _build_id_links none
%global debug_package %{nil}
%global __strip /usr/bin/true
%{!?bench_version: %global bench_version 0.0.0}
%if 0%{?bench_prerelease:1}
%global bench_release %{bench_prerelease}
%else
%global bench_release 1
%endif
Name: helexa-bench
Version: %{bench_version}
Release: %{bench_release}%{?dist}
Summary: Continuous version-aware benchmark harness for the neuron fleet (prebuilt)
License: GPL-3.0-or-later
URL: https://git.lair.cafe/helexa/helexa
Source0: helexa-bench
Source1: helexa-bench.service
Source2: helexa-bench-sysusers.conf
Source3: helexa-bench.example.toml
Source4: LICENSE
Source5: helexa-bench-firewalld.xml
Requires: firewalld-filesystem
ExclusiveArch: x86_64
Requires(pre): shadow-utils
Requires: systemd
Provides: user(helexa-bench)
%description
helexa-bench hits each neuron on the fleet directly, exercises an
extensible benchmark suite against every warm model, and records each
run with full build/version provenance into a SQLite store. It runs
continuously under systemd and is version-aware: a given neuron build is
benchmarked only until it has the configured number of samples, then
skipped until a new build ships. Replaces manual bench.py runs.
%prep
cp %{SOURCE0} ./helexa-bench
cp %{SOURCE1} .
cp %{SOURCE2} .
cp %{SOURCE3} .
cp %{SOURCE4} .
cp %{SOURCE5} .
%build
# Already built in the upstream CI build job.
%install
install -Dm755 helexa-bench %{buildroot}%{_bindir}/helexa-bench
install -Dm644 helexa-bench.service %{buildroot}%{_unitdir}/helexa-bench.service
install -Dm644 helexa-bench-sysusers.conf %{buildroot}%{_sysusersdir}/helexa-bench.conf
install -Dm644 helexa-bench-firewalld.xml %{buildroot}%{_prefix}/lib/firewalld/services/helexa-bench.xml
install -dm755 %{buildroot}%{_sysconfdir}/helexa-bench
install -Dm644 helexa-bench.example.toml %{buildroot}%{_sysconfdir}/helexa-bench/helexa-bench.toml
%pre
getent group helexa-bench >/dev/null || groupadd -r helexa-bench
getent passwd helexa-bench >/dev/null || \
useradd -r -g helexa-bench -d /var/lib/helexa-bench -s /sbin/nologin \
-c "helexa-bench harness" helexa-bench
%post
%systemd_post helexa-bench.service
%preun
%systemd_preun helexa-bench.service
%postun
%systemd_postun_with_restart helexa-bench.service
%files
%license LICENSE
%{_bindir}/helexa-bench
%{_unitdir}/helexa-bench.service
%{_sysusersdir}/helexa-bench.conf
%{_prefix}/lib/firewalld/services/helexa-bench.xml
%dir %{_sysconfdir}/helexa-bench
%config(noreplace) %{_sysconfdir}/helexa-bench/helexa-bench.toml
%changelog
* Sat Jun 13 2026 Gitea Actions <actions@git.lair.cafe> - %{bench_version}-%{bench_release}
- Prerelease build from upstream CI binary.