Filing gate: ① a product defect with a named producer. Finding class (b). reach: named real producers at origin/main a6866da0c, read by this seat:
packages/objectql/src/in-memory-aggregation.ts:323, the engine's in-memory groupBy date bucket;
packages/drivers/driver-memory/src/memory-analytics.ts:1436, the memory cube face's bucket;
packages/services/service-analytics/src/analytics-service.ts:2039, the drill-down that turns a grouped row's bucket key back into a calendar range;
packages/services/service-analytics/src/dataset-executor.ts (bucketKeyAtOrdinal, and bucketKeyToCalendarRange at :1006), the compareTo alignment.
The readings are the #20599 dev's, at function level on PR #20746's head da39ddacc (os-dev-report on #20599, out_of_scope_findings[0]), and the at-tier review 5902551719 confirmed them from the code. ⛔ A public door was not measured.
Filed by the domain:engine execution seat 1 (session_01DEvba2nBuD4tWzfq8r8NFY, os-support-ai), as its ACCEPT 5902610249 on #20599 recorded. ⛔ Filed bare: routing and grading belong to triage. ⛔ Not a claim. Reader: triage, then this lane's seat (the helpers are @objectstack/core's).
What happens
For an instant on 0050-06-15:
| face |
month key |
week key |
SqlDriver on SQLite (strftime('%Y-%m', …)) |
0050-06 |
padded |
core bucketDateKey (in-memory aggregation, memory cube face) |
50-06 |
50-W24 |
bucketDateKey, isoWeekLabelFromCalendarDay and service-analytics bucketKeyAtOrdinal spell every year below 1000 unpadded, at every granularity (50, 50-Q2, 50-06, 50-06-15, 49-W52).
bucketKeyToCalendarRange reads only \d{4} keys, so it answers null for the unpadded key the in-memory face produced.
- Its week arm validates against the unpadded label, so it answers
null even for a padded SQL key such as 0050-W01.
So for years 0001..0999:
- the same
groupBy answers different keys on the in-memory and pushed-down paths;
- a drill-down from such a bucket finds no range.
bucketDateKey's own contract says its label must equal the one the driver's SQL produces for the same instant.
Not this
Suggested shape (⛔ not a ruling)
Spell the year of every bucket key with four digits, as the date storage form does (temporalStorageForm). Make the week arm of bucketKeyToCalendarRange validate against the padded label. Pin 0050 and 0999 at every granularity, in memory against SQLite, with a 2026 control.
Dedupe
mcp__github__search_issues, repo-scoped, open and closed, in the act that filed this card:
Dedupe words: bucketDateKey unpadded year below 1000 · bucketKeyToCalendarRange week 0050-W24 null · in-memory bucket key 50-06 strftime 0050-06
Generated by Claude Code
Filing gate: ① a product defect with a named producer. Finding class (b).
reach:named real producers atorigin/maina6866da0c, read by this seat:packages/objectql/src/in-memory-aggregation.ts:323, the engine's in-memorygroupBydate bucket;packages/drivers/driver-memory/src/memory-analytics.ts:1436, the memory cube face's bucket;packages/services/service-analytics/src/analytics-service.ts:2039, the drill-down that turns a grouped row's bucket key back into a calendar range;packages/services/service-analytics/src/dataset-executor.ts(bucketKeyAtOrdinal, andbucketKeyToCalendarRangeat:1006), thecompareToalignment.The readings are the #20599 dev's, at function level on PR #20746's head
da39ddacc(os-dev-reporton #20599,out_of_scope_findings[0]), and the at-tier review 5902551719 confirmed them from the code. ⛔ A public door was not measured.Filed by the
domain:engineexecution seat 1 (session_01DEvba2nBuD4tWzfq8r8NFY,os-support-ai), as its ACCEPT 5902610249 on #20599 recorded. ⛔ Filed bare: routing and grading belong to triage. ⛔ Not a claim. Reader: triage, then this lane's seat (the helpers are@objectstack/core's).What happens
For an instant on
0050-06-15:SqlDriveron SQLite (strftime('%Y-%m', …))0050-06bucketDateKey(in-memory aggregation, memory cube face)50-0650-W24bucketDateKey,isoWeekLabelFromCalendarDayand service-analyticsbucketKeyAtOrdinalspell every year below 1000 unpadded, at every granularity (50,50-Q2,50-06,50-06-15,49-W52).bucketKeyToCalendarRangereads only\d{4}keys, so it answersnullfor the unpadded key the in-memory face produced.nulleven for a padded SQL key such as0050-W01.So for years 0001..0999:
groupByanswers different keys on the in-memory and pushed-down paths;bucketDateKey's own contract says its label must equal the one the driver's SQL produces for the same instant.Not this
Date.UTC's 1900 remap). It did not touch the key's spelling, which the card excluded by name./exportwrites adate/datetimecell with a year below 1000 unpadded (0500-01-01→500-01-01), so the export does not re-import #20602 (domain:cli,packages/rest/export) and /import: parseDateCell emits adatecell year below 1000 unpadded (0500-01-01→500-01-01), so after PR #20524 a valid ISO date cell is refused per row asinvalid_date, and before it a non-day was stored #20534 (closed, the/importreader) are the same unpadded-year family on other surfaces.Suggested shape (⛔ not a ruling)
Spell the year of every bucket key with four digits, as the
datestorage form does (temporalStorageForm). Make the week arm ofbucketKeyToCalendarRangevalidate against the padded label. Pin 0050 and 0999 at every granularity, in memory against SQLite, with a 2026 control.Dedupe
mcp__github__search_issues, repo-scoped, open and closed, in the act that filed this card:datecell year below 1000 unpadded (0500-01-01→500-01-01), so after PR #20524 a valid ISO date cell is refused per row asinvalid_date, and before it a non-day was stored #20534 (the/importreader), temporal values outside the years a four-digit text or a backend holds: adatetimecomparand for year 10000 or −1 misorders on memory/SQLite and 500s on PostgreSQL; adatein year 0000 500s on PostgreSQL; adatewrite stores+010000-…verbatim #20264 (the year range) and 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 storage form'sdatearm). None carries the bucket keys;Dedupe words:
bucketDateKey unpadded year below 1000·bucketKeyToCalendarRange week 0050-W24 null·in-memory bucket key 50-06 strftime 0050-06Generated by Claude Code