pub struct ForgettingConfig {
pub enabled: bool,
pub decay_rate: f32,
pub forgetting_floor: f32,
pub sweep_interval_secs: u64,
pub sweep_batch_size: usize,
pub replay_window_hours: u32,
pub replay_min_access_count: u32,
pub protect_recent_hours: u32,
pub protect_min_access_count: u32,
}Expand description
Configuration for the SleepGate forgetting sweep (#2397).
When enabled = true, a background loop periodically decays importance scores
(synaptic downscaling), restores recently-accessed memories (selective replay),
and prunes memories below forgetting_floor (targeted forgetting).
Fields§
§enabled: boolEnable the SleepGate forgetting sweep. Default: false.
decay_rate: f32Per-sweep decay rate applied to importance scores. Range: (0.0, 1.0). Default: 0.1.
forgetting_floor: f32Importance floor below which memories are pruned. Range: [0.0, 1.0]. Default: 0.05.
sweep_interval_secs: u64How often the forgetting sweep runs, in seconds. Default: 7200.
sweep_batch_size: usizeMaximum messages to process per sweep. Default: 500.
replay_window_hours: u32Hours: messages accessed within this window get replay protection. Default: 24.
replay_min_access_count: u32Messages with access_count >= this get replay protection. Default: 3.
protect_recent_hours: u32Hours: never prune messages accessed within this window. Default: 24.
protect_min_access_count: u32Never prune messages with access_count >= this. Default: 3.
Trait Implementations§
Source§impl Clone for ForgettingConfig
impl Clone for ForgettingConfig
Source§fn clone(&self) -> ForgettingConfig
fn clone(&self) -> ForgettingConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ForgettingConfig
impl Debug for ForgettingConfig
Source§impl Default for ForgettingConfig
impl Default for ForgettingConfig
Source§impl<'de> Deserialize<'de> for ForgettingConfigwhere
ForgettingConfig: Default,
impl<'de> Deserialize<'de> for ForgettingConfigwhere
ForgettingConfig: Default,
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>,
Auto Trait Implementations§
impl Freeze for ForgettingConfig
impl RefUnwindSafe for ForgettingConfig
impl Send for ForgettingConfig
impl Sync for ForgettingConfig
impl Unpin for ForgettingConfig
impl UnsafeUnpin for ForgettingConfig
impl UnwindSafe for ForgettingConfig
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,
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request