From eb9e1fa1275fbb50409c6e074f91491cba4a1249 Mon Sep 17 00:00:00 2001 From: Nicolas De Loof Date: Tue, 22 Sep 2026 11:09:36 +0200 Subject: [PATCH] docs(logs): why a timestampless exit is dropped, not patched MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Review finding on runEndTracker.Observe: recording nothing for an exit event without a timestamp is the deliberate choice — the anchor is evaluated by the daemon against its own log clock, so substituting the local clock would introduce real skew mis-anchoring to paper over a hypothetical daemon quirk, while dropping only degrades that container to the pre-tracker fallback. Signed-off-by: Nicolas De Loof --- pkg/compose/logs.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkg/compose/logs.go b/pkg/compose/logs.go index 2836dea15..1e5966ef9 100644 --- a/pkg/compose/logs.go +++ b/pkg/compose/logs.go @@ -164,7 +164,14 @@ func newRunEndTracker() *runEndTracker { return &runEndTracker{ends: map[string]int64{}} } -// Observe records exit events (other event types are ignored). +// Observe records exit events (other event types are ignored). An exit +// carrying no timestamp is deliberately dropped rather than patched with the +// local clock: the anchor is compared by the DAEMON against its own +// container-log timestamps, so substituting our clock would trade a +// hypothetical daemon quirk for real clock-skew mis-anchoring. Dropping it +// merely degrades that container to the logsSinceLastRun fallback — the +// exact pre-tracker behavior, imperfect only for a run fast enough to have +// finished again by inspection time. func (t *runEndTracker) Observe(e api.ContainerEvent) { if e.Type != api.ContainerEventExited || e.Time == 0 { return