Skip to content

refactor(ollama): remove orphan embedding hook - #130765

Merged
steipete merged 1 commit into
mainfrom
codex/cleanup-ollama-orphan-hook-20260826
Aug 27, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/cleanup-ollama-orphan-hook-20260826

Conversation

@steipete

@steipete steipete commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Ollama still implemented the optional ProviderPlugin.createEmbeddingProvider hook after the production provider runtime stopped consuming that hook. Its lazy runtime loader and a large lazy-import test branch therefore described a path that current OpenClaw could not call.

The dormant wrapper duplicated the active memory embedding adapter's query/document projection and made the plugin entrypoint appear to own two embedding creation paths.

Why This Change Was Made

This removes only Ollama's orphan hook implementation, its now-dead lazy loader, and the obsolete mock/assertion branch that exercised it.

The public optional ProviderPlugin type remains available. Ollama's actual memory embedding adapter, embedding runtime, query/document behavior, output dimensionality handling, Gateway embedding transport, and plugin SDK helpers are unchanged.

The hook and wrapper existed in the v2026.7.1 lineage; the wrapper was removed from the current architecture. This cleanup does not claim the historical hook was never functional.

User Impact

No user-visible behavior change is intended. Ollama embeddings continue through the canonical registered memory embedding adapter and existing transport path. The change removes a misleading internal layer rather than a working public capability.

Evidence

  • Current-main source search finds no production .createEmbeddingProvider consumer; only the optional public type, Ollama implementation, and its test branch remained.
  • Grouped owner/sibling coverage passes 97/97 tests across Ollama lazy imports and transport, Memory Core provider creation/state, and shared embedding runtime resolution.
  • The isolated real-transport file passes 4/4 on rerun; its initial cold run timed out under a concurrent full build, while the unchanged isolated rerun passed 4/4.
  • Ollama package-local type checking passes with zero diagnostics.
  • The complete changed-path gate passes all phases after restoring the exact pinned Daytona SDK importer in a task-owned dependency overlay: production and test type graphs, scoped lint, plugin boundaries, database/media/runtime-sidecar guards, dead-code scans, formatting, and zero import cycles.
  • Fresh review reports no actionable findings.
  • Production: 0/-22, net -22 lines. Tests: 0/-43, net -43 lines. Total: 65 lines removed.
  • No public SDK/type, configuration, protocol, dependency, package manifest, or persisted-state change.

CHANGELOG.md is release-owned; this behavior-preserving internal cleanup needs no release entry.

@clawsweeper

clawsweeper Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@steipete
steipete marked this pull request as ready for review August 27, 2026 06:46
@steipete
steipete merged commit 0a633d8 into main Aug 27, 2026
168 checks passed
@steipete
steipete deleted the codex/cleanup-ollama-orphan-hook-20260826 branch August 27, 2026 06:59
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant