feat(#1014): rename manager agent root→ruth across all crates + frontend
This commit is contained in:
parent
0c5760b0da
commit
89665b94de
19 changed files with 71 additions and 166 deletions
|
|
@ -156,13 +156,16 @@ pub async fn rebuild_agent(
|
|||
}
|
||||
|
||||
/// Auto-create the manager container on startup if it isn't already there.
|
||||
/// hive-c0re manages `root` end-to-end: operators no
|
||||
/// longer declare `containers.root` in their host NixOS config. Bypasses
|
||||
/// hive-c0re manages `ruth` end-to-end: operators no
|
||||
/// longer declare `containers.h-ruth` in their host NixOS config. Bypasses
|
||||
/// the approval queue — manager is required infrastructure. Idempotent.
|
||||
pub async fn ensure_manager(coord: &Arc<Coordinator>) -> Result<()> {
|
||||
let existing = lifecycle::list().await.unwrap_or_default();
|
||||
let current_rev = current_flake_rev(&coord.hyperhive_flake);
|
||||
if existing.iter().any(|c| c == MANAGER_NAME) {
|
||||
if existing
|
||||
.iter()
|
||||
.any(|c| c.strip_prefix(AGENT_PREFIX) == Some(MANAGER_NAME))
|
||||
{
|
||||
// Container exists already. If it predates the unified lifecycle
|
||||
// (no applied flake on disk) we must rebuild — otherwise it's
|
||||
// running whatever the host-declarative config was at create
|
||||
|
|
@ -285,13 +288,7 @@ pub async fn run(coord: Arc<Coordinator>) -> Result<()> {
|
|||
// the topology file sort last (stable, alphabetical within tier).
|
||||
let mut logical_names: Vec<String> = containers
|
||||
.iter()
|
||||
.filter_map(|c| {
|
||||
if c == MANAGER_NAME {
|
||||
Some(MANAGER_NAME.to_owned())
|
||||
} else {
|
||||
c.strip_prefix(AGENT_PREFIX).map(str::to_owned)
|
||||
}
|
||||
})
|
||||
.filter_map(|c| c.strip_prefix(AGENT_PREFIX).map(str::to_owned))
|
||||
.collect();
|
||||
let topo = crate::topology::read();
|
||||
topology_sort(&mut logical_names, &topo);
|
||||
|
|
|
|||
Loading…
Reference in a new issue