feat(#2302): thread &Ident through agent path builders
This commit is contained in:
parent
1286029947
commit
bf644cc126
23 changed files with 168 additions and 85 deletions
|
|
@ -66,7 +66,12 @@ pub(super) fn gc_orphans(coord: &Coordinator, approvals: Vec<Approval>) -> Vec<A
|
|||
) {
|
||||
return true;
|
||||
}
|
||||
if Coordinator::agent_proposed_dir(&a.agent).exists() {
|
||||
let Ok(agent) = hive_host_sock::Ident::parse(&a.agent) else {
|
||||
let _ = coord.approvals.mark_failed(a.id, "invalid agent name");
|
||||
tracing::warn!(id = a.id, agent = %a.agent, "auto-failed approval with invalid agent name");
|
||||
return false;
|
||||
};
|
||||
if Coordinator::agent_proposed_dir(&agent).exists() {
|
||||
true
|
||||
} else {
|
||||
let note = "agent state dir missing";
|
||||
|
|
|
|||
Loading…
Reference in a new issue