Skip to main content

Ontology and semantic layer

Ontology lets workspace users define business-facing objects, dimensions, measures, and relationships over physical tables. Users edit an isolated working branch, submit changes for review, and merge approved changes to the project's main model. Cube compiles the effective project and branch model and executes semantic queries through Trino.

This assessment covers projects, objects, relationships, proposal review and merge, workbooks, the object graph, semantic-query execution, persistence, dynamic model loading, and the scale boundaries from Ontology through Cube and Trino. Workbooks and semantic queries are runtime consumers of the published model; they are not part of its immutable revision history.

See Architecture and evidence and reproduction.

Assessment scope​

FieldValue
ActorsModel author, reviewer, project administrator, platform administrator, semantic-query consumer, and platform operator
Components assessedsparqd/oqullus, sparqd/bff-api, sparqd/ontology, sparqd/platform-stacks, Cube, Trino, and KubeBlocks PostgreSQL
Assessed environmentRealm gj76anadpsc; workspace w-t5e2kcxjd; Kubernetes context dev-north-alicloud
Deployed baselinesontology-backend e499673; BFF API 9b2fd45; Cube v1.6.38
Source baselinesOqullus integration source f76e57db; platform-stacks a71390d; ontology origin/main 984932a compared with deployed e499673
Last verified4 September 2026
Review statusEngineering assessment recorded; product, data-governance, security, and operations validation not recorded

The five ontology commits newer than the deployed backend add proposal email and build changes; they do not change the reviewed core object lifecycle.

Current lifecycle​

  1. Oqullus selects an Ontology project and branch. A project is currently a model namespace, not an authorization boundary.
  2. The UI reads the effective branch model through BFF proxy routes.
  3. An authenticated branch owner creates, updates, renames, or deletes objects on a writable working branch. PostgreSQL stores the branch overlay as JSON.
  4. Backend validation checks model shape, member uniqueness, primary-key presence, relationship target existence, and balanced template braces. It does not validate physical tables, columns, SQL semantics, or Cube compilation.
  5. Proposal merge publishes object projection, immutable object versions, main revision, proposal state, and notifications in one database transaction.
  6. Reviewers inspect a live branch diff. Editing the branch rebuilds proposal tasks, removes existing decisions, and returns the proposal to Open.
  7. Workbooks persist query configuration and selected dashboard tabs in the same PostgreSQL database. Results are not saved by the current UI; reopening a configured tab runs the query again.
  8. The object graph fetches object summaries and then every visible object definition, builds edges from name-based relationships, and lays out the complete fetched subset in the browser.
  9. Cube uses contextToAppId to isolate compiler state by project and branch, obtains generated YAML through repositoryFactory, and calls schemaVersion to detect changes.
  10. Semantic queries use a short-lived Cube token containing the project, branch, and effective Trino username. Trino and Ranger remain responsible for physical data authorization.

There is no separate model deployment artifact. Publication is a database state transition; Cube pulls and compiles the selected effective model on demand.

Support boundary​

