feat(orchestration): pipeline combinator (Workflow Phase 3)#53
Merged
Conversation
Adds execute_pipeline — the one scheduling shape parallel() can't express: each item flows through a chain of stages independently, with NO barrier between stages, so item A can be in stage 3 while item B is still in stage 1 (wall-clock = slowest single chain, not sum-of-slowest-per-stage). - PipelineStage<I> = Fn(Option<&StepOutcome>, &I) -> Option<AgentStepSpec>: pure spec-builders that can branch on the prior stage's outcome (e.g. "verify the finding the review stage produced"). The executor runs them. - Chains run concurrently bounded by the executor's concurrency_hint; a chain stops early on a None stage or a failed step; a panicking stage isolates to its own chain (-> None) without dropping the others. Reuses run_ordered_parallel_with_limit; built entirely on the AgentExecutor seam. Deferred (Rule 6 — no consumer yet): phase-grouping events (would churn the persisted AgentEvent schema + SDK mapping) and a budget-aware loop_until; both land when the SDK/UI (Phase 5) needs them. Tests: 4 mock-based pipeline tests (chaining + prior-output visibility, stop on failure/None, no-barrier concurrency bound, panic isolation) and a real-LLM \#[ignore] two-stage chain passing against .a3s/config.acl. fmt + clippy --lib --bins clean.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 3 of the Workflow integration (builds on #51, #52). Adds
execute_pipeline— the scheduling shapeparallel()can't express.What
execute_pipeline: each item flows through a chain of stages independently, with no barrier between stages — item A can be in stage 3 while item B is still in stage 1 (wall-clock = slowest single chain, not sum-of-slowest-per-stage).PipelineStage<I> = Fn(Option<&StepOutcome>, &I) -> Option<AgentStepSpec>: pure spec-builders that can branch on the prior stage's outcome (e.g. "verify the finding the review stage produced"). The executor runs them.concurrency_hint; a chain stops early on aNonestage or a failed step; a panicking stage isolates to its own chain (→None). Reusesrun_ordered_parallel_with_limit; built entirely on the Phase-1AgentExecutorseam.Deferred (Rule 6 — no consumer yet): phase-grouping events (would churn the persisted
AgentEventschema + SDK mapping for no current consumer) and a budget-awareloop_until. Both land when the SDK/UI (Phase 5) needs them.Verification
#[ignore]two-stage chain (stage 2's prompt derived from stage 1's live output) passing against.a3s/config.acl.cargo fmt --all --check+cargo clippy --lib --bins -D warningsclean.