infoxtractor/tests
Dirk Riemann 2efc4d1088
All checks were successful
tests / test (push) Successful in 1m13s
tests / test (pull_request) Successful in 1m23s
fix(genai): send format="json" (loose mode) to Ollama
Ollama 0.11.8 segfaults on any Pydantic-shaped structured-output schema
with $ref, anyOf, or pattern — confirmed on the deploy host with the
simplest MVP case (BankStatementHeader alone). The earlier null-stripping
sanitiser wasn't enough.

Switch to format="json", which is "emit valid JSON" mode. We're already
describing the exact JSON shape in the system prompt (via GenAIStep +
the use case's citation instruction appendix) and validating the
response body through Pydantic on parse — which raises IX_002_001 on
schema mismatch, exactly as before.

Stronger guarantees can come back later via a newer Ollama, an API
fix, or a different GenAIClient impl. None of that is needed for the
MVP to work end to end.

Unit tests: the sanitiser left in place (harmless, still tested). The
"happy path" test now asserts format == "json".

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 13:59:04 +02:00
..
fixtures test(pipeline): end-to-end hermetic test with fakes + synthetic fixture 2026-04-18 11:24:29 +02:00
integration feat(pg-queue): LISTEN ix_jobs_new + 10s fallback poll (spec §4) 2026-04-18 11:52:26 +02:00
live chore(model): switch default IX_DEFAULT_MODEL to qwen3:14b (already on host) 2026-04-18 12:20:23 +02:00
unit fix(genai): send format="json" (loose mode) to Ollama 2026-04-18 13:59:04 +02:00
__init__.py feat(scaffold): project skeleton with uv + pytest + forgejo CI 2026-04-18 10:36:43 +02:00
conftest.py feat(scaffold): project skeleton with uv + pytest + forgejo CI 2026-04-18 10:36:43 +02:00