ADR-0021 Phase 2: dataset dual-form migration + reconciliation harness (#1658)#1671
Merged
Conversation
…form + reconciliation harness
Migrate inline analytics (report/dashboard widgets) in app-todo, app-crm and
app-showcase to the semantic `dataset` form (dual-form, side-by-side with the
legacy inline query), and add a read-only reconciliation harness that asserts
both forms return identical numbers — the hard gate before deleting old form.
Harness (scripts/analytics-reconcile/): boots each app's real kernel and runs
legacy engine.aggregate() vs dataset queryDataset(), diffing numbers group by
group; exits non-zero on mismatch. 52 surfaces reconcile green, 0 mismatch.
Two real runtime bugs the gate caught, both fixed in ObjectQLStrategy (+regression tests):
- same-field filter-operator overwrite dropped a bound of a $gte/$lte range
- timeDimensions were ignored, so date dimensions never bucketed — now lowered
to a structured {field, dateGranularity} groupBy that engine.aggregate buckets
Also:
- record-list reports (app-todo overdue_tasks, showcase task_list) -> ListViews
- joined report: added block-level dataset dual-form to JoinedReportBlockSchema
and bound the analytics block (showcase task_overview/open_block)
- fixed example bugs surfaced by reconciliation (created_date->created_at,
invalid date macros, crm sales_by_stage flat-list -> real grouped sum)
Spec: 6666 tests pass. service-analytics: 89 tests pass.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
ADR-0021 Phase 2 (issue #1658): migrate inline analytics in app-todo / app-crm / app-showcase to the semantic
datasetform (dual-form — kept side-by-side with the legacy inline query), and add a read-only reconciliation harness that asserts both forms return identical numbers. This is the hard gate before the legacy form is deleted.Reconciliation harness —
scripts/analytics-reconcile/Boots each app's real kernel and runs legacy
engine.aggregate()vs datasetqueryDataset(), diffing numbers group-by-group; exits non-zero on mismatch. 52 surfaces reconcile green · 0 mismatch.Two real runtime bugs the gate caught (both fixed + regression tests)
ObjectQLStrategyoverwrote same-field filter operators → a$gte/$lterange silently lost a bound.ObjectQLStrategyignoredtimeDimensions→ date dimensions never bucketed. Now lowers a granularity to a structured{field, dateGranularity}groupBy thatengine.aggregatebuckets.Also
overdue_tasks,task_list) → ListViews.JoinedReportBlockSchema; bound the analytics block (task_overview/open_block).created_date→created_at, invalid date macros, crmsales_by_stageflat-list → real grouped sum.Tests
@objectstack/spec: 6666 pass@objectstack/service-analytics: 89 pass (incl. 2 new regression tests)Not in this PR (follow-ups toward delete-old-form)
platform-objects
system_overview; single-form convergence (delete inline fields +ListChartConfigSchema,blocks→sections);pnpm gen:schema; WS5 docs/skills.🤖 Generated with Claude Code