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

stacklok / toolhive / 21485790118 / 1
60%
main: 60%

Build:
DEFAULT BRANCH: main
Ran 29 Jan 2026 04:23PM UTC
Files 484
Run time 10s
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

29 Jan 2026 04:15PM UTC coverage: 60.439% (-0.03%) from 60.472%
21485790118.1

push

github

web-flow
fix(vmcp) - template validation with functions (#3492)

While I was working on stacklok/docs-website#367, I attempted to validate the documented composite tool which used the fromJson function. However, the ValidateTemplate function in composite_validation.go was parsing templates without registering the custom template functions available at runtime. This caused validation to reject valid templates with errors like:

function "fromJson" not defined
This PR fixes template validation failing for composite tools that use custom template functions like fromJson, json, and quote.

Solution: Consolidate template function definitions into a shared FuncMap() in pkg/templates/funcs.go. Both validation and runtime now import from this single source of truth, ensuring parity between what validates and what executes.


Changes
In commit 1:

Add e2e test that verifies VirtualMCPServer with fromJson templates becomes ready. This fails without the following commit.
In commit 2:

Add pkg/templates/funcs.go with shared FuncMap() containing json, quote, and fromJson
Update pkg/vmcp/composer/template_expander.go to use templates.FuncMap()
Update pkg/vmcp/config/composite_validation.go to use templates.FuncMap() in ValidateTemplate
Update pkg/templates/references.go to use FuncMap() in ExtractReferences

39209 of 64874 relevant lines covered (60.44%)

77.02 hits per line

Source Files on job 21485790118.1
  • Tree
  • List 484
  • Changed 8
  • Source Changed 3
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 21485790118
  • 3daefd3d on github
  • Prev Job for on main (#21484983596.1)
  • Next Job for on main (#21485843449.1)
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