pub struct GateRecord {Show 25 fields
pub schema: u32,
pub benchmark_id: String,
pub benchmark_name: String,
pub git_sha: String,
pub dirty_paths: Vec<String>,
pub recorded_at: u64,
pub target_model: String,
pub params: BTreeMap<String, String>,
pub command: Vec<String>,
pub served_by: Option<String>,
pub serve_overrides: BTreeMap<String, String>,
pub metrale_version: String,
pub hardware: Hardware,
pub hardware_state: Option<HardwareStateReport>,
pub metrics: BTreeMap<String, f64>,
pub dataset_fingerprint: Option<String>,
pub frame_status: RunStatus,
pub verdict: Option<String>,
pub verdict_reason: String,
pub summary: String,
pub perf_env: BTreeMap<String, String>,
pub serve_resolved: BTreeMap<String, String>,
pub serve_env: BTreeMap<String, String>,
pub served_recipe_sha256: Option<String>,
pub closure: Attestation,
}Expand description
2026-09-26: One run record, as committed under .benchmarks/<id>/.
Fields§
§schema: u32§benchmark_id: String§benchmark_name: String§git_sha: String2026-09-26: The commit checked out when the run started. from_run
refuses an empty or whitespace-only sha.
dirty_paths: Vec<String>2026-09-26: The uncommitted PERF_PATHS files present when the run
started (super::dirty_perf_paths). Empty, and absent from the JSON,
for a clean tree; check_one fails a record whose list is not empty.
recorded_at: u64§target_model: String§params: BTreeMap<String, String>2026-09-26: The run record’s params, rendered into command as
--param KEY=VALUE.
command: Vec<String>2026-09-26: The met benchmark run invocation from_run rebuilds from
the recorded inputs, ending in --pull-request-gate.
served_by: Option<String>2026-09-26: The recipe (<family>/<stem>) that served this run when the
gate started its own server; None for an endpoint the operator ran.
When set, command carries no --url or --model, because that URL
named a port chosen for the run.
serve_overrides: BTreeMap<String, String>2026-09-26: Recipe keys changed for this run: the baseline entry’s
serve_overrides merged with the operator’s --serve-override, copied
from the run record. Empty, and absent from the JSON, means the recipe
served as written; otherwise served_by alone does not describe the
server’s config.
metrale_version: String§hardware: Hardware2026-09-26: The fingerprint the serving endpoint’s /hardware returned.
hardware_state: Option<HardwareStateReport>2026-09-26: The box’s state before and after the run, with the delta and the pre- and post-check verdicts, carried from the terminal frame. Absent when the frame captured none: absent means unmeasured, not healthy.
metrics: BTreeMap<String, f64>2026-09-26: The terminal frame’s metrics, by name.
dataset_fingerprint: Option<String>2026-09-26: Content identity of the dataset the run scored against,
from the terminal frame (the MLPerf agentic leg writes
file-sha256:…;draw-sha256:…). Absent when the frame carries none.
frame_status: RunStatus2026-09-26: The run’s terminal status. check_one fails a record whose
status is Failed, whatever its metrics.
verdict: Option<String>2026-09-26: PASS, FAIL or info from the frame’s verdict kind;
None when the frame has no verdict. Its reason is verdict_reason.
verdict_reason: String§summary: String2026-09-26: The one line record_summary::summarize builds: model,
metrics, verdict, and the first warning or error logged.
perf_env: BTreeMap<String, String>2026-09-26: The performance controls in record_env’s PERF_CONTROLS,
resolved: an unset or empty variable is recorded as its default.
from_run reads this process’s environment, which an in-process serve
shares; with_serve_env re-resolves it through the levers applied to
the server. Disclosure only: check_record does not read it.
serve_resolved: BTreeMap<String, String>2026-09-26: The serve settings the gate resolved from its recipe; the
keys and rules are in super::record_serve. Empty, and absent from
the JSON, for a run against an operator’s own endpoint. Disclosure
only: check_record does not read it.
serve_env: BTreeMap<String, String>2026-09-26: The METRALE_* levers the gate applied to the server it
measured: the recipe’s env: block with the entry’s
[benchmarks.serve_env] on top (serve_env::Reconciled::env). Empty,
and absent from the JSON, for an operator’s own endpoint or a recipe
that declares none. Disclosure only: check_record does not read it.
served_recipe_sha256: Option<String>2026-10-02: Canonical content hash of the recipe the gate served, from the tree under
test with the run’s serve overrides (recipe_closure::content_sha256). A later commit
keeps this record only while its recipe hashes the same (recipe_closure). Absent for an
operator’s own endpoint and on records written before gates served in-tree recipes.
closure: Attestation2026-09-26: What each kernel target compiled to when this was measured.
Lets a later kernels/-only diff keep this record for the targets whose
device code did not change; see super::closure. Empty, and absent
from the JSON, excuses no diff.
Implementations§
Source§impl GateRecord
impl GateRecord
Sourcepub fn with_served_recipe(self, sha256: String) -> Self
pub fn with_served_recipe(self, sha256: String) -> Self
2026-10-02: Attach the canonical content hash of the recipe the gate served
(content_sha256 over the recipe text and the run’s serve overrides).
Source§impl GateRecord
impl GateRecord
Sourcepub fn shard(&self) -> Option<(usize, usize)>
pub fn shard(&self) -> Option<(usize, usize)>
2026-09-26: (index, count) from the shard.index / shard.count
metrics, or None for a whole-draw run or for values that are not
integers with 1 <= count and index < count. record_path_for
copies it into the file name.
Sourcepub fn from_run(
record: &RunRecord,
hardware: Hardware,
git_sha: String,
dirty_paths: Vec<String>,
served_by: Option<String>,
) -> Result<Self>
pub fn from_run( record: &RunRecord, hardware: Hardware, git_sha: String, dirty_paths: Vec<String>, served_by: Option<String>, ) -> Result<Self>
2026-09-26: Build a gate record from a finished run. hardware is the
serving endpoint’s /hardware fingerprint. With served_by set,
command omits --url and --model: replaying asks for the benchmark
again and the recipe supplies the endpoint. dirty_paths is the
super::dirty_perf_paths result from when the run started.
Errors on an empty git_sha or a Running frame.
Sourcepub fn with_closure(self, baked: &str) -> Self
pub fn with_closure(self, baked: &str) -> Self
2026-09-26: Attach what each kernel target in the measuring binary
compiled from. baked is metrale_kernels::TARGET_CLOSURES, which the
kernels build script emits, so it describes the built sources rather
than the working tree. Unparseable input attaches an empty attestation,
which excuses no later diff.
Sourcepub fn verdict_passes(&self) -> bool
pub fn verdict_passes(&self) -> bool
2026-09-26: True only when verdict is PASS; FAIL, info and no
verdict are false.
Sourcepub fn frame_status_failed(&self) -> bool
pub fn frame_status_failed(&self) -> bool
2026-09-26: True when the frame status is Failed.
Source§impl GateRecord
impl GateRecord
Sourcepub fn with_serve_env(self, env: BTreeMap<String, String>) -> Self
pub fn with_serve_env(self, env: BTreeMap<String, String>) -> Self
2026-09-26: Attach the METRALE_* levers the gate applied to its
server (serve_env::Reconciled::env) and re-resolve perf_env with
the applied set first and this process’s environment second. A leased
server is a child given the declared levers this process lacks, so
this process’s environment alone can miss a value the server had.
Source§impl GateRecord
impl GateRecord
Sourcepub fn with_serve_resolved(self, resolved: BTreeMap<String, String>) -> Self
pub fn with_serve_resolved(self, resolved: BTreeMap<String, String>) -> Self
2026-09-26: Attach what the gate’s serve resolved; see disclosure.
Trait Implementations§
Source§impl Clone for GateRecord
impl Clone for GateRecord
Source§fn clone(&self) -> GateRecord
fn clone(&self) -> GateRecord
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GateRecord
impl Debug for GateRecord
Source§impl<'de> Deserialize<'de> for GateRecord
impl<'de> Deserialize<'de> for GateRecord
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for GateRecord
impl RefUnwindSafe for GateRecord
impl Send for GateRecord
impl Sync for GateRecord
impl Unpin for GateRecord
impl UnwindSafe for GateRecord
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more