From 0ab6b764be417942282c9ddcf4eb2b90caac3b9b Mon Sep 17 00:00:00 2001 From: atlas Date: Mon, 20 Jul 2026 23:27:33 +0200 Subject: [PATCH] docs(#2591): fix stale Claim.agent doc + explain cancel's container roll-up (argus review) --- hive-c0re/src/job_queue/mod.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/hive-c0re/src/job_queue/mod.rs b/hive-c0re/src/job_queue/mod.rs index 1b9fb040..e2068cb7 100644 --- a/hive-c0re/src/job_queue/mod.rs +++ b/hive-c0re/src/job_queue/mod.rs @@ -71,7 +71,7 @@ pub struct Claim { pub node_id: NodeId, pub kind: NodeKind, /// The agent this node targets (its own, not a DAG-level field). Empty for - /// the internal [`NodeKind::Finalize`] node. + /// the agentless [`NodeKind::MetaLock`] + [`NodeKind::Dag`] container nodes. pub agent: String, pub template: Template, pub approval_id: Option, @@ -452,8 +452,12 @@ impl JobQueue { for id in work { inner.sched.cancel_node(id); } - // Roll the container up so the DAG reaches a terminal state (all children - // now `Cancelled`); `dag_rollup` reports `Cancelled` to the wire. + // The container was settled to `Finishing` at submit; completing it again + // now re-runs the roll-up with its children all `Cancelled`, driving it to + // a terminal state synchronously within this lock — so the caller reads + // the terminal summary immediately instead of waiting for the scheduler + // loop to observe the cancellation. `dag_rollup` reports `Cancelled` to + // the wire (a container whose children all cancelled). inner.sched.complete(container, Outcome::Done); let terminal = inner.terminal_dag(container); drop(inner);