Expand description
2026-09-26: The METRALE_* environment a gate’s server is measured under.
A serve lever is a METRALE_* variable that is not a harness variable.
Levers are not recipe keys, so they do not appear in the argv a leased
server is fingerprinted by. Instead the recipe declares the levers it is
measured under (its env: block, with the gate’s BENCH.toml
[benchmarks.serve_env] pin on top), and reconcile refuses a lever in
the harness’s own environment that nothing declared, and a declared lever
it carries at another value. The set is fingerprinted into the serve
identity (serve_identity) and disclosed on the gate record
(gate::GateRecord::serve_env).
It lives in this crate so both ends share one definition: the server
fingerprints its own environment for GET /serve-config, and the harness
computes what that fingerprint must be.
Owner: bench (serve environment). Invariants:
Structs§
- Reconciled
- 2026-09-26: What the harness must do to serve
declaredfrom an environment that already holdspresent.
Constants§
- PREFIX
- 2026-09-26: The prefix every lever carries.
Functions§
- declared
- 2026-09-26: Validate one declaration (a recipe’s
env:block or a BENCH.toml[benchmarks.serve_env]table) into the lever set it means. - fingerprint
- 2026-09-26: The SHA-256 of a lever set:
name=valuein key order, each NUL-terminated, soA=1 B=2andA=1B=2differ and the empty set has one fixed digest. - is_
lever - 2026-09-26: Whether
nameis a serve lever: anyMETRALE_*name that is not a harness variable. - levers
- 2026-09-26: The levers in an environment, from any
(name, value)iterator. - merge_
declared - 2026-09-26: The recipe’s declaration under the gate entry’s pin; the pin wins on a clash.
- process_
levers - 2026-09-26: The levers of this process: what the server fingerprints, and what the harness reconciles against the recipe before it serves.
- reconcile
- 2026-09-26: Reconcile the recipe’s declaration with the harness’s own
levers (
process_levers).