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

stacklok / toolhive / 23595496600
65%

Build:
DEFAULT BRANCH: main
Ran 26 Mar 2026 01:02PM UTC
Jobs 1
Files 584
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

26 Mar 2026 12:57PM UTC coverage: 65.361% (+0.01%) from 65.349%
23595496600

push

github

web-flow
Add forEach step type for VMCP composite tool workflows (#4375)

* Add forEach step type for VMCP composite tool workflows

Workflows today require statically defined steps -- you cannot dynamically
spawn steps based on a previous step's output. This makes patterns like
"for each package in the image, query for vulnerabilities" impossible
without hardcoding every item.

Add a third step type `forEach` that iterates over a collection produced
by a previous step and executes an inner tool step for each item, with
configurable parallelism and error handling.

Key design decisions:
- forEach is a DAG-opaque macro: the DAG sees one node, internal
  parallelism is self-managed via errgroup + semaphore
- Single inner step (tool type only) keeps it simple; multi-step
  iteration bodies and elicitation inner steps can come later
- Nested forEach is explicitly rejected at validation time
- Collection resolves via Go template expansion then JSON parse,
  reusing existing template infrastructure
- Aggregated output has a well-known shape (iterations, count,
  completed, failed) so downstream templates have a predictable
  structure to reference

Safety limits:
- maxIterations: default 100, hard cap 1000
- maxParallel: default 10 (DAG default), hard cap 50
- itemVar cannot shadow the reserved "index" key
- Step and workflow timeouts apply as normal

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Address review feedback on forEach step implementation

Write a "cancelled" sentinel to iteration results when errgroup
cancels the context, preventing zero-value entries from producing
misleading aggregated output. Add MaxParallel() accessor to
dagExecutor to avoid coupling forEach to DAG struct internals.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

255 of 322 new or added lines in 7 files covered. (79.19%)

36 existing lines in 4 files now uncovered.

52383 of 80144 relevant lines covered (65.36%)

64.61 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
4
37.74
-0.19% pkg/vmcp/config/zz_generated.deepcopy.go
7
89.57
-5.76% pkg/vmcp/internal/compositetools/workflow_converter.go
12
74.73
2.57% pkg/vmcp/config/composite_validation.go
14
83.8
-6.32% pkg/vmcp/server/workflow_converter.go
30
82.81
0.3% pkg/vmcp/composer/workflow_engine.go

Uncovered Existing Lines

Lines Coverage ∆ File
3
71.85
-1.11% pkg/ignore/processor.go
8
23.56
-4.6% pkg/client/manager.go
11
68.42
-14.47% pkg/client/discovery.go
14
74.44
-5.19% pkg/client/config.go
Jobs
ID Job ID Ran Files Coverage
1 23595496600.1 26 Mar 2026 01:02PM UTC 584
65.36
GitHub Action Run
Source Files on build 23595496600
  • Tree
  • List 584
  • Changed 13
  • Source Changed 8
  • Coverage Changed 12
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #23595496600
  • 97818528 on github
  • Prev Build on main (#23594843864)
  • Next Build on main (#23602607437)
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

© 2026 Coveralls, Inc