Filing gate: ① a product defect with a measured reach:. Finding class (a). reach: is POST /api/v1/data/:object/query, measured by the #20525 dev at PR #20547's head 0999284ab on memory, SQLite and PostgreSQL 16 (os-dev-report on #20525, out_of_scope_findings[2]).
Filed by the domain:engine execution seat 1 (session_01N8TPEsoJxPsdSdNKGnNGEN, os-warren). The landing site is packages/spec. ⛔ Filed bare: routing and grading belong to triage. ⛔ Not a claim.
What happens
where opened_at $lte '0050-01-01' (a datetime field) returns [], although a row is stored at 0050-01-01T10:00:00.000Z.
- The control
where opened_at $lte '2026-07-15' includes that day's 2026-07-15T14:00:00.000Z row, so whole-day widening works for 2026 and is skipped for 0050.
Why
packages/spec/src/data/calendar-day.ts, nextUtcCalendarDay, proves a day real by a Date.UTC round trip, and Date.UTC reads years 0..99 as 1900..1999. So it answers null for every day in 0001..0099, and $lte / $between-max fall back to midnight.
Suggested shape (⛔ not a ruling)
- Build the date with
setUTCFullYear (or equivalent) so years 0..99 are not remapped. Pin 0001, 0050, 0099 and 0100, and a 2026 control, at the helper and at $lte over REST.
Dedupe
search_issues, run by this seat in objectstack-ai/objectstack, open and closed: "nextUtcCalendarDay year below 100 Date.UTC 1900 whole day lte widening 0050" gives 0 hits.
Dedupe words: nextUtcCalendarDay year below 100 Date.UTC 1900 · lte whole day widening year 0050 · utcInstantMs 0050-01-01 null
Filing gate: ① a product defect with a measured
reach:. Finding class (a).reach:isPOST /api/v1/data/:object/query, measured by the #20525 dev at PR #20547's head0999284abon memory, SQLite and PostgreSQL 16 (os-dev-reporton #20525,out_of_scope_findings[2]).Filed by the
domain:engineexecution seat 1 (session_01N8TPEsoJxPsdSdNKGnNGEN,os-warren). The landing site ispackages/spec. ⛔ Filed bare: routing and grading belong to triage. ⛔ Not a claim.What happens
where opened_at $lte '0050-01-01'(adatetimefield) returns[], although a row is stored at0050-01-01T10:00:00.000Z.where opened_at $lte '2026-07-15'includes that day's2026-07-15T14:00:00.000Zrow, so whole-day widening works for 2026 and is skipped for 0050.Why
packages/spec/src/data/calendar-day.ts,nextUtcCalendarDay, proves a day real by aDate.UTCround trip, andDate.UTCreads years 0..99 as 1900..1999. So it answersnullfor every day in 0001..0099, and$lte/$between-max fall back to midnight.nextUtcCalendarDay('0050-01-01')=nullandutcInstantMs('0050-01-01')=null.'0100-01-01'answers.datetimecomparand for year 10000 or −1 misorders on memory/SQLite and 500s on PostgreSQL; adatein year 0000 500s on PostgreSQL; adatewrite stores+010000-…verbatim #20264 (closed).2026-02-30is stored verbatim (500 on PostgreSQL), datetime2026-02-30T10:00:00Zrolls over to March 2, and a non-ISO datetime is read in the host zone #20525's write door does not reuse the helper.Suggested shape (⛔ not a ruling)
setUTCFullYear(or equivalent) so years 0..99 are not remapped. Pin 0001, 0050, 0099 and 0100, and a 2026 control, at the helper and at$lteover REST.Dedupe
search_issues, run by this seat inobjectstack-ai/objectstack, open and closed: "nextUtcCalendarDay year below 100 Date.UTC 1900 whole day lte widening 0050" gives 0 hits.Dedupe words:
nextUtcCalendarDay year below 100 Date.UTC 1900·lte whole day widening year 0050·utcInstantMs 0050-01-01 null