From e7a5718e83c022296feff8d52a348010450e3d6d Mon Sep 17 00:00:00 2001 From: damocles Date: Mon, 1 Jun 2026 16:44:53 +0200 Subject: [PATCH] fix(947): strip prose/issue-tags from agent_sockets.rs --- hive-c0re/src/agent_sockets.rs | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/hive-c0re/src/agent_sockets.rs b/hive-c0re/src/agent_sockets.rs index 99cdae1d..9a715f36 100644 --- a/hive-c0re/src/agent_sockets.rs +++ b/hive-c0re/src/agent_sockets.rs @@ -1,8 +1,8 @@ //! `/var/lib/hyperhive/agent-sockets.json` writer. Sibling to //! `agent_ports.rs`; same atomic `.tmp` + `rename()` shape so -//! the gateway's nginx worker never reads a partial file. Manager -//! excluded from the map (manager UI routes via the dashboard -//! upstream, not per-agent `/agent//`). +//! the gateway's nginx worker never reads a partial file. Includes +//! manager and sub-agents so the gateway can route +//! `/agent//` for all containers with a bound unix socket. //! //! Full mechanism — per-agent subdir bind-mount, `hyperhive-socket-bound` //! marker gate, gateway UDS upstream, transition vs `agent-ports.json`, @@ -38,7 +38,7 @@ pub const SOCKET_FILENAME: &str = "web.sock"; /// sub-agent that hasn't flipped the option yet. /// /// Renamed from `.bound` (legacy) to match the `hyperhive-` prefix -/// convention for all harness-written state files (#838). `build_map` +/// convention for all harness-written state files. `build_map` /// checks both names during the transition window so existing containers /// don't lose gateway routing before their next rebuild. pub const READY_MARKER: &str = "hyperhive-socket-bound"; @@ -67,11 +67,9 @@ pub fn socket_path_for(name: &str) -> PathBuf { } /// Compute the agent-socket map for the given logical agent names. -/// Includes manager and sub-agents — all managed containers that have -/// bound a unix socket get an entry. Filters by `READY_MARKER` presence: -/// only agents whose -/// harness has actually bound the unix socket (and dropped the -/// marker) appear in the map. Without this, the gateway would +/// Includes manager and sub-agents. Filters by `READY_MARKER` +/// presence: only agents whose harness has actually bound the unix +/// socket appear in the map. Without this, the gateway would /// `proxy_pass` to a non-existent socket for every sub-agent that /// hasn't yet flipped `hyperhive.web.useUnixSocket = true`. /// @@ -238,11 +236,6 @@ mod tests { #[test] fn build_map_includes_manager() { - // Manager is now included in the gateway socket map so the - // gateway can route `/agent//` to its unix socket, - // giving the operator access to the manager's per-agent web UI - // (terminal, inbox, stats). All-ready predicate bypasses the - // marker check so we exercise the manager inclusion in isolation. let names: Vec = ["iris", MANAGER_NAME, "argus"] .iter() .map(|s| (*s).to_owned()) @@ -339,3 +332,4 @@ mod tests { assert!(body.contains("\"/run/hive-agent/iris/web.sock\"")); } } +