Skip to content

feat(pipeline): start_at kwarg for mid-pipeline entry (#245 layer 6)#252

Merged
miguelgfierro merged 1 commit into
issue-147-pipeline-evolutionfrom
unify-pipeline-6-start-at
May 28, 2026
Merged

feat(pipeline): start_at kwarg for mid-pipeline entry (#245 layer 6)#252
miguelgfierro merged 1 commit into
issue-147-pipeline-evolutionfrom
unify-pipeline-6-start-at

Conversation

@miguelgfierro
Copy link
Copy Markdown
Contributor

Sixth layer of the unification (#245). PipelineEngine.run() accepts start_at= (string node id or callable reference) to begin execution mid-DAG. Nodes not reachable from start_at are treated as pre-completed and skipped — the unified equivalent of StatePipeline.invoke(state=..., start_at=...).

resume(run_id=...) and approve_pause already landed in layers 1A (#246) and 5 (#251); this layer completes the trio of entry-control kwargs.

API

result = await engine.run(inputs=..., start_at="deploy")
# or
result = await engine.run(inputs=..., start_at=deploy)  # callable ref

Semantics

  • May be a string node id or a callable (uses fn.name).
  • Forward-reachable set computed; everything else added to pre_completed so the readiness check passes for start_at immediately.
  • Unknown start_at raises PipelineError.
  • Works with state overlay, edge conditions, and cyclic mode.

Tests

7 new in tests/unit/pipeline/test_pipeline_engine_start_at.py.

Full suite: 1594 passed.

Refs: #245, layers 1-5 already merged into issue-147-pipeline-evolution.

Sixth layer of the unification. PipelineEngine.run() accepts start_at=
(string node id or callable reference) to begin execution mid-DAG.
Nodes not reachable from start_at are treated as pre-completed and
skipped. Resume (run_id) and approve_pause already landed in layers 1A
and 5; this completes the entry-control kwargs.

Engine changes:

- run() accepts start_at: str | Callable | None = None.
- New _resolve_node_id helper at module level.
- pre_completed initialized from all_nodes - forward(start_at).
- Works with state overlay, edge conditions, and cyclic mode.

Tests: 7 new in tests/unit/pipeline/test_pipeline_engine_start_at.py.

Full suite: 1594 passed.

Refs: #245
@miguelgfierro miguelgfierro merged commit 292af30 into issue-147-pipeline-evolution May 28, 2026
@miguelgfierro miguelgfierro deleted the unify-pipeline-6-start-at branch May 28, 2026 13:18
ancongui pushed a commit that referenced this pull request May 31, 2026
feat(pipeline): start_at kwarg for mid-pipeline entry (#245 layer 6)
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