pub struct InterventionPolicy {
pub mode: InterventionMode,
pub max_level: InterventionLevel,
pub friction_threshold: u32,
pub audit_escalations: bool,
}Expand description
Strategy-governance knobs (friction + risk domain).
Additive for 0.4.x — all fields optional with safe defaults.
See docs/INTERVENTION_POLICY.md.
Fields§
§mode: InterventionModeexploration = DX efficiency; strict = high-stakes governance.
max_level: InterventionLevelCap on how far the system may escalate under this mode.
friction_threshold: u32Consecutive similar env/build failures before suggesting an alternative path.
Only honored when mode = exploration and max_level allows it.
audit_escalations: boolIf true, emit audit-friendly notes when escalation is suppressed or allowed.
Implementations§
Source§impl InterventionPolicy
impl InterventionPolicy
Sourcepub fn effective_max_level(&self) -> InterventionLevel
pub fn effective_max_level(&self) -> InterventionLevel
Effective max level after applying mode constraints.
Sourcepub fn may_suggest_alternative(&self, consecutive_failures: u32) -> bool
pub fn may_suggest_alternative(&self, consecutive_failures: u32) -> bool
Whether friction streak may trigger a path-alternative suggestion.
Trait Implementations§
Source§impl Clone for InterventionPolicy
impl Clone for InterventionPolicy
Source§impl Debug for InterventionPolicy
impl Debug for InterventionPolicy
Source§impl Default for InterventionPolicy
impl Default for InterventionPolicy
Source§impl<'de> Deserialize<'de> for InterventionPolicywhere
InterventionPolicy: Default,
impl<'de> Deserialize<'de> for InterventionPolicywhere
InterventionPolicy: 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
Auto Trait Implementations§
impl Forget for InterventionPolicy
impl Freeze for InterventionPolicy
impl Move for InterventionPolicy
impl RefUnwindSafe for InterventionPolicy
impl Send for InterventionPolicy
impl Sync for InterventionPolicy
impl Unpin for InterventionPolicy
impl UnsafeUnpin for InterventionPolicy
impl UnwindSafe for InterventionPolicy
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