Skip to content

hardening: aggregateProjectsIntoDays can emit days outside the parsed range #1130

Closed

Description

@iamtoruk

Found during #1127's root-cause work. A turn whose user message anchors before the parse range's start survives range slicing whole (parser keeps the original anchor when ALL calls are in range), so aggregateProjectsIntoDays emits a residue day the parse range never covered. Since #1129's guarded gap merge, this is non-load-bearing — the residue slice fails hasSliceData and cannot clobber anything — but any future consumer of aggregateDays output that assumes 'days ⊆ parse range' inherits the trap.

Options: an assertion/filter (daysInRange) at the gap call site, or re-anchoring whole-turn slices to their first in-range call. Low priority; document-or-guard, not urgent.

Release note for 0.9.21 cut: consider bumping DAILY_CACHE_VERSION 28→29 — the #1129 residue self-heal only reaches days inside the 7-day settle window, so v28 dev-build users with an older residue day never heal without a bump (v17-and-older users heal via version adoption regardless). One lossless full re-derive, absorbed by the progressive cold paint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions