From 024c90d68f711c660747c5d04f58977ea3dc008b Mon Sep 17 00:00:00 2001 From: Oliver Kieselbach Date: Sat, 8 Aug 2026 12:37:13 +0200 Subject: [PATCH] ci: cache the MiniLM embedding model so MCP tests stop 429ing on huggingface MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The vector-search tests tokenize with the real Xenova/all-MiniLM-L6-v2 model. transformers.js caches it under node_modules by default, which npm ci recreates on every run — so each CI run re-downloaded the tokenizer/weights from huggingface.co, and a rate-limited response (429) failed the whole MCP job (run 31252869254; unrelated to the commit under test). Persist the model via actions/cache and point HF_CACHE_DIR (already honored by vector-search-provider.ts) at it. Co-Authored-By: Claude Fable 5 --- .github/workflows/ci.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1324d148..1bc58950 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -107,8 +107,22 @@ jobs: - name: Typecheck run: npx tsc --noEmit + # The vector-search tests tokenize with the real all-MiniLM-L6-v2 model + # (~23 MB tokenizer + ONNX weights). transformers.js caches under + # node_modules by default, which npm ci recreates — so every CI run + # re-downloaded from huggingface.co and rate-limits (429) failed the job + # (run 31252869254). Persist the model across runs instead; HF_CACHE_DIR + # is honored by vector-search-provider.ts. + - name: Cache embedding model + uses: actions/cache@v4 + with: + path: ${{ github.workspace }}/.hf-cache + key: hf-model-Xenova-all-MiniLM-L6-v2 + - name: Tests run: npm test + env: + HF_CACHE_DIR: ${{ github.workspace }}/.hf-cache guardrails-in-sync: name: Generated guardrails match rules/guardrails.json