#[non_exhaustive]pub struct LevelMetadata {
pub level: u8,
pub evidence_mode: EvidenceMode,
pub runner: RunnerProvenance,
pub challenge_revision: String,
pub invocation: Invocation,
pub build: BuildProvenance,
pub source_digests: SourceDigests,
pub run: RunTelemetry,
pub verifier: VerifierResult,
}Expand description
One level’s complete metadata.json.
Why: this is the retained-evidence contract #5441’s gate reads. Everything
the gate decides comes from this document plus the sibling raw artifacts;
nothing is inferred from the filesystem or from a live process.
What: level number, evidence mode, runner/challenge/build/source provenance,
the invocation, run telemetry, and the verifier verdict.
Test: bakeoff::tests::metadata_round_trips_the_documented_shape.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.level: u8Bake-off level: 1, 2, or 3.
evidence_mode: EvidenceModeWhether this is real or mock evidence.
runner: RunnerProvenanceWhich runner produced it.
challenge_revision: StringThe challenge repository’s revision.
invocation: InvocationModel, provider, timeout.
build: BuildProvenanceWhich tcode binary ran.
source_digests: SourceDigestsDigests of the behavior sources the run consumed.
run: RunTelemetryWhat the run did.
verifier: VerifierResultWhat the verifier concluded.
Implementations§
Source§impl LevelMetadata
impl LevelMetadata
Sourcepub fn provenance_gaps(&self) -> Vec<String>
pub fn provenance_gaps(&self) -> Vec<String>
Name every provenance field this document left unusable.
Why: “missing provenance” is one of #5441’s five rejections, and a gate
that reports only “provenance incomplete” sends the operator back to
diff two JSON files by hand. Naming each gap makes one rerun enough.
What: returns the dotted field names that are empty, whitespace-only,
the literal "unknown" (what crate::build_info emits outside a git
checkout), or — for timeout_secs — zero. An empty vector means every
provenance field carries a usable value.
Test: bakeoff::tests::provenance_gaps_names_every_missing_field,
bakeoff::tests::a_complete_bundle_passes_preflight.
Sourcepub fn build_identity(&self) -> String
pub fn build_identity(&self) -> String
The build identity other levels and the pins are compared against.
Why: four fields compared field-by-field at three call sites drifts;
one canonical rendering does not.
What: <version>/<commit>/<commit_date>/<binary_sha256>.
Test: bakeoff::tests::build_drift_across_levels_is_rejected.
Trait Implementations§
Source§impl Clone for LevelMetadata
impl Clone for LevelMetadata
Source§impl Debug for LevelMetadata
impl Debug for LevelMetadata
Source§impl<'de> Deserialize<'de> for LevelMetadata
impl<'de> Deserialize<'de> for LevelMetadata
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>,
Source§impl PartialEq for LevelMetadata
impl PartialEq for LevelMetadata
Source§impl Serialize for LevelMetadata
impl Serialize for LevelMetadata
impl StructuralPartialEq for LevelMetadata
Auto Trait Implementations§
impl Freeze for LevelMetadata
impl RefUnwindSafe for LevelMetadata
impl Send for LevelMetadata
impl Sync for LevelMetadata
impl Unpin for LevelMetadata
impl UnsafeUnpin for LevelMetadata
impl UnwindSafe for LevelMetadata
Blanket Implementations§
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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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