Skip to content

fix(memory-core): resolve adapter default model for index identity state#90447

Open
Kailigithub wants to merge 1 commit into
openclaw:mainfrom
Kailigithub:fix/90413-memory-status-empty-model-fallback
Open

fix(memory-core): resolve adapter default model for index identity state#90447
Kailigithub wants to merge 1 commit into
openclaw:mainfrom
Kailigithub:fix/90413-memory-status-empty-model-fallback

Conversation

@Kailigithub

Copy link
Copy Markdown

Summary

openclaw memory status reported Index identity: index was built for model <X>, expected (blank expected) and Vector search: paused until memory is rebuilt whenever agents.<id>.memorySearch.model was left at its default empty string and the embedding adapter exposes a defaultModel (e.g. OpenAI text-embedding-3-small). memory status --deep and memory index --force reported the system as healthy, but the plain status path declared a mismatch and downstream memory_search calls returned disabled: true, error: "index metadata is missing".

Root cause

MemoryManagerSyncOps.resolveCurrentIndexIdentityState built configuredProvider directly from this.settings.model. With the default empty-string setting, the configured provider's model was always "", so identity validation compared meta.model !== "" and declared a mismatch with a blank "expected" model. The provider init path that runs on --deep / --index resolves the adapter's defaultModel via resolveProviderModel, but the cheap status-only path never reached that branch (providerInitialized: false, this.provider === undefined).

Fix

  • In resolveCurrentIndexIdentityState, resolve the adapter's defaultModel up front via the existing resolveEmbeddingProviderFallbackModel helper when this.settings.model is empty/whitespace, so the status path computes the same expected model as the index/deep paths.
  • In refreshIndexIdentityDirty, apply a symmetric fallback so the initialised-provider branch also tolerates a falsy this.provider.model.

Both edits reuse helpers already present in embeddings.ts; no new dependencies or configuration surfaces.

Verification

  • TypeScript syntax check via ts.transpileModule (Node 22) on both modified files: no diagnostics.
  • Logic-level sanity check confirms: empty model + openai provider → text-embedding-3-small; explicit model preserved; provider === "none" still returns null; whitespace-only model also falls back.
  • The existing cli.test.ts "prints index identity mismatch reasons" test covers the formatting path and is unaffected because the status object shape is unchanged.

Local vitest run is unavailable in this environment (rolldown/oxlint native bindings not installed for this platform); CI will exercise the full test suite.

Closes #90413

When agents.<id>.memorySearch.model is left at the default empty string
and the embedding adapter exposes a defaultModel (e.g. OpenAI
text-embedding-3-small), `openclaw memory status` reported a mismatch
against a blank expected model and paused vector search, even though
`--deep` status and `memory index --force` succeeded.

resolveCurrentIndexIdentityState built configuredProvider directly from
this.settings.model, so the empty default survived as the expected
model. The provider path that actually creates embeddings resolves the
adapter's defaultModel, but the cheap status-only path never
initialised the provider and never reached that branch.

Resolve the adapter defaultModel up front via the existing
resolveEmbeddingProviderFallbackModel helper (same module) so the
status path computes the same expected model as the index/deep paths.
Apply a symmetric fallback in refreshIndexIdentityDirty for the case
where the provider is initialised but its model is still falsy.

Closes openclaw#90413
@openclaw-barnacle openclaw-barnacle Bot added extensions: memory-core Extension: memory-core size: XS triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels Jun 4, 2026
@clawsweeper

clawsweeper Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed June 4, 2026, 3:35 PM ET / 19:35 UTC.

Summary
The PR updates memory-core index identity checks to resolve adapter default embedding models when the configured memory-search model is blank.

PR surface: Source +19. Total +19 across 2 files.

Reproducibility: yes. from source at medium confidence: when resolved settings still carry a blank model, current main's status-only identity path compares index metadata against that blank model before provider initialization resolves adapter defaults. I did not run a live OpenClaw memory setup in this read-only review.

