From e59a2a34fb24876c7aad2a3b73f649dc00aba4e5 Mon Sep 17 00:00:00 2001 From: atlas Date: Fri, 16 Oct 2026 09:34:51 +0200 Subject: [PATCH] hive-c0re: spawn the auto-update and knowledge git calls through git_command Three git spawns in workers/auto_update.rs and workers/knowledge.rs used a bare tokio Command, so they ignored HYPERHIVE_GIT and, when the job queue's deadline dropped their future (the knowledge pull has a 5 minute one), the git child was left running instead of killed. They now use lifecycle::git_command(), as the other git calls in knowledge.rs already do. --- hive-c0re/src/workers/auto_update.rs | 2 +- hive-c0re/src/workers/knowledge.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hive-c0re/src/workers/auto_update.rs b/hive-c0re/src/workers/auto_update.rs index d4661870..b02305b8 100644 --- a/hive-c0re/src/workers/auto_update.rs +++ b/hive-c0re/src/workers/auto_update.rs @@ -51,7 +51,7 @@ pub fn current_flake_rev(hyperhive_flake: &str) -> Option { /// starved the runtime and stalled the per-agent sockets. pub async fn agent_config_pending(name: &str, deployed_sha: Option<&str>) -> bool { let applied = crate::paths::applied_dir(name); - let applied_head = tokio::process::Command::new("git") + let applied_head = crate::lifecycle::git_command() .args(["-C", &applied.to_string_lossy(), "rev-parse", "HEAD"]) .output() .await diff --git a/hive-c0re/src/workers/knowledge.rs b/hive-c0re/src/workers/knowledge.rs index bdccebe2..e57e8cb8 100644 --- a/hive-c0re/src/workers/knowledge.rs +++ b/hive-c0re/src/workers/knowledge.rs @@ -72,7 +72,7 @@ async fn ensure_local_clone(auth: Option<&str>) -> Result<()> { /// failure (used only to detect whether a pull actually moved `HEAD` — /// worth skipping the broadcast over, not worth failing the pull for). async fn head_sha() -> Option { - let out = tokio::process::Command::new("git") + let out = crate::lifecycle::git_command() .args(["-C", LOCAL_DIR, "rev-parse", "HEAD"]) .output() .await @@ -186,7 +186,7 @@ pub async fn pull(coord: &Coordinator) -> Result<()> { /// summary to every live agent. Best-effort — a diff or send failure is /// logged, never propagated (the pull itself already succeeded). async fn broadcast_change(coord: &Coordinator, before: &str, after: &str) { - let diff = tokio::process::Command::new("git") + let diff = crate::lifecycle::git_command() .args([ "-C", LOCAL_DIR,