GateRecord

Struct GateRecord 

Source
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: String

2026-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: Hardware

2026-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: RunStatus

2026-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: String

2026-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: Attestation

2026-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

Source

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

Source

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.

Source

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.

Source

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.

Source

pub fn verdict_passes(&self) -> bool

2026-09-26: True only when verdict is PASS; FAIL, info and no verdict are false.

Source

pub fn frame_status_failed(&self) -> bool

2026-09-26: True when the frame status is Failed.

Source§

impl GateRecord

Source

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

Source

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

Source§

fn clone(&self) -> GateRecord

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for GateRecord

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for GateRecord

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for GateRecord

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> ArchivePointee for T

§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
§

impl<T> LayoutRaw for T

§

fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>

Returns the layout of the type.
§

impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
where T: SharedNiching<N1, N2>, N1: Niching<T>, N2: Niching<T>,

§

unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool

Returns whether the given value has been niched. Read more
§

fn resolve_niched(out: Place<NichedOption<T, N1>>)

Writes data to out indicating that a T is niched.
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Pointee for T

§

type Metadata = ()

The metadata type for pointers and references to this type.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,