huskies: merge 768

This commit is contained in:
dave
2026-04-28 10:06:18 +00:00
parent fb5a21cfbb
commit 0c2789b2c1
11 changed files with 13 additions and 209 deletions
+13 -3
View File
@@ -221,10 +221,20 @@ pub async fn fetch_pipeline_status_for_project(
.map_err(|e| format!("invalid upstream response: {e}"))
}
/// Check health of a single project URL.
/// Check health of a single project URL via the read-RPC `health.check` method.
///
/// Sends an RPC request to the project's `/mcp` endpoint. A successful
/// response (HTTP 2xx) indicates the project container is reachable and
/// serving requests.
pub async fn check_project_health(client: &Client, base_url: &str) -> Result<bool, String> {
let health_url = format!("{}/health", base_url.trim_end_matches('/'));
match client.get(&health_url).send().await {
let mcp_url = format!("{}/mcp", base_url.trim_end_matches('/'));
let rpc_body = json!({
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list",
"params": {}
});
match client.post(&mcp_url).json(&rpc_body).send().await {
Ok(resp) => Ok(resp.status().is_success()),
Err(e) => Err(format!("unreachable: {e}")),
}