Skip to content

fix(daily-cache): ranged parses never write days outside their range - #1131

Merged
iamtoruk merged 1 commit into
mainfrom
fix/1130-range-filter
Aug 24, 2026
Merged

iamtoruk merged 1 commit into
mainfrom
fix/1130-range-filter

Conversation

@iamtoruk

Copy link
Copy Markdown
Member

Closes #1130 part 1 (part 2 — the cache-version bump — already shipped via #1118's v29). A midnight-straddling turn survives range slicing with its original anchor, so aggregateProjectsIntoDays can emit a residue day outside the parsed range; #1129's merge guards defuse the overwrite, but the residue should never reach durable history at all. daysInRange filters at both ranged call sites (re-derive + gap); aggregator and slicer untouched — whole-corpus callers unaffected. New test: a gap over D+1 with a straddler anchored on D writes nothing to D (persisted entry compares equal before/after hydration). Implementation by Kimi Code from the diagnosis spec; suite 3,286 green + tsc clean re-run by maintainer.

A turn anchored before the range start survives range slicing whole, so
the aggregator can emit a residue day the parse never covered (#1130,
found in #1127's root-cause work). The merge guards already defuse the
overwrite; this stops the residue from reaching durable history at all.
Applied at both ranged call sites (re-derive and gap); the aggregator
and slicer semantics are untouched — whole-corpus callers still
aggregate undated parses freely.
@iamtoruk
iamtoruk merged commit 991ee6f into main Aug 24, 2026
16 of 17 checks passed
@iamtoruk
iamtoruk deleted the fix/1130-range-filter branch August 24, 2026 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

hardening: aggregateProjectsIntoDays can emit days outside the parsed range

1 participant