Skip to content

fix(memory): isolate local embedding services across runtimes - #104741

Merged
vincentkoc merged 6 commits into
mainfrom
fix/embedding-local-service-runtime-facts
Jul 11, 2026
Merged

vincentkoc merged 6 commits into
mainfrom
fix/embedding-local-service-runtime-facts

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

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

  • Blacksmith Testbox tbx_01kx9jc2bd046s32j0k2d9e7tw
  • Focused changed-surface Memory Core and SDK suite: 163 tests passed
  • OPENCLAW_TESTBOX=1 pnpm check:changed on all 24 changed files
  • Fresh autoreview completed with no accepted/actionable findings
  • Preserved the existing local embedding runtime-facts propagation and current-main ranking coverage during rebase
  • The full memory/index.test.ts currently has five session-index failures on both this branch and clean current main; the new local-service cache-isolation test passes independently

@vincentkoc vincentkoc self-assigned this Jul 11, 2026
@openclaw-barnacle openclaw-barnacle Bot added extensions: memory-core Extension: memory-core size: L maintainer Maintainer-authored PR labels Jul 11, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review July 11, 2026 22:26
@vincentkoc

Copy link
Copy Markdown
Member Author

Land-ready proof:

The five session-index failures seen in the full Memory Core index test reproduce unchanged on clean current main; the added local-service cache-isolation test passes independently.

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.

@vincentkoc
vincentkoc merged commit 52f8847 into main Jul 11, 2026
177 of 181 checks passed
@vincentkoc
vincentkoc deleted the fix/embedding-local-service-runtime-facts branch July 11, 2026 22:34
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via rebase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: memory-core Extension: memory-core maintainer Maintainer-authored PR size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant