pub struct ConfidenceSignals {
pub source_age_days: f64,
pub atom_derivation: bool,
pub prior_corroboration_count: i64,
pub freshness_factor: f64,
pub baseline_per_source: f64,
}Expand description
v0.7.0 Form 5 (issue #758) — JSON snapshot of the signals that produced an auto-derived or calibrated confidence value.
Stored on memories.confidence_signals TEXT NULL (schema v39
sqlite / v38 postgres) as a JSON-encoded envelope. NULL on legacy
rows and on rows whose confidence_source = 'caller_provided'.
Also written verbatim into the confidence_shadow_observations.signals
column per recall when shadow mode is enabled.
An auditor can reconstruct the derivation after the fact by inspecting this snapshot — the recall ranker and the forensic bundle preserve it across reads, so a downstream review never needs to re-query the substrate at the then-current state.
Fields§
§source_age_days: f64Age (in days) of the source memory at the moment of derivation.
Drives the freshness_factor exponent.
atom_derivation: boolWhether the row is an atom of an existing memory (atom_of IS NOT NULL). Atom rows inherit higher base confidence because
their provenance is anchored to a curator-validated parent.
prior_corroboration_count: i64Count of related memories (via memory_links) at the moment of
derivation. More corroboration → higher confidence; the
formula uses log10(1 + count) to keep the bump sub-linear.
freshness_factor: f64Pre-computed freshness factor exp(-age / half_life) clamped
to [0, 1]. Stored alongside source_age_days so a future
review can verify the half-life used at write time.
baseline_per_source: f64Per-source baseline from the calibration table (median derived
confidence for the row’s (namespace, source) pair). 0.5
when no calibrated baseline exists yet.
Trait Implementations§
Source§impl Clone for ConfidenceSignals
impl Clone for ConfidenceSignals
Source§fn clone(&self) -> ConfidenceSignals
fn clone(&self) -> ConfidenceSignals
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ConfidenceSignals
impl Debug for ConfidenceSignals
Source§impl Default for ConfidenceSignals
impl Default for ConfidenceSignals
Source§impl<'de> Deserialize<'de> for ConfidenceSignals
impl<'de> Deserialize<'de> for ConfidenceSignals
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>,
Source§impl PartialEq for ConfidenceSignals
impl PartialEq for ConfidenceSignals
Source§fn eq(&self, other: &ConfidenceSignals) -> bool
fn eq(&self, other: &ConfidenceSignals) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for ConfidenceSignals
impl Serialize for ConfidenceSignals
impl StructuralPartialEq for ConfidenceSignals
Auto Trait Implementations§
impl Freeze for ConfidenceSignals
impl RefUnwindSafe for ConfidenceSignals
impl Send for ConfidenceSignals
impl Sync for ConfidenceSignals
impl Unpin for ConfidenceSignals
impl UnsafeUnpin for ConfidenceSignals
impl UnwindSafe for ConfidenceSignals
Blanket Implementations§
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
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>,
impl<T> ErasedDestructor for Twhere
T: 'static,
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