pub struct KernelPolicy {
pub working_set_limit: usize,
pub recall_limit: usize,
pub minimum_recall_score: f32,
pub allow_sensitive_persistence: bool,
pub consolidation_min_support: usize,
pub consolidation_min_independent_sources: usize,
pub consolidation_min_confidence: f32,
pub calibration_min_outcomes: usize,
pub recall: RecallWeights,
}Fields§
§working_set_limit: usize§recall_limit: usize§minimum_recall_score: f32Minimum relevance (cue) a trace needs to be recalled.
allow_sensitive_persistence: bool§consolidation_min_support: usize§consolidation_min_independent_sources: usize§consolidation_min_confidence: f32Consolidation proposals below this blended confidence are never eligible for promotion.
calibration_min_outcomes: usizeScored outcomes a calibration row needs to be measurable (see calibration.rs); below
it, its Brier is reported as anecdotal.
recall: RecallWeightsRecall scoring weights (see recall.rs).
Implementations§
Source§impl KernelPolicy
impl KernelPolicy
Sourcepub fn from_json_file(path: impl AsRef<Path>) -> Result<Self>
pub fn from_json_file(path: impl AsRef<Path>) -> Result<Self>
Load a JSON policy file: missing fields keep their defaults, unknown fields are errors, and the result is validated.
Sourcepub fn from_json(text: &str) -> Result<Self>
pub fn from_json(text: &str) -> Result<Self>
Load a policy from JSON data (a --policy file or HIKMAH_POLICY). Data can tune
weights and thresholds but cannot lift the sensitive-persistence hard block: the
append-only reference ledger cannot delete, so enabling it belongs in code, next to an
encrypted, deletion-capable storage adapter, not in an ambient file or variable.
Trait Implementations§
Source§impl Clone for KernelPolicy
impl Clone for KernelPolicy
Source§impl Debug for KernelPolicy
impl Debug for KernelPolicy
Source§impl Default for KernelPolicy
impl Default for KernelPolicy
Source§impl<'de> Deserialize<'de> for KernelPolicywhere
KernelPolicy: Default,
impl<'de> Deserialize<'de> for KernelPolicywhere
KernelPolicy: 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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for KernelPolicy
impl PartialEq for KernelPolicy
Source§impl Serialize for KernelPolicy
impl Serialize for KernelPolicy
impl StructuralPartialEq for KernelPolicy
Auto Trait Implementations§
impl Freeze for KernelPolicy
impl RefUnwindSafe for KernelPolicy
impl Send for KernelPolicy
impl Sync for KernelPolicy
impl Unpin for KernelPolicy
impl UnsafeUnpin for KernelPolicy
impl UnwindSafe for KernelPolicy
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