CapabilityCurrent stateBoundary
ProjectsAvailable as shared model namespacesNo project membership or project-scoped authorization exists; treat isolation as an improvement backlog
Main modelRead-only in OqullusDeprecated direct-main POST and DELETE routes remain reachable through BFF
Working branchesAvailableMutations are branch-owner-only; concurrent writes from the same identity have no optimistic conflict check
Object validationStructural validation availablePhysical tables, columns, SQL expressions, and Cube compilation are not checked before merge
RelationshipsEmbedded in the source objectTargets must exist, but the database has no relationship foreign key because definitions are JSON documents
Proposal reviewAuthor-separated approve/reject and admin merge are implementedImpact is calculated in Oqullus from partial/fan-out reads, is discarded on failure, and is not an authoritative merge gate
Decision auditEvery decision row is retained in PostgreSQLAPI/UI return only each reviewer's latest decision and omit decision/proposal timestamps
WorkbooksQuery configuration, tabs, chart choice, and dashboard selection are persistedResource authorization is not enforced; save timing is implicit; writes are last-write-wins; dashboard tab references are JSON IDs
Workbook resultsQueries rerun through CubeCurrent Oqullus deliberately does not persist result_data; opening configured tabs or dashboards can execute queries again
Object graphAvailable for the fetched project/branch subsetIt inherits the first-50/N+1 object path and performs full Dagre layout and React rendering in the browser
Semantic queryBranch-aware Cube query builder and results/chart views are availableDefault is No Limit; results are fully buffered and client-paged; browser Stop does not cancel upstream work
Model versioningMain revisions and immutable object-version rows existThe deployed workspace contains no representative object or proposal history
Cube model loadingDynamic project/branch loading availableDependency failures are converted to empty/default model state by deployment configuration
Cube execution topologyOne API, one CubeStore router, and two CubeStore workers are deployedCache/queue driver is memory, refresh worker is disabled, generated models contain no pre-aggregations, and all CubeStore pods share one node
Trino query capacityOne fixed coordinator and one fixed worker are deployedWorker autoscaling and workload admission are absent; semantic Cube traffic connects directly to the cluster rather than the autoscaled gateway
Object listingAvailable for the first backend pageOqullus never requests a second page; objects after the first 50 alphabetically are absent from list and search
RecoveryPostgreSQL is the model source of truthOne database replica, no declared backup, and destructive cluster termination policy
Schema migrationAlembic migrations existDeployment does not run or gate on them; the current database was nevertheless at image head when inspected

Validation policy​

Recommended policy:

  • Permit a structurally valid but datasource-unresolved draft on a working branch so authors can model incrementally.
  • Record and display validation status, timestamp, datasource identity, and diagnostics on the draft.
  • Require generated Cube model compilation plus table, column, relationship, and expression validation before proposal submission.
  • Repeat authoritative validation immediately before merge to detect metadata drift between review and publication.
  • Reject merge on blocking failures. Do not publish a model that has only been checked by the browser's metadata selectors.

Critical journeys​

JourneyRequired result
Create or edit a draftPersist a structurally valid working-branch change without mutating main
Invalid model shapeReturn field-specific validation without a partial write
Missing table or columnPreserve the draft if policy allows, mark it invalid, and block proposal or merge
Rename an objectPreserve stable object identity and update affected references atomically
Delete a referenced objectReject deletion with the incoming relationships identified
Submit and mergeRevalidate against current metadata, publish one atomic main revision, and retain audit identity
Review destructive changesShow complete, revision-bound relationship and workbook impact; never turn an impact-read failure into “no impact”
Change a review decisionPreserve and display the complete decision chronology while deriving one current effective state
Create, reopen, and edit a workbookEnforce workspace/project/owner policy, disclose saved versus unsaved state, and prevent silent lost updates
Delete or reorder a workbook tabKeep dashboard membership and positions valid in one transaction
Open a workbook dashboardBound concurrent query fan-out and expose each chart's queued/running/failed/cancelled state
Open and search the object graphDisplay a complete authorized graph or an explicit bounded subgraph without blocking the browser
Run a semantic queryApply a safe default and maximum result boundary, preserve project/branch/user identity, and expose queue and execution state
Cancel a semantic queryPropagate one correlated cancellation through Cube to Trino and confirm terminal engine state
Scale query serviceScale the saturated layer without fragmenting queues/caches or merely moving pressure downstream
Unauthorized project accessApply the documented shared-namespace policy now and project membership when introduced
Ontology or Cube failureIdentify the failing dependency; do not present an empty model as a valid model
More than 50 objectsPage, search, and sort the complete authorized result set without N+1 detail calls
Database loss or migration failureRestore the model source of truth and block rollout on incompatible schema

Findings​

