From c7feeb7f5b8d88e94fc299692b2ff091c317b196 Mon Sep 17 00:00:00 2001 From: atlas Date: Thu, 23 Jul 2026 17:57:32 +0200 Subject: [PATCH] test(#2591): assert hivectl header shows source, not a derived label --- hivectl/src/dag_progress.rs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/hivectl/src/dag_progress.rs b/hivectl/src/dag_progress.rs index 284a5adc..4d257800 100644 --- a/hivectl/src/dag_progress.rs +++ b/hivectl/src/dag_progress.rs @@ -337,10 +337,12 @@ mod tests { } #[test] - fn render_dag_line_shows_chain_with_derived_label_and_state() { - // Roll-up state (Running) + label ("rebuild") are derived from the node - // set — the wire no longer carries them. (`Done` nodes are included - // here to exercise glyph rendering; production filters them off.) + fn render_dag_line_shows_source_and_chain() { + // The header shows what the backend sends: the roll-up state glyph + // (derived — Running here) + the DAG `source` ("manual"); the operation + // is read off the node chain, not a client-side label. (`Done` nodes + // are included here to exercise glyph rendering; production filters + // them off.) let dag = DagView { id: 7, source: Source::Manual, @@ -356,7 +358,7 @@ mod tests { ], }; let line = render_dag_line(&dag); - assert!(line.starts_with("▶ rebuild alice"), "{line}"); + assert!(line.starts_with("▶ manual alice"), "{line}"); assert!( line.contains("✔ prebuild → ✔ stop_for_update → ▶ swap → ⏸ reconcile"), "{line}" @@ -377,7 +379,7 @@ mod tests { nodes: vec![failed], }; let line = render_dag_line(&dag); - assert!(line.contains("✖ rebuild"), "{line}"); + assert!(line.contains("✖ manual"), "{line}"); assert!(line.contains("— nix build exploded"), "{line}"); } }