rename(#162): scrub remaining hm1nd references from comments and MCP instructions
All functional renames (MANAGER_NAME, MANAGER_AGENT → "root") were done in earlier commits. This cleans up the stale `hm1nd` strings that remained in doc comments, test fixture labels, and the manager MCP server instructions (which told the manager its config lived at /agents/hm1nd/config/agent.nix).
This commit is contained in:
parent
f9de183f4e
commit
ab278affc7
9 changed files with 16 additions and 16 deletions
|
|
@ -84,7 +84,7 @@ mod tests {
|
|||
#[test]
|
||||
fn build_map_filters_manager() {
|
||||
// Use MANAGER_NAME in the input so the assert below actually
|
||||
// exercises the filter path — a literal `"hm1nd"` would pass
|
||||
// exercises the filter path — a literal `"root"` would pass
|
||||
// trivially if the constant ever changed and the filter
|
||||
// silently became a no-op.
|
||||
let names: Vec<String> = ["iris", MANAGER_NAME, "argus"]
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ pub struct DashboardLink {
|
|||
pub struct ContainerView {
|
||||
/// Logical agent name (no `h-` prefix). Used in action URLs.
|
||||
pub name: String,
|
||||
/// Container name as nixos-container sees it (`h-foo`, `hm1nd`).
|
||||
/// Container name as nixos-container sees it (`h-foo`, `root`).
|
||||
pub container: String,
|
||||
pub is_manager: bool,
|
||||
pub port: u16,
|
||||
|
|
@ -273,7 +273,7 @@ fn read_status(name: &str) -> (Option<String>, Option<i64>) {
|
|||
/// the manager, the logical agent name otherwise — so callers can
|
||||
/// reuse the same string they used to look the agent up.
|
||||
pub async fn read_agent_status_live(name: &str) -> (Option<String>, Option<i64>, bool) {
|
||||
// The lifecycle helper wants the on-disk name (`hm1nd` for the
|
||||
// The lifecycle helper wants the on-disk name (`root` for the
|
||||
// manager, the bare logical name for sub-agents) and internally
|
||||
// adds the `h-` prefix. Map the broker-side `MANAGER_AGENT`
|
||||
// sentinel back to the lifecycle name here so callers don't have
|
||||
|
|
|
|||
|
|
@ -2561,7 +2561,7 @@ fn transient_label(k: crate::coordinator::TransientKind) -> &'static str {
|
|||
}
|
||||
|
||||
/// Convert either a logical name or a container name back to the logical
|
||||
/// name. Sub-agents are `h-foo` → `foo`; manager stays `hm1nd`.
|
||||
/// name. Sub-agents are `h-foo` → `foo`; manager stays `root`.
|
||||
fn strip_container_prefix(name: &str) -> String {
|
||||
name.strip_prefix(lifecycle::AGENT_PREFIX)
|
||||
.unwrap_or(name)
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@ async fn cmd_serve(
|
|||
tracing::warn!(error = ?e, "startup migration failed");
|
||||
}
|
||||
// Auto-create the manager container if it isn't there yet. Block
|
||||
// on this — without hm1nd the system has no manager harness.
|
||||
// on this — without root the system has no manager harness.
|
||||
// Failures are logged but allowed: a broken auto-spawn shouldn't
|
||||
// make the dashboard unreachable for debugging.
|
||||
if let Err(e) = auto_update::ensure_manager(&coord).await {
|
||||
|
|
|
|||
|
|
@ -951,7 +951,7 @@ fn handle_edit_schedule(
|
|||
}
|
||||
|
||||
/// Permission check for `CancelSchedule` on the manager surface.
|
||||
/// `requester` (always `hm1nd` here) can cancel its own schedules.
|
||||
/// `requester` (always `root` here) can cancel its own schedules.
|
||||
/// Sub-agent ownership is delegated to topology — see
|
||||
/// `crate::topology::is_descendant_of`. Also reused by
|
||||
/// `handle_fire_schedule_now` — fire-auth follows the same shape.
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ pub fn write_payload(agent: &str, host_path: &Path, message: &str) -> Result<(),
|
|||
/// under. Every agent sees its state at `/agents/<container>/state/`
|
||||
/// (see `lifecycle::set_nspawn_flags`). Auto-file paths use the same
|
||||
/// prefix so the round-trip is symmetric. The manager logical name
|
||||
/// maps to its container name (`hm1nd`) per `lifecycle::MANAGER_NAME`.
|
||||
/// maps to its container name (`root`) per `lifecycle::MANAGER_NAME`.
|
||||
#[must_use]
|
||||
pub fn container_state_prefix(agent: &str) -> String {
|
||||
if agent == hive_sh4re::MANAGER_AGENT {
|
||||
|
|
|
|||
Loading…
Reference in a new issue