pub enum BugPattern {
AlternatePathMissing,
AlgorithmMismatch,
SilentFallbackWrongResource,
StateAdvancementTiming,
SharedStateCorruption,
MissingPostTransformValidation,
MissingTypeDetection,
MissingCompanionData,
UnwrapOnFallible,
ErrorPropagationGap,
PathTraversal,
PromptInjection,
}Expand description
Bug pattern categories derived from cross-project analysis
Variants§
AlternatePathMissing
Feature implemented in primary path but missing in alternate path Example: GH-185 - merges embedded in one code path, not raw GGUF path
AlgorithmMismatch
Two implementations of same algorithm with incompatible layouts Example: GH-177 - Q4K dequant: one scale vs two scales per block
SilentFallbackWrongResource
Fallback mechanism silently uses wrong/incompatible resource Example: realizar - tokenizer fallback found different model’s tokenizer
StateAdvancementTiming
State advancement happens at wrong point in multi-stage pipeline Example: realizar - KV cache len auto-advanced on layer 0 instead of last
Prior operation corrupts shared state for subsequent operations Example: realizar - GPU context corrupted from earlier tests
MissingPostTransformValidation
No validation after data transformation allows corrupt values downstream Example: GH-177 - no NaN/Inf check after dequantization
MissingTypeDetection
No format/type detection before processing incompatible data Example: realizar - legacy Q4_0 routed to Q4_K GPU kernel
MissingCompanionData
Primary data saved but required companion/metadata missing Example: GH-182 - SafeTensors missing config.json, tokenizer.json
UnwrapOnFallible
.unwrap() on fallible operation causes panic instead of error
Example: PMAT-189 - mutex lock poisoning crashes server
ErrorPropagationGap
Error not propagated on alternate code path Example: Error handling differs between primary and fallback paths
PathTraversal
Path traversal vulnerability (untrusted path not validated) Example: realizar - could read /etc/passwd as model
PromptInjection
Special tokens not escaped, treated as control codes
Example: realizar - <| prompt injection
Implementations§
Source§impl BugPattern
impl BugPattern
Sourcepub fn description(&self) -> &'static str
pub fn description(&self) -> &'static str
Get human-readable description
Sourcepub fn severity(&self) -> &'static str
pub fn severity(&self) -> &'static str
Get the severity level (P0 = critical, P1 = high, P2 = medium)
Sourcepub fn by_severity(severity: &str) -> Vec<Self>
pub fn by_severity(severity: &str) -> Vec<Self>
Get patterns by severity
Trait Implementations§
Source§impl Clone for BugPattern
impl Clone for BugPattern
Source§fn clone(&self) -> BugPattern
fn clone(&self) -> BugPattern
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BugPattern
impl Debug for BugPattern
Source§impl<'de> Deserialize<'de> for BugPattern
impl<'de> Deserialize<'de> for BugPattern
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>,
Source§impl PartialEq for BugPattern
impl PartialEq for BugPattern
Source§impl Serialize for BugPattern
impl Serialize for BugPattern
impl Copy for BugPattern
impl Eq for BugPattern
impl StructuralPartialEq for BugPattern
Auto Trait Implementations§
impl Freeze for BugPattern
impl RefUnwindSafe for BugPattern
impl Send for BugPattern
impl Sync for BugPattern
impl Unpin for BugPattern
impl UnwindSafe for BugPattern
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
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§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<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 more