You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[finding] service-analytics still spells a year below 1000 its own way: formatDateBucket labels bucket key 0050 as 1970 and 0050-06 as 50-06, and the draft-preview bucketDate writes unpadded keys the published path no longer writes #20867
Filing gate: ① a defect with named producers. Finding class (a). reach: named producers in service-analytics, read at function level by #20760's dev at PR #20865's head c03977051a. ⛔ A public door was not measured.
packages/services/service-analytics/src/dimension-labels.tsformatDateBucket, called by analytics-serviceresolveDimensionLabels for a date dimension's key;
packages/services/service-analytics/src/preview-evaluator.tsbucketDate, over a draft dataset's seed rows (?preview=).
The source is os-dev-report 5912276902 on #20760, out_of_scope_findings[0] and [1]. Both are one family, so they are filed as one card.
Filed by the domain:engine execution seat 1 (session_01DEvba2nBuD4tWzfq8r8NFY, os-support-ai). ⛔ Filed bare: routing and grading belong to triage. ⛔ Not a claim.
What happens
PR #20865 (#20760) makes every core bucket key spell its year with four digits (0050, 0050-Q2, 0050-06, 0050-06-15, 0049-W52). The SQL drivers already pad their keys (SQLite strftime; PostgreSQL to_char, measured). Two service-analytics functions still spell such years their own way:
producer
input
answer
right answer
formatDateBucket (a dimension label)
year key 0050
1970: the pure-digit key is read as epoch seconds, because the year recogniser admits only 1000..9999
0050
formatDateBucket
month key 0050-06, day key 0050-06-15
50-06, 50-06-15
the key as written
preview-evaluatorbucketDate (draft preview)
an instant on 0050-06-15
50 / 50-Q2 / 50-06 / 50-06-15
0050 / 0050-Q2 / 0050-06 / 0050-06-15, as the published dataset path answers
Quarter and week keys pass formatDateBucket unchanged, and a 2026 control is correct on both.
So for years 0001..0999:
a date dimension's label on a chart can read 1970;
a draft's preview buckets differ from what the same dataset answers once published.
Scope for whoever takes it (⛔ not a ruling)
formatDateBucket recognises every key core's bucketDateKey writes, the four-digit year from 0001 included, and relabels nothing it did not write.
Its week key is the Monday's YYYY-MM-DD, not the ISO week label the runtime writes, and a test pins that. Whether preview adopts the runtime's week vocabulary is the taker's to measure and say.
Filing gate: ① a defect with named producers. Finding class (a).
reach:named producers inservice-analytics, read at function level by #20760's dev at PR #20865's headc03977051a. ⛔ A public door was not measured.packages/services/service-analytics/src/dimension-labels.tsformatDateBucket, called byanalytics-serviceresolveDimensionLabelsfor a date dimension's key;packages/services/service-analytics/src/preview-evaluator.tsbucketDate, over a draft dataset's seed rows (?preview=).The source is
os-dev-report5912276902 on #20760,out_of_scope_findings[0]and[1]. Both are one family, so they are filed as one card.Filed by the
domain:engineexecution seat 1 (session_01DEvba2nBuD4tWzfq8r8NFY,os-support-ai). ⛔ Filed bare: routing and grading belong to triage. ⛔ Not a claim.What happens
PR #20865 (#20760) makes every core bucket key spell its year with four digits (
0050,0050-Q2,0050-06,0050-06-15,0049-W52). The SQL drivers already pad their keys (SQLitestrftime; PostgreSQLto_char, measured). Twoservice-analyticsfunctions still spell such years their own way:formatDateBucket(a dimension label)00501970: the pure-digit key is read as epoch seconds, because the year recogniser admits only 1000..99990050formatDateBucket0050-06, day key0050-06-1550-06,50-06-15preview-evaluatorbucketDate(draft preview)0050-06-1550/50-Q2/50-06/50-06-150050/0050-Q2/0050-06/0050-06-15, as the published dataset path answersQuarter and week keys pass
formatDateBucketunchanged, and a 2026 control is correct on both.So for years 0001..0999:
1970;Scope for whoever takes it (⛔ not a ruling)
formatDateBucketrecognises every key core'sbucketDateKeywrites, the four-digit year from 0001 included, and relabels nothing it did not write.bucketDatedelegates tobucketDateKeyfor its keys, asbucketKeyAtOrdinalnow does (PR fix(core,service-analytics): a date-bucket key spells its year with four digits, and the reader reads the week key the writer writes (#20760) #20865). ⛔ No second padding.YYYY-MM-DD, not the ISO week label the runtime writes, and a test pins that. Whether preview adopts the runtime's week vocabulary is the taker's to measure and say./exportwrites adate/datetimecell with a year below 1000 unpadded (0500-01-01→500-01-01), so the export does not re-import #20602 (/export,domain:cli), which stays its own card.Dedupe
mcp__github__search_issues, repo-scoped, open and closed, in the act that filed this card:50-06,49-W52) while the SQL drivers pad it (0050-06), andbucketKeyToCalendarRangeanswersnullfor a padded week key such as0050-W01#20760 (open) is the core writer and reader, whose PR produced this finding. [finding] outside calendar-day.ts, a year from 0001 to 0099 is still read as 1900..1999: Date.UTC's two-digit-year remap in core's datetime and bucket helpers, filter-tokens and the REST import's datetime cell #20599 (closed) is the instant for 0001..0099. Analytics: a timeDimensions-bucketed query drops the bucket label from rows and fields — trend charts get counts with no x-axis #4033 (closed) is an unrelated bucket-label drop. None covers these two producers.Dedupe words:
formatDateBucket year 0050 1970·dimension label unpadded year 50-06·preview bucketDate unpadded year below 1000Generated by Claude Code