• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stacklok / toolhive / 19379293047
51%

Build:
DEFAULT BRANCH: main
Ran 14 Nov 2025 10:26PM UTC
Jobs 1
Files 377
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

14 Nov 2025 10:25PM UTC coverage: 49.178% (+0.4%) from 48.812%
19379293047

push

github

web-flow
Advanced Workflow Features for vMCP Composition (#2592)

## Overview

Implements advanced workflow features for Virtual MCP Composite Tools, including DAG-based parallel execution, step dependencies, sophisticated error handling, and workflow state management. This completes Phase 2 of the composition work.

**Issue**: Closes #156 (stacklok/stacklok-epics)

## What Changed

### Core Features

#### 1. DAG-Based Parallel Execution
- **New file**: [pkg/vmcp/composer/dag_executor.go](pkg/vmcp/composer/dag_executor.go)
  - Implements topological sort using Kahn's algorithm to build execution levels
  - Executes independent steps in parallel using `errgroup` for coordination
  - Semaphore-based concurrency limiting (default: 10 parallel steps)
  - Automatic optimization: steps with no dependencies run concurrently
  - Performance improvement: parallel execution reduces workflow time by ~60-70% for independent steps

#### 2. Step Dependencies
- `depends_on` field support in [pkg/vmcp/composer/composer.go:67](pkg/vmcp/composer/composer.go#L67)
- Dependency graph validation with cycle detection using DFS
- Transitive dependencies automatically handled
- Missing dependency validation at workflow definition time

#### 3. Advanced Error Handling
- **Three-level error handling**:
  - Step-level: `on_error.continue_on_error` overrides workflow-level settings
  - Workflow-level: `failure_mode` (abort/continue/best_effort)
  - Automatic: retry with exponential backoff
- **Retry logic** in [pkg/vmcp/composer/workflow_engine.go:311-350](pkg/vmcp/composer/workflow_engine.go#L311-L350):
  - Configurable retry count and initial delay
  - Exponential backoff (2^attempt * initial_delay, max 60x)
  - Safety cap: maximum 10 retries to prevent infinite loops

#### 4. Workflow State Management
- **Pluggable state store interface**: [pkg/vmcp/composer/composer.go:191-217](pkg/vmcp/composer/composer.go#L191-L217)
- **In-memory implementation**: [pkg/vmcp/composer/state_store.go](... (continued)

453 of 522 new or added lines in 6 files covered. (86.78%)

15 existing lines in 1 file now uncovered.

24216 of 49242 relevant lines covered (49.18%)

61.56 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
6
96.0
pkg/vmcp/composer/dag_executor.go
18
90.95
pkg/vmcp/composer/state_store.go
45
80.35
-1.72% pkg/vmcp/composer/workflow_engine.go

Uncovered Existing Lines

Lines Coverage ∆ File
15
38.71
-48.39% pkg/vmcp/composer/workflow_errors.go
Jobs
ID Job ID Ran Files Coverage
1 19379293047.1 14 Nov 2025 10:26PM UTC 377
49.18
GitHub Action Run
Source Files on build 19379293047
  • Tree
  • List 377
  • Changed 5
  • Source Changed 4
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #19379293047
  • c262cf88 on github
  • Prev Build on main (#19376910474)
  • Next Build on main (#19389532234)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc