Implement workflow pipeline execution surface (spec 058)#600
Merged
enricopiovesan merged 2 commits intoJul 10, 2026
Merged
Conversation
Adds namespaced step-output publication (publish_to_state_as) and final-output projection (output_projection) to workflow definitions, letting one execute call run an ordered capability pipeline and return merged output under namespaced keys. Ships traverse-starter.pipeline and doc-approval.pipeline workflow JSON, workflow-backed pipeline capability contracts, a registerable traverse-starter bundle, and pipeline integration tests at runtime, CLI, and HTTP levels. Closes #558 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The unreached test-executor fallback arm left one uncovered line in traverse-runtime; fold the summarize arm into the fallback. Move the doc-approval pipeline workflow and contract under the top-level drafts/ quarantine — its step capabilities (#538/#556/#555) are not merged, so the contractual enforcement gate cannot register them yet. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
b486a76
into
claude/issue-554-starter-wasm-agents
25 checks passed
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.
Governing Spec
058-workflow-pipeline-execution007-workflow-registry-traversal041-workflow-composition-api009-expedition-example-artifacts042-mcp-library-surfaceProject Item
Project 1 item for issue #558 (Status: In Progress, claimed with
agent:claude).Summary
Implements spec 058-workflow-pipeline-execution: multi-capability pipelines executable through the existing workflow traversal engine and the existing execute endpoint, returning merged output under namespaced step keys.
Runtime/registry mechanics (additive, backward compatible)
WorkflowNodeOutput.publish_to_state_as: Option<String>— stores the entire step output object in workflow state under a namespaced key, alongside existingto_workflow_statehoisting (serde-defaulted; absent in existing artifacts).WorkflowDefinition.output_projection: Vec<String>— when non-empty, the final workflow output contains exactly these state keys, producing the spec's merged pipeline shape (e.g.{validate, process, summarize}); empty preserves current whole-state output.publish_to_state_asmust be non-empty when present;output_projectionkeys must be non-empty and unique.runtime.submit) work through the existing workflow-backed capability path (implementation_kind: workflow+workflow_ref) — no endpoint changes needed.Pipeline artifacts
workflows/examples/traverse-starter/pipeline/workflow.json— validate → process → summarize per spec 058, namespaced outputs, projection.contracts/examples/traverse-starter/capabilities/pipeline/contract.json— workflow-backed pipeline capability (traverse-starter.pipeline).examples/traverse-starter/registry-bundle/manifest.json+runtime-requests/pipeline.json— registerable bundle and canonical request.drafts/workflows/examples/doc-approval/pipeline/workflow.json+drafts/contracts/examples/doc-approval/capabilities/pipeline/contract.json— extract → analyze → recommend, quarantined under the top-leveldrafts/(the contractual-enforcement gate's designed quarantine) because the step capabilities belong to Add doc-approval.extract capability contract, WASM agent, and app manifest #538/Add doc-approval.analyze capability contract, WASM agent, and app manifest #556/Add doc-approval.recommend WASM agent for pipeline showcase #555 (Add doc-approval.recommend WASM agent for pipeline showcase #555 blocked) and their contracts are not merged yet, so the workflow cannot register. Wiring is conservative (input_from: initial_input— every step readsdocument). Move out ofdrafts/alongside those tickets; revisit if the recommend step needs analysis fields.Validation
cargo test --workspace— all 25 suites pass.pipeline_workflow_merges_namespaced_step_outputs_deterministically(same input twice → identical result, exact merged output, per-step trace records),pipeline_workflow_stops_on_failed_step_with_failed_step_id_in_trace.publish_to_state_asand duplicate/emptyoutput_projectionkeys; parse-compat test that old workflow JSON (without the new fields) still parses with defaults.traverse_starter_pipeline_bundle_executes_with_merged_namespaced_outputloads the shipped bundle manifest, real contracts, and real workflow JSON, executestraverse-starter.pipelinetwice viaRuntime::execute, and asserts the exact deterministic merged output.execute_endpoint_runs_pipeline_workflow_capability_with_merged_outputregisters step capabilities + workflow + workflow-backed pipeline capability, thenPOST /v1/workspaces/{id}/executewith the pipeline capability id returns 200 with the namespaced merged output (FR-003, response shape unchanged).cargo clippy --workspace --all-targets -- -D warnings— clean.cargo fmt --all— applied.bash scripts/ci/spec_alignment_check.sh— passes.Unblocks
reference-apps #110 (traverse-starter pipeline) now; #111 (doc-approval) once #538/#556/#555 agents land.
Closes #558.
🤖 Generated with Claude Code