wip(#3001): convert tests off the container id; drop Source + insert_group

The last of the DAG-container removal. `tests.rs` navigated by the id
`submit` returned, so removing the container removed the tests' way of
finding what they inserted; they name the roots they assert on now, which
is the same handle production uses.

Three findings the port surfaced, each a behaviour change rather than a
test fix:

- Cancelling a rebuild's head no longer drops the job. `Reconcile`'s edge
  accepts a skipped brace, and a cancel-cascade skips rather than cancels,
  so the tail stays claimable. Dropping a job means cancelling every id the
  insert returned.
- A directly-cancelled group root reads terminal while a spared tail still
  runs; the cancel used to land on a node above it, which rolled up
  Finishing instead.
- "One DAG per hive-wide op" is not expressible without a container. The
  three tests asserting it now assert that every named root is top-level,
  which is what makes the per-agent subgraphs concurrent.

Deletes two tests: one asserted only that two containers get distinct ids,
the other re-ran an existing case under a second name.

`Source`, `insert_group` and the stop path's `reason` string went dead with
the container and are removed with it.
This commit is contained in:
atlas 2026-08-04 19:31:33 +02:00 committed by mara
commit ddc017f01b
6 changed files with 273 additions and 275 deletions

View file

@ -94,7 +94,8 @@ pub(super) async fn post_kill(
// lease keeps it from racing an in-flight rebuild for the same
// agent, and per-node progress surfaces on the queue snapshot.
if let Err(e) =
crate::job_queue::power::stop_many(&state.coord, &[logical.clone()], true).await
crate::job_queue::power::stop_many(&state.coord, std::slice::from_ref(&logical), true)
.await
{
tracing::error!(agent = %logical, error = ?e, "graceful stop: insert failed");
}
@ -111,7 +112,8 @@ pub(super) async fn post_kill(
// 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
crate::job_queue::power::stop_many(&state.coord, std::slice::from_ref(&logical), false)
.await
{
tracing::error!(agent = %logical, error = ?e, "stop: insert failed");
}
@ -146,15 +148,20 @@ pub(super) async fn post_restart(
return reject;
}
if params.graceful {
if let Err(e) =
crate::job_queue::power::restart_many(&state.coord, &[logical.clone()], true).await
if let Err(e) = crate::job_queue::power::restart_many(
&state.coord,
std::slice::from_ref(&logical),
true,
)
.await
{
tracing::error!(agent = %logical, error = ?e, "graceful restart: insert failed");
}
return (StatusCode::OK, "ok").into_response();
}
if let Err(e) =
crate::job_queue::power::restart_many(&state.coord, &[logical.clone()], false).await
crate::job_queue::power::restart_many(&state.coord, std::slice::from_ref(&logical), false)
.await
{
tracing::error!(agent = %logical, error = ?e, "restart: insert failed");
}
@ -219,7 +226,9 @@ pub(super) async fn post_start(
return (StatusCode::OK, "ok").into_response();
}
}
if let Err(e) = crate::job_queue::power::start_many(&state.coord, &[logical.clone()]).await {
if let Err(e) =
crate::job_queue::power::start_many(&state.coord, std::slice::from_ref(&logical)).await
{
tracing::error!(agent = %logical, error = ?e, "start: insert failed");
}
(StatusCode::OK, "ok").into_response()