library_maintenance: log orphan-gc decisions in stale-library path too

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) <noreply@anthropic.com>
This commit is contained in:
Cameron Cordes
2026-05-01 17:14:09 +00:00
parent 5f247be1f1
commit fa98d147be

View File

@@ -369,6 +369,19 @@ pub fn run_orphan_gc(
} }
} }
state.prev_tick_all_online = false; 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; return stats;
} }