Files
ruflo/v3/@claude-flow/embeddings/src
6afffb777c fix(embeddings): writable model cache dir + retryable degraded state (#3692) (#3831)
A system-prefix global install's default ONNX model cache lives under its
own package directory, which is root-owned — an ordinary runtime user hits
EACCES the first time any of three independent call sites load the local
transformers.js pipeline. The resulting failure also got memoized as
permanent mock-embedding state for a worker's entire process lifetime, so
fixing cache permissions mid-run never helped an already-running worker.

- Resolve a writable cache dir (TRANSFORMERS_CACHE/HF_HOME, else
  ~/.cache/ruflo/models) and set it before pipeline() init at all three
  call sites: transformers-loader.ts, memory-initializer.ts, task-embedder.ts.
- Distinguish a permanently-missing backend from a retryable environmental
  failure (EACCES, ENOSPC, transient network) in memory-initializer.ts and
  task-embedder.ts, so a retryable degraded state re-attempts real
  initialization after a bounded interval instead of requiring a restart.
- Keep ADR-390's truthful backend:'onnx'|'mock' reporting unchanged.

See ADR-454 for the full decision record.

Co-authored-by: Nicholas Ruest <nicholasruest@Nicholass-MacBook-Pro.local>
Co-authored-by: RuFlo <ruv@ruv.net>
2026-10-19 22:56:02 -04:00
..
2026-01-07 04:42:18 +00:00
2026-01-07 04:36:22 +00:00