test(pipeline): end-to-end hermetic test with fakes + synthetic fixture #17

Merged
goldstein merged 1 commit from feat/pipeline-e2e-fakes into main 2026-04-18 09:24:52 +00:00
Owner

Chunk 2, Task 2.9 (final task of the chunk).

Wires Setup + OCR + GenAI + Reliability + ResponseHandler together with FakeOCRClient and FakeGenAIClient, runs the committed tests/fixtures/synthetic_giro.pdf via file:// URL, and asserts full-response shape.

Files

  • scripts/create_fixture_pdf.py — PyMuPDF builder; re-runnable. Page content is stable; PDF byte output has embedded timestamps (not load-bearing for tests).
  • tests/fixtures/synthetic_giro.pdf — committed output.
  • tests/unit/test_pipeline_end_to_end.py — 5 tests.

Tests

5 new tests (197 total). uv run pytest tests/unit -q -> 197 passed. uv run ruff check src tests scripts -> clean.

Merge gate

Forgejo Actions trigger bug is still in effect — local test + ruff are the gate.

Chunk 2, Task 2.9 (final task of the chunk). Wires Setup + OCR + GenAI + Reliability + ResponseHandler together with FakeOCRClient and FakeGenAIClient, runs the committed `tests/fixtures/synthetic_giro.pdf` via `file://` URL, and asserts full-response shape. ## Files - `scripts/create_fixture_pdf.py` — PyMuPDF builder; re-runnable. Page content is stable; PDF byte output has embedded timestamps (not load-bearing for tests). - `tests/fixtures/synthetic_giro.pdf` — committed output. - `tests/unit/test_pipeline_end_to_end.py` — 5 tests. ## Tests 5 new tests (197 total). `uv run pytest tests/unit -q` -> 197 passed. `uv run ruff check src tests scripts` -> clean. ## Merge gate Forgejo Actions trigger bug is still in effect — local test + ruff are the gate.
goldstein added 1 commit 2026-04-18 09:24:44 +00:00
test(pipeline): end-to-end hermetic test with fakes + synthetic fixture
All checks were successful
tests / test (push) Successful in 59s
tests / test (pull_request) Successful in 57s
b109bba873
Wires the five pipeline steps together with FakeOCRClient +
FakeGenAIClient, feeds the committed synthetic_giro.pdf fixture via
file:// URL, and asserts the full response shape.

- scripts/create_fixture_pdf.py: PyMuPDF-based builder. One-page A4 PDF
  with six known header strings (bank name, IBAN, period, balances,
  statement date). Re-runnable on demand; the committed PDF is what CI
  consumes.
- tests/fixtures/synthetic_giro.pdf: committed output.
- tests/unit/test_pipeline_end_to_end.py: 5 tests covering
  * ix_result.result fields populated from the fake LLM
  * provenance.fields["result.closing_balance"].provenance_verified True
  * text_agreement True when Paperless-style texts match the value
  * metadata.timings has one entry per step in the right order
  * response.error is None and context is not serialised

197 tests total; ruff clean. No integration tests, no real clients,
no network.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
goldstein merged commit a54a968313 into main 2026-04-18 09:24:52 +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#17
No description provided.