refactor(search): remove NLP/smart-search feature entirely #772

Merged
marcel merged 51 commits from worktree-feat+nlp-service into main 2026-06-08 10:57:01 +02:00
2 changed files with 7 additions and 2 deletions
Showing only changes of commit 778382cd61 - Show all commits

View File

@@ -1,10 +1,10 @@
from __future__ import annotations
from typing import Literal
from pydantic import BaseModel
from pydantic import BaseModel, Field
class ParseRequest(BaseModel):
query: str
query: str = Field(max_length=500)
lang: Literal["de", "en", "es"]

View File

@@ -81,6 +81,11 @@ def test_parse_all_languages(client):
assert r.json()["dateTo"] == "1920-12-31", f"Wrong dateTo for lang={lang}"
def test_parse_exceeds_max_length_returns_422(client):
r = client.post("/parse", json={"query": "a" * 501, "lang": "de"})
assert r.status_code == 422
def test_parse_internal_exception_does_not_leak_detail(client, monkeypatch):
"""500 errors must return generic message — never expose internal details."""
import main as main_module