IDFindingComponentsEvidenceImpactIssue
GOV-ONT-001Define projects as an authorization boundary when project isolation is introducedOntology backend, BFF API, Oqullus, identity policySource + deployed role mappingImprovement backlogontology-backend#13
GOV-ONT-002Retire deprecated direct-main mutation routesOntology backend, BFF APISource + automated testsHighontology-backend#14
DATA-ONT-001Validate model executability before publicationOntology backend, Cube, Trino, OqullusSource-verifiedHighontology-backend#15
REL-ONT-001Surface dynamic model dependency failuresPlatform stacks, Cube, ontology backend, OqullusSource-verifiedHighplatform-stacks#680
OPS-ONT-001Protect and test recovery of the Ontology source of truthPlatform stacks, KubeBlocks PostgreSQL, ontology backendLive deployment + sourceCriticalplatform-stacks#681
PERF-ONT-001Page and summarize the complete object listOqullus, ontology backend, BFF APISource-verifiedHigh beyond 50 objectsoqullus#549
OPS-ONT-002Make schema migration a deployment gatePlatform stacks, ontology backendLive revision + sourceHighplatform-stacks#682
SEC-ONT-001Enforce workbook resource authorizationOntology backend, BFF API, OqullusSource-verified; live negative test pendingCriticalNot opened
GOV-ONT-003Make proposal impact authoritative and revision-boundOntology backend, OqullusSource-verified; representative proposal pendingHighNot opened
GOV-ONT-004Expose complete proposal decision chronologyOntology backend, OqullusSource-verifiedMediumNot opened
DATA-ONT-002Define a safe workbook persistence and concurrency contractOntology backend, OqullusSource-verified; multi-session test pendingHighNot opened
PERF-ONT-002Serve a complete bounded object-graph projectionOqullus, ontology backend, BFF APISource-verified; scale test pendingHighNot opened
REL-ONT-002Propagate semantic-query cancellation to TrinoOqullus, BFF API, ontology backend, Cube, TrinoSource-verified client gap; engine outcome pendingHighNot opened
PERF-ONT-003Bound semantic-query result size end to endOqullus, BFF API, ontology backend, Cube, TrinoSource-verified; payload limit pendingHighNot opened
ARCH-ONT-001Align Cube API, refresh worker, and CubeStore with the actual workloadPlatform stacks, Cube, CubeStore, ontology backendDeployed topology + sourceHighNot opened
PERF-ONT-004Bound model loading and compiler/orchestrator cardinalityOntology backend, Cube, PostgreSQL, platform stacksSource-verified; scale boundary pendingHighNot opened
PERF-ONT-005Bound workbook listing and dashboard query fan-outOqullus, ontology backend, Cube, TrinoSource-verified; concurrency boundary pendingHighNot opened

Findings describe observed behavior and required decisions, not accepted implementation commitments. Existing issues are linked from their detailed findings; the new findings remain unfiled until review.

Assessment maturity​

Scale: 0 absent, 1 ad hoc, 2 partly documented or automated, 3 routinely verified, 4 measured and improving.

LensScoreEvidence-backed assessment
Product and UX1Authoring, review, workbooks, graph, results, and charts exist; save/freshness/queue semantics and representative deployed journeys remain incomplete.
Architecture and data2Stable IDs, branch overlays, atomic merges, immutable main revisions, and Cube isolation exist; workbook integrity, publication validation, and runtime result boundaries remain incomplete.
Security and governance1Branch review roles exist, but project isolation is undefined, workbook routes lack resource authorization, decision chronology is hidden, and deprecated main writes remain.
Reliability and operations1Deployed components are healthy, but browser cancellation is not upstream cancellation, model-load failures are hidden, and recovery is not declared or tested.
Performance1No supported object, graph, workbook, branch, compiler-context, query-concurrency, or result-size boundary is stated; several paths materialize or fan out over complete sets.
Delivery and lifecycle1Exact deployed revisions are known, but migrations are not an enforced deployment step and component-owner validation is absent.

Current evidence limitation​

The deployed database contained one active core project, its active main branch, revision zero, and zero objects, changes, proposals, decisions, proposal tasks, object versions, workbooks, or workbook tabs. Deployment topology and data shape are live-confirmed, but there is no representative model against which to claim deployed review, workbook, graph, semantic-query, rollback, or recovery behavior. Those journeys remain open until a controlled test model is created.