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

stacklok / toolhive / 27712366822
67%

Build:
DEFAULT BRANCH: main
Ran 17 Jun 2026 07:00PM UTC
Jobs 1
Files 762
Run time 2min
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

17 Jun 2026 06:54PM UTC coverage: 67.053% (+0.02%) from 67.032%
27712366822

push

github

web-flow
Wire the tool optimizer onto the Serve path (#5543)

* Wire the tool optimizer onto the Serve path

Implements changes for issue #5538:
- Build a per-session optimizer over core.ListTools on the Serve path
  and advertise only find_tool/call_tool (sourced from the core)
- Route call_tool's inner invocation through core.CallTool by its real
  name, closing the deferred inner-target admission gap
- Skip the session factory's optimizer decorator on the Serve path
  (FactoryConfig.AdvertiseFromCore) to avoid double-indexing the store
- Surface the resolved optimizer factory via Manager.OptimizerFactory;
  store/cleanup ownership stays in sessionmanager

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

* Guard nil find_tool output and document optimizer re-index cost

Addresses stacklok/toolhive#5543 review comments:
- MEDIUM serve_optimizer.go (3428801576): add the output == nil guard to
  optimizerFindToolHandler for parity with the legacy/sibling handlers, so a
  nil result cannot marshal to "null" and surface as a success
- LOW serve_optimizer.go (3428801603): document that optimizerSessionTools
  re-upserts on every registration and cross-pod rehydration (idempotent by
  PK, repeated work not a leak; optimization deferred to #5445)

* Strengthen Serve optimizer tests

Addresses stacklok/toolhive#5543 review comments:
- LOW serve_optimizer_test.go (3428801613): assert find_tool returns exactly
  the core's advertised tool names by decoding into FindToolOutput, instead of
  substring-matching the whole marshalled body; note ranking is out of scope
- LOW serve_optimizer.go (3428801607): add a test that optimizerToolHandler
  rejects an unknown meta-tool name, locking in the defensive default branch
- LOW serve_optimizer_test.go (3428801618): assert the cross-pod rehydration
  re-aggregates via a fresh core.ListTools and rebuilds the optimizer (the
  half of AC5 the test did not previously prove)

* Enforce the AdvertiseFromCore doubl... (continued)

139 of 167 new or added lines in 7 files covered. (83.23%)

3 existing lines in 1 file now uncovered.

69179 of 103170 relevant lines covered (67.05%)

64.06 hits per line

Uncovered Changes

Lines Coverage ∆ File
28
74.07
pkg/vmcp/server/serve_optimizer.go

Coverage Regressions

Lines Coverage ∆ File
3
80.42
-0.71% pkg/transport/proxy/httpsse/http_proxy.go
Jobs
ID Job ID Ran Files Coverage
1 27712366822.1 17 Jun 2026 07:00PM UTC 762
67.05
GitHub Action Run
Source Files on build 27712366822
  • Tree
  • List 762
  • Changed 9
  • Source Changed 6
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #27712366822
  • fc70da75 on github
  • Prev Build on main (#27711103421)
  • Next Build on main (#27717871704)
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