Skip to main content

DiffReport

Struct DiffReport 

Source
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: String

Content id of the baseline trace used to produce this report.

§candidate_trace_id: String

Content id of the candidate trace used to produce this report.

§pair_count: usize

Number 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

Source

pub fn worst_severity(&self) -> Severity

The highest severity observed across all axes.

Source

pub fn to_markdown(&self) -> String

Render as a markdown table (one row per axis, columns as in the nine axes in README.md).

Source

pub fn to_terminal(&self) -> String

Render a plain-text table suitable for stdout.

Trait Implementations§

Source§

impl Clone for DiffReport

Source§

fn clone(&self) -> DiffReport

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 DiffReport

Source§

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

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

impl<'de> Deserialize<'de> for DiffReport

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 PartialEq for DiffReport

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for DiffReport

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 DiffReport

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> Ungil for T
where T: Send,