File tree Expand file tree Collapse file tree
crates/zeroclaw-runtime/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -143,7 +143,7 @@ pub async fn run(
143143 ) ) ;
144144 } else {
145145 crate :: health:: mark_component_ok ( "channels" ) ;
146- tracing:: info!( "No real-time channels configured; channel supervisor disabled" ) ;
146+ tracing:: info!( "No channels configured; channel supervisor disabled" ) ;
147147 }
148148 } else {
149149 crate :: health:: mark_component_ok ( "channels" ) ;
@@ -960,11 +960,7 @@ fn validate_heartbeat_channel_config(config: &Config, channel: &str) -> Result<(
960960}
961961
962962fn has_supervised_channels ( config : & Config ) -> bool {
963- config
964- . channels
965- . channels_except_webhook ( )
966- . iter ( )
967- . any ( |( _, ok) | * ok)
963+ config. channels . channels ( ) . iter ( ) . any ( |( _, ok) | * ok)
968964}
969965
970966// run_mqtt_sop_listener has been moved to zeroclaw-channels::orchestrator::mqtt.
@@ -1117,6 +1113,21 @@ mod tests {
11171113 assert ! ( has_supervised_channels( & config) ) ;
11181114 }
11191115
1116+ #[ test]
1117+ fn webhook_only_config_is_supervised ( ) {
1118+ let mut config = Config :: default ( ) ;
1119+ config. channels . webhook = Some ( zeroclaw_config:: schema:: WebhookConfig {
1120+ enabled : true ,
1121+ port : 8080 ,
1122+ listen_path : None ,
1123+ send_url : None ,
1124+ send_method : None ,
1125+ auth_header : None ,
1126+ secret : None ,
1127+ } ) ;
1128+ assert ! ( has_supervised_channels( & config) ) ;
1129+ }
1130+
11201131 #[ test]
11211132 fn resolve_delivery_none_when_unset ( ) {
11221133 let config = Config :: default ( ) ;
Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ const MODEL_CACHE_TTL_SECS: u64 = 12 * 60 * 60;
9494const CUSTOM_MODEL_SENTINEL : & str = "__custom_model__" ;
9595
9696fn has_launchable_channels ( channels : & ChannelsConfig ) -> bool {
97- channels. channels_except_webhook ( ) . iter ( ) . any ( |( _, ok) | * ok)
97+ channels. channels ( ) . iter ( ) . any ( |( _, ok) | * ok)
9898}
9999
100100// ββ Main wizard entry point ββββββββββββββββββββββββββββββββββββββ
@@ -7853,6 +7853,21 @@ mod tests {
78537853 assert ! ( has_launchable_channels( & channels) ) ;
78547854 }
78557855
7856+ #[ test]
7857+ fn webhook_only_config_is_launchable ( ) {
7858+ let mut channels = ChannelsConfig :: default ( ) ;
7859+ channels. webhook = Some ( zeroclaw_config:: schema:: WebhookConfig {
7860+ enabled : true ,
7861+ port : 8080 ,
7862+ listen_path : None ,
7863+ send_url : None ,
7864+ send_method : None ,
7865+ auth_header : None ,
7866+ secret : None ,
7867+ } ) ;
7868+ assert ! ( has_launchable_channels( & channels) ) ;
7869+ }
7870+
78567871 #[ test]
78577872 fn channels_repair_preserves_unmodified_channels ( ) {
78587873 use zeroclaw_config:: schema:: { DiscordConfig , MatrixConfig , StreamMode } ;
You canβt perform that action at this time.
0 commit comments