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
{{ message }}
Repository navigation
service-analytics: refuse at dataset compile a raw measure over a record-mode amount or quantity with no code/unit dimension, and the derived-measure unit twin (ADR-0144 "at build") #36083
ADR-0144's dated "At build" note: "a dataset measure at compile, with existing codes (DATASET_INVALID at compile)". On main, the record-currency guards at compile (packages/services/service-analytics/src/measure-currency-coherence.ts) judge a measure's currency key and derived measures across currencies only. A dataset whose measure is an ungrouped sum over a record-mode amount compiles, and the refusal rides each query selection through the cube door (cube-record-currency-door.ts, INVALID_FIELD / 400). Measured by the #35491 dev on a real engine (SqlDriver / better-sqlite3): such a dataset compiles; an ungrouped query answers INVALID_FIELD / 400.
PR #36060 (ADR-0158 U7 R1) mirrors that per-selection shape for record-mode quantities; L1 accepted it as that PR's deviation. So ADR-0144's text and main differ for both families. A derived measure combining a record-mode quantity with another quantity (the unit twin of currency guard 2) is judged nowhere.
reach: the public door: a dataset with such a measure saves and compiles (os validate, metadata save) and then can never serve that measure ungrouped.
Business reason
An author, or an AI writing a metadata app, gets a dataset that saves clean and fails at every query; the refusal belongs where the declaration is written (contract tightening at publish over runtime tolerance).
Ask
At dataset compile, refuse DATASET_INVALID a raw measure (sum/avg/min/max) over a record-mode currency amount or record-mode quantity when the dataset declares no dimension over its code or unit field. Keep the per-selection cube refusal.
The unit twin of guard 2: a derived measure that adds a record-mode quantity to another quantity of a different or unknown unit.
The currency half narrows what compiles today (released): Clause-②: no (narrowing), its ADR-0087 disposition, and the maintainer's approval at landing. The unit half is no narrowing only while unitConfig is unreleased.
Order
After PR #36060 merges. The ADR-0144 / ADR-0158 texts stay as ruled; this card brings code to them.
Grading: area:data · Bug · ADR-ruled behaviour main does not implement.
Suggested grade: p3 (no wrong number reaches anyone: every ungrouped query is already refused; the cost is a late refusal).
Dedupe: repo:objectstack-ai/objectstack is:issue DATASET_INVALID record currency compile (14 hits: #27579, #28019, #28194 fixed-currency guards, closed; #27187 the cube door, closed; #35491), dataset measure record-mode compile (#35046, #27579, #27187, closed) → no card for the compile-time record-mode refusal.
2026-11-21T12:52Z · Order (L2 N1 on PR #36060, 7062871169): land the unit half before .changeset/35489-unit-config.md ships in a release. Until then the unit compile guard narrows nothing published; once unitConfig ships, it becomes a published narrowing too and needs the same Clause-②: no (narrowing), ADR-0087 disposition and maintainer approval the currency half already needs.
Triage: lands in domain:server (service-analytics) · pm:queue; rationale: area:data · Bug · ADR-0144 says a raw measure over a record-mode amount with no code dimension is refused at dataset compile, but main refuses only per query, so a dataset that can never answer saves; the unit twin and derived measures are unchecked; measured → p3 as filed · size M. The currency half is a narrowing of a shipped behaviour and needs an ADR-0087 disposition, possibly the maintainer's nod; the unit half is not a narrowing if it lands before unitConfig ships.
Activity
objectstack-fleet commentedon Nov 21, 2026
repo:objectstack#7 · os-tesla · session_01L9qibvMi1U7R2kBd3JbTPu
2026-11-21T12:52Z · Order (L2 N1 on PR #36060, 7062871169): land the unit half before
.changeset/35489-unit-config.mdships in a release. Until then the unit compile guard narrows nothing published; onceunitConfigships, it becomes a published narrowing too and needs the sameClause-②: no (narrowing), ADR-0087 disposition and maintainer approval the currency half already needs.objectstack-fleet commentedon Nov 21, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Triage: lands in
domain:server(service-analytics) ·pm:queue; rationale: area:data · Bug · ADR-0144 says a raw measure over a record-mode amount with no code dimension is refused at dataset compile, but main refuses only per query, so a dataset that can never answer saves; the unit twin and derived measures are unchecked; measured → p3 as filed · size M. The currency half is a narrowing of a shipped behaviour and needs an ADR-0087 disposition, possibly the maintainer's nod; the unit half is not a narrowing if it lands beforeunitConfigships.feat(objectql,service-analytics): refuse a raw aggregate over a recor…