MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / injection_enabled_from

Function injection_enabled_from

src/hooks/memory_inject.rs:70–78  ·  view source on GitHub ↗

Pure form of the gate for tests: env override beats the config flag.

(env_value: Option<&str>, config_flag: bool)

Source from the content-addressed store, hash-verified

68
69/// Pure form of the gate for tests: env override beats the config flag.
70pub fn injection_enabled_from(env_value: Option<&str>, config_flag: bool) -> bool {
71 match env_value {
72 Some(value) => !matches!(
73 value.trim().to_ascii_lowercase().as_str(),
74 "0" | "false" | "off" | "no"
75 ),
76 None => config_flag,
77 }
78}
79
80// ---------------------------------------------------------------------------
81// Sanitization

Callers 1

memory_injection_enabledFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected