fix(config): forgiving bool parsing for pre-existing feature flags
scheduler_prompt_injection, cache_warming_enabled, and headroom_enabled used env_parse::<bool>, i.e. bool::from_str, which accepts only "true"/ "false". Any other truthy spelling (1/yes/on/TRUE) silently parsed to false — the feature failed closed with no error or log. Switch them to the same env_bool helper added for terminal capture so =1/yes/on now work as operators expect. Backward compatible: true/false keep their meaning. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
0509ed76bc
commit
b2f5d8f355
1 changed files with 3 additions and 4 deletions
|
|
@ -105,12 +105,11 @@ impl DaemonConfig {
|
|||
host,
|
||||
max_context_tokens: env_parse("COLIBRI_MAX_CONTEXT_TOKENS").unwrap_or(128_000),
|
||||
cost_mode: std::env::var("COLIBRI_COST_MODE").unwrap_or_else(|_| "smart".to_string()),
|
||||
scheduler_prompt_injection: env_parse("COLIBRI_SCHEDULER_PROMPT_INJECTION")
|
||||
.unwrap_or(false),
|
||||
cache_warming_enabled: env_parse("COLIBRI_CACHE_WARMING").unwrap_or(false),
|
||||
scheduler_prompt_injection: env_bool("COLIBRI_SCHEDULER_PROMPT_INJECTION"),
|
||||
cache_warming_enabled: env_bool("COLIBRI_CACHE_WARMING"),
|
||||
cache_warming_interval_hours: env_parse("COLIBRI_CACHE_WARMING_INTERVAL_HOURS")
|
||||
.unwrap_or(0),
|
||||
headroom_enabled: env_parse("COLIBRI_HEADROOM_ENABLED").unwrap_or(false),
|
||||
headroom_enabled: env_bool("COLIBRI_HEADROOM_ENABLED"),
|
||||
headroom_socket_path: std::env::var("COLIBRI_HEADROOM_SOCKET")
|
||||
.map(PathBuf::from)
|
||||
.unwrap_or_else(|_| PathBuf::from("/var/run/colibri/headroom.sock")),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue