From fa98d147bea7fd418357e8d8d9054460f8faab9e Mon Sep 17 00:00:00 2001 From: Cameron Cordes Date: Fri, 1 May 2026 17:14:09 +0000 Subject: [PATCH] library_maintenance: log orphan-gc decisions in stale-library path too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit run_orphan_gc returned early on the !all_online branch before the final debug/info log line, so the GC was effectively invisible whenever any library was Stale — exactly the dry-run scenario where operators most want to confirm the safety gate is firing. Add the same conditional log inside the early-return branch (plus a "deferred — at least one library Stale" hint in the info-level variant when there's something newly marked). No behavior change beyond observability. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/library_maintenance.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/library_maintenance.rs b/src/library_maintenance.rs index 4ba5d06..035bb8a 100644 --- a/src/library_maintenance.rs +++ b/src/library_maintenance.rs @@ -369,6 +369,19 @@ pub fn run_orphan_gc( } } state.prev_tick_all_online = false; + if stats.changed() { + info!( + "orphan-gc: marked {} new, revived {} (deferred — at least one library Stale; pending: {})", + stats.newly_marked, + stats.revived, + state.pending.len() + ); + } else { + debug!( + "orphan-gc: stale library, no changes (pending: {})", + state.pending.len() + ); + } return stats; }