Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: isolate huggingFaceCatalog gated-repo test from real settings

[._.]/ Adam Eivyceb5742759f0
diff --git a/server/services/huggingFaceCatalog.test.js b/server/services/huggingFaceCatalog.test.js
index 2f89b8a338..acf006ab36 100644
--- a/server/services/huggingFaceCatalog.test.js
+++ b/server/services/huggingFaceCatalog.test.js
@@ -18,6 +18,14 @@ vi.mock('./huggingFaceRepoCache.js', () => ({
writeCachedRepoModel: vi.fn(async () => {})
}))
+// `getHfToken()` reads a stored token from settings before falling back to the
+// env vars this file stubs — without this mock, a dev machine with a real HF
+// token saved in Settings silently outranks `vi.stubEnv`, corrupting the
+// Authorization header the auth-gated-repo tests assert on.
+vi.mock('./settings.js', () => ({
+ getSettings: vi.fn(async () => ({}))
+}))
+
const response = (body, ok = true) => ({
ok,
status: ok ? 200 : 500,