Skip to content

fix(memory): resolve adapter default model in plain status identity check#90748

Closed
849261680 wants to merge 1 commit into
openclaw:mainfrom
849261680:fix/90413-memory-status-blank-model
Closed

fix(memory): resolve adapter default model in plain status identity check#90748
849261680 wants to merge 1 commit into
openclaw:mainfrom
849261680:fix/90413-memory-status-blank-model

Conversation

@849261680

@849261680 849261680 commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Summary

openclaw memory status always printed Index identity: index was built for model <X>, expected (blank expected) and Vector search: paused until memory is rebuilt, even right after a successful openclaw memory index --force. As a result memory_search tool calls returned disabled: true, error: "index metadata is missing". openclaw memory status --deep reported the system healthy — only the plain status path was broken.

Fixes #90413.

Root cause

MemoryManagerSyncOps.resolveCurrentIndexIdentityState built the configured provider identity from this.settings.model directly. For an agent with the default memorySearch.model (the empty string ""), the plain memory status path runs before the provider is initialized, so settings.model is still that unresolved empty default. The empty string survives the existing ??/direct assignment, so identity compared meta.model (e.g. text-embedding-3-small) against "", declared a mismatch, and printed a blank "expected" model. The --deep / index paths initialize the provider first, where the adapter default model is resolved, so they were unaffected.

Fix

Resolve the configured model the same way provider initialization does — use the trimmed configured model when set, otherwise fall back to the adapter's default via the existing resolveEmbeddingProviderFallbackModel helper. This keeps the plain status identity check symmetric with the initialized path. The refreshIndexIdentityDirty uninitialized branch delegates to this same function, so it is fixed in one place; the initialized branch already carries the resolved provider.model.

Automated tests (supplemental)

  • node scripts/run-vitest.mjs extensions/memory-core/src/memory/index.test.ts — new regression test passes; all identity tests pass (5 passed).
  • oxfmt --check clean on both changed files.

Real behavior proof

Real openclaw CLI built from this source tree (OpenClaw 2026.6.2), isolated OPENCLAW_HOME, agent main with memorySearch.provider: "openai" and no explicit model (the empty-string default that triggers the bug), pointed at a local OpenAI-compatible /v1/embeddings endpoint so indexing runs fully offline. The exact same on-disk index is reused for both captures — only the patched binary differs, no reindex between them.

  • Behavior addressed: plain openclaw memory status falsely reporting an Index identity mismatch with a blank "expected" model and Vector search: paused when memorySearch.model is the empty default, which in turn reports memory_search as disabled.

  • Real environment tested: real openclaw CLI built from this source tree, run against a live local /v1/embeddings endpoint with an isolated OPENCLAW_HOME; the index was built once with openclaw memory index --agent main --force (Memory index updated (main).).

  • Exact steps or command run after this patch: OPENCLAW_HOME=… openclaw memory status --agent main (identical index on disk; the only difference between the two captures below is the patched binary).

  • Evidence after fix: Before the patch, plain openclaw memory status --agent main printed the false identity mismatch and pause:

    Memory Search (main)
    Provider: openai (requested: openai)
    Indexed: 1/1 files · 1 chunks
    Dirty: yes
    Index identity: index was built for model text-embedding-3-small, expected 
    Vector search: paused until memory is rebuilt
    Fix: Run: openclaw memory status --index --agent main
    

    After the patch, the same on-disk index (no reindex) reports healthy — the Index identity and Vector search: paused lines are gone and Dirty flips to no:

    Memory Search (main)
    Provider: openai (requested: openai)
    Sources: memory
    Dirty: no
    By source:
    Vector store: unknown
    Vector dims: 16
    FTS: ready
    
  • Observed result after fix: plain memory status reports the existing index as valid, so memory_search is no longer reported as disabled/index metadata is missing. openclaw memory search "fallback embedding provider" --agent main returns the indexed chunk (0.627 memory/notes.md:1-5) in both builds, matching the report that CLI search keeps working while plain status falsely pauses.

  • What was not tested: a Homebrew-packaged install (verified against a source build instead) and a hosted embedding endpoint (a local OpenAI-compatible /v1/embeddings endpoint stood in for text-embedding-3-small, which only affects the stored vectors, not the identity-resolution path under test).

@openclaw-barnacle openclaw-barnacle Bot added extensions: memory-core Extension: memory-core size: XS triage: mock-only-proof Candidate: PR proof only shows tests, mocks, snapshots, lint, typecheck, or CI. labels Jun 5, 2026
@clawsweeper

clawsweeper Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Codex review: passed. Reviewed June 5, 2026, 10:16 PM ET / 02:16 UTC.

Summary
The PR resolves the memory status index identity model through the embedding adapter default when the configured memory model is empty, and adds a regression test for that plain status path.

PR surface: Source +9, Tests +33. Total +42 across 2 files.

Reproducibility: yes. Source inspection shows current main's plain status path refreshes index identity before provider initialization and compares index metadata against settings.model, which can be the empty default while the indexed metadata used the adapter default.

Review metrics: none identified.

Merge readiness
Overall: 🦞 diamond lobster
Proof: 🦞 diamond lobster
Patch quality: 🦞 diamond lobster
Result: ready for maintainer review.

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

Next step before merge

  • [P2] No repair lane is needed because the open automerge-opted PR already contains the focused fix, regression test, and sufficient real behavior proof.

Security
Cleared: The diff changes only memory-core TypeScript and test code, with no dependency, workflow, lockfile, package, secret, or download surface.

Review details

Best possible solution:

Land this focused fix after exact-head CI and mergeability gates pass; the linked bug can then close through the merged PR.

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

Yes. Source inspection shows current main's plain status path refreshes index identity before provider initialization and compares index metadata against settings.model, which can be the empty default while the indexed metadata used the adapter default.

Is this the best way to solve the issue?

Yes. The PR fixes the shared identity resolver to mirror the existing provider initialization model fallback, instead of adding a CLI-only workaround or forcing a deep provider probe on the fast status path.

AGENTS.md: found and applied where relevant.

Codex review notes: model gpt-5.5, reasoning high; reviewed against 3a2f54e6a866.

Label changes

Label changes:

  • add status: 🚀 automerge armed: This PR is in ClawSweeper's automerge lane. Sufficient (terminal): The PR body includes direct before/after terminal output from a real source-built CLI run that exercises the fixed plain status behavior against the same index.
  • remove status: 👀 ready for maintainer look: Current PR status label is status: 🚀 automerge armed.

Label justifications:

  • P1: The bug makes plain memory status and memory_search readiness falsely pause vector search for users on the default empty memory model setting.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 🚀 automerge armed: This PR is in ClawSweeper's automerge lane. Sufficient (terminal): The PR body includes direct before/after terminal output from a real source-built CLI run that exercises the fixed plain status behavior against the same index.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes direct before/after terminal output from a real source-built CLI run that exercises the fixed plain status behavior against the same index.
Evidence reviewed

PR surface:

Source +9, Tests +33. Total +42 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 10 1 +9
Tests 1 33 0 +33
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 43 1 +42

What I checked:

Likely related people:

  • Ayaan Zaidi: Available blame/history attributes the current memory manager identity path, provider initialization helper, and backend config source to commit 61d121f. (role: recent area contributor; confidence: medium; commits: 61d121f1caa2; 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 5, 2026
@openclaw-barnacle openclaw-barnacle Bot added triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. and removed triage: mock-only-proof Candidate: PR proof only shows tests, mocks, snapshots, lint, typecheck, or CI. labels Jun 5, 2026
@849261680

Copy link
Copy Markdown
Contributor Author

Added live before/after CLI proof to the PR description (real openclaw source build, isolated OPENCLAW_HOME, memorySearch.model left at the empty default, offline local /v1/embeddings endpoint). Same on-disk index, no reindex:

  • Before: Index identity: index was built for model text-embedding-3-small, expected + Vector search: paused until memory is rebuilt, Dirty: yes.
  • After: those two lines are gone and Dirty: no.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed 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. labels Jun 5, 2026
@openclaw-barnacle openclaw-barnacle Bot added proof: supplied External PR includes structured after-fix real behavior proof. and removed triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels Jun 5, 2026
@Takhoffman

Copy link
Copy Markdown
Contributor

@clawsweeper automerge

@clawsweeper

clawsweeper Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

🦞🔧
ClawSweeper saw the passing review, but the PR needs another repair pass before merge.

Source: clawsweeper[bot]
Feedback: structured ClawSweeper verdict: pass (sha=52047e0f38e2da629ed16be2e17437491cd6509f); failed required checks before automerge: Real behavior proof:CANCELLED
Action: repair worker queued. Run: https://github.com/openclaw/clawsweeper/actions/runs/27049838716
Model: gpt-5.5

I will update this PR branch, or open a safe credited replacement, if the repair worker finds a narrow CI fix.

Automerge progress:

  • 2026-06-06 02:09:50 UTC review queued 52047e0f38e2 (queued)
  • 2026-06-06 02:16:38 UTC review passed 52047e0f38e2 (structured ClawSweeper verdict: pass (sha=52047e0f38e2da629ed16be2e17437491cd65...)

@clawsweeper clawsweeper Bot added clawsweeper:automerge Maintainer opted this PR into bounded ClawSweeper-reviewed automerge status: 🚀 automerge armed This PR is in ClawSweeper's automerge lane. and removed status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Jun 6, 2026
@clawsweeper

clawsweeper Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper 🐠 reef update

Thanks for the work here. GitHub would not let ClawSweeper push to this branch with the available credentials, so the fix moved to a narrow replacement PR. nothing personal, just permission currents.

Why replacement: ClawSweeper could not update the source PR branch directly; GitHub did not grant sufficient push rights to the bot for that branch.
Replacement PR: #90816
Why close: this run explicitly closes the superseded source PR after the credited replacement PR is open, so review continues in one place.
Closing this source PR only because source-PR closing was explicitly enabled for this run.
Contributor credit is carried into the replacement PR body and release-note context.
Co-author credit kept:

fish notes: model gpt-5.5, reasoning high; reviewed against 9741437.

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

Labels

clawsweeper:automerge Maintainer opted this PR into bounded ClawSweeper-reviewed automerge extensions: memory-core Extension: memory-core P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: supplied External PR includes structured after-fix real behavior proof. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: XS status: 🚀 automerge armed This PR is in ClawSweeper's automerge lane.

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