fix(openclaw-plugin): gate noisy recall resources#2084
Conversation
PR Reviewer Guide 🔍(Review updated until commit 3c7cd64)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨No code suggestions found for the PR. |
|
Persistent review updated to latest commit 3c7cd64 |
PR Code Suggestions ✨No code suggestions found for the PR. |
3c7cd64 to
2af6cf7
Compare
|
There is one issue with the explicit memory_recall path. The PR says the resource score floor also applies to explicit memory_recall, but when the caller passes targetUri: "viking://resources/...", the server returns matches under the resources field. The current code later only reads result.memories, so all resource results are dropped. In practice, explicit resource recall may incorrectly return “No relevant OpenViking memories found.” The fix should be small: before filtering/ranking in memory_recall, merge result.memories ?? [] and result.resources ?? [], then apply the existing leaf/filter/rank logic. It would also be good to add a unit test for explicit targetUri: "viking://resources/..." to make sure resource matches are preserved and the resource score floor is applied. |
Summary
Fixes noisy OpenClaw plugin auto-recall when shared
viking://resourcesare enabled.The patch adds lightweight query-aware recall gating:
memory_recall[memory]instead of[]Root Cause
OpenClaw auto-recall searched user memories, agent memories, and shared resources with the same low score threshold. For vague prompts, shared resource transcripts and logs around ~0.53 score could be injected even when they were not actionable. Russian queries also did not get lexical-overlap help because the token regex only matched ASCII.
Verification
pnpm installpnpm test tests/utpnpm buildAlso verified locally against a running OpenViking/OpenClaw setup: