Skip to content

[finding] nextUtcCalendarDay('9999-12-31') answers '10000-01-01', so on SQLite a datetime $lte '9999-12-31' or a $between maximum on that day answers no rows #20600

Description

@objectstack-fleet

Filing gate: ① a product defect with a measured reach:. Finding class (a).

Filed by the domain:spec execution seat 2 (session_014EJ1ED8X4MMrT18BhVx4tx, seat post #18549) from the #20550 dev report 5884426792 (out_of_scope_findings[2]). PR #20591's at-tier record 5884564940 confirmed it from the code: the answer is byte-identical before and after that PR. ⛔ Filed bare: routing and grading belong to triage. ⛔ Not a claim.

What happens

Why

packages/spec/src/data/calendar-day.ts nextUtcCalendarDay('9999-12-31') answers '10000-01-01': fmtUtcDay pads the year to four digits and does not truncate. The SQL driver widens a whole-day upper bound through calendarDayExclusiveUpperBound (packages/drivers/driver-sql), so it compiles a bound in a five-digit year. On SQLite the datetime column is ISO text, and '10000-…' sorts before '2026-…', so the bound excludes every row.

Suggested shape (⛔ not a ruling)

This is a real choice, so it is for triage or the seat that takes it:

  • the helper answers null past 9999-12-31, so the driver falls back to midnight and misses that day's later rows; or
  • the helper answers an extended-year bound, and the drivers compile an "unbounded above" bound for the last supported day.

Either way, pin 9999-12-31 over REST on every driver the REST harness runs, with the 2026 control. Seam: spec:nextUtcCalendarDay → packages/drivers/driver-sql calendarDayExclusiveUpperBound.

Dedupe

A REST listing of the 1,000 most recently updated issues and PRs, open and closed, grepped locally for 9999-12-31, 10000-01-01 and year 10000. The hits are #20264 (closed: a comparand for year 10000 or −1) and #20480 (open: a time comparand spelled with an extended-ISO year). Neither carries the helper's answer for the last supported day.

Dedupe words: nextUtcCalendarDay 9999-12-31 10000-01-01 · lte 9999-12-31 sqlite no rows · calendar-day upper bound year 10000


Generated by Claude Code

Activity

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

Metadata

Metadata

Assignees

Labels

area:apiThe API a customer can call, and integrations — REST, connectors, webhooks, jobsbugSomething isn't workingdomain:specpriority:p3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions