Repository navigation
fix(memory): isolate local embedding services across runtimes - #104741
Merged
Merged
Conversation
vincentkoc
marked this pull request as ready for review
July 11, 2026 22:26
Member
Author
|
Land-ready proof:
The five session-index failures seen in the full Memory Core index test reproduce unchanged on clean current Behavior verified: embedding providers receive lifecycle acquisition through the Memory Core host boundary, manager caches remain isolated by host hook, configured aliases/base URLs remain distinct, and the existing llama runtime-facts propagation is preserved. |
Member
Author
|
Merged via rebase.
|
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.
Related: #104306
What Problem This Solves
Fixes an issue where embedding requests could reuse another plugin runtime's provider-local-service lifecycle after the on-demand local embedding service support landed.
Why This Change Was Made
Memory Core now receives local-service acquisition as a narrow host-injected hook and passes it through provider creation, tools, CLI, and SDK facade calls. Builtin and QMD manager caches include the host-hook identity, preventing fallback managers from retaining another runtime's lifecycle owner.
The change stays within Memory Core and its dedicated SDK facades. It does not add a shared acceleration type or expose the core lifecycle owner to plugins.
User Impact
Local OpenAI-compatible, Ollama, and LM Studio embedding requests use the same serialized startup, health, lease, abort, in-flight, and idle-stop lifecycle as model requests without leaking service ownership across plugin runtimes.
Configured provider aliases and base URLs remain intact.
Evidence
tbx_01kx9jc2bd046s32j0k2d9e7twOPENCLAW_TESTBOX=1 pnpm check:changedon all 24 changed filesmemory/index.test.tscurrently has five session-index failures on both this branch and clean currentmain; the new local-service cache-isolation test passes independently