wip(#3001): power chains name their group roots

The `*_many` entry points returned `insert_job`'s result while their closures
ended in `Vec::new()` — naming nothing, so the returned id list was always
empty. `queued_dags` would have shipped `Some([])` and hivectl's wait loop would
have had nothing to poll. Silent: it compiles, the op still runs, and no test in
isolation looks.

Each `*_chain` now returns its group root's guid and the `*_nodes` collectors
gather them, so the ids a caller gets back are the roots it can actually wait on.

`start_chain` returns *four* in the stale branch, not one: `rebuild_nodes`
chains its roots behind `SetWanted` with `after_ok` rather than nesting them
under it, so `SetWanted` rolls up only itself. Naming it alone would have
reported the start complete while the rebuild was still running — the same
under-reporting bug one level down.
This commit is contained in:
atlas 2026-08-04 17:54:28 +02:00 committed by mara
commit 02e916feee
2 changed files with 89 additions and 37 deletions

View file

@ -110,7 +110,8 @@ pub(super) async fn post_kill(
// `socket_server.rs::Request::Kill` stays in place: a
// manager calling Kill on its own container is self-suicide
// mid-call, not a legitimate operator action.
if let Err(e) = crate::job_queue::power::stop_many(&state.coord, &[logical.clone()], false).await
if let Err(e) =
crate::job_queue::power::stop_many(&state.coord, &[logical.clone()], false).await
{
tracing::error!(agent = %logical, error = ?e, "stop: insert failed");
}