refactor: remove legacy ktx compatibility shims

This commit is contained in:
Andrey Avtomonov 2026-05-24 10:51:45 +02:00
parent db09936085
commit cc071f45b7
59 changed files with 295 additions and 344 deletions

View file

@ -3,6 +3,8 @@ from __future__ import annotations
import json
from pathlib import Path
import pytest
from ktx_daemon.semantic_layer import (
SemanticLayerQueryRequest,
ValidateSourcesRequest,
@ -95,6 +97,16 @@ def test_query_semantic_layer_emits_plan_and_sql_debug_events(
assert "public.orders" not in captured.err
def test_semantic_layer_request_rejects_project_id_field_name() -> None:
with pytest.raises(ValueError):
SemanticLayerQueryRequest(
sources=[],
dialect="postgres",
project_id="a" * 64,
query={"measures": ["orders.order_count"]},
)
def test_validate_semantic_layer_reports_duplicate_measure_names() -> None:
invalid_source = {
**ORDERS_SOURCE,