pub struct LifecycleConfig {
pub decay_rate_per_day: f32,
pub max_facts: usize,
pub low_confidence_threshold: f32,
pub stale_days: i64,
pub consolidation_similarity: f32,
pub forgetting_model: ForgettingModel,
pub base_stability_days: f32,
pub archetype_aware_decay: bool,
pub prune_unretrieved_after_days: Option<i64>,
pub reclaim_headroom_pct: f32,
pub reclaim_enabled: bool,
}Fields§
§decay_rate_per_day: f32§max_facts: usize§low_confidence_threshold: f32§stale_days: i64§consolidation_similarity: f32§forgetting_model: ForgettingModelForgetting curve (#1). Defaults to Ebbinghaus.
base_stability_days: f32Characteristic stability (days) for the Ebbinghaus curve before spacing and feedback modulation.
archetype_aware_decay: boolWhen true, scale stability by the fact’s archetype so structural evidence (architecture/dependency/…) decays slower than inference (#802/cognition). Default false keeps the baseline tuning byte-for-byte.
prune_unretrieved_after_days: Option<i64>Archive facts untouched for this many days that were never retrieved —
dead weight that costs injection tokens regardless of confidence (#962).
None disables it (the default, so existing tuning is unchanged); the
production policy can opt in. Reversible: pruned facts go to the archive.
reclaim_headroom_pct: f32Proactive headroom on a capacity reclaim (#995): when a store reaches its
cap, drop down to reclaim_target(max_facts, reclaim_headroom_pct) so it
settles with working room instead of churning at the cap. 0.25 = 75%.
reclaim_enabled: boolMaster switch for the proactive capacity reclaim (#995). false restores
the legacy “trim only the overflow” behavior — the documented escape
hatch. Eviction stays lossless either way (excess is archived).
Implementations§
Source§impl LifecycleConfig
impl LifecycleConfig
Sourcepub fn from_policy(policy: &MemoryPolicy) -> Self
pub fn from_policy(policy: &MemoryPolicy) -> Self
Map the persisted crate::core::memory_policy::MemoryPolicy to the
runtime lifecycle config. The single mapping site, so adding a knob
touches exactly one place (previously duplicated across the lifecycle and
cognition callers).
Trait Implementations§
Source§impl Clone for LifecycleConfig
impl Clone for LifecycleConfig
Source§fn clone(&self) -> LifecycleConfig
fn clone(&self) -> LifecycleConfig
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 LifecycleConfig
impl Debug for LifecycleConfig
Auto Trait Implementations§
impl Freeze for LifecycleConfig
impl RefUnwindSafe for LifecycleConfig
impl Send for LifecycleConfig
impl Sync for LifecycleConfig
impl Unpin for LifecycleConfig
impl UnsafeUnpin for LifecycleConfig
impl UnwindSafe for LifecycleConfig
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
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<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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