diff --git a/hive-c0re/src/job_queue/tests.rs b/hive-c0re/src/job_queue/tests.rs index 6c8a0199..6adac2e9 100644 --- a/hive-c0re/src/job_queue/tests.rs +++ b/hive-c0re/src/job_queue/tests.rs @@ -679,7 +679,12 @@ fn failed_node_cancels_downstream_but_afterany_reconcile_runs() { assert_eq!(by_kind("stop_for_update"), State::Cancelled); assert_eq!(by_kind("swap"), State::Cancelled); assert_eq!(by_kind("post_swap"), State::Cancelled); - assert_eq!(by_kind("reconcile"), State::Done); + // The AfterAny reconcile ran (claimed + completed Ok above) → it's `Done`, + // and `Done` nodes are excluded from the wire, so it's absent here. + assert!( + dag.nodes.iter().all(|n| n.kind != "reconcile"), + "the completed (Done) reconcile is filtered off the wire" + ); assert_eq!( dag.nodes .iter() @@ -917,9 +922,12 @@ fn history_evicts_old_terminals_per_template() { ), ); let c = claim_one(&q); - // Completing the single work node rolls the container up terminal (its - // inline hook fires off the returned summary — no terminal-hook node). - q.complete_node(id, c.node_id, Ok(())); + // Fail the single work node so the DAG *lingers*: a fully-`Done` DAG + // drops off the wire entirely, but a `Failed` one is retained (+ + // history-capped) so the operator can still triage it. Completing the + // node rolls the container up terminal (its inline hook fires off the + // returned summary — no terminal-hook node). + q.complete_node(id, c.node_id, Err("boom".to_owned())); } // Fresh terminals are inside the grace window: nothing evicts yet, // so a ~1s QueueDag poller can still observe every terminal state