From 025746b6748616a12420fe776ce4127958facd97 Mon Sep 17 00:00:00 2001 From: damocles Date: Mon, 1 Jun 2026 12:19:50 +0200 Subject: [PATCH] fix(#438): use QueueSource::AutoUpdate for StartupSweep parent, fix AutoUpdate doc --- hive-c0re/src/auto_update.rs | 2 +- hive-c0re/src/rebuild_queue.rs | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/hive-c0re/src/auto_update.rs b/hive-c0re/src/auto_update.rs index 4291809f..ead302ee 100644 --- a/hive-c0re/src/auto_update.rs +++ b/hive-c0re/src/auto_update.rs @@ -220,7 +220,7 @@ pub async fn run(coord: Arc) -> Result<()> { let sweep_id = coord.rebuild_queue.enqueue( crate::rebuild_queue::QueueKind::StartupSweep, "hyperhive".to_owned(), - crate::rebuild_queue::QueueSource::Manual, + crate::rebuild_queue::QueueSource::AutoUpdate, format!("startup sweep ({} containers)", containers.len()), None, ); diff --git a/hive-c0re/src/rebuild_queue.rs b/hive-c0re/src/rebuild_queue.rs index 85ee18ca..bb5b00fc 100644 --- a/hive-c0re/src/rebuild_queue.rs +++ b/hive-c0re/src/rebuild_queue.rs @@ -60,12 +60,16 @@ pub enum QueueSource { /// the originating meta-update. MetaUpdate, /// `auto_update::run` startup sweep — rebuild every container on - /// hive-c0re boot. Child rebuilds of a `StartupSweep` entry use - /// this source; the `parent_id` links them to the parent. + /// hive-c0re boot. Legacy flat source (no parent); replaced by + /// `StartupSweep` for the parent entry and child rebuilds once the + /// queue introduced `parent_id` grouping. Kept for wire compatibility + /// with entries logged before the migration. AutoUpdate, - /// Direct child of a `StartupSweep` queue entry. Same semantics - /// as `AutoUpdate` but carries the `parent_id` back-link so the - /// dashboard can render the sweep's per-agent rebuilds nested. + /// Direct child of a `StartupSweep` queue entry — one per agent in + /// the boot-time rebuild sweep. Carries `parent_id` back-link so + /// the dashboard renders the sweep's per-agent rebuilds nested under + /// the parent header. The parent entry itself uses `QueueSource::AutoUpdate` + /// (automated boot action, not operator-driven). StartupSweep, /// Crash recovery path (future use — currently no auto-rebuild on /// crash, but the variant exists for the imminent feature).