feat(use_cases): registry + bank_statement_header (spec §7) #5

Merged
goldstein merged 1 commit from feat/use-case-bank-statement-header into main 2026-04-18 08:51:58 +00:00
Owner

Adds the use-case registry plus the first use case (bank_statement_header).

  • Flat Pydantic schema (no nested lists) for Ollama structured-output reliability.
  • get_use_case(name) raises IX_001_001 on unknown name with the offending name in detail.
  • Explicit registration in __init__.py — no import-time side effects.

CI trigger is flaky for now; local tests green (42 passed, ruff clean).

Adds the use-case registry plus the first use case (`bank_statement_header`). - Flat Pydantic schema (no nested lists) for Ollama structured-output reliability. - `get_use_case(name)` raises `IX_001_001` on unknown name with the offending name in `detail`. - Explicit registration in `__init__.py` — no import-time side effects. CI trigger is flaky for now; local tests green (42 passed, ruff clean).
goldstein added 1 commit 2026-04-18 08:51:52 +00:00
feat(use_cases): registry + bank_statement_header (spec §7)
All checks were successful
tests / test (pull_request) Successful in 1m0s
tests / test (push) Successful in 58s
b80c7952f7
First use case lands. The schema is intentionally flat — nine scalar fields,
no nested arrays — because Ollama's structured-output guidance stays most
reliable when the top level has only scalars, and every field we care about
(bank_name, IBAN, period, opening/closing balance) can be rendered as one.

Registration is explicit in `use_cases/__init__.py`, not a side effect of
importing the use-case module. That keeps load order obvious and lets tests
patch the registry without having to reload modules.

`get_use_case(name)` is the one-liner adapters use; it raises
`IX_001_001` with the offending name in `detail` when the lookup misses,
which keeps log-scrape simple.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
goldstein merged commit 810979e416 into main 2026-04-18 08:51:58 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: goldstein/infoxtractor#5
No description provided.