pub struct KernelSnapshot {Show 51 fields
pub version: u32,
pub total_steps: u64,
pub biases: BTreeMap<String, f64>,
pub constraints: BTreeMap<String, f64>,
pub cas_total_steps: u64,
pub cas_avg_prediction_error: f64,
pub cas_adaptation_score: f64,
pub cognitive_effect: RuleEffect,
pub cases: Vec<Case>,
pub case_capacity: usize,
pub strategies: BTreeMap<String, Strategy>,
pub active_modules: BTreeMap<String, String>,
pub patch_history: Vec<(CognitivePatch, String)>,
pub l2_enabled: bool,
pub l2_in_fixed_point: bool,
pub l2_dwell_steps: u64,
pub l2_last_alignment_score: f64,
pub l2_commit_threshold: f64,
pub l2_commit_cooldown_steps: u64,
pub l2_commit_cooldown_remaining: u64,
pub l2_last_consequence_score: f64,
pub l2_defensive_mode: bool,
pub l2_negative_consequence_streak: u32,
pub l2_stable_consequence_steps: u32,
pub l2_reward_change_score: f64,
pub l2_error_change_score: f64,
pub l2_awaiting_consequence: bool,
pub l2_negative_reward_streak: u32,
pub l2_negative_reward_required: u32,
pub l2_detector_history: Vec<MetaMetrics>,
pub l2_detector_window: usize,
pub l2_detector_pred_threshold: f64,
pub l2_detector_self_ref_threshold: f64,
pub l2_detector_cooldown_steps: usize,
pub l2_detector_cooldown_remaining: usize,
pub self_modify_enabled: bool,
pub steps_since_last_patch: u64,
pub l2_rollback_effect: Option<RuleEffect>,
pub last_l2_decision: Option<L2DecisionRecord>,
pub bandit_ucb: Option<BanditUcbSnapshot>,
pub bandit_config: BanditConfig,
pub l1_previous_effect: Option<RuleEffect>,
pub l1_pending_rollback: bool,
pub l2_controller: ResidentController,
pub l2_pending_policy: L2Policy,
pub l2_applied_policy: L2Policy,
pub l2_pending_l1_rollback: bool,
pub l2_last_reward: f64,
pub case_sample_counter: u32,
pub external_loop: Option<ExternalLoopState>,
pub adaptive_state: Option<AdaptivePersistedState>,
}std only.Expand description
Serializable snapshot of the kernel state.
Fields§
§version: u32On-disk schema version. Missing / 0 treated as pre-0.5 and migrated up to
CURRENT_SCHEMA_VERSION (currently 7) on load.
total_steps: u64Total number of kernel steps completed.
biases: BTreeMap<String, f64>Mapping of biases.
constraints: BTreeMap<String, f64>Mapping of constraints.
cas_total_steps: u64Number of CAS total.
cas_avg_prediction_error: f64Cas average prediction error for this value.
cas_adaptation_score: f64Cas adaptation score for this value.
cognitive_effect: RuleEffectCognitive effect for this value.
cases: Vec<Case>Collection of cases.
case_capacity: usizeCase capacity for this value.
strategies: BTreeMap<String, Strategy>Mapping of strategies.
active_modules: BTreeMap<String, String>Number of active cognitive modules.
patch_history: Vec<(CognitivePatch, String)>Collection of patch history.
l2_enabled: boolWhether the L2 meta-controller is enabled.
l2_in_fixed_point: boolWhether L2 in fixed point is enabled or active.
l2_dwell_steps: u64Number of L2 dwell.
l2_last_alignment_score: f64L2 last alignment score for this value.
l2_commit_threshold: f64L2 commit threshold for this value.
l2_commit_cooldown_steps: u64Number of L2 commit cooldown.
l2_commit_cooldown_remaining: u64L2 commit cooldown remaining for this value.
l2_last_consequence_score: f64L2 last consequence score for this value.
l2_defensive_mode: boolWhether L2 is operating in defensive mode.
l2_negative_consequence_streak: u32Number of consecutive negative consequences observed by L2.
l2_stable_consequence_steps: u32Number of L2 stable consequence.
l2_reward_change_score: f64L2 reward change score for this value.
l2_error_change_score: f64L2 error change score for this value.
l2_awaiting_consequence: boolWhether L2 awaiting consequence is enabled or active.
l2_negative_reward_streak: u32L2 negative reward streak for this value.
l2_negative_reward_required: u32L2 negative reward required for this value.
l2_detector_history: Vec<MetaMetrics>Collection of L2 detector history.
l2_detector_window: usizeL2 detector window for this value.
l2_detector_pred_threshold: f64L2 detector pred threshold for this value.
l2_detector_self_ref_threshold: f64L2 detector self ref threshold for this value.
l2_detector_cooldown_steps: usizeNumber of L2 detector cooldown.
l2_detector_cooldown_remaining: usizeL2 detector cooldown remaining for this value.
self_modify_enabled: boolL1 self-modify master switch (v2+). Restored so that enabling L1 then restarting does not silently fall back to the safe default-off.
steps_since_last_patch: u64L1 patch cooldown counter (v2+). Restored so a restart cannot reset the min-steps-between-patches cooldown.
l2_rollback_effect: Option<RuleEffect>L2 rollback policy snapshot (v2+). Restored so that after an L2 commit a restart retains the pre-commit policy needed for negative-feedback rollback.
last_l2_decision: Option<L2DecisionRecord>Last UCB-backed L2 decision, available to status and trajectory replay.
bandit_ucb: Option<BanditUcbSnapshot>Complete local bandit state when the kernel uses BanditUcbDecisionMaker.
bandit_config: BanditConfigBandit config for this value.
l1_previous_effect: Option<RuleEffect>Optional L1 previous effect.
l1_pending_rollback: boolWhether L1 pending rollback is enabled or active.
l2_controller: ResidentControllerResident L2 controller and one-step pending policy (v4+). Missing legacy state is dormant with zero trust, so migration cannot inject a bias.
l2_pending_policy: L2PolicyL2 policy proposed but not yet applied.
l2_applied_policy: L2PolicyL2 policy currently applied at the control boundary.
l2_pending_l1_rollback: boolWhether L2 pending L1 rollback is enabled or active.
l2_last_reward: f64L2 last reward for this value.
case_sample_counter: u32Per-instance prioritized-replay cursor (v6+), independent of other kernels.
external_loop: Option<ExternalLoopState>Optional external loop.
adaptive_state: Option<AdaptivePersistedState>Optional Adaptive Kernel Protocol v1 durable state (introduced in schema v7).
Implementations§
Source§impl KernelSnapshot
impl KernelSnapshot
Sourcepub fn redact_user_content(&mut self)
pub fn redact_user_content(&mut self)
Redact known user-provided goal text before writing a snapshot. Numeric learning state and schema remain unchanged.