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
lint: refuse an incoherent dataset measure (aggregate × field type) at authoring time, from the spec's compatibility matrix (lint leg of #16099) #16354
Lint leg of #16099, split by director ruling (decision batch #59, 2026-09-06, "both legs, table in spec").
Blocked-by:#16353 (the AggregationFunction × FieldType compatibility matrix, exported from @objectstack/spec). This card consumes that table; it declares no rows of its own.
Scope
A packages/lint rule over dataset measures: for each { aggregate, field }, resolve the field's declared type from the object schema lint already loads and refuse the pair when isAggregateCompatibleWithFieldType says no.
Message names the aggregate, the field, its type, and the accepted types for that aggregate — so the author's fix is visible without reading the spec.
Tests: the positive control from the card (avg over datetime fires), a negative control (avg over number silent), and sum over percent (fires — the row analytics-service.ts already calls incoherent).
Acceptance
rule consumes the spec table; no local copy of the rows
Lint leg of #16099, split by director ruling (decision batch #59, 2026-09-06, "both legs, table in spec").
Blocked-by: #16353 (the
AggregationFunction×FieldTypecompatibility matrix, exported from@objectstack/spec). This card consumes that table; it declares no rows of its own.Scope
packages/lintrule over dataset measures: for each{ aggregate, field }, resolve the field's declared type from the object schema lint already loads and refuse the pair whenisAggregateCompatibleWithFieldTypesays no.avgover a datetime works on SQLite and errors on Postgres #16099 (dataset-compiler, services): this rule reaches the author earliest; it cannot see a dataset assembled at runtime, which is why both legs exist.avgoverdatetimefires), a negative control (avgovernumbersilent), andsumoverpercent(fires — the rowanalytics-service.tsalready calls incoherent).Acceptance