Skip to content

refactor(runtime): extract the pipeline vocabulary into dynamo-pipeline - #32

Closed
ishandhanani wants to merge 1 commit into
idhanani/p1-delete-runtime-schedulerfrom
idhanani/p5-pipeline-leaf-crate
Closed

ishandhanani wants to merge 1 commit into
idhanani/p1-delete-runtime-schedulerfrom
idhanani/p5-pipeline-leaf-crate

Conversation

@ishandhanani

Copy link
Copy Markdown
Owner

Stacked on #31. Phase 5 as written: "extract pipeline traits into a leaf crate".

Summary

  • New crate lib/pipeline (dynamo-pipeline): engine (AsyncEngine traits/streams), pipeline (Context, nodes, type aliases, PipelineError), error (DynamoError/ErrorType/BackendError taxonomy), protocols::{annotated, maybe_error}. Dependencies: tokio, futures, serde, serde_json, anyhow, thiserror, either, uuid. No dynamo-runtime edge.
  • dynamo-runtime depends on it and re-exports at the historical paths, so every existing dynamo_runtime::pipeline::… / ::engine::… / ::error::… / ::protocols::annotated::… import compiles unchanged across the workspace and the Python bindings.
  • Kept in the runtime: pipeline::network transports, routing policy, and the transport-bound RequestStream/ManyIn/client-streaming aliases (a local type is required for the ingress handler impls to remain coherent).
  • Dropped dead PipelineError variants (8 jetstream #[from], local_ip_address, prometheus; none had users); one ? site now maps to PipelineError::Generic.
  • CODEOWNERS: lib/pipeline/ under the runtime area.

This is the first half of the Phase 5 extraction: the engine contract is runtime-free. dynamo-llm still depends on dynamo-runtime for discovery, components, and transports, so the second half (moving dynamo-llm's wire protocols off the runtime) remains.

Validation

  • cargo test -p dynamo-pipeline (37 unit + doctests), cargo test -p dynamo-runtime --lib (602 passed), cargo test -p dynamo-llm --lib (2557 passed).
  • cargo check --workspace --all-targets, bindings cargo check, cargo clippy -p dynamo-pipeline -p dynamo-runtime -p dynamo-llm --all-targets: clean. build_codeowners.py --strict passes.

New leaf crate `lib/pipeline` (`dynamo-pipeline`) holds the runtime-free
pipeline vocabulary: the `AsyncEngine` traits and streams (`engine`), the
request `Context`, pipeline nodes, stream/engine type aliases and
`PipelineError` (`pipeline`), the `DynamoError`/`ErrorType`/`BackendError`
taxonomy migration and routing key on (`error`), and the `Annotated` stream
envelope (`protocols::annotated`, `protocols::maybe_error`). It depends on
tokio, futures, serde, serde_json, anyhow, thiserror, either, and uuid only.

`dynamo-runtime` depends on it and re-exports everything at the historical
paths (`dynamo_runtime::{engine, error, pipeline, protocols::annotated}`), so
no caller changes. The runtime keeps what needs the runtime: the network
transports under `pipeline::network`, the routing policy, and the
transport-bound `RequestStream`/`ManyIn` aliases (kept local so the ingress
handler impls stay coherent). The eight jetstream `PipelineError` variants
and the `local_ip_address`/`prometheus` `#[from]` variants had no users and
are dropped; the one `?` site maps to `PipelineError::Generic`.

Phase 5 of the runtime-optional frontend roadmap: a consumer that needs the
engine contract without the distributed runtime can now depend on
`dynamo-pipeline`. Owned by the runtime area in CODEOWNERS.

Signed-off-by: Ishan Dhanani <ishandhanani@gmail.com>
@ishandhanani

Copy link
Copy Markdown
Owner Author

DEP for this stack: #33.

@ishandhanani

Copy link
Copy Markdown
Owner Author

Closed while Stack 1 (#45 to #53) and Stack 2 (#40) go upstream; the branch stays for later stacks (direct dispatch, catalog leases, runtime features). See #33.

This branch had an error being deployed

1 failed deployment
external_collaborator — 9e36a347 Deployed Sep 3, 2026 by ishandhanani via ok-to-test #58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant