Skip to content

Analytics drivers (memory, SQL) align dateRange string handling to the closed preset vocabulary (driver half of #16041) #16322

Description

@os-zhuang

Driver half of #16041, split by director ruling (decision batch #57, 2026-09-06, option A — contract first).

Blocked-by: #16041 (spec half — AnalyticsQuerySchema.dateRange string arm closes to the date-range-presets.ts vocabulary plus today; unrecognised strings are refused with the ADR-0112 envelope; the spec example is corrected). This card unblocks when the spec change lands.

Scope

Once the contract is closed:

  • driver-memory analytics: an unparseable / unrecognised dateRange string is refused with the ADR-0112 envelope emitted by the schema, never silently accepted as "matches everything".
  • SQL drivers (postgres, sqlite, mysql — whichever implement the analytics path): same refusal, same envelope; the preset vocabulary lowers to the same window boundaries the memory driver uses, so results agree across drivers.
  • Conformance: one shared test fixture that runs the preset list plus a handful of unrecognised strings through every analytics driver and asserts identical accept/refuse outcomes and identical window boundaries for the accepted presets.

Out of scope

Acceptance

  • memory driver refuses unrecognised dateRange strings with the ADR-0112 envelope
  • SQL drivers refuse identically
  • shared conformance fixture passes on every analytics-capable driver
  • changeset present

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions