|
964 | 964 | "title": "The showcase_delivery analytics cube serves /api/v1/analytics/*: meta discovers its measures/dimensions, a query answers a known aggregate that reconciles against a direct /data aggregate, and an unwired analytics slot degrades honestly to 404", |
965 | 965 | "since": "v16", |
966 | 966 | "status": "active", |
967 | | - "revision": 2, |
| 967 | + "revision": 3, |
968 | 968 | "priority": "P2", |
969 | 969 | "surface": "api", |
970 | 970 | "personas": [ |
|
973 | 973 | "fixtures": { |
974 | 974 | "app": "showcase", |
975 | 975 | "requires": [ |
976 | | - "the showcase_delivery cube (examples/app-showcase/src/data/analytics/showcase.cube.ts — verified present: base table showcase_task; measures count / total_estimate_hours / avg_estimate_hours / done_rate; dimensions status / priority / due_date / assignee), registered as `analyticsCubes` (examples/app-showcase/src/coverage.ts) and served by the `analytics` capability the CLI serve path auto-loads (packages/cli/src/commands/serve.ts CAPABILITY_PROVIDERS.analytics → @objectstack/service-analytics, configKey analyticsCubes)", |
| 976 | + "the showcase_delivery cube (examples/app-showcase/src/data/analytics/showcase.cube.ts — verified present: base table showcase_task; measures count / total_estimate_hours / avg_estimate_hours; dimensions status / priority / due_date / assignee), registered as `analyticsCubes` (examples/app-showcase/src/coverage.ts) and served by the `analytics` capability the CLI serve path auto-loads (packages/cli/src/commands/serve.ts CAPABILITY_PROVIDERS.analytics → @objectstack/service-analytics, configKey analyticsCubes)", |
977 | 977 | "seeded showcase_task rows spanning multiple statuses (the same multi-bucket seed dashboards.chart-first-paint relies on) so the reconciled aggregate has more than one bucket" |
978 | 978 | ] |
979 | 979 | }, |
|
988 | 988 | ], |
989 | 989 | "acceptance": [ |
990 | 990 | { |
991 | | - "clause": "meta discovers the cube: GET /analytics/meta lists showcase_delivery with exactly its four measures (namespaced showcase_delivery.count / .total_estimate_hours / .avg_estimate_hours / .done_rate) and four dimensions (showcase_delivery.status / .priority / .due_date / .assignee)", |
| 991 | + "clause": "meta discovers the cube: GET /analytics/meta lists showcase_delivery with exactly its measures (namespaced showcase_delivery.count / .total_estimate_hours / .avg_estimate_hours) and four dimensions (showcase_delivery.status / .priority / .due_date / .assignee)", |
992 | 992 | "oracle": "api", |
993 | | - "verify": "the meta response's cubes[] entry for showcase_delivery names all four measures and four dimensions (getMeta keys them `${cube}.${key}`, and lists a cube only when its `public` is not `false`: a cube declaring `public: false` is omitted from meta and refused by query()/generateSql() with 404 CUBE_NOT_FOUND. showcase_delivery declares no `public`, so it is visible by the schema default `true`)", |
| 993 | + "verify": "the meta response's cubes[] entry for showcase_delivery names each measure and dimension the clause lists (getMeta keys them `${cube}.${key}`, and lists a cube only when its `public` is not `false`: a cube declaring `public: false` is omitted from meta and refused by query()/generateSql() with 404 CUBE_NOT_FOUND. showcase_delivery declares no `public`, so it is visible by the schema default `true`)", |
994 | 994 | "evidence": "the /analytics/meta?cube=showcase_delivery body" |
995 | 995 | }, |
996 | 996 | { |
|
1033 | 1033 | "variants": [ |
1034 | 1034 | "measure count (type: count)", |
1035 | 1035 | "measure total_estimate_hours (type: sum)", |
1036 | | - "measure avg_estimate_hours (type: avg)", |
1037 | | - "measure done_rate (type: number, computed CASE expression)" |
| 1036 | + "measure avg_estimate_hours (type: avg)" |
1038 | 1037 | ], |
1039 | 1038 | "traps": [ |
1040 | 1039 | "dispatcher-vs-hono-route", |
|
1061 | 1060 | "date": "2026-09-28", |
1062 | 1061 | "change": "re-spelled the meta clause's verify text and two source lines, which stopped being true when the analytics service began reading `analytics_cube.public`: getMeta no longer returns every registry cube (it omits one declaring `public: false`, and query()/generateSql() refuse it with 404 CUBE_NOT_FOUND), and the showcase cube no longer declares `public: false` (it is visible by the default `true`). Text only: every clause, step and verdict is unchanged, because showcase_delivery stays visible and its meta entry still names the same four measures and four dimensions", |
1063 | 1062 | "ref": "#20348" |
| 1063 | + }, |
| 1064 | + { |
| 1065 | + "revision": 3, |
| 1066 | + "date": "2026-10-01", |
| 1067 | + "change": "dropped done_rate from the fixture line and the meta clause, re-spelled the verify text that counted it, and removed its variant: a cube member's `sql` is now a column reference (MetricSchema in packages/spec/src/data/analytics.zod.ts refuses a SQL expression at parse), so the showcase_delivery cube no longer declares the CASE-expression done_rate measure, and the done rate is declared on the showcase_task_metrics dataset (examples/app-showcase/src/ui/datasets/chart-gallery.dataset.ts) as a filtered count over a count. The steps, the reconciliation clauses and the four dimensions are unchanged", |
| 1068 | + "ref": "#20943" |
1064 | 1069 | } |
1065 | 1070 | ] |
1066 | 1071 | }, |
|
0 commit comments