fix: address argus review yellows on #1158
- restore count in get_loose_ends: 'N local task(s):' instead of bare 'local task(s):' - add cross-crate coupling comment to both mcp_loose_ends_dir() copies - add comment in hive-bash-daemon service env explaining HYPERHIVE_HARNESS_DIR is already injected via systemd.globalEnvironment by the meta flake
This commit is contained in:
parent
8731474104
commit
f87a52f28f
4 changed files with 17 additions and 1 deletions
|
|
@ -743,7 +743,8 @@ impl AgentServer {
|
|||
let mcp_items = crate::mcp_loose_ends::collect();
|
||||
if !mcp_items.is_empty() {
|
||||
use std::fmt::Write as _;
|
||||
let _ = write!(out, "\n\nlocal task(s):");
|
||||
let n = mcp_items.len();
|
||||
let _ = write!(out, "\n\n{n} local task(s):");
|
||||
for item in &mcp_items {
|
||||
let _ = write!(out, "\n- {item}");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,6 +10,9 @@
|
|||
|
||||
use std::path::PathBuf;
|
||||
|
||||
/// NOTE: the base-dir resolution logic here is intentionally mirrored in
|
||||
/// `hive-bash-mcp/src/paths.rs::mcp_loose_ends_dir()`. They can't share
|
||||
/// code across crates — keep them in sync if the fallback logic changes.
|
||||
fn loose_ends_dir() -> PathBuf {
|
||||
let base = if let Some(p) = std::env::var_os("HYPERHIVE_HARNESS_DIR") {
|
||||
PathBuf::from(p)
|
||||
|
|
|
|||
|
|
@ -51,6 +51,10 @@ pub fn hyperhive_socket() -> PathBuf {
|
|||
/// Directory where MCP daemons write loose-end summary files for the harness.
|
||||
/// Each daemon writes `<name>.json` here; the harness scans the dir in
|
||||
/// `get_loose_ends` to surface active work from all MCPs generically.
|
||||
///
|
||||
/// NOTE: the base-dir resolution logic here is intentionally mirrored in
|
||||
/// `hive-ag3nt/src/mcp_loose_ends.rs::loose_ends_dir()`. They can't share
|
||||
/// code across crates — keep them in sync if the fallback logic changes.
|
||||
#[must_use]
|
||||
pub fn mcp_loose_ends_dir() -> PathBuf {
|
||||
let base = if let Some(p) = std::env::var_os("HYPERHIVE_HARNESS_DIR") {
|
||||
|
|
|
|||
|
|
@ -1130,6 +1130,14 @@ in
|
|||
HIVE_BASH_SOCKET = "/run/hive-bash/socket";
|
||||
HIVE_CONTROL_SOCKET = "/run/hive/mcp.sock";
|
||||
RUST_LOG = "info";
|
||||
# HYPERHIVE_HARNESS_DIR and HYPERHIVE_STATE_DIR are already
|
||||
# injected via systemd.globalEnvironment by the meta flake
|
||||
# (set to /agents/<name>/harness and /agents/<name>/state
|
||||
# respectively). Listed here for explicitness — the daemon
|
||||
# uses these to derive its task + loose-ends dir paths.
|
||||
# Without them the daemon falls back to deriving harness/ as a
|
||||
# sibling of state/, which produces the same value but is
|
||||
# less robust if the two vars ever diverge.
|
||||
};
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.hyperhive}/bin/hive-bash-daemon";
|
||||
|
|
|
|||
Loading…
Reference in a new issue