Repository navigation
Lite's daily-summary retention horizon starts at the first whole month the archive cleanup keeps, not at the cutoff day - #3984
Merged
Conversation
…h the archive cleanup keeps, not at the cutoff day The cleanup deletes an archive file whole once the month it is named for falls before the cutoff, so the days between the cutoff and the next month start are gone with it. DailySummaryRetentionHorizon returned the cutoff day, which judged those days as retained with no data instead of purged, and published a retention_horizon up to a month earlier than Lite's history. It now returns RetentionService.OldestRetainedInstant, the instant #3975 gave the Overview freshness band. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GdmA4ND1wLSqA91ax1m4xv
erikdarlingdata
enabled auto-merge (squash)
September 23, 2026 03:07
erikdarlingdata
deleted the
fix/lite-daily-summary-horizon-month-start
branch
September 23, 2026 03:14
erikdarlingdata
added a commit
that referenced
this pull request
Sep 23, 2026
…3920, #3927, #3931, #3932, #3940, #3942, #3946, #3947, #3950, #3952, #3955, #3956, #3957, #3964, #3965, #3966, #3968, #3972, #3975, #3979, #3980, #3981, #3983, #3984, #3985) (#3989) The wave's fix PRs deliberately carried no CHANGELOG edits (parallel-agent hot-spot protocol); each agent reported its entry and this commit lands them together, byte-verified against origin/dev. Claude-Session: https://claude.ai/code/session_01GdmA4ND1wLSqA91ax1m4xv Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #3975 (#3967). Lite's daily-summary retention horizon now starts where Lite's history actually starts.
The defect
LocalDataService.DailySummaryRetentionHorizonreturned the archive retention's cutoff day: today minusArchiveRetentionMonths, for example 2026-06-18 on 2026-09-18. The archive cleanup doesn't delete at that day, though. It deletes a file whole once the month the file is named for falls before the cutoff. On 2026-09-18 the June file goes, and with it every row from June 18 to June 30. Those days sat on the retained side of the horizon, soget_daily_summary/get_daily_summary_rangejudged them as days inside retention that simply had no data, instead ofpurged, and published aretention_horizonabout two weeks earlier than the data really goes back.#3975 already added
RetentionService.OldestRetainedInstantfor this: the first month start at or after the cutoff. It gave the Overview freshness band that instant. The daily summary was the one reader still using the raw cutoff.The fix
DailySummaryRetentionHorizonreturnsRetentionService.OldestRetainedInstant(utcNow), so both Lite surfaces agree on when the history ends. The doc comment explains why the horizon is not the cutoff. This is Lite only: Darling's horizons are per-signal and day-based (DailySummaryRetention.HorizonFor) and have no whole-month file deletion.Test plan
TheLiteHorizon_IsTheArchiveRetention_InMonths_FromTheFirstWholeMonthKept: a mid-month clock (2026-09-18) gets 2026-07-01, and equalsOldestRetainedInstant. A month-start clock (2026-09-01) keeps its own month (2026-06-01). The old code returned 2026-06-18 for the first case.McpPageContractTests,DarkPastRetentionReadsOfflineToolTests,FindingsRetentionHorizonPinTests,PerformanceCalendarDataTests: 32/32.Lite.Tests: 5,147 run, 0 failed.🤖 Generated with Claude Code
https://claude.ai/code/session_01GdmA4ND1wLSqA91ax1m4xv