Skip to main content

BatchResult

Struct BatchResult 

Source
pub struct BatchResult {
    pub commit: CommitSha,
    pub series: SeriesName,
    pub verdict: SeriesVerdict,
    pub diagnostics: Diagnostics,
    pub patch_facts: PatchFacts,
    pub touched_paths: Vec<RelativePath>,
    pub pr_commits: Option<Vec<PrCommit>>,
    pub parent_count: Option<NonZeroU32>,
    pub verdict_fingerprint: Option<VerdictFingerprint>,
    pub apply: Option<ApplyForecast>,
    pub target_findings: Option<TargetFindings>,
}
Expand description

One row in the batch result set.

Fields§

§commit: CommitSha§series: SeriesName§verdict: SeriesVerdict§diagnostics: Diagnostics§patch_facts: PatchFacts§touched_paths: Vec<RelativePath>

Paths the analysed patch touched, in diff-encounter order. Always emitted; an empty vec means the patch touched zero files.

§pr_commits: Option<Vec<PrCommit>>

Inner PR-branch commits for 2-parent merge SHAs. None for non-2-parent merges and non-merge SHAs.

Do NOT add skip_serializing_if = "Option::is_none". The None vs Some(vec![]) distinction is wire-load-bearing.

§parent_count: Option<NonZeroU32>

Number of parents of the evaluated commit: 1 for plain commits, 2 for PR merges, 3+ for octopus merges. None only when the envelope was produced by a pre-v7 binary; v7 producers always emit it.

§verdict_fingerprint: Option<VerdictFingerprint>

Stable join key tying this row’s verdict to a later build outcome. Absent for uncacheable rows (--no-cache, an unresolvable pin) and pre-fingerprint producers.

§apply: Option<ApplyForecast>

Apply-axis prediction for this row. None means no target context was supplied, so the axis was not evaluated: never “clean”. A producer with a target context always emits Some, even when the patch touched zero files.

§target_findings: Option<TargetFindings>

Symbol-axis target findings for this row. None means no target context was supplied, so the axis was not evaluated: never “clean”. A producer with a target context always emits Some, even when no check produced a finding.

Implementations§

Source§

impl BatchResult

Source

pub fn evaluation(&self) -> SeriesEvaluationView<'_>

A borrowed SeriesEvaluationView over this row’s verdict and diagnostics, exposing the same accessors as a single-check evaluation. The batch-only fields (patch_facts, touched_paths, pr_commits, parent_count) stay on the row.

Source

pub fn to_corpus_entry( &self, observed: BuildOutcome, coverage: Option<&ResolverCoverage>, ) -> Option<CorpusEntry>

Project this row into a corpus entry. backhopper fills the fingerprint and aggregate verdict; the caller supplies the observed outcome and the round’s coverage. None when the row is not measurable: no fingerprint (un-joinable), or an empty verdict (no pins, so nothing was predicted).

Source

pub fn predicted_conflicts(&self) -> Vec<PredictedConflict>

The risky apply conflicts this row predicts, one per path at its highest severity: the union of the row’s apply forecast and the reason-derived conflicts. The reason arm keeps envelopes that predate the forecast working; the forecast arm carries the rows whose reasons were dropped on inapplicable pins. Path stays a PathBuf: a predictor never drops a risky path, so relativizing is the caller’s call.

Trait Implementations§

Source§

impl Clone for BatchResult

Source§

fn clone(&self) -> BatchResult

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for BatchResult

Source§

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

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

impl<'de> Deserialize<'de> for BatchResult

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 Eq for BatchResult

Source§

impl From<BatchResult> for SeriesEvaluation

Owned projection of one batch row into a SeriesEvaluation, moving every shared field across. The batch-only fields (commit, series, parent_count, verdict_fingerprint) are dropped. A consumer that needs one row’s evaluation without a field-by-field repack uses this; a new shared field is carried here or it fails to compile.

Source§

fn from(row: BatchResult) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for BatchResult

Source§

fn eq(&self, other: &BatchResult) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for BatchResult

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

impl StructuralPartialEq for BatchResult

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
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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

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

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

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> 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.
Source§

impl<T> WithSubscriber for T

Source§

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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