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
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
fix: invalidate legacy Hugging Face auth cache
[._.]/ Adam Eivy50ba980a2171
diff --git a/server/services/huggingFaceRepoCache.js b/server/services/huggingFaceRepoCache.jsindex eca8ff3a68..4656b20545 100644--- a/server/services/huggingFaceRepoCache.js+++ b/server/services/huggingFaceRepoCache.js@@ -24,7 +24,10 @@ import { PATHS, readJSONFileStrict, atomicWrite, ensureDir } from '../lib/fileUtconst CACHE_FILE = join(PATHS.data, 'cache', 'huggingface-repos.json')// Bump when the envelope shape changes — a mismatch drops the file and refetches// rather than trying to read an older layout.-const CACHE_SCHEMA_VERSION = 1+// v2 invalidates legacy `model: null` entries, which may represent a cached+// 401/403 from before auth denials became retryable (#4365). Their envelope did+// not retain the HTTP status, so selective migration is impossible.+const CACHE_SCHEMA_VERSION = 2// 7 days. Long because the payload is near-immutable (published file sizes never// change); bounded because a repo CAN gain a new quant, and a stale card would// hide it indefinitely.diff --git a/server/services/huggingFaceRepoCache.test.js b/server/services/huggingFaceRepoCache.test.jsindex 6a498090eb..ea4e479dfc 100644--- a/server/services/huggingFaceRepoCache.test.js+++ b/server/services/huggingFaceRepoCache.test.js@@ -62,7 +62,7 @@ describe('huggingFaceRepoCache', () => {const stale = Date.now() - (8 * 24 * 60 * 60 * 1000); // 8 days — TTL is 7await mkdir(join(tempRoot, 'cache'), { recursive: true });await writeFile(cacheFile(), JSON.stringify({- schemaVersion: 1,+ schemaVersion: 2,entries: {'old/Repo': { fetchedAt: stale, model: { id: 'old/Repo' } },'new/Repo': { fetchedAt: Date.now(), model: { id: 'new/Repo' } }