Skip to content

feat(pipeline): deprecate StatePipeline (#245 layer 7)#253

Merged
miguelgfierro merged 1 commit into
issue-147-pipeline-evolutionfrom
unify-pipeline-7-deprecate-state-pipeline
May 28, 2026
Merged

feat(pipeline): deprecate StatePipeline (#245 layer 7)#253
miguelgfierro merged 1 commit into
issue-147-pipeline-evolutionfrom
unify-pipeline-7-deprecate-state-pipeline

Conversation

@miguelgfierro
Copy link
Copy Markdown
Contributor

Seventh layer of the unification (#245). StatePipeline now emits a DeprecationWarning on construction pointing users at PipelineEngine configured with state_schema= as the unified replacement.

Stacked on layer 6 (#252) which is already merged.

Why deprecate now

PipelineEngine has full feature parity with StatePipeline after layers 1-6:

Feature Layer Status
State overlay + reducers 3 done
Pause 5 done
Send fan-out 5 done
Cycles + recursion_limit 4 done
Checkpointing 1A done
Audit log 1A done
Resume + approve_pause 1A + 5 done
start_at 6 done
Unified event handler 1B done
Parallel state-aware execution 3 done (not in StatePipeline)

Changes

  • StatePipeline.__init__ raises DeprecationWarning with migration text.
  • import warnings added.
  • Class docstring includes a deprecation block + a PipelineEngine migration example.

What still works

All 37 existing state-pipeline tests pass unchanged — they emit the new warning but continue to operate. Behavior is preserved.

Tests

1 new test in tests/unit/pipeline/test_state_pipeline_deprecation.py verifying the warning is raised and references both PipelineEngine and issue #245.

Full suite: 1595 passed.

Layer 8 (deletion) — deferred

Full deletion of state_pipeline.py + dual-mode logic in builder.py is tracked as follow-up. It requires:

  1. Migrating 37 state-pipeline tests to the unified PipelineEngine surface.
  2. Translating PipelineBuilder.branch(source, router, mapping) into conditional DAGEdges (especially the mapping=None case where targets are dynamic).
  3. Removing _StateNodePlaceholder and the dual-mode add_node / build dispatch.

That's a multi-PR migration, not a single mechanical cleanup. Deferring keeps this PR safely scoped to the deprecation signal.

Refs

Seventh layer of the unification. StatePipeline now emits a
DeprecationWarning on construction pointing users at PipelineEngine
configured with state_schema= as the unified replacement.

PipelineEngine has feature parity with StatePipeline after layers 1-6:
state overlay, reducers, Pause, Send, cycles, recursion_limit,
checkpointing, audit log, resume, start_at — plus parallel state-aware
execution that StatePipeline could not provide.

Changes:

- StatePipeline.__init__ raises DeprecationWarning with migration text.
- import warnings added at module level.
- Class docstring includes a deprecation notice and migration example.

StatePipeline still works — all 37 existing state-pipeline tests pass
unchanged (they emit the new DeprecationWarning but continue to operate).

Tests: 1 new in tests/unit/pipeline/test_state_pipeline_deprecation.py
verifying the warning is raised and references PipelineEngine + #245.

Full suite: 1595 passed.

Layer 8 (full deletion of state_pipeline.py and dual-mode logic in
builder.py) is tracked as follow-up — it requires migrating the 37
state-pipeline tests to the unified PipelineEngine surface and
translating PipelineBuilder.branch(source, router, mapping) into
conditional DAGEdges, which is more invasive than this deprecation
layer warrants.

Refs: #245
@miguelgfierro miguelgfierro merged commit f77dbde into issue-147-pipeline-evolution May 28, 2026
@miguelgfierro miguelgfierro deleted the unify-pipeline-7-deprecate-state-pipeline branch May 28, 2026 13:25
ancongui pushed a commit that referenced this pull request May 31, 2026
…ate-state-pipeline

feat(pipeline): deprecate StatePipeline (#245 layer 7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant