feat(#2591): auto-complete the DAG container + run terminal hooks inline

This commit is contained in:
atlas 2026-07-20 22:44:19 +02:00 committed by mara
commit 2294cd4516
4 changed files with 59 additions and 78 deletions

View file

@ -127,8 +127,10 @@ pub(super) async fn post_rebuild_queue_cancel(
State(state): State<AppState>,
AxumPath(id): AxumPath<u64>,
) -> Response {
let cancelled = state.coord.job_queue.cancel(id);
if cancelled {
if let Some(terminal) = state.coord.job_queue.cancel(id) {
// Fire the DAG's inline terminal hook (power-op intent revert / approval
// resolution) off the cancel roll-up, then surface the flip live.
crate::job_queue::exec::run_terminal_hook(&state.coord, &terminal).await;
state.coord.emit_rebuild_queue_snapshot();
axum::Json(serde_json::json!({"cancelled": true})).into_response()
} else {