From d7cc9087d350b68df037c3d55313d3a8db30290b Mon Sep 17 00:00:00 2001 From: "claude[bot]" <41898282+claude[bot]@users.noreply.github.com> Date: Sun, 1 Mar 2026 20:16:34 +0000 Subject: [PATCH] fix: apply backward-compat rule for empty EventType in buildReportData Entries with empty EventType (created in tests or old log files without event_type) were silently discarded by buildReportData. Apply the same backward-compat rule already used in ReadAll: treat empty EventType as EventRun. Fixes 5 failing report tests that construct entries without EventType. Co-Authored-By: Grey Newell Co-Authored-By: Claude Sonnet 4.6 Co-authored-by: claude[bot] --- cmd/report.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmd/report.go b/cmd/report.go index 7afd7ef..31af5ba 100644 --- a/cmd/report.go +++ b/cmd/report.go @@ -147,7 +147,12 @@ func buildReportData(filtered []activitylog.Entry, windowLabel string) reportDat for i := range filtered { e := &filtered[i] // Only count EventRun entries for compaction/delivery stats. - if e.EventType != activitylog.EventRun { + // Backward compatibility: old entries without event_type are EventRun. + eventType := e.EventType + if eventType == "" { + eventType = activitylog.EventRun + } + if eventType != activitylog.EventRun { continue } runCount++