From 1726ad3bad940079bea4044a5d2fcfc09812ebe4 Mon Sep 17 00:00:00 2001 From: atlas Date: Fri, 9 Oct 2026 15:55:27 +0200 Subject: [PATCH] hive-c0re: bound the forge readiness probe wait_until_ready only checked READY_TIMEOUT between polls, so a half-open forge hung the first get_version forever. The probe now goes through forge::bounded; a timeout counts as not-ready and falls into the existing retry/deadline path. --- hive-c0re/src/forge/mod.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hive-c0re/src/forge/mod.rs b/hive-c0re/src/forge/mod.rs index ed84f5ab..23c47949 100644 --- a/hive-c0re/src/forge/mod.rs +++ b/hive-c0re/src/forge/mod.rs @@ -197,8 +197,8 @@ pub(crate) fn api(token: &str) -> Result { } /// Upper bound on one Forgejo API request. `forgejo-api` takes no -/// caller-built client, so the request itself has no timeout; every call -/// through [`api`] is wrapped in [`bounded`]. +/// caller-built client, so the request itself has no timeout; every request +/// in this module is wrapped in [`bounded`]. const API_TIMEOUT: Duration = Duration::from_secs(10); /// Await one Forgejo API request for at most [`API_TIMEOUT`]. @@ -359,7 +359,10 @@ async fn wait_until_ready() -> bool { let deadline = Instant::now() + READY_TIMEOUT; let mut waited = false; loop { - if client.get_version().await.is_ok() { + if bounded("forge readiness probe", client.get_version()) + .await + .is_ok_and(|probe| probe.is_ok()) + { if waited { tracing::info!("forge: endpoint ready, proceeding with provisioning"); }