Draft: feat(data-model): reference spike for ADR 024, do not merge [skip ci]
What does this MR do and why?
Reference spike for ADR 024: a pluggable data model that replaces the ontology. It is not meant to merge. The production rollout is built separately, and this MR keeps the full diff for reference.
Related Issues
Relates to !3337 (merged) (ADR 024) and !3333 (merged) (ADR 023).
Testing
Each step was gated locally on byte-identical SQL across the query corpus, identical indexer dumps, byte-identical DDL for every bundled schema version, and the local and container suites.
Performance Analysis
- This merge request does not introduce any performance regression. If a performance regression is expected, explain why.
Agent context: long-form analysis, file-by-file walkthroughs, profiler output, alternatives considered
The branch moves every reader of the ontology onto query-data-model: packages and the loader, the ClickHouse schema in the backend, plan tracking and the surfaces, the relational builder and renderer, one planning phase that builds through the catalog, the indexer and migrations on the model, and finally the deletion of the ontology crate and config/ontology. The only deliberate SQL changes are seven narrower DuckDB queries and the CTE layout from shared reads.