Repository navigation
feat: offer optional memory embedding setup - #163693
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR adds optional embedding provider, model, and credential setup to local onboarding and a dedicated memory configure section. Example: An operator runs openclaw configure --section memory with Ollama running and bge-m3 installed.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Partial Merge readiness✅ Ready for maintainer review Keep this PR open: it delivers a maintainer-approved setup capability still missing from current main, with no actionable findings in the introduced diff. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherCLI onboarding and configure pass existing configuration into a shared setup flow; plugin metadata supplies choices, embedding adapters perform the readiness request, and existing wizard writers persist confirmed changes. flowchart LR
A[CLI onboarding or configure] --> B[Optional memory setup]
C[Enabled provider metadata] --> B
B --> D[Existing embedding adapter]
D --> E[Synthetic readiness request]
E --> F[Explicit save confirmation]
F --> G[Existing configuration writer]
Technical reviewBest possible solution: Land the approved optional flow through existing adapters and configuration writers, retaining explicit save consent and the documented reindex instruction. Do we have a high-confidence way to reproduce the issue? The setup gap is source-verifiable: current main excludes the memory configure section and lacks this shared flow; supplied real CLI evidence also records the baseline rejection. Is this the best way to solve the issue? The implementation fits the approved scope by sharing one optional flow, reusing provider and secret owners, and leaving persistence with existing callers. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 716e1f452694. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +397, Tests +693, Docs +49. Total +1139 across 18 files. Added test files: 2. View PR surface stats
Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (13 earlier review cycles; latest 8 shown)
Reviewed October 12, 2026, 1:23 AM ET / 05:23 UTC (Revision 14). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
d9403a1 to
c9addaf
Compare
Keep skipped, failed, or declined memory configuration byte-preserving. Offer configured native embedding aliases and resolve their own credentials for readiness checks. Clarify Ollama and LM Studio setup, allow existing models time to load, and reuse the shared timeout owner.
|
@clawsweeper re-review Maintainer-approved optional embedding setup scope is preserved. Upstream main was merged without rewriting the contributor commits. Current head adds real local Ollama/LM Studio proof, fixes skipped config writes and configured-provider aliases, and preserves inherited multimodal settings and implicit OpenAI endpoints. Independent Codex autoreview is clean; the PR body has the boundary proof and exact inherited UI type failure attribution. Please review head |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
* feat: offer optional memory embedding setup * fix: preserve incompatible multimodal memory selections during setup * test: distinguish setup security consent from optional memory * test: preserve memory setup mock export contracts * fix: preserve optional embedding setup and support local servers Keep skipped, failed, or declined memory configuration byte-preserving. Offer configured native embedding aliases and resolve their own credentials for readiness checks. Clarify Ollama and LM Studio setup, allow existing models time to load, and reuse the shared timeout owner. * fix: validate inherited agent memory settings during setup * fix: retain implicit OpenAI embedding destinations during setup --------- Co-authored-by: Peter Steinberger <[email protected]>
Related: #16670
What Problem This Solves
Users cannot choose and verify memory embeddings during onboarding or through a dedicated configure section.
User Impact
Local guided/classic onboarding and
openclaw configure --section memoryoffer an optional provider/model step. Cloud providers and running local Ollama/LM Studio servers use the existing embedding adapters; configuration is saved only after a synthetic readiness check and explicit confirmation. Ollama supports installed models such asbge-m3andnomic-embed-text; LM Studio uses an installed embedding model.Skipping, failed checks, incompatible retained settings, and declining save preserve memory configuration. A memory-only configure run also leaves the complete config file byte-identical in those cases. Existing per-agent overrides, custom endpoints, and SecretRefs are retained; selecting a different provider drops the old endpoint, headers, and key. Provider/model changes can pause vector search until an explicit
openclaw memory index --force. This flow neither opens/rebuilds the index nor downloads models. Managed llama.cpp remains a follow-up through its existing installer/service setup owner.Why This Change Was Made
One optional flow serves all three entry points. Enabled plugin metadata owns provider availability, the memory configuration owner validates shared defaults and every existing agent's effective settings, provider adapters own the embedding request, and callers own config persistence. The default/legacy provider normalization is shared with runtime so selecting an already-effective OpenAI provider preserves its custom destination. Local HTTP providers can load an already-downloaded model within the bounded readiness budget.
No dependency, public config key, schema, retention, database, or Doctor migration is added. Existing configurations keep their format and indexes are untouched during setup. Maintainer approval covers optional placement, explicit shared-default changes, and the manual-reindex tradeoff. Original implementation by @PollyBot13; contributor commits are preserved, with upstream main merged rather than rebased.
Evidence
d0df645f66013c79290904ac9c4e69f9749b94fd: real CLI rejectsconfigure --section memory. Original feature CLI reproduced an unwanted metadata rewrite after skipping; repaired CLI leaves the file byte-identical.bge-m3,nomic-embed-text, LM Studiotext-embedding-nomic-embed-text-v1.5, and a loopback OpenAI-compatible provider stub. Skip/decline/failure preserved config bytes. The stub received only/v1/embeddingswithinput: ["ping"], using its own fixture credentials rather than the old destination's key.ollama/bge-m3. Real guided onboarding verifiedollama/llama3.2:latest(reply in 6.0s), then preserved memory settings when the optional step was skipped. All CLI runs used isolated HOME/state/config; no operator Gateway or service was changed.autoOpenAI selections preserved their existing endpoint, headers, and key through the real CLI (68.74s and 39.13s respectively).319ec991d02a343014c40b1e623897502ab41d5b(fix(ui): restore MCP App test typechecks #169439) fixes those exact Solid fixture errors. No unrelated UI repair is bundled.Head:
137e7339f6b939a95f9d317b3eedca0289c02e04. Relative to the merged base: production +415/-18 (net +397), tests/support +755/-62, docs +51/-2. The original feature added 414 production lines; repair work reduces that net by 17 lines while adding local-server support and preservation fixes. Most remaining production code is the single 370-line optional flow: credential input/materialization, provider discovery, bounded probe lifecycle, compatibility validation, and save confirmation. No index manager or provider policy is duplicated. Existing classic-wizard credential fixtures moved to test support to satisfy the line cap.Independent Codex autoreview: scoped-clean, no actionable P0–P2 findings on head
137e7339f6b939a95f9d317b3eedca0289c02e04. Both accepted findings were reproduced and repaired before this clean pass. ClawSweeper Revision 10 reviewed the same head: no actionable findings, sufficient live proof (5/6). Its product-approval hold is covered by the maintainer's explicit October 11 approval of this feature scope; no new product/config/schema decision is requested.Hosted CI run 38189573172 completed with one failing test leaf: extensions bundle 2. The two failing session-backfill cases concern deleted/replaced physical-source admission; both failures reproduced in the same observed 10-file order on clean exact CI base
656287c940a5287da9efe69aabde2348695e07e1, with the forgotten-source sibling passing. This establishes inherited failure: this PR does not change the session-backfill test, inventory, or session-read authority owner. The complete clean-base replay passed 190 tests and failed exactly these two across ten files (1038.83s on the heavily loaded host; 82.71s for the hosted failing shard). Upstream69b99d40994d83683acd40c1fd206ac103c22ba1(#169310) removed the physical-identity check after asynchronous discovery; a deleted source can reopen empty and a copied replacement can be admitted. The lead owns the separate upstream repair and landing decision. The aggregateopenclaw/ci-gateis red. All other completed test/check leaves passed, including baseline ratchets (96 CI seconds), changed checks (251 seconds), and changed boundary tests (82 seconds). No CI rerun was used to turn a failure green.Readiness: READY-WITH-INHERITED at the exact head above; not merged. The lane prohibits label edits, so the lead still owns the requested
ci:no-fail-fastlabel.