Struct DefectArtifact
pub struct DefectArtifact {
pub format_version: u32,
pub repo_identity: String,
pub head_at_mining: String,
pub vintage: String,
pub generated_at: String,
pub oracle: OracleConfig,
pub mining: MiningStats,
pub validation: ValidationMetrics,
pub weights: Vec<(String, f64)>,
pub tuning: TuningDecision,
}Expand description
A versioned own-repo defect-calibration artifact (defects.calib.json).
Mirrors calibration::CalibrationArtifact’s serde style: a compact
(non-pretty) JSON container, loaded and validated by load, written by
save. Applying an artifact mined from a different repository is a hard
error unless explicitly overridden — see check_repo_identity.
Fields§
§format_version: u32§repo_identity: StringSHA-256 hex (64 chars) identifying which repository this artifact was
mined from, derived from the repo’s root commit SHA — see
repo_identity. Distinct from head_at_mining: this identifies
which repository, not which commit.
head_at_mining: StringHEAD SHA at mining time.
vintage: StringHuman-readable vintage, e.g. "defects-2026-07-15".
generated_at: StringRFC 3339 build timestamp (caller-injected, like
calibration::build_from_observations’s generated_at, so builds are
byte-reproducible given identical inputs and timestamp).
oracle: OracleConfigThe oracle configuration used to mine this artifact.
mining: MiningStats§validation: ValidationMetrics§weights: Vec<(String, f64)>The eight smell weights (tuned or left at their defaults), in
code_health::SMELL_WEIGHTS order.
tuning: TuningDecisionTrait Implementations§
§impl Clone for DefectArtifact
impl Clone for DefectArtifact
§fn clone(&self) -> DefectArtifact
fn clone(&self) -> DefectArtifact
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for DefectArtifact
impl Debug for DefectArtifact
§impl<'de> Deserialize<'de> for DefectArtifact
impl<'de> Deserialize<'de> for DefectArtifact
§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 Serialize for DefectArtifact
impl Serialize for DefectArtifact
Auto Trait Implementations§
impl Freeze for DefectArtifact
impl RefUnwindSafe for DefectArtifact
impl Send for DefectArtifact
impl Sync for DefectArtifact
impl Unpin for DefectArtifact
impl UnsafeUnpin for DefectArtifact
impl UnwindSafe for DefectArtifact
Blanket Implementations§
impl<T> Allocation for T
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more