From dc76a14cdd83e3a0fca6e7a44914a697ef939ec6 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 29 Jul 2026 11:03:05 +0000 Subject: [PATCH] chore(liveness): flip `report.order` to live now that objectui lowers it (#3916) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `ReportSchema.order` shipped as `planned` + `authorWarn` because only half of it existed: the schema accepted the declaration, `reportSelectionOrder` lowered it and the executor applied it, but objectui's `DatasetReportRenderer` built the selection it posted and never carried `report.order` into it — so an authored ordering reached no query. Marking it `live` then would have been the exact failure the gate exists to catch. objectui#2964 landed the wiring: `useDatasetRows`, the single fetch choke point behind every report path, now carries the lowered ordering across all four call sites (grouped table, embedded chart, matrix cross-tab, each joined block), with the ordering in the refetch signature and narrowed per sub-selection so the chart's x/y query cannot post a key it never selected. The entry therefore flips to `live`, gains the two framework evidence paths (which resolve in this checkout) and a `verifiedAt` stamp, and drops `authorWarn` / `authorHint` — the advisory said the declaration did nothing at runtime, which is no longer true. The separate default this issue also shipped is unchanged and was already live on its own: a selected time dimension sorts ascending server-side, so month and quarter matrix columns are chronological with no `order` declared at all. No behaviour change in this repo; the ledger is the deliverable. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01CYJ5WSiCgd522s1zCWtmFT --- .changeset/report-order-liveness-live.md | 23 +++++++++++++++++++++++ packages/spec/liveness/report.json | 8 ++++---- 2 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 .changeset/report-order-liveness-live.md diff --git a/.changeset/report-order-liveness-live.md b/.changeset/report-order-liveness-live.md new file mode 100644 index 0000000000..852def8a47 --- /dev/null +++ b/.changeset/report-order-liveness-live.md @@ -0,0 +1,23 @@ +--- +"@objectstack/spec": patch +--- + +chore(liveness): `report.order` is live — objectui now lowers it onto the selection (#3916) + +`ReportSchema.order` shipped as `planned` + `authorWarn`: the framework half was +complete (schema, `reportSelectionOrder`, executor), but objectui's +`DatasetReportRenderer` built the selection it posted and never carried the +declaration into it, so an authored ordering reached no query. Marking it `live` +then would have been the exact failure the gate exists to catch. + +objectui#2964 landed that wiring — `useDatasetRows`, the single fetch choke point +behind every report path, now carries the lowered ordering across all four call +sites (grouped table, embedded chart, matrix cross-tab, each joined block), with +the ordering in the refetch signature and scoped per sub-selection so the +chart's narrower x/y query cannot post a key it never selected. + +So the ledger entry flips to `live`, gains the framework evidence paths, and +drops `authorWarn` / `authorHint` — an authored `order` now does what it says, +and the advisory that it did not is no longer true. + +No behaviour change in this repo; the ledger is the deliverable. diff --git a/packages/spec/liveness/report.json b/packages/spec/liveness/report.json index baff10c81e..b4feda4747 100644 --- a/packages/spec/liveness/report.json +++ b/packages/spec/liveness/report.json @@ -39,10 +39,10 @@ "note": "objectui: render-time scope filter ANDed at query time (`?? filter`, mergeFilters) — DatasetReportRenderer." }, "order": { - "status": "planned", - "authorWarn": true, - "authorHint": "A selected date dimension is ALREADY chronological (ascending) without `order` — that default is live server-side. Only the explicit declaration is pending its renderer wiring.", - "note": "[planned] framework#3916. The FRAMEWORK half is complete and live: the schema accepts `order`, `reportSelectionOrder` (ui/report.zod.ts) lowers it to `DatasetSelection.order`, and the executor applies that ordering over the assembled grid (services/service-analytics/src/dataset-executor.ts, resolveOrdering/applyOrdering). What is NOT yet wired is the objectui side — `DatasetReportRenderer` builds the selection it posts and does not carry `report.order` into it, so an authored `order` does not reach the server yet. Marked `planned` + authorWarn until objectui lowers it, per enforce-or-mark. NOTE the separate, already-live default this issue also shipped: a selected TIME dimension defaults to ascending server-side, so month/quarter matrix columns are chronological with no `order` declared at all." + "status": "live", + "verifiedAt": "2026-07-29", + "evidence": "packages/spec/src/ui/report.zod.ts (reportSelectionOrder), packages/services/service-analytics/src/dataset-executor.ts (resolveOrdering/applyOrdering)", + "note": "framework#3916. Authored ordering, most significant key first; each `by` names a `rows`/`columns` dimension or a `values` measure the report selects (validated by the schema's superRefine; a `joined` report orders per block). `reportSelectionOrder` lowers the list to `DatasetSelection.order` and the executor applies it over the ASSEMBLED grid — after measure-scoped filters merge, `__compare` columns attach and derived measures evaluate — so a derived measure is a valid sort key. objectui: `DatasetReportRenderer`'s `useDatasetRows` (the single fetch choke point) carries it onto the posted selection across all four paths — grouped table, embedded chart, matrix cross-tab, per joined block — with `readOrder` lowering and `scopeOrder` narrowing it to each sub-selection, plus the ordering in the refetch signature (objectui#2964). Flipped from `planned` + authorWarn once that landed. Separate and independently live: a selected TIME dimension defaults to ascending server-side, so month/quarter matrix columns are chronological with no `order` declared at all." }, "drilldown": { "status": "live",