Skip to main content

L2MetaLayer

Struct L2MetaLayer 

Source
pub struct L2MetaLayer {
Show 35 fields pub monitor: MetaMonitor, pub detector: EmergenceDetector, pub fixed_point: OmegaDayanFixedPoint, pub modulator: MetaModulator, pub enabled: bool, pub in_fixed_point: bool, pub dwell_steps: u64, pub last_alignment_score: f64, pub commit_threshold: f64, pub commit_cooldown_steps: u64, pub commit_cooldown_remaining: u64, pub last_consequence_score: f64, pub defensive_mode: bool, pub negative_consequence_streak: u32, pub rollback_effect: Option<RuleEffect>, pub external_attention: bool, pub stable_consequence_steps: u32, pub reward_change_score: f64, pub error_change_score: f64, pub awaiting_consequence: bool, pub negative_reward_streak: u32, pub negative_reward_required: u32, pub controller: ResidentController, pub pending_l1_rollback: bool, pub last_rejection_reason: Option<String>, pub pending_policy: L2Policy, pub applied_policy: L2Policy, pub last_error: Option<f64>, pub last_reward: f64, pub consecutive_l1_rollbacks: u32, pub current_cycle_recoveries: u32, pub spectral_reflector: L1SpectralReflector, pub spectral_gate: L2CognitiveGate, pub spectral_history: Vec<f64>, pub spectral_control_enabled: bool,
}
Expand description

Data structure representing L2 meta layer.

Fields§

§monitor: MetaMonitor

Monitor for this value.

§detector: EmergenceDetector

Detector for this value.

§fixed_point: OmegaDayanFixedPoint

Fixed point for this value.

§modulator: MetaModulator

Modulator for this value.

§enabled: bool

Whether L2 is allowed to change biases, constraints, or RuleEffect. The monitor still runs when disabled so benchmark baselines retain comparable observability without receiving L2 interventions.

New kernels enable bounded interventions by default. Use Kernel::set_l2_enabled(false) for an observational baseline.

§in_fixed_point: bool

Whether L2 is currently in a fixed-point regime.

§dwell_steps: u64

How many consecutive steps we have been inside the fixed point.

§last_alignment_score: f64

Most recent L2 alignment score.

§commit_threshold: f64

Commit threshold for this value.

§commit_cooldown_steps: u64

Number of commit cooldown.

§commit_cooldown_remaining: u64

Commit cooldown remaining for this value.

§last_consequence_score: f64

Most recent consequence score.

§defensive_mode: bool

Whether defensive mode is enabled or active.

§negative_consequence_streak: u32

Negative consequence streak for this value.

§rollback_effect: Option<RuleEffect>

Optional rollback effect.

§external_attention: bool

Whether external attention is enabled or active.

§stable_consequence_steps: u32

Number of stable consequence.

§reward_change_score: f64

Reward change score for this value.

§error_change_score: f64

Error change score for this value.

§awaiting_consequence: bool

Whether awaiting consequence is enabled or active.

§negative_reward_streak: u32

Negative reward streak for this value.

§negative_reward_required: u32

Negative reward required for this value.

§controller: ResidentController

Controller for this value.

§pending_l1_rollback: bool

Whether pending L1 rollback is enabled or active.

§last_rejection_reason: Option<String>

Most recent rejection reason.

§pending_policy: L2Policy

Pending policy for this value.

§applied_policy: L2Policy

Validated policy used by the current L0 decision and its outcome.

§last_error: Option<f64>

Most recent error.

§last_reward: f64

Most recent reward.

§consecutive_l1_rollbacks: u32

Consecutive l1 rollbacks for this value.

§current_cycle_recoveries: u32

Current cycle recoveries for this value.

§spectral_reflector: L1SpectralReflector

Spectral reflector for this value.

§spectral_gate: L2CognitiveGate

Spectral gate for this value.

§spectral_history: Vec<f64>

Collection of spectral history.

§spectral_control_enabled: bool

Whether spectral control enabled.

Implementations§

Source§

impl L2MetaLayer

Source

pub fn blocks_l1_write(&self) -> bool

Returns true when L2 holds exclusive write priority over RuleEffect (active gate intervention, defensive mode, committed policy, or cooldown).

Source

pub fn new() -> Self

Creates a new value of this type.

Source

pub fn step( &mut self, state: &SystemState, biases: BTreeMap<String, f64>, constraints: BTreeMap<String, f64>, _current_effect: &RuleEffect, ) -> Result<L2Result>

Performs step for this type.

Source

pub fn configure_spectral_control(&mut self, enabled: bool)

Performs configure spectral control for this type.

Source

pub fn observe_consequence( &mut self, reward_delta: f64, error_delta: f64, risk_delta: f64, )

Feed back the short-term consequence of the last committed modulation. Negative outcomes extend the commit cooldown and leave fixed-point mode.

Source

pub fn take_rollback_effect(&mut self) -> Option<RuleEffect>

Performs take rollback effect for this type.

Trait Implementations§

Source§

impl Default for L2MetaLayer

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Forget for L2MetaLayer

§

impl Freeze for L2MetaLayer

§

impl Move for L2MetaLayer

§

impl RefUnwindSafe for L2MetaLayer

§

impl Send for L2MetaLayer
where RawVecInner: Send, NonZero<i32>: Send, Utc: Send, NodeRef<Owned, String, f64, LeafOrInternal>: Send, BoxRaw<(String, f64)>: Send,

§

impl Sync for L2MetaLayer
where RawVecInner: Sync, NonZero<i32>: Sync, Utc: Sync, NodeRef<Owned, String, f64, LeafOrInternal>: Sync, BoxRaw<(String, f64)>: Sync,

§

impl Unpin for L2MetaLayer
where *const u8 is !null: Unpin, NonZero<i32>: Unpin, Utc: Unpin, *const LeafNode<String, f64> is !null: Unpin, Box<(String, f64)>: Unpin,

§

impl UnsafeUnpin for L2MetaLayer

§

impl UnwindSafe for L2MetaLayer

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more