Skip to content

Implement workflow pipeline execution surface (spec 058)#600

Merged
enricopiovesan merged 2 commits into
claude/issue-554-starter-wasm-agentsfrom
claude/issue-558-pipeline-execution
Jul 10, 2026
Merged

Implement workflow pipeline execution surface (spec 058)#600
enricopiovesan merged 2 commits into
claude/issue-554-starter-wasm-agentsfrom
claude/issue-558-pipeline-execution

Conversation

@enricopiovesan

@enricopiovesan enricopiovesan commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Governing Spec

  • 058-workflow-pipeline-execution
  • 007-workflow-registry-traversal
  • 041-workflow-composition-api
  • 009-expedition-example-artifacts
  • 042-mcp-library-surface

Project 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.

Stacked on #599 (traverse-starter validate/summarize agents, issue #554) — the pipeline integration test executes those agents. Merge #599 first; I will rebase this branch onto main afterwards.

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 existing to_workflow_state hoisting (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.
  • Registry validation: publish_to_state_as must be non-empty when present; output_projection keys must be non-empty and unique.
  • FR-003 (execute endpoint accepts pipeline id) and FR-004 (runtime.submit) work through the existing workflow-backed capability path (implementation_kind: workflow + workflow_ref) — no endpoint changes needed.
  • FR-005 (stop on step failure with failed step id) and FR-008 (per-step trace with index and capability id) are existing traversal behavior, now covered by pipeline tests.

Pipeline artifacts

Validation

  • cargo test --workspace — all 25 suites pass.
    • Runtime: 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.
    • Registry: rejection tests for empty publish_to_state_as and duplicate/empty output_projection keys; parse-compat test that old workflow JSON (without the new fields) still parses with defaults.
    • CLI end-to-end: traverse_starter_pipeline_bundle_executes_with_merged_namespaced_output loads the shipped bundle manifest, real contracts, and real workflow JSON, executes traverse-starter.pipeline twice via Runtime::execute, and asserts the exact deterministic merged output.
    • HTTP surface: execute_endpoint_runs_pipeline_workflow_capability_with_merged_output registers step capabilities + workflow + workflow-backed pipeline capability, then POST /v1/workspaces/{id}/execute with 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

enricopiovesan and others added 2 commits July 9, 2026 14:17
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>
@enricopiovesan enricopiovesan merged commit b486a76 into claude/issue-554-starter-wasm-agents Jul 10, 2026
25 checks passed
@enricopiovesan enricopiovesan deleted the claude/issue-558-pipeline-execution branch July 10, 2026 04:57
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