Repository navigation
fix(embeddings): persist model cache outside node_modules - #179
Open
HengYangDS wants to merge 5 commits into
Open
HengYangDS wants to merge 5 commits into
HengYangDS wants to merge 5 commits into
Conversation
This was referenced Sep 26, 2026
3 of 4 tasks
AndrewSpell
added a commit
to AndrewSpell/episodic-memory
that referenced
this pull request
Oct 10, 2026
Author
|
Author follow-up for #179: the exact PR head is still mergeable, but its CI run remains action_required and has not executed. The consolidated current request on #180 covers this contribution as well: please approve the fork workflow and review its narrow source behavior for merge. I will address resulting failures and keep generated output, portability and generality qualified; no hosted pass or installation update is claimed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
node_modules.EPISODIC_MEMORY_MODEL_CACHE_DIRfor a shared or pre-seeded cache and explicitEPISODIC_MEMORY_OFFLINE=1for remote-download denial. Forward both through the existing Codex STDIO MCP allowlist.Product boundary
Cache and offline controls use documented process-global Transformers.js configuration. They affect all loaders sharing that module instance; an embedding host coordinates the shared cache and permissions. This contribution does not offer per-model or concurrent configuration isolation. Fresh normal processes remain network-enabled, while pre-existing host denial and explicit offline remain authoritative.
The dependency remains exactly Transformers.js 4.2.0. This repository ignores
package-lock.json; its former caret range selected an unqualified 4.3.x/ONNX line. The exact pin is a bounded compatibility choice, not a claim that 4.2.0 is the latest stable or that later releases are defective. Upgrading that constraint requires separate native model/ABI qualification.Current revision qualification (
fedc911)On macOS arm64 using Node 24.19.0 (ABI 137), native npm and manifest-compatible Vitest 3.2.7:
npm installcompleted with the unchanged declared manifest and nativeallowScripts; SQLite and sqlite-vec instantiated. The package cache was warmed; this is not a cold package-network claim.npm test: 371/371 tests across 66 files, zero skips, including the actual packaged STDIO MCP tests.npm run buildcompleted. The final MCP bundle differs from exact upstream base7e065193only at the intendedgetModelCacheDir/initEmbeddingsproduct-source sections. The earlier approximately 6,300-line transitive dependency churn has been removed using native build inputs, not compiled-source hand edits. SDK, Zod, Marked and URI parser bytes match the upstream bundle; package constraints are unchanged.The first native full-suite prerequisite failed because its isolated Unix-socket pathname was too long for macOS. A shorter caller-owned temporary directory allowed the same unchanged native pretest/full-suite to execute. The initial actual-model recovery assertion also exhausted heap by deeply enumerating a 34 MB Buffer; native
Buffer.equalsnow checks the same bytes without expanding the test runner. Failed receipts are retained, not hidden or used as product-defect claims.Prior evidence and remaining limits
The earlier parent-head clean Node 22/26 359-test runs remain historical; they are not rerun or represented as acceptance of this revision. The earlier Node 24.21 cleanup/signing failures do not prove an unchanged failure on 24.19, and the current successful 24.19 gate does not prove those 24.21 upstream issues resolved. Ubuntu/Windows, hosted CI and the later Transformers line remain unqualified.
Fork workflow execution requires maintainer approval; submission, local tests and mergeability are not hosted-green evidence. I will address actual review/CI feedback and follow through to merge, stable-release inclusion and installed adoption. Maintainer merge authority is preserved.