pub struct DiffReport {
pub rows: Vec<AxisStat>,
pub baseline_trace_id: String,
pub candidate_trace_id: String,
pub pair_count: usize,
pub first_divergence: Option<FirstDivergence>,
pub divergences: Vec<FirstDivergence>,
pub recommendations: Vec<Recommendation>,
pub drill_down: Vec<PairDrilldown>,
}Expand description
Top-level diff result.
Fields§
§rows: Vec<AxisStat>Per-axis rows, in [Axis::all] order (nine entries).
baseline_trace_id: StringContent id of the baseline trace used to produce this report.
candidate_trace_id: StringContent id of the candidate trace used to produce this report.
pair_count: usizeNumber of paired responses the report is based on.
first_divergence: Option<FirstDivergence>The first turn at which the candidate meaningfully diverged from
the baseline, with a classification (style / decision / structural).
None when the two traces agree end-to-end.
Preserved for backward compatibility; equivalent to the first
element of Self::divergences sorted by alignment order (not
by importance rank).
divergences: Vec<FirstDivergence>Top-ranked divergences between the two traces, sorted by
importance (Structural > Decision > Style by class, then by
confidence within a class). Empty when the traces agree
end-to-end. Capped at DEFAULT_K entries in standard reports;
renderers typically show the top 3 inline and hide the rest in
a collapsible details section.
recommendations: Vec<Recommendation>Prescriptive fix recommendations derived from the divergence set and the axis rows. Sorted by severity (Error > Warning > Info), capped at 8 entries. Every recommendation names a specific action (Restore / Remove / Revert / Review / Verify) and the turn it targets. Empty when nothing is actionable.
drill_down: Vec<PairDrilldown>Top-K most-regressive response pairs with per-axis breakdown,
ranked by an aggregate regression score. Surfaces which
specific turns drove the aggregate axis deltas — without this,
a reviewer looking at a PR with many paired traces has to
hand-audit each pair. Empty when no pairs are in the report.
Capped at drill_down::DEFAULT_K entries.
Implementations§
Source§impl DiffReport
impl DiffReport
Sourcepub fn worst_severity(&self) -> Severity
pub fn worst_severity(&self) -> Severity
The highest severity observed across all axes.
Sourcepub fn to_markdown(&self) -> String
pub fn to_markdown(&self) -> String
Render as a markdown table (one row per axis, columns as in the nine axes in README.md).
Sourcepub fn to_terminal(&self) -> String
pub fn to_terminal(&self) -> String
Render a plain-text table suitable for stdout.
Trait Implementations§
Source§impl Clone for DiffReport
impl Clone for DiffReport
Source§fn clone(&self) -> DiffReport
fn clone(&self) -> DiffReport
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more