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 part of the wire contract.
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
impl BatchResult
Sourcepub fn evaluation(&self) -> SeriesEvaluationView<'_>
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.
Sourcepub fn to_corpus_entry(
&self,
observed: BuildOutcome,
coverage: Option<&ResolverCoverage>,
) -> Option<CorpusEntry>
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).
Sourcepub fn predicted_conflicts(&self) -> Vec<PredictedConflict>
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
impl Clone for BatchResult
Source§impl Debug for BatchResult
impl Debug for BatchResult
Source§impl<'de> Deserialize<'de> for BatchResult
impl<'de> Deserialize<'de> for BatchResult
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>,
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.
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.