feat(#1014): rename manager agent root→ruth across all crates + frontend

This commit is contained in:
damocles 2026-06-02 17:02:01 +02:00 committed by mara
commit 89665b94de
19 changed files with 71 additions and 166 deletions

View file

@ -1178,11 +1178,7 @@ async fn get_journal(
// Validate the container name against the list of managed
// containers so we don't shell out with arbitrary input.
let container = strip_container_prefix(&name);
let prefixed = if container == lifecycle::MANAGER_NAME {
container.clone()
} else {
format!("{}{container}", lifecycle::AGENT_PREFIX)
};
let prefixed = format!("{}{container}", lifecycle::AGENT_PREFIX);
let live = lifecycle::list().await.unwrap_or_default();
if !live.iter().any(|c| c == &prefixed) {
return error_response(&format!("journal: no managed container {prefixed:?}"));
@ -2285,9 +2281,6 @@ async fn post_purge_tombstone(
if let Some(reason) = validate_agent_name(&name) {
return (StatusCode::BAD_REQUEST, format!("bad agent name: {reason}")).into_response();
}
if name == lifecycle::MANAGER_NAME {
return error_response("refusing to purge the manager's state");
}
// Sanity: refuse to purge if a live container still exists with this
// name. The dashboard already filters tombstones to non-live names,
// but the operator could send a stale POST.
@ -2755,11 +2748,8 @@ async fn post_start(State(state): State<AppState>, AxumPath(name): AxumPath<Stri
async fn post_update_all(State(state): State<AppState>) -> Response {
let containers = lifecycle::list().await.unwrap_or_default();
for container in containers {
let logical = if container == lifecycle::MANAGER_NAME {
lifecycle::MANAGER_NAME.to_owned()
} else if let Some(n) = container.strip_prefix(lifecycle::AGENT_PREFIX) {
n.to_owned()
} else {
let Some(logical) = container.strip_prefix(lifecycle::AGENT_PREFIX).map(str::to_owned)
else {
continue;
};
state.coord.rebuild_queue.enqueue(