Review metrics: 1 noteworthy metric.

  • Focused regression coverage: 0 added. No new test directly covers the blank configured model plus adapter default-model status path changed by this PR.

Merge readiness
Overall: 🧂 unranked krab
Proof: 🧂 unranked krab
Patch quality: 🦐 gold shrimp
Result: blocked until real behavior proof is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P1] Add redacted terminal output or a terminal screenshot showing openclaw memory index --agent main --force, plain openclaw memory status, and a successful memory search after the patch.
  • [P1] Add a focused regression test for the blank or whitespace configured model plus adapter default-model status-only identity path.

Proof guidance:

  • [P1] Needs real behavior proof before merge: Contributor-provided real behavior proof is still required; redacted terminal output or a terminal screenshot showing after-fix openclaw memory status and memory search would satisfy this gate, and updating the PR body should trigger a fresh ClawSweeper review or a maintainer can comment @clawsweeper re-review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Risk before merge

  • [P1] The PR has no after-fix proof from a real OpenClaw memory setup, so the reported CLI/tool improvement is not demonstrated beyond source-level reasoning.
  • [P1] The changed status-only identity path is not pinned by a focused regression test for blank or whitespace configured model plus adapter default model.

Maintainer options:

  1. Decide the mitigation before merge
    Land a narrow memory-core fix that makes status-only identity checks use the same effective embedding model as provider initialization, with focused regression coverage and redacted real setup proof before merge.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • [P1] The remaining blockers are contributor real-behavior proof and maintainer review of whether to require the focused regression test before merge; missing contributor proof is not repairable by ClawSweeper.

Security
Cleared: The diff only changes memory-core TypeScript model resolution logic and does not touch dependencies, CI, secrets, package metadata, or code-download paths.

Review details

Best possible solution:

Land a narrow memory-core fix that makes status-only identity checks use the same effective embedding model as provider initialization, with focused regression coverage and redacted real setup proof before merge.

Do we have a high-confidence way to reproduce the issue?

Yes from source at medium confidence: when resolved settings still carry a blank model, current main's status-only identity path compares index metadata against that blank model before provider initialization resolves adapter defaults. I did not run a live OpenClaw memory setup in this read-only review.

Is this the best way to solve the issue?

Yes for the code shape: using the existing embedding fallback helper in the status identity path is a narrow way to align expected-model calculation with provider initialization. It still needs a regression test and contributor real-behavior proof before merge.

AGENTS.md: found and applied where relevant.

Codex review notes: model gpt-5.5, reasoning high; reviewed against 8605076a6f00.

Label changes

Label justifications:

  • P1: The linked memory-core bug can pause vector search for real users after a successful index when plain status expects a blank model.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: Contributor-provided real behavior proof is still required; redacted terminal output or a terminal screenshot showing after-fix openclaw memory status and memory search would satisfy this gate, and updating the PR body should trigger a fresh ClawSweeper review or a maintainer can comment @clawsweeper re-review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed

PR surface:

Source +19. Total +19 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 2 21 2 +19
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 21 2 +19

Acceptance criteria:

  • [P1] node scripts/run-vitest.mjs extensions/memory-core/src/memory/index.test.ts -t "index identity".
  • [P1] Redacted real setup proof for openclaw memory status and memory search after the patch.

What I checked:

Likely related people:

  • steipete: Local blame on the memory status identity path, config resolver, embedding default helper, and identity comparison points to the same current-main commit by Peter Steinberger. (role: recent area contributor; confidence: medium; commits: 100be0e55ab5; files: extensions/memory-core/src/memory/manager-sync-ops.ts, extensions/memory-core/src/memory/manager.ts, extensions/memory-core/src/memory/embeddings.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P1 High-priority user-facing bug, regression, or broken workflow. labels Jun 4, 2026
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 P1 High-priority user-facing bug, regression, or broken workflow. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: XS status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

memory status always reports "Vector search: paused" with blank expected model (2026.6.1)

2 participants