feat(pipeline): Step ABC + Pipeline runner + Timer #9

Merged
goldstein merged 1 commit from feat/pipeline-core into main 2026-04-18 09:07:10 +00:00
Owner

Chunk 2, Task 2.1.

Adds the pipeline core (Step ABC, Pipeline runner, Timer context manager) per spec §3/§4. Each step has async validate + process; the runner times every step, writes timings to response.metadata.timings, and aborts on the first IXException by writing response.error.

Tests

9 unit tests in tests/unit/test_pipeline.py: ordering, skip-on-false, validate-raises, process-raises, timings populated for every executed step, timing recorded when validate false / validate raises, non-IX exceptions propagate, shared response_ix mutation across steps.

uv run pytest tests/unit -q → 112 passed locally.
uv run ruff check src tests → clean.

Merge gate

Forgejo Actions trigger bug is still in effect (known issue) — local test + ruff are the gate. Merging once local checks pass.

Chunk 2, Task 2.1. Adds the pipeline core (`Step` ABC, `Pipeline` runner, `Timer` context manager) per spec §3/§4. Each step has async `validate` + `process`; the runner times every step, writes timings to `response.metadata.timings`, and aborts on the first IXException by writing `response.error`. ## Tests 9 unit tests in `tests/unit/test_pipeline.py`: ordering, skip-on-false, validate-raises, process-raises, timings populated for every executed step, timing recorded when validate false / validate raises, non-IX exceptions propagate, shared `response_ix` mutation across steps. `uv run pytest tests/unit -q` → 112 passed locally. `uv run ruff check src tests` → clean. ## Merge gate Forgejo Actions trigger bug is still in effect (known issue) — local test + ruff are the gate. Merging once local checks pass.
goldstein added 1 commit 2026-04-18 09:07:00 +00:00
feat(pipeline): Step ABC + Pipeline runner + Timer (spec §3, §4)
All checks were successful
tests / test (push) Successful in 56s
tests / test (pull_request) Successful in 1m7s
dcd1bc764a
Adds the transport-agnostic pipeline orchestrator. Each step implements
async validate + process; the runner wraps both in a Timer, writes
per-step entries to response.metadata.timings, and aborts on the first
IXException by writing response.error.

- Step exposes a step_name property (defaults to class name) so tests and
  logs label steps consistently.
- Timer is a plain context manager that appends one {step, elapsed_seconds}
  entry on exit regardless of whether the body raised, so the timeline
  stays reconstructable for failed steps.
- 9 unit tests cover ordering, skip-on-false, IXException in validate vs.
  process, timings populated for every executed step, and shared-response
  mutation across steps. Non-IX exceptions propagate.

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