forjar 1.32.0

Rust-native Infrastructure as Code — bare-metal first, BLAKE3 state, provenance tracing
Documentation
# Benchmark regression tracking
# Runs on pushes to main and PRs to detect performance regressions

name: Benchmarks

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

concurrency:
  group: bench-${{ github.event.pull_request.number || github.sha }}
  cancel-in-progress: true

jobs:
  # PMAT-237: what can this change break? The release gate is untouched and
  # still runs everything; this decides only what a PR pays for what it
  # changed. The decision is scripts/ci/changed-class.sh, driven in both
  # directions by tests/falsification_pr_lane_runs_what_the_change_can_break.rs.
  classify:
    runs-on: [self-hosted, clean-room, X64]
    outputs:
      code: ${{ steps.class.outputs.code }}
    steps:
      - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1  # v7.0.1
        with:
          fetch-depth: 0
      - id: class
        uses: ./.github/actions/changed-class

  benchmark:
    if: needs.classify.outputs.code == 'true'
    needs: classify
    runs-on: [self-hosted, clean-room, X64]
    # infra#430: sixteen clean-room runners share one ~/.cargo, and an hourly
    # reaper deletes registry/src entries by mtime -- under a live build, which
    # makes rustc read a source file that has just vanished:
    #   couldn't read .../registry/src/.../<crate>/src/<file>.rs: No such file
    #   error: could not parse/generate dep info at: .../deps/<crate>.d
    # MEASURED on this branch: msrv and coverage both died that way the first
    # time PMAT-547 moved them off GitHub-hosted runners, where each job had a
    # private ~/.cargo by construction. A registry private to this runner takes
    # the job off the shared surface. The path is outside the workspace, so it
    # survives the checkout clean and is a cache rather than a cold download.
    # The host-side fix is paiml/infra's.
    env:
      CARGO_HOME: ${{ github.workspace }}/../cargo-home-${{ github.job }}
    steps:
      - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1  # v7.0.1

      - name: Install Rust toolchain
        run: rustup show

      - name: Cache cargo
        uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9  # v6.1.0
        with:
          path: |
            ~/.cargo/registry
            ~/.cargo/git
            target
          key: bench-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}

      - name: Run benchmarks
        run: cargo bench --bench core_bench --bench store_bench --bench copia_bench -- --output-format bencher 2>/dev/null | tee bench-output.txt

      - name: Check for regressions
        run: |
          echo "Benchmark results:"
          cat bench-output.txt
          echo "Benchmark suite completed successfully"