parlov-core 0.7.0

Shared types, error types, and oracle class definitions for parlov.
Documentation
//! Structured scoring breakdown for oracle results.

use serde::{Deserialize, Serialize};

/// One contribution to confidence or impact — audit trail for verdict computation.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
pub struct ScoringReason {
    /// e.g. `"Status differential 416 vs 404"`
    pub description: String,
    /// Points added (positive) or subtracted (negative) on this dimension.
    pub points: i16,
    /// Which scoring axis this reason contributes to.
    pub dimension: ScoringDimension,
}

/// Which axis a `ScoringReason` contributes to.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
pub enum ScoringDimension {
    /// Numeric confidence score (0–100).
    Confidence,
    /// Impact classification — drives severity when gated by confidence.
    Impact,
}