pub struct QualityGateConfig {
pub enabled: bool,
pub threshold: f32,
pub recent_window: usize,
pub contradiction_grace_seconds: u64,
pub information_value_weight: f32,
pub reference_completeness_weight: f32,
pub contradiction_weight: f32,
pub rejection_rate_alarm_ratio: f32,
pub llm_timeout_ms: u64,
pub llm_weight: f32,
pub reference_check_lang_en: bool,
}Expand description
Configuration for the write quality gate ([memory.quality_gate] TOML section).
Fields§
§enabled: boolEnable the quality gate. When false, all writes pass through. Default: false.
threshold: f32Combined score threshold below which writes are rejected. Range [0, 1]. Default: 0.55.
recent_window: usizeNumber of recent writes to compare against for information-value scoring. Default: 32.
contradiction_grace_seconds: u64Seconds: edges older than this are considered stable for contradiction detection.
Default: 300.
information_value_weight: f32Weight of information_value sub-score. Default: 0.4.
reference_completeness_weight: f32Weight of reference_completeness sub-score. Default: 0.3.
contradiction_weight: f32Weight of contradiction sub-score (applied as 1 - contradiction_risk). Default: 0.3.
rejection_rate_alarm_ratio: f32Ratio of rejections (rolling 100-write window) above which a WARN is emitted.
Default: 0.35.
llm_timeout_ms: u64LLM timeout for optional scoring path. Default: 500 ms.
llm_weight: f32Weight blended into the final score when an LLM provider is set. Default: 0.5.
reference_check_lang_en: boolWhether pronoun/deictic reference checks are active. Disable for non-English sessions.
Default: true.
Trait Implementations§
Source§impl Clone for QualityGateConfig
impl Clone for QualityGateConfig
Source§fn clone(&self) -> QualityGateConfig
fn clone(&self) -> QualityGateConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for QualityGateConfig
impl Debug for QualityGateConfig
Auto Trait Implementations§
impl Freeze for QualityGateConfig
impl RefUnwindSafe for QualityGateConfig
impl Send for QualityGateConfig
impl Sync for QualityGateConfig
impl Unpin for QualityGateConfig
impl UnsafeUnpin for QualityGateConfig
impl UnwindSafe for QualityGateConfig
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