[Feature] Add provider-neutral BI semantic model #4

Closed
opened 2026-07-30 18:17:54 +02:00 by zemion · 3 comments
Owner

Context

Implement the semantic core defined by #3 on top of reproducible analytical datasets from #2. PostgreSQL is the first execution target, but definitions must remain provider-neutral.

Acceptance criteria

  • Define versioned analytical dataset, dimension, level/hierarchy, measure, calculated measure, format, total, parameter, and report-definition schemas.
  • Consume datasets through capabilities and opaque references; do not import Dataflow or Datasources internals.
  • Persist source revision/fingerprint, schema, freshness, lineage, quality state, effective Policy decision, and retention provenance.
  • Support system/tenant/group/user scope inheritance without broadening ancestor constraints.
  • Provide a PostgreSQL-backed query planner with bounded filters, grouping, measures, ordering, and result limits.
  • Add permission and row-level-policy hooks before planning and again before result delivery.
  • Add migration, API, and module-permutation tests.

Depends on #2. Architecture reference: docs/SUPERX_CAPABILITY_ASSESSMENT.md.

Architecture reconciliation (2026-07-31)

Parent direction: GovOPlaN/govoplan#29.

Add to acceptance:

  • Each material report/indicator retains its institutional question, goal or obligation, owner, datasource/materialization and Dataflow revisions, freshness/quality, calculation version, purpose/visibility/retention, publication, and consuming decision/action references.
  • Reporting owns semantic report planning, policy-aware result shaping, and presentation; Dataflow owns generic validation, expression evaluation, SQL compilation, execution, and schema propagation, while Datasources and referenced institutional modules retain source and domain ownership.
  • Catalogue metadata and aggregate visibility must not grant access to protected detail rows.
## Context Implement the semantic core defined by #3 on top of reproducible analytical datasets from #2. PostgreSQL is the first execution target, but definitions must remain provider-neutral. ## Acceptance criteria - [ ] Define versioned analytical dataset, dimension, level/hierarchy, measure, calculated measure, format, total, parameter, and report-definition schemas. - [ ] Consume datasets through capabilities and opaque references; do not import Dataflow or Datasources internals. - [ ] Persist source revision/fingerprint, schema, freshness, lineage, quality state, effective Policy decision, and retention provenance. - [ ] Support system/tenant/group/user scope inheritance without broadening ancestor constraints. - [ ] Provide a PostgreSQL-backed query planner with bounded filters, grouping, measures, ordering, and result limits. - [ ] Add permission and row-level-policy hooks before planning and again before result delivery. - [ ] Add migration, API, and module-permutation tests. Depends on #2. Architecture reference: `docs/SUPERX_CAPABILITY_ASSESSMENT.md`. ## Architecture reconciliation (2026-07-31) Parent direction: [GovOPlaN/govoplan#29](https://git.add-ideas.de/GovOPlaN/govoplan/issues/29). Add to acceptance: - Each material report/indicator retains its institutional question, goal or obligation, owner, datasource/materialization and Dataflow revisions, freshness/quality, calculation version, purpose/visibility/retention, publication, and consuming decision/action references. - Reporting owns semantic report planning, policy-aware result shaping, and presentation; Dataflow owns generic validation, expression evaluation, SQL compilation, execution, and schema propagation, while Datasources and referenced institutional modules retain source and domain ownership. - Catalogue metadata and aggregate visibility must not grant access to protected detail rows. <!-- codex-institutional-governance-reporting-2026-07-31 -->
Author
Owner

Codex State: progress

Summary

  • The provider-neutral immutable dataset/semantic/report schemas, typed dimensions/hierarchies/measures/calculations, provenance, access and row-policy hooks, bounded execution, migrations, APIs, WebUI and permutation-safe contracts are implemented locally.

Verification

  • 7 Reporting tests passed; Ruff passed; Core WebUI production build passed.

Next / Blocked

  • Retain this issue for the explicit PostgreSQL push-down planner and the full transitive system/tenant/group/user inheritance restriction matrix; the current safe engine evaluates bounded provider rows in the Reporting runtime.

Suggested status label: status/in-progress

## Codex State: progress ### Summary - The provider-neutral immutable dataset/semantic/report schemas, typed dimensions/hierarchies/measures/calculations, provenance, access and row-policy hooks, bounded execution, migrations, APIs, WebUI and permutation-safe contracts are implemented locally. ### Verification - `7 Reporting tests passed; Ruff passed; Core WebUI production build passed.` ### Next / Blocked - Retain this issue for the explicit PostgreSQL push-down planner and the full transitive system/tenant/group/user inheritance restriction matrix; the current safe engine evaluates bounded provider rows in the Reporting runtime. Suggested status label: `status/in-progress`
zemion added
status
in-progress
and removed
status
ready
labels 2026-08-01 14:56:06 +02:00
Author
Owner

Closure audit (2026-08-03)

The versioned provider-neutral dataset, semantic model, dimensions/hierarchies/measures, provenance, capability boundary, row-policy hook, migrations, and bounded in-process execution are implemented. This issue is not yet closable: query execution currently materializes rows and filters/groups in Python; the required PostgreSQL pushdown planner is absent. The complete system/tenant/group/user inheritance matrix that proves ancestor restrictions cannot be broadened is also incomplete.

Closure requires the PostgreSQL planner plus the transitive scope-inheritance/policy matrix. Those are the correct next slices before #5 is finalized.

## Closure audit (2026-08-03) The versioned provider-neutral dataset, semantic model, dimensions/hierarchies/measures, provenance, capability boundary, row-policy hook, migrations, and bounded in-process execution are implemented. This issue is **not yet closable**: query execution currently materializes rows and filters/groups in Python; the required PostgreSQL pushdown planner is absent. The complete system/tenant/group/user inheritance matrix that proves ancestor restrictions cannot be broadened is also incomplete. Closure requires the PostgreSQL planner plus the transitive scope-inheritance/policy matrix. Those are the correct next slices before #5 is finalized.
Author
Owner

Implemented and published in 8337aec. Reporting definitions now persist restrictive system/tenant/group/user governance provenance; parent limits are intersected and cannot be broadened. Execution performs pre-plan and pre-delivery authorization, and PostgreSQL installations receive parameterized bounded semantic plans for filters, grouping, base/calculated measures, ordering, offsets, and limits. Provider ownership remains capability-based. Verification: 11 Reporting tests, Ruff, 65/65 manifest registry, strict endpoint inventory, module-permutation probes, and the integrated Core WebUI production build.

Implemented and published in 8337aec. Reporting definitions now persist restrictive system/tenant/group/user governance provenance; parent limits are intersected and cannot be broadened. Execution performs pre-plan and pre-delivery authorization, and PostgreSQL installations receive parameterized bounded semantic plans for filters, grouping, base/calculated measures, ordering, offsets, and limits. Provider ownership remains capability-based. Verification: 11 Reporting tests, Ruff, 65/65 manifest registry, strict endpoint inventory, module-permutation probes, and the integrated Core WebUI production build.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: GovOPlaN/govoplan-reporting#4