rename(162): role badge manager -> root, update hm1nd comment

This commit is contained in:
damocles 2026-06-01 16:59:27 +02:00 committed by mara
commit 4c2398a38e

View file

@ -23,7 +23,7 @@ pub fn start(coord: Arc<Coordinator>) -> Result<()> {
}
let listener = UnixListener::bind(&socket)
.with_context(|| format!("bind manager socket {}", socket.display()))?;
// 0666 so the in-container hm1nd user (non-root) can connect;
// 0666 so the in-container root user (non-root) can connect;
// the bind source dir is manager-only on host. See agent_server.rs.
use std::os::unix::fs::PermissionsExt as _;
std::fs::set_permissions(&socket, std::fs::Permissions::from_mode(0o666))
@ -404,11 +404,9 @@ async fn dispatch(req: &ManagerRequest, coord: &Arc<Coordinator>) -> ManagerResp
let n = lines.unwrap_or(50);
// `journalctl -M` wants the *machine* name, not the
// logical agent name: `gui` → `h-gui`. `container_name`
// does that and passes `hm1nd` through unprefixed — but
// it doesn't know the broker-logical manager name
// `"manager"` (it'd wrongly produce `h-manager`), so
// handle that alias explicitly. Either manager spelling
// resolves to the unprefixed `hm1nd` machine.
// does that and passes the manager name through unprefixed.
// The explicit check here keeps parity with the MANAGER_AGENT
// constant so the two never diverge.
let machine = if agent == MANAGER_AGENT {
crate::lifecycle::MANAGER_NAME.to_owned()
} else {
@ -541,7 +539,7 @@ async fn dispatch(req: &ManagerRequest, coord: &Arc<Coordinator>) -> ManagerResp
let (status_text, status_set_at, running) =
crate::container_view::read_agent_status_live(target).await;
let role = if target == MANAGER_AGENT {
"manager"
"root"
} else {
"agent"
}