#[non_exhaustive]pub struct GateReport {
pub levels: Vec<u8>,
pub violations: Vec<Violation>,
pub notes: Vec<String>,
}Expand description
The gate’s verdict over one bundle, optionally compared to a baseline.
Why: preflight and comparison findings land in one document so the operator
sees the whole picture in one run instead of fixing provenance, rerunning,
and only then discovering a correctness regression.
What: the levels that were readable, every violation, and the informational
notes (accepted dispositions, within-tolerance deltas) that explain what the
gate looked at and let pass.
Test: bakeoff::tests::a_complete_bundle_passes_preflight.
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.levels: Vec<u8>Levels whose metadata.json parsed, ascending.
violations: Vec<Violation>Every reason the gate is refusing to pass.
notes: Vec<String>Findings that did not block: accepted dispositions, deltas inside tolerance, and what the gate compared against.
Implementations§
Source§impl GateReport
impl GateReport
Sourcepub fn passed(&self) -> bool
pub fn passed(&self) -> bool
Whether the milestone may close on this evidence.
Why: one predicate, so the CLI exit code and every test agree.
What: true when no violation was recorded.
Test: bakeoff::tests::a_complete_bundle_passes_preflight.
Sourcepub fn absorb(&mut self, other: GateReport)
pub fn absorb(&mut self, other: GateReport)
Fold another report’s findings into this one.
Why: the comparison stage runs after preflight and must not discard what
preflight already found.
What: appends levels-preserving; violations and notes are concatenated.
Test: bakeoff::tests::comparison_findings_join_preflight_findings.
Sourcepub fn render_human(&self) -> String
pub fn render_human(&self) -> String
Render the verdict for a terminal.
Why: an operator reading CI output wants the verdict on line one and the
concrete findings under it, not a JSON blob.
What: a PASS/FAIL header naming the covered levels, then one line per
violation, then the notes.
Test: bakeoff::tests::human_render_names_every_violation.
Sourcepub fn render_json(&self) -> String
pub fn render_json(&self) -> String
Render the verdict as one machine-readable JSON document.
Why: the gate is meant to be callable from the external runner and from
CI, both of which want to branch on structure rather than parse prose.
What: {"passed", "levels", "violations", "notes"}, pretty-printed.
Test: bakeoff::tests::json_render_carries_the_verdict_and_rules.
Trait Implementations§
Source§impl Clone for GateReport
impl Clone for GateReport
Source§impl Debug for GateReport
impl Debug for GateReport
Source§impl Default for GateReport
impl Default for GateReport
impl Eq for GateReport
Source§impl PartialEq for GateReport
impl PartialEq for GateReport
Source§impl Serialize for GateReport
impl Serialize for GateReport
impl StructuralPartialEq for GateReport
Auto Trait Implementations§
impl Freeze for GateReport
impl RefUnwindSafe for GateReport
impl Send for GateReport
impl Sync for GateReport
impl Unpin for GateReport
impl UnsafeUnpin for GateReport
impl UnwindSafe for GateReport
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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