feat(pipeline): ResponseHandlerStep (spec §8) #16

Merged
goldstein merged 1 commit from feat/step-response-handler into main 2026-04-18 09:21:50 +00:00
Owner

Chunk 2, Task 2.8.

Final shape-up step: flat OCR text, strip geometries, drop context.

Tests

7 new tests (192 total). uv run pytest tests/unit -q -> 192 passed. uv run ruff check src tests -> clean.

Merge gate

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

Chunk 2, Task 2.8. Final shape-up step: flat OCR text, strip geometries, drop context. ## Tests 7 new tests (192 total). `uv run pytest tests/unit -q` -> 192 passed. `uv run ruff check src tests` -> 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:21:45 +00:00
feat(pipeline): ResponseHandlerStep — shape-up final payload (spec §8)
All checks were successful
tests / test (push) Successful in 1m0s
tests / test (pull_request) Successful in 1m2s
565d8d0676
Final pipeline step. Three mechanical transforms:

1. include_ocr_text -> concatenate non-tag line texts, pages joined
   with \n\n, write to ocr_result.result.text.
2. include_geometries=False (default) -> strip ocr_result.result.pages
   + ocr_result.meta_data. Geometries are heavy; callers opt in.
3. Delete response.context so the internal accumulator never leaks to
   the caller (belt-and-braces; Field(exclude=True) already does this).

validate() always returns True per spec.

7 unit tests in tests/unit/test_response_handler_step.py cover all
three branches + context-not-in-model_dump check.

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