Filing gate: ① a defect with a named landing site, as one class-closure card for three positions of one family. The family is a temporal value whose year a fixed-width YYYY… text, or a backend's temporal type, cannot hold. #20240 (PR #20261) closes it for the date comparand at where and the per-aggregation filter. These are the other positions:
packages/core/src/utils/temporal-storage-form.ts, canonicalUtcDatetime, and temporal-comparand.ts, readsAsInstant: the datetime rule;
- the same rule's
date arm for year 0000, against PostgreSQL's DATE;
- the
date write door (the engine and REST create path), and the rule's string arm on write.
Finding class (a). reach: was measured at the public REST door on main (below).
The domain:engine execution seat 1 (session_01Bvd69VPa6puiNzzPUroDBx) filed this from its #20240 dev's report (os-dev-report 5857762502, out_of_scope_findings[1..3], which the dev named as one family), re-measured by the at-tier review of PR #20261 (record 5857959126), per seat ruling 5857781537. ⛔ Filed bare: routing and grading are triage's. ⛔ Not a claim.
What happens
Measured at e46218674b, which equals current main on the query and write paths, on InMemoryDriver, SqlDriver on SQLite and SqlDriver on PostgreSQL 16, through the engine and REST. PR #20261 moves none of these cells.
| position |
input |
memory |
SQLite |
PostgreSQL |
correct |
1 · where on a datetime field, $gt / $lt / $eq |
10000-01-01 as a number, Date or ISO |
7 / 0 / 0 |
7 / 0 / 0 |
500 DATABASE_ERROR (22009 on +010000-…) |
0 / 7 / 0 |
| 1 · the same |
−1-01-01, same three spellings |
7 / 0 / 0 |
7 / 0 / 0 |
500 (22007 on the negative spelling) |
7 / 0 / 0 |
2 · where on a date field |
year 0000 as a number, Date, ISO or bare 0000-06-15 |
7 / 0 / 0 |
7 / 0 / 0 |
500 (22008 date/time field value out of range) in all four spellings; a direct driver write of year 0 is also 22008 |
one answer on every driver |
3 · REST create on a date field |
placed_on: "+010000-01-01T00:00:00.000Z" |
201, stored verbatim (read back "+010000-01-01T00:00:00.000Z", not a YYYY-MM-DD day) |
201, stored verbatim |
500 (22009) |
a day, or a refusal |
Suggested shape (⛔ not a ruling)
One decision for the whole family, then one edit per position in the one rule and its door. ⛔ No driver copy.
Filing-gate answers
Dedupe words: datetime comparand year 10000 extended ISO text order · postgres date year 0000 out of range 22008 · date write door year 10000 stored verbatim
Filing gate: ① a defect with a named landing site, as one class-closure card for three positions of one family. The family is a temporal value whose year a fixed-width
YYYY…text, or a backend's temporal type, cannot hold. #20240 (PR #20261) closes it for thedatecomparand atwhereand the per-aggregationfilter. These are the other positions:packages/core/src/utils/temporal-storage-form.ts,canonicalUtcDatetime, andtemporal-comparand.ts,readsAsInstant: thedatetimerule;datearm for year 0000, against PostgreSQL'sDATE;datewrite door (the engine and REST create path), and the rule's string arm on write.Finding class (a).
reach:was measured at the public REST door onmain(below).The
domain:engineexecution seat 1 (session_01Bvd69VPa6puiNzzPUroDBx) filed this from its #20240 dev's report (os-dev-report5857762502,out_of_scope_findings[1..3], which the dev named as one family), re-measured by the at-tier review of PR #20261 (record 5857959126), per seat ruling 5857781537. ⛔ Filed bare: routing and grading are triage's. ⛔ Not a claim.What happens
Measured at
e46218674b, which equals currentmainon the query and write paths, on InMemoryDriver, SqlDriver on SQLite and SqlDriver on PostgreSQL 16, through the engine and REST. PR #20261 moves none of these cells.whereon adatetimefield,$gt/$lt/$eqDateor ISODATABASE_ERROR(22009 on+010000-…)whereon adatefieldDate, ISO or bare0000-06-15date/time field value out of range) in all four spellings; a direct driver write of year 0 is also 22008datefieldplaced_on: "+010000-01-01T00:00:00.000Z""+010000-01-01T00:00:00.000Z", not aYYYY-MM-DDday)datetimerule spells extended ISO years (+010000-…,-000001-…), which sort as text the way no instant does. The ISO string passes thedatetimedoor becauseDate.parsereads extended years.DATEhas no year 0 (select '0000-06-15'::date→ out of range). PR fix(core,objectql)!: a date field's number or Date comparand spells a four-digit year, and one outside 0..9999 is refused INVALID_FILTER / 400 (#20240) #20261 pads year 0 to0000-06-15, as triage's range 0..999 directs, and PostgreSQL still refuses it.datewrite door accepts an extended-year ISO string, and the rule returns a string with no leadingYYYY-MM-DDunchanged.Suggested shape (⛔ not a ruling)
One decision for the whole family, then one edit per position in the one rule and its door. ⛔ No driver copy.
dateanddatetime, the range every shipped backend holds.INVALID_FILTER/ 400) onwhere, the per-aggregationfilter, andhaving(objectqlhaving: a comparand on an aggregateddatecolumn never meets the temporal-comparand door — over RESThaving { last_placed: { $lt: "not-a-date" } }onmax(placed_on)keeps every group (200) while itswheretwin answers 400 #20263). Refuse it at the write door (VALIDATION_FAILED/ 400).temporalStorageForm: thedatearm leaves a year outside 1000..9999 unpadded — over REST the epoch-ms number for 0999-06-15 counts$gt0 /$lt7 on InMemoryDriver and SQLite (correct 6 / 0); its ISO string counts 6 / 0 #20240's year-0000 padding stays, or year 0000 joins the refused range.Filing-gate answers
domain:engine, the owner ofpackages/coreand the SQL / memory drivers). It is sequenced after PR fix(core,objectql)!: a date field's number or Date comparand spells a four-digit year, and one outside 0..9999 is refused INVALID_FILTER / 400 (#20240) #20261 (coretemporalStorageForm: thedatearm leaves a year outside 1000..9999 unpadded — over REST the epoch-ms number for 0999-06-15 counts$gt0 /$lt7 on InMemoryDriver and SQLite (correct 6 / 0); its ISO string counts 6 / 0 #20240), which edits the same rule and predicate. That is a region order, not aBlocked-by:.closedincluded:datetime year 10000 extended ISO +010000 filter postgres 500→ coretemporalStorageForm: thedatearm leaves a year outside 1000..9999 unpadded — over REST the epoch-ms number for 0999-06-15 counts$gt0 /$lt7 on InMemoryDriver and SQLite (correct 6 / 0); its ISO string counts 6 / 0 #20240 (the parent, open), rest/OCC: postgres 驱动下乐观锁必现假冲突 409 —— normaliseVersionToken 对 Date 做 String() 丢毫秒后与 ISO 字符串严格比较 #13382, driver-sql: every Field.date read from PostgreSQL is one day early when the process TZ is east of UTC — toDateOnly() reads UTC components off a local-midnight Date #11389, [17.0.0-rc.0] SQLite datetime window filters return empty: filter comparands coerced to epoch-ms while writes store ISO TEXT #3912 and Field.date defaultValue NOW() records the server-timezone calendar day on Postgres — and the DDL is invalid on MySQL 8.0 #4022, none this;postgres date year 0000 out of range 22008→ coretemporalStorageForm: thedatearm leaves a year outside 1000..9999 unpadded — over REST the epoch-ms number for 0999-06-15 counts$gt0 /$lt7 on InMemoryDriver and SQLite (correct 6 / 0); its ISO string counts 6 / 0 #20240, Field.date defaultValue NOW() records the server-timezone calendar day on Postgres — and the DDL is invalid on MySQL 8.0 #4022 and MySQL: Field.datetime maps to TIMESTAMP (range ends 2038-01-19) and binds a Date in the process-local timezone #3942, none this;date field write extended year stored verbatim not YYYY-MM-DD→ 0 hits.Dedupe words:
datetime comparand year 10000 extended ISO text order·postgres date year 0000 out of range 22008·date write door year 10000 stored verbatim