diff --git a/hive-c0re/src/forge.rs b/hive-c0re/src/forge.rs index 05c23029..286d591f 100644 --- a/hive-c0re/src/forge.rs +++ b/hive-c0re/src/forge.rs @@ -14,7 +14,7 @@ use tokio::process::Command; use crate::coordinator::Coordinator; const FORGE_CONTAINER: &str = "hive-forge"; -const FORGE_HTTP: &str = "http://localhost:3000"; +pub(crate) const FORGE_HTTP: &str = "http://localhost:3000"; const TOKEN_NAME_PREFIX: &str = "hyperhive"; /// Where the host-side `core` admin token lives. Used by hive-c0re /// itself to push the meta repo + drive admin API calls (org diff --git a/hive-c0re/src/knowledge.rs b/hive-c0re/src/knowledge.rs index 9701ec56..de229d0a 100644 --- a/hive-c0re/src/knowledge.rs +++ b/hive-c0re/src/knowledge.rs @@ -145,7 +145,6 @@ async fn seed_readme(core_token: &str) -> Result<()> { /// Called at startup alongside [`ensure_local_clone`]. No-op when the /// core token is absent (forge not yet provisioned). pub async fn ensure_webhook(core_token: &str, dashboard_port: u16) -> Result<()> { - const FORGE_HTTP: &str = "http://localhost:3000"; let target_url = format!("http://127.0.0.1:{dashboard_port}/webhook/knowledge"); let client = reqwest::Client::builder() .timeout(std::time::Duration::from_secs(10)) @@ -153,7 +152,7 @@ pub async fn ensure_webhook(core_token: &str, dashboard_port: u16) -> Result<()> .context("build reqwest client for webhook setup")?; // List existing hooks — skip creation if ours is already there. - let list_url = format!("{FORGE_HTTP}/api/v1/repos/{ORG}/{REPO}/hooks"); + let list_url = format!("{}/api/v1/repos/{ORG}/{REPO}/hooks", crate::forge::FORGE_HTTP); let resp = client .get(&list_url) .header("Authorization", format!("token {core_token}")) @@ -175,7 +174,7 @@ pub async fn ensure_webhook(core_token: &str, dashboard_port: u16) -> Result<()> } // Create the webhook. - let create_url = format!("{FORGE_HTTP}/api/v1/repos/{ORG}/{REPO}/hooks"); + let create_url = format!("{}/api/v1/repos/{ORG}/{REPO}/hooks", crate::forge::FORGE_HTTP); let body = serde_json::json!({ "type": "forgejo", "config": { diff --git a/hive-c0re/src/main.rs b/hive-c0re/src/main.rs index 751db452..07b5aed2 100644 --- a/hive-c0re/src/main.rs +++ b/hive-c0re/src/main.rs @@ -280,7 +280,7 @@ async fn cmd_serve( let mut knowledge_shutdown = coord.shutdown_rx(); tokio::spawn(async move { // Initial pull — reconcile any commits that landed while c0re - // was offline, including the push that triggered #1244. + // was offline. if let Err(e) = knowledge::pull().await { tracing::debug!(error = ?e, "knowledge: startup pull skipped (no clone yet?)"); }