Expand description
2026-09-26: The pull-request gate: benchmark records committed beside the code they measured.
Owner: bench gate. Invariants: none beyond the types.
Each run writes one record file under .benchmarks/<id>/; a default-variant record
is named YYYY-MM-DD-<sha>.json (record_path()). The thresholds a record must meet
are assembled from every kernels/<hw>/<model>/BENCH.toml (read_baseline).
check_gates judges every id in REQUIRED_GATES against the committed files.
Re-exports§
pub use check::Comparison;pub use check::GateStatus;pub use check::Standing;pub use check::check_gates;pub use check::check_record;pub use check::compare;pub use check::record_covers;pub use check::record_standing;pub use check::records_newest_first;pub use record::Bound;pub use record::GateBaseline;pub use record::GateRecord;pub use record::HardwareBaseline;pub use record::ModelBaseline;pub use record::date_of;pub use record::merge_serve_overrides;pub use record::now_secs;pub use record::read_baseline;pub use record::read_record;pub use record::record_path;pub use record::record_path_for;pub use record::variant_slug;pub use record::write_record;pub use coverage::PERF_PATHS;
Modules§
- agreement
- 2026-09-26: Do the records a PR adds agree with each other and with the head being certified?
- amnesty
- 2026-09-26: Content-pinned amnesty: a table of paths whose exact blob at the head excuses them from invalidating gate records.
- bench
- 2026-09-26:
kernels/<hw>/<model>/BENCH.toml: a model’s benchmark entries and thresholds, beside itsMODEL.toml, andbaseline_for, which assembles one gate’sGateBaselinefrom every such file. - card
- 2026-09-26: Shareable result cards: a benchmark record rendered onto the SVG card template
(
assets/cards/result-card.svg). - check
- 2026-09-26:
--pull-request-gate-check: does this commit have a passing record for every required gate? Reads.benchmarks/, the kernel tree andgit diff; no endpoint, no GPU. - check_
paths - 2026-09-26: Which changed paths invalidate a gate record.
- closure
- 2026-09-26: Excuse a kernel-only diff when every affected target still hashes to the closure its record attests.
- codeowners
- 2026-09-26: Who owns a changed path, per
.github/CODEOWNERS, for the telemetry table. - coverage
- 2026-09-26: Which changed paths invalidate which gate’s records.
- group
- 2026-09-26: Benchmark groups: one gate satisfied by a complete partition of shard runs.
- hermetic
- 2026-09-26: The serve keys
met serve --hermeticcloses, as one table that the bench and server crates both read. - pr_
taxonomy - 2026-09-26: The PR intent taxonomy (
.github/pr-taxonomy.json): a tree of what a change is for (performance/decode,correctness/kv-cache), and the benchmarks each path implies.crate::gate::taxonis the separate hardware taxonomy derived fromkernels/paths. - recipe_
closure - 2026-10-02: The recipe a gate serves, as part of what its records attest.
- record
- 2026-09-26: The committed shape of one gate run, the baseline shapes it is judged against, and reading both.
- record_
serve - 2026-09-26: The serve settings a gate record discloses about the server it
measured (
GateRecord::serve_resolved). - required
- 2026-09-26: What a PR owes: the gates its changed paths invalidate
(
by_path) united with the gates its recorded intent classifications imply (by_intent). - scoring
- 2026-09-26: Scoring one record against one baseline, the pure half of the
gate check:
comparejudges one metric against one bound, andcheck_recordresolves the record’s own (hardware, checkpoint) pair and scores that entry’s pins and bounds. - signing
- 2026-09-26: Ed25519 signatures binding a gate record to the commit it measured.
- taxon
- 2026-09-26: The gate’s view of the kernel taxonomy
kernels/<hardware>/<model>/<quant>/: target enumeration, sources and configs, path-to-node helpers, and the set of targets a change affects. - telemetry
- 2026-09-26: The open-PR telemetry comment: which kernel targets each PR re-opens, which targets more than one open PR re-opens, a recommended merge order, and promotion-candidate debt.
Constants§
- HARDWARE_
TIMEOUT - 2026-09-26: The timeout for the endpoint’s
/hardwarefetch when a gate record is written (bench_record.rsinmetrale-server). - REQUIRED_
GATES - 2026-09-26: The ids of
coverage::REQUIRED, in its order: the gatescheck_gatesjudges. A test inregistry.rslooks up each id as a registered benchmark.
Functions§
- dirty_
perf_ paths - 2026-09-26: The files under
PERF_PATHSthatgit statusreports as modified, staged or untracked in this working tree, sorted and deduplicated. The gate run records this list, since a dirty perf path means the binary was not built from the commit the record names. - gate_
dir - 2026-09-26:
.benchmarks/<benchmark_id>underroot. - git_
rev_ parse - 2026-09-26: The full 40-hex commit id
revresolves to in this working tree. - git_
rev_ parse_ toplevel - 2026-09-26: The repository root that contains
dir, from git itself. - git_sha
- 2026-09-26: The short commit id of
HEAD(--short=10), or the trimmed value ofMETRALE_GATE_SHAwhen that is set, for a checkout without git metadata. - shard_
suffix - 2026-09-26: The file-name tail for one shard’s record,
-s<index>of<count>, 0-based like the--param shard=i/nthat ran it. Empty for a whole-draw run. - shards_
owed - 2026-09-26: The
(index, count)shards ofgroupa certification atshastill owes, for a planner that wantswantedshards: