fix(plugins): load owning plugin for configured memory embedding provider at startup#89652
Conversation
…ider at startup Gateway startup planning now matches agents.*.memorySearch.provider against plugin contracts.memoryEmbeddingProviders and includes the owning plugin, the same capability-specific startup loading already done for speech/web/model/ image/voice providers. Without this, memorySearch.provider="openai" did not load the OpenAI plugin, so active-memory started with no registered memory embedding provider and silently dropped to keyword/FTS-only recall. Also warns at Gateway startup when a configured memory embedding provider is not registered by any loaded plugin. Closes openclaw#89651 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Codex review: needs maintainer review before merge. Reviewed June 6, 2026, 8:09 AM ET / 12:09 UTC. Summary PR surface: Source +348, Tests +594. Total +942 across 9 files. Reproducibility: yes. from source inspection, though I did not run a live Gateway repro in this read-only review. Current main collects sibling provider families for startup but omits memory embedding providers, matching the reported Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the startup-planning fix if maintainers accept earlier provider-plugin activation for explicit memory provider configs, while keeping the runtime fail-fast/race work in #90336. Do we have a high-confidence way to reproduce the issue? Yes from source inspection, though I did not run a live Gateway repro in this read-only review. Current main collects sibling provider families for startup but omits memory embedding providers, matching the reported Is this the best way to solve the issue? Yes, this appears to be the right layer for the startup part: Gateway planning already owns manifest-based provider startup, and the PR mirrors sibling capability paths plus adds diagnostics. The runtime fail-fast/provider visibility problem should remain separate in the linked runtime work. AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 0a08625d795f. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +348, Tests +594. Total +942 across 9 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
CHANGELOG.md is release-owned; PR release-note context belongs in the PR body and commit messages. Per ClawSweeper review, remove the changelog line this PR added so release generation owns CHANGELOG.md. Behavior context stays in the fix commit body and PR description. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Implementation-loop closeout for b7648ca. Summary:
Validation:
CI:
Remaining maintainer decision:
|
|
Maintainer land-ready note for b7648ca. I am accepting the product behavior tradeoff here: explicit memorySearch.provider and memorySearch.fallback configs should activate the owning provider plugin during Gateway startup, rather than silently allowing semantic memory to degrade when the plugin was not loaded. Validation reviewed before merge:
CI reviewed before merge:
Related runtime work:
|
|
Merged by direct manual squash merge.
Proof used for the merge is recorded in the land-ready note above. The only accepted CI exceptions were unrelated baseline failures in build-artifacts and check-additional-boundaries-bcd, both from existing extension live-test boundary offenders in extensions/google/google.live.test.ts and extensions/minimax/minimax.live.test.ts. |
Summary
agents.*.memorySearch.provider), matched againstcontracts.memoryEmbeddingProviders— the same capability-specific startup loading already done for speech, web search, model, image, and voice providers.agents.defaults.memorySearch.provider = "openai"did not pull the OpenAI plugin into the startup plan, soactive-memorycould start with no registered memory embedding provider and silently drop to keyword/FTS-only recall.memorySearch.provideris not registered by any loaded plugin, so the silent fallback is diagnosable from startup logs.memorySearch.provideris unset (only explicitly-configured concrete providers are collected;auto/local/nonesentinels and custommodels.providers.<id>openai-compatible ids are intentionally excluded).Linked context
Closes #89651
Related #
Was this requested by a maintainer or owner? This is a contributor bug fix opened from issue #89651.
Real behavior proof (required for external PRs)
agents.defaults.memorySearch.provider = "openai"did not load the owning plugin at Gateway startup, so memory embeddings were never registered and recall fell back to keyword/FTS-only.agents.defaults.memorySearch.provider = "openai", active-memory enabled, and OpenAI configured as the memory embedding provider.openclaw plugins inspect openai --json,openclaw plugins inspect active-memory --json, and a directmemory_searchquery.memoryEmbeddingProviderIds=["openai"], active-memory is loaded and activated, and live memory recall returns vector results throughprovider=openaiwithmodel=text-embedding-3-largeinstead of keyword-only fallback.Tests and validation
Which commands did you run?
pnpm test src/plugins/channel-plugin-ids.test.ts(131 passed)pnpm test src/gateway/server-startup-plugins.test.ts(8 passed)pnpm test src/plugins/bundled-plugin-metadata.test.ts src/plugins/effective-plugin-ids.test.ts(40 passed)pnpm test src/gateway/server-plugins.test.ts src/plugins/loader-records.test.ts(48 passed)pnpm tsgo(clean),oxfmt --checkon touched files (clean),pnpm build(clean, no[INEFFECTIVE_DYNAMIC_IMPORT])pnpm check:test-types(clean)pnpm deadcode:unused-files(clean; allowlist matched 36 intentional entries)pnpm format:check src/gateway/server-startup-plugins.test.ts scripts/deadcode-unused-files.allowlist.mjs(clean)What regression coverage was added or updated?
src/plugins/channel-plugin-ids.test.ts: owning plugin included for a configured (and per-agent) memory embedding provider; sentinel/disabled providers ignored; disabled and denied owners excluded; restrictive-allowlist metadata scope keeps the owner. Fixture updated so the OpenAI plugin declarescontracts.memoryEmbeddingProviders: ["openai"](matching the real manifest).src/gateway/server-startup-plugins.test.ts:warnUnregisteredConfiguredMemoryEmbeddingProviderswarns for an unregistered configured provider, stays quiet when registered, skips custommodels.providersids, and skips sentinel/disabled providers.What failed before this fix, if known?
memorySearch.provider=openaiproduced a startup plan withoutopenai, so no memory embedding provider was registered.Risk checklist
Did user-visible behavior change? Yes — a configured memory-embedding provider's plugin is now loaded at startup; semantic recall works instead of silently degrading.
Did config, environment, or migration behavior change? No new config surface; this reads existing
agents.*.memorySearch.provider.Did security, auth, secrets, network, or tool execution behavior change? No.
What is the highest-risk area? Pulling an additional plugin into the Gateway startup set. It is mitigated by routing through the same allow/deny/enabled/activation policy used by the neighboring
canStartConfigured*ProviderPluginfunctions (fail-closed for denied/disabled), only collecting explicitly-configured concrete provider ids, and excluding sentinels and custommodels.providersids.How is that risk mitigated? Capability-specific collection mirrors the existing voice/generation provider startup paths; both the authoritative plan path (
resolveGatewayStartupPluginPlanFromRegistry) and the metadata-scope fast path (resolveGatewayStartupMetadataPluginIds) are covered so the scoped snapshot cannot under-scope the owning plugin.Current review state
What is the next action? Maintainer review after CI rerun.
What is still waiting on author, maintainer, CI, or external proof? CI rerun on commit
d723a1f6df.Which bot or reviewer comments were addressed? None yet.