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

stacklok / toolhive / 32264738558
70%

Build:
DEFAULT BRANCH: main
Ran 19 Aug 2026 02:41PM UTC
Jobs 1
Files 879
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

19 Aug 2026 02:33PM UTC coverage: 70.473% (-0.04%) from 70.515%
32264738558

push

github

web-flow
Reuse tool embeddings across sessions (#5996)

* Reuse tool embeddings across sessions

The optimizer re-embeds the whole tool set on every client session, so
tools/list blocks on a full index build each time a client connects. At 140
aggregated tools against a CPU embedding backend that is 16-19s per connect,
and under concurrency the redundant rebuilds queue until sessions fail.

THV-0022 describes the store as a regenerable cache whose cold-start cost
falls on the first session after a pod restart. This restores that: an
embedding is reused when the tool's embedded text and the embedding backend
are both unchanged, keyed on a hash of the text plus the backend identity.

Because vectors now outlive a single build, two things follow. Stored vectors
whose width differs from the current backend's are skipped in search rather
than compared, since cosine distance indexes both slices positionally. And a
fixed probe string is re-embedded on each build and compared with the stored
one, because neither the content hash nor the vector width can observe a
same-width model swap behind an unchanged service URL.

Fixes #5847

Signed-off-by: TANTIOPE <antiope.tristan.pro@gmail.com>

* Derive the cache identity from the backend model id, dropping the canary

The embedding cache key now folds in the model id read from the backend
on every build: TEI reports it from /info, the OpenAI client knows it
from configuration. A model swap changes the keys, so stale vectors
stop being found instead of needing to be detected and discarded —
which makes the canary probe, its table, its ordering lock and its
distance threshold unnecessary. A failed id read falls back to the last
id seen, keeping keys stable across transient failures.

The identity is re-read after each embedding batch; a build whose batch
spanned a swap is discarded and re-run under the new identity rather
than committing vectors under keys naming the wrong model.

The dimension guard moves into CosineSimilarit... (continued)

205 of 239 new or added lines in 5 files covered. (85.77%)

89 existing lines in 7 files now uncovered.

85996 of 122027 relevant lines covered (70.47%)

100.99 hits per line

Uncovered Changes

Lines Coverage ∆ File
21
86.46
1.19% pkg/vmcp/optimizer/internal/toolstore/sqlite_store.go
11
36.67
-5.11% pkg/vmcp/optimizer/internal/types/mocks/mock_types.go
2
88.8
0.23% pkg/vmcp/optimizer/internal/similarity/tei_client.go

Coverage Regressions

Lines Coverage ∆ File
64
61.31
-5.5% pkg/workloads/manager.go
6
20.11
-3.45% pkg/client/manager.go
6
76.15
-5.5% pkg/secrets/keyring/keyctl_linux.go
5
0.0
-100.0% pkg/workloads/sysproc_unix.go
3
96.57
-0.45% pkg/authz/authorizers/cedar/core.go
3
65.38
-3.85% pkg/state/runconfig.go
2
82.27
-0.21% pkg/vmcp/composer/workflow_engine.go
Jobs
ID Job ID Ran Files Coverage
1 32264738558.1 19 Aug 2026 02:41PM UTC 879
70.47
GitHub Action Run
Source Files on build 32264738558
  • Tree
  • List 879
  • Changed 15
  • Source Changed 5
  • Coverage Changed 15
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #32264738558
  • fe39aecf on github
  • Prev Build on main (#32241985523)
  • Next Build on main (#32269514024)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc