Module required

Module required 

Source
Expand description

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).

pr_taxonomy::validate refuses any _benches id outside super::coverage::REQUIRED, so the intent half names only required gates. The intent half matters where paths invalidate nothing: paths off PERF_PATHS (docker/, docs/, scripts/, bench/), BENCH.toml files, and crates/bench/src/gate files outside BOUNDARY_FILES.

super::check::check_gates checks every gate in REQUIRED_GATES whatever this module computes. met benchmark --pull-request-gate-check prints the intent half after the verdicts, and it does not change the exit code.

Every classification recorded for the PR counts, and the result is their union, so re-running the classifier can only add gates.

Owner: bench gate (intent). Invariants:

  • by_path does not depend on the classifications or the taxonomy.
  • required_for and report read no files.

Structs§

RequiredReport
2026-09-26: Both halves plus where the intent half came from.
RequiredSet
2026-09-26: Both halves, kept apart so a report can say which half required a gate.

Enums§

IntentSource
2026-09-26: Where the intent half came from. It keeps “not classified” apart from “the ledger could not be read”, which both give an empty intent half.

Functions§

intent_source
2026-09-26: Read the classifications recorded for pr from its ledger, deduplicated. Every Category row counts, whatever its head_sha: the row for a head is committed after that head, so a head filter would find nothing. Unioning across older heads can only add gates.
parse_category
2026-09-26: Parse performance/decode into ["performance", "decode"]. Segments are trimmed and empty ones dropped: benches_for would stop at an empty segment and lose the benchmarks below it.
report
2026-09-26: Assemble the report. Only a Recorded source contributes intent. Reads no files: the I/O is in intent_source and the caller’s taxonomy load.
required_for
2026-09-26: Compute both halves. categories is every recorded classification path; an empty slice (not classified) or an empty roots yields an empty intent half.