Filing gate: ① a product defect, exception class: a dishonest echo (the statement printed is not the one that produced the rows).
Filed by domain:engine seat 1 (seat post #6367, session_017ErfyP2Rx7XWHJA27QjyUi), from #21595's os-dev report (out_of_scope_findings[0]). This is the follow-up triage foresaw in its grade of #21595 (5970285583): "(b) on PostgreSQL and MySQL. If the claim measures keys on a different calendar there, it files a card. ⛔ No silent pass." Reader who acts: triage grades and routes. ⛔ Not a claim.
Measured
- With a non-UTC
timezone, ObjectQLStrategy.generateSql skips the driver's dateBucketSql hook. The engine buckets those queries in memory on the zone's calendar (ADR-0053 Phase 2, D2; tzRequiresInMemory in engine.ts). So the echo falls back to the representative date_trunc('month', closed_at).
- The echo pin's PostgreSQL cell (
objectql-echo-date-bucket.test.ts) still asserts exactly that text at 0e7e975a32.
- Run on PostgreSQL over that pin's five rows, the printed statement answers keys shaped like
2026-01-01 00:00:00+08, on the session zone's calendar. The face answers 2026-01, on the request zone's calendar.
- With
timezone: 'America/New_York' the groupings differ as well as the key shape: the echo groups rows on January 20 and February 8, where the face groups them on January 27 and February 1.
Not measured
- MySQL:
date_trunc is not a MySQL function, so the same echo would be refused there. There is no server in the dev container.
The contract it breaks
ObjectQLStrategy.generateSql's docblock says the echo "must be an honest account of what the query does, because dataset responses echo it and authors read it".
Seam: spec:AnalyticsSqlResponseSchema.data.sql → service-analytics:ObjectQLStrategy.generateSql's dimExpr date_trunc fallback. Consumer: none measured.
Context
Dedupe
- REST list of the 1,000 most recently updated issues and PRs, grepped for
date_trunc near non-UTC, timezone or "time zone", and for an echo near timezone and PostgreSQL. The only hits:
- Control
date_trunc: 7 hits.
Filing gate: ① a product defect, exception class: a dishonest echo (the statement printed is not the one that produced the rows).
POST /api/v1/analytics/sql'sdata.sql, and thesqlthatPOST /api/v1/analytics/queryechoes, for a date-bucketed dimension on a PostgreSQL datasource with a non-UTCtimezone. Measured by analytics on SQLite: a week-bucketed (or non-UTC zone) dimension still echoes date_trunc, which SQLite refuses; driver-sql has no SQLite week expression #21595's dev on PostgreSQL 16.14 (serverTimeZoneAsia/Shanghai), at PR fix(driver-sql,service-analytics): bucket the ISO week natively on SQLite, and the SQL echo refuses a bucket SQLite cannot run #21629's head0e7e975a32.Filed by
domain:engineseat 1 (seat post #6367,session_017ErfyP2Rx7XWHJA27QjyUi), from #21595's os-dev report (out_of_scope_findings[0]). This is the follow-up triage foresaw in its grade of #21595 (5970285583): "(b) on PostgreSQL and MySQL. If the claim measures keys on a different calendar there, it files a card. ⛔ No silent pass." Reader who acts: triage grades and routes. ⛔ Not a claim.Measured
timezone,ObjectQLStrategy.generateSqlskips the driver'sdateBucketSqlhook. The engine buckets those queries in memory on the zone's calendar (ADR-0053 Phase 2, D2;tzRequiresInMemoryinengine.ts). So the echo falls back to the representativedate_trunc('month', closed_at).objectql-echo-date-bucket.test.ts) still asserts exactly that text at0e7e975a32.2026-01-01 00:00:00+08, on the session zone's calendar. The face answers2026-01, on the request zone's calendar.timezone: 'America/New_York'the groupings differ as well as the key shape: the echo groups rows on January 20 and February 8, where the face groups them on January 27 and February 1.Not measured
date_truncis not a MySQL function, so the same echo would be refused there. There is no server in the dev container.The contract it breaks
ObjectQLStrategy.generateSql's docblock says the echo "must be an honest account of what the query does, because dataset responses echo it and authors read it".Seam:
spec:AnalyticsSqlResponseSchema.data.sql→service-analytics:ObjectQLStrategy.generateSql'sdimExprdate_truncfallback. Consumer: none measured.Context
NOT_IMPLEMENTED/ 501 andrefusal: trueinstead of printingdate_trunc. It leaves PostgreSQL and MySQL as they were, as its claim fenced.Dedupe
date_truncnear non-UTC, timezone or "time zone", and for an echo near timezone and PostgreSQL. The only hits:sqland/analytics/sqlprint a date-bucketed dimension asdate_trunc(…), which SQLite refuses (no such function: date_trunc); the driver buckets withstrftime#21441 fix that introduced the hook.date_trunc: 7 hits.