pub enum RepairMode {
Off,
Suggest,
AutoSafe,
AutoStrict,
}Expand description
Controls how the auto-repair pipeline behaves at extension load time.
Precedence (highest to lowest): CLI flag → environment variable
PI_REPAIR_MODE → config file → default (AutoSafe).
Variants§
Off
No repairs are attempted; extensions that fail to load fail normally.
Suggest
Log suggested repairs but do not apply them. Useful for auditing what would change before enabling auto-repair in production.
AutoSafe
Apply only provably safe repairs: file-path fallbacks (Pattern 1) and missing-asset stubs (Pattern 2). These never grant new privileges.
AutoStrict
Apply all repairs including aggressive heuristics (monorepo escape stubs, proxy-based npm stubs, export shape fixups). May change observable extension behavior.
Implementations§
Source§impl RepairMode
impl RepairMode
Sourcepub const fn should_apply(self) -> bool
pub const fn should_apply(self) -> bool
Whether repairs should actually be applied (not just logged).
Sourcepub const fn is_active(self) -> bool
pub const fn is_active(self) -> bool
Whether any repair activity (logging or applying) is enabled.
Sourcepub const fn allows_aggressive(self) -> bool
pub const fn allows_aggressive(self) -> bool
Whether aggressive/heuristic patterns (3-5) are allowed.
Sourcepub fn from_str_lossy(s: &str) -> Self
pub fn from_str_lossy(s: &str) -> Self
Parse from a string (env var, CLI flag, config value).
Trait Implementations§
Source§impl Clone for RepairMode
impl Clone for RepairMode
Source§fn clone(&self) -> RepairMode
fn clone(&self) -> RepairMode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RepairMode
impl Debug for RepairMode
Source§impl Default for RepairMode
impl Default for RepairMode
Source§fn default() -> RepairMode
fn default() -> RepairMode
Source§impl Display for RepairMode
impl Display for RepairMode
Source§impl PartialEq for RepairMode
impl PartialEq for RepairMode
impl Copy for RepairMode
impl Eq for RepairMode
impl StructuralPartialEq for RepairMode
Auto Trait Implementations§
impl Freeze for RepairMode
impl RefUnwindSafe for RepairMode
impl Send for RepairMode
impl Sync for RepairMode
impl Unpin for RepairMode
impl UnsafeUnpin for RepairMode
impl UnwindSafe for RepairMode
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more