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

kubeflow / mcp-server / 37055694876
83%

Build:
DEFAULT BRANCH: main
Ran 02 Oct 2026 07:41PM UTC
Jobs 3
Files 38
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

02 Oct 2026 07:40PM UTC coverage: 82.491% (+0.6%) from 81.929%
37055694876

push

github

web-flow
fix(core): fall back to keyword search when the embedding model can't load (#254)

* fix(core): fall back to keyword search when the embedding model can't load

_EmbeddingCache.get() only caught ImportError. With sentence-transformers
installed but no way to download all-MiniLM-L6-v2, as on an air-gapped
cluster, SentenceTransformer() raised OSError and find_tools failed on
every call, retrying the download each time.

Catch any error while loading, log it, and remember the failure so later
calls go straight to keyword search. reset() clears it, so a reset or a
restart tries the model again.

Fixes #251

Signed-off-by: yats0x7 <kattayatharth@gmail.com>

* fix(core): name the real failure when semantic search is unavailable

The model download and the encode pass shared one handler, so a model
that loaded but failed to encode logged "Could not load the embedding
model". Keep the catch broad, since an encode failure escaping get()
would crash find_tools again, and split the import check out so the
remaining handler can name either failure honestly.

Add a test for a model that loads and then fails to encode.

Signed-off-by: yats0x7 <kattayatharth@gmail.com>

* fix(core): recover semantic search and survive a broken import

Two review points from #254.

init_dynamic_tools() now resets the embedding cache, so _unavailable is
cleared on a registry rebuild and the model is tried again once the
underlying problem is fixed.

The import of sentence_transformers now catches more than ImportError. A
broken native dependency raises OSError or RuntimeError from the import
itself, which escaped find_tools() instead of falling back to keyword
search.

Signed-off-by: yats0x7 <kattayatharth@gmail.com>

* fix(core): load the embedding model once under a lock

Concurrent find_tools() calls all read _unavailable as False and each
started their own model download: eight threads produced eight loads.

Guard the load with a lock and re-check the cached state inside it, so
c... (continued)

2530 of 3067 relevant lines covered (82.49%)

2.47 hits per line

Coverage Regressions

Lines Coverage ∆ File
25
74.86
13.21% core/dynamic_tools.py
Jobs
ID Job ID Ran Files Coverage
1 python-3.10 - 37055694876.1 02 Oct 2026 07:41PM UTC 38
82.49
GitHub Action Run
2 python-3.11 - 37055694876.2 02 Oct 2026 07:41PM UTC 38
82.49
GitHub Action Run
3 python-3.12 - 37055694876.3 02 Oct 2026 07:41PM UTC 38
82.49
GitHub Action Run
Source Files on build 37055694876
  • Tree
  • List 38
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #37055694876
  • 65582b4c on github
  • Prev Build on main (#37053472487)
  • Next Build on main (#37185347834)
  • Delete
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