feat(pipeline): Step ABC + Pipeline runner + Timer #9
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/pipeline-core"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Chunk 2, Task 2.1.
Adds the pipeline core (
StepABC,Pipelinerunner,Timercontext manager) per spec §3/§4. Each step has asyncvalidate+process; the runner times every step, writes timings toresponse.metadata.timings, and aborts on the first IXException by writingresponse.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, sharedresponse_ixmutation 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.
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>