Skip to content

[B1] ci(bench): populate docs/benchmarks/baseline.json and enable regression gating #861

Description

@MichaelFisher1997

Part of #834 (Production-Readiness Audit) — Batch B1 (foundation, parallel-safe).
Replaces audit item #1 (P0). Parallel with: audit-b1 siblings — this issue owns docs/benchmarks/* + scripts/compare_benchmarks.sh.

Why P0: this is the audit's #1 critical finding. Today no benchmark regression can ever fail CI.

Problem

docs/benchmarks/baseline.json is an all-zeros placeholder (line 80 literally says "Populate this file with real benchmark baselines before enabling regression gating."). The benchmark workflow runs on every dev push, "compares" against the zeroed baseline, and publishes a green commit status. No regression can ever fail.

Acceptance criteria

  • A real low/medium/high preset pass is captured on fixed reference hardware (Blacksmith runner or a pinned self-hosted box) — pick one and document it.
  • Real numbers committed to docs/benchmarks/baseline.json (replace all zeros).
  • scripts/compare_benchmarks.sh flipped to exit non-zero on regression beyond tolerance.
  • docs/benchmarks/README.md documents: hardware used, driver/Lavapipe version, Zig version, capture procedure, tolerance policy — so future drift is interpretable.
  • Tolerance is explicit (e.g. ±10% p1-FPS) and applied per metric.

Files in scope

  • docs/benchmarks/baseline.json
  • docs/benchmarks/README.md
  • scripts/compare_benchmarks.sh

Dependencies

  • Unblocks: B4-1 (bench PR trigger + Bencher), B4-3 (SLO assertions). Those need a real baseline to compare against.

Out of scope

Branch / PR

  • Branch: ci/bench-baseline-real · Targets: dev

Metadata

Metadata

Labels

audit-b1Audit Batch 1: Trust-the-CI foundation (no deps, parallel-safe)bugSomething isn't workingcidocumentationImprovements or additions to documentationhotfixproduction-readinessAudit findings: missing CI/lint/benchmark/regression guardrails for production-grade engine

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions