Skip to main content

AuditEvent

Enum AuditEvent 

Source
#[non_exhaustive]
pub enum AuditEvent {
Show 15 variants Step { step: u64, goal: String, action: String, avg_err: f64, damping: f64, }, PatchAccepted { step: u64, patch_id: Uuid, damping: f64, description: String, }, PatchRejected { step: u64, reason: String, }, Checkpoint { checkpoint_id: Uuid, step: u64, label: String, }, Rollback { checkpoint_id: Uuid, step_before: u64, }, TaskEpisode { task: String, reward: f64, steps: u32, }, ToolAllowed { tool: String, }, ToolDenied { tool: String, reason: String, }, FixedPointEntered { step: u64, alignment_score: f64, }, FixedPointExited { step: u64, alignment_score: f64, dwell_steps: u64, }, L2ModulationProposed { step: u64, score: f64, }, L2ModulationCommitted { step: u64, score: f64, gain: f64, }, ExternalStep { step_id: u64, prediction_error: f64, observed_risk: f64, l1_gate: String, keep_steady: bool, patch_id: Option<String>, }, ExternalRollback { step_id: u64, checkpoint_id: String, consecutive_rollbacks: u32, next_cooldown: u64, }, ExternalStepDuplicate { step_id: u64, last_step_id: u64, },
}
Available on crate feature std only.
Expand description

Typed event emitted by the kernel and persisted in its append-only audit log.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Step

A kernel step completed.

Fields

§step: u64

Kernel step number associated with the event.

§goal: String

Goal submitted for the step.

§action: String

Action selected or produced by the kernel.

§avg_err: f64

Average prediction error reported for the step.

§damping: f64

Prediction-error damping factor used for the step.

§

PatchAccepted

A proposed patch passed validation and was accepted.

Fields

§step: u64

Kernel step number associated with the patch.

§patch_id: Uuid

Unique identifier assigned to the accepted patch.

§damping: f64

Prediction-error damping factor used for the step.

§description: String

Human-readable summary of the accepted change.

§

PatchRejected

A proposed patch was rejected and not applied.

Fields

§step: u64

Kernel step number associated with the proposal.

§reason: String

Explanation for rejecting the patch.

§

Checkpoint

A kernel snapshot was saved as a checkpoint.

Fields

§checkpoint_id: Uuid

Identifier for the checkpoint.

§step: u64

Kernel step captured by the checkpoint.

§label: String

Human-readable label for the checkpoint.

§

Rollback

Kernel state was restored from a checkpoint.

Fields

§checkpoint_id: Uuid

Identifier for the checkpoint.

§step_before: u64

Kernel step number before the restore.

§

TaskEpisode

A task episode completed and its reward was recorded.

Fields

§task: String

Name or description of the completed task.

§reward: f64

Reward observed for the episode.

§steps: u32

Number of steps used by the episode.

§

ToolAllowed

Tool-call gate: proposed tool was on allow-list and recorded.

Fields

§tool: String

Name of the tool admitted by the gate.

§

ToolDenied

Tool-call gate: proposed tool blocked (deny-list or not allowed).

Fields

§tool: String

Name of the tool rejected by the gate.

§reason: String

Explanation for denying the tool call.

§

FixedPointEntered

L2 entered the fixed-point regime.

Fields

§step: u64

Kernel step at which L2 entered the regime.

§alignment_score: f64

Alignment score measured at entry.

§

FixedPointExited

L2 exited the fixed-point regime.

Fields

§step: u64

Kernel step at which L2 exited the regime.

§alignment_score: f64

Alignment score measured at exit.

§dwell_steps: u64

Number of steps spent in the current regime or arm.

§

L2ModulationProposed

L2 proposed a policy modulation.

Fields

§step: u64

Kernel step associated with the proposal.

§score: f64

Score assigned to the proposal.

§

L2ModulationCommitted

L2 committed a proposed policy modulation.

Fields

§step: u64

Kernel step at which the modulation was committed.

§score: f64

Score assigned to the committed modulation.

§gain: f64

Gain applied when committing the modulation.

§

ExternalStep

Telemetry for a step executed by an external host was processed.

Fields

§step_id: u64

Identifier of the step represented by this value.

§prediction_error: f64

Prediction error measured for this step.

§observed_risk: f64

Risk observed while executing this step.

§l1_gate: String

L1 gate decision returned to the host.

§keep_steady: bool

Whether the host was instructed to keep its current policy.

§patch_id: Option<String>

Identifier of the patch proposed for this step, if any.

§

ExternalRollback

The host was instructed to restore a checkpoint after a degraded step.

Fields

§step_id: u64

Identifier of the step represented by this value.

§checkpoint_id: String

Identifier for the checkpoint.

§consecutive_rollbacks: u32

Number of consecutive rollbacks at this point.

§next_cooldown: u64

Remaining cooldown steps before another patch may be considered.

§

ExternalStepDuplicate

A duplicate or out-of-order external step identifier was ignored.

Fields

§step_id: u64

Identifier of the step represented by this value.

§last_step_id: u64

Most recent external step identifier already processed.

Trait Implementations§

Source§

impl Clone for AuditEvent

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AuditEvent

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for AuditEvent

Source§

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 Serialize for AuditEvent

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl Forget for AuditEvent

§

impl Freeze for AuditEvent
where *const u8 is !null: Freeze, PhantomData<u8>: Freeze,

§

impl Move for AuditEvent

§

impl RefUnwindSafe for AuditEvent

§

impl Send for AuditEvent
where RawVecInner: Send,

§

impl Sync for AuditEvent
where RawVecInner: Sync,

§

impl Unpin for AuditEvent
where *const u8 is !null: Unpin,

§

impl UnsafeUnpin for AuditEvent

§

impl UnwindSafe for AuditEvent
where RawVecInner: UnwindSafe,

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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