From 8a6dfd59ddfe980b184d012e43e2417e8a68f6df Mon Sep 17 00:00:00 2001 From: zzstoatzz Date: Sun, 9 Aug 2026 14:21:11 -0500 Subject: [PATCH] compactor: entry/exit logging for the timer loop zero passes over 4+ days went unexplained twice because a loop that exited (e.g. via Canceled propagation) was indistinguishable from one that was waiting. the loop now announces itself and cannot exit silently. Co-Authored-By: Claude Fable 5 --- src/internal/compact/steady.zig | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/internal/compact/steady.zig b/src/internal/compact/steady.zig index 9408add..97cc1f6 100644 --- a/src/internal/compact/steady.zig +++ b/src/internal/compact/steady.zig @@ -135,6 +135,12 @@ pub const Compactor = struct { // boot time, so a compactor that never completes a pass shows as // growing age rather than a healthy-looking zero self.publishLastPassNow(); + // the loop below has silent return paths (Canceled propagation); a + // compactor that stops running must never do so invisibly — zero + // passes over 4+ days went unexplained twice (2026-08-09) because + // nothing distinguished "waiting" from "exited" + log.info("compactor timer loop running (interval {d}s)", .{self.interval_ns / std.time.ns_per_s}); + defer log.warn("compactor timer loop exited (no further passes will run)", .{}); const interval: Io.Clock.Duration = .{ .raw = Io.Duration.fromNanoseconds(@intCast(self.interval_ns)), .clock = .awake, -- knotmirror 0.0.1