huskies: merge 1132 story Chat-bot proxy reads stale gateway_project_urls BTreeMap instead of live store (1122 missed this seam)

This commit is contained in:
dave
2026-05-18 00:02:37 +00:00
parent ec3216072d
commit 70797753df
8 changed files with 88 additions and 58 deletions
@@ -265,7 +265,18 @@ pub(in crate::chat::transport::matrix::bot) async fn on_room_message(
// `all_status` — aggregate pipeline status across all projects (gateway-only).
if cmd == "all_status" {
let project_urls = ctx.gateway_project_urls.clone();
let project_urls: std::collections::BTreeMap<String, String> = if let Some(ref store) =
ctx.gateway_projects_store
{
store
.read()
.await
.iter()
.filter_map(|(name, entry)| entry.url.clone().map(|url| (name.clone(), url)))
.collect()
} else {
std::collections::BTreeMap::new()
};
let client = reqwest::Client::new();
let statuses =
crate::gateway::fetch_all_project_pipeline_statuses(&project_urls, &client).await;