pub struct RetuneTriggerState {
pub current_memory_count: u64,
pub memory_count_at_last_tune: u64,
pub memories_added_since_tune: u64,
pub corpus_milestone_triggered: bool,
pub recent_regret_count: u64,
pub recent_served_count: u64,
pub regret_rate: f64,
pub drift_triggered: bool,
pub should_retune: bool,
pub last_tuned_at: Option<String>,
}Expand description
Trigger state for S2.1 re-tune proposals. Computed cheaply (no sweep).
Fields§
§current_memory_count: u64Active memory count right now.
memory_count_at_last_tune: u64Active memory count at the last tune, or 0 if never tuned.
memories_added_since_tune: u64Memories added since the last tune.
corpus_milestone_triggered: boolWhether the corpus milestone threshold has been crossed.
recent_regret_count: u64Regrets in the last 24 h window.
recent_served_count: u64Context-served events in the last 24 h window.
regret_rate: f64Regret rate = recent_regret_count / recent_served_count (0.0 when served=0).
drift_triggered: boolWhether the drift threshold has been crossed.
should_retune: boolTrue when either trigger is active.
last_tuned_at: Option<String>Timestamp of the last tune, or None if never tuned.
Trait Implementations§
Source§impl Clone for RetuneTriggerState
impl Clone for RetuneTriggerState
Source§fn clone(&self) -> RetuneTriggerState
fn clone(&self) -> RetuneTriggerState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RetuneTriggerState
impl Debug for RetuneTriggerState
Source§impl<'de> Deserialize<'de> for RetuneTriggerState
impl<'de> Deserialize<'de> for RetuneTriggerState
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RetuneTriggerState
impl RefUnwindSafe for RetuneTriggerState
impl Send for RetuneTriggerState
impl Sync for RetuneTriggerState
impl Unpin for RetuneTriggerState
impl UnsafeUnpin for RetuneTriggerState
impl UnwindSafe for RetuneTriggerState
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
Mutably borrows from an owned value. Read more