hive-c0re: let request_init_config spawn a brand-new sub-agent under its requester
This commit is contained in:
parent
63a79d76ba
commit
b3d002e4a7
8 changed files with 254 additions and 23 deletions
|
|
@ -1403,4 +1403,21 @@ impl Coordinator {
|
|||
out.sort();
|
||||
out
|
||||
}
|
||||
|
||||
/// Agents that have an operator-approved proposed config repo but
|
||||
/// were never deployed — proposed `.git` exists, applied `.git` does
|
||||
/// not. Their `topology.json` parent edge (written at `InitConfig`
|
||||
/// approval) must survive `topology::reconcile` until the first
|
||||
/// apply-commit spawns the container. Distinct from tombstones,
|
||||
/// which have an applied repo from a prior deploy.
|
||||
#[must_use]
|
||||
pub fn pending_init_names() -> Vec<String> {
|
||||
Self::kept_state_names()
|
||||
.into_iter()
|
||||
.filter(|n| {
|
||||
Self::agent_proposed_dir(n).join(".git").exists()
|
||||
&& !Self::agent_applied_dir(n).join(".git").exists()
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue