From b2f5d8f35561b948fd44dc512119dcd4964ad1fd Mon Sep 17 00:00:00 2001 From: Sam & Claude Date: Thu, 25 Jun 2026 20:54:26 +0200 Subject: [PATCH] fix(config): forgiving bool parsing for pre-existing feature flags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit scheduler_prompt_injection, cache_warming_enabled, and headroom_enabled used env_parse::, 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 --- crates/colibri-daemon/src/config.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/crates/colibri-daemon/src/config.rs b/crates/colibri-daemon/src/config.rs index 5e51b36..ef7bc2d 100644 --- a/crates/colibri-daemon/src/config.rs +++ b/crates/colibri-daemon/src/config.rs @@ -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")),