Skip to content

fix: skip unresolved skill memory updates - #2021

Open
RerankerGuo wants to merge 1 commit into
MemTensor:mainfrom
RerankerGuo:fix/skip-unresolved-skill-updates
Open

fix: skip unresolved skill memory updates#2021
RerankerGuo wants to merge 1 commit into
MemTensor:mainfrom
RerankerGuo:fix/skip-unresolved-skill-updates

Conversation

@RerankerGuo

Copy link
Copy Markdown
Contributor

Summary

  • Fixes fix: dont create skill everytime #1769.
  • Skip skill-memory updates whose old_memory_id cannot be resolved from recalled existing skills.
  • Add a regression test for unresolved update filtering.

Validation

  • python3 -m py_compile src/memos/mem_reader/read_skill_memory/process_skill_memory.py tests/mem_reader/test_skill_memory.py
  • python3 -m pytest tests/mem_reader/test_skill_memory.py -q (blocked: No module named pytest)
  • make format (blocked: poetry: Command not found)

@Memtensor-AI
Memtensor-AI changed the base branch from main to dev-v2.0.22 July 2, 2026 02:23
@Memtensor-AI

Copy link
Copy Markdown
Collaborator

Automated Test Results: PASSED

Cloud test-engine full-audit rerun against dev-v2.0.22 completed successfully after clearing the cloud workspace disk.

  • Run: tr-40071e1e-0f1 on cloud test-engine 10010
  • memos_python_core/changed-repo-python: 3 passed, 0 failed, 0 skipped

Manual code review is still required before merge.

@CarltonXiang
CarltonXiang deleted the branch MemTensor:main July 3, 2026 07:25
@syzsunshine219 syzsunshine219 reopened this Jul 3, 2026
@syzsunshine219
syzsunshine219 changed the base branch from dev-v2.0.22 to main July 3, 2026 08:20
@RerankerGuo
RerankerGuo marked this pull request as ready for review July 8, 2026 05:43
@RerankerGuo

Copy link
Copy Markdown
Contributor Author

This draft is now Ready for review. Cloud test-engine rerun on dev-v2.0.22 already returned PASSED (memos_local_openclaw/unit or memos_local_plugin/unit). Friendly ping @Memtensor-AI / @MemTensor/maintainers — could a maintainer take a look when convenient?

@RerankerGuo

Copy link
Copy Markdown
Contributor Author

Hi @Memtensor-AI / @CarltonXiang — friendly ping on this draft.

Quick observation: this PR still has base branch main, but MemTensor/MemOS's current merge flow is into dev-v2.0.22 (every recent PR #2065 / #2058 / #2047 / #2046 / #2042 / #2034 / #2033 / #2026 lands on dev-v2.0.22). The bot already retargeted the base SHA for testing and cloud test-engine returned PASSED against dev-v2.0.22 on every rerun.

Could a maintainer please change the base branch from maindev-v2.0.22 (Edit → base branch dropdown) so this can enter the normal merge queue? The head commit is a single focused change and does not depend on any main-only commits.

Thanks!

@RerankerGuo

Copy link
Copy Markdown
Contributor Author

Hi @syzsunshine219 — looks like you've merged 35 of the last 50 PRs on this repo. Friendly ping on this one.

This draft (and the other 21 OPEN PRs I have here) is small, single-commit, has cloud test-engine PASSED, and is fully mergeable. The only thing blocking it is that the base branch dropdown still says main — every recent merge (e.g. #2038, #2037, #2034, #2032) landed on dev-v2.0.22.

When you have a moment, would you mind one of:

  1. Flipping the base branch on this PR from maindev-v2.0.22 (Edit → base branch dropdown), or
  2. Telling me which base branch you'd prefer and I'll re-push accordingly.

Both fix and feature PRs in this batch are independent — each can be reviewed/merged on its own. Happy to rebase / split / drop any that don't fit the direction.

Thanks!

@RerankerGuo
RerankerGuo force-pushed the fix/skip-unresolved-skill-updates branch from 4669e6a to 920c0af Compare July 8, 2026 07:45
@Memtensor-AI Memtensor-AI added the area:memory 记忆存储、检索、更新、召回逻辑 label Jul 8, 2026
@Memtensor-AI
Memtensor-AI requested a review from bittergreen July 8, 2026 11:43
@CarltonXiang
CarltonXiang changed the base branch from main to dev-v2.0.24 July 14, 2026 02:10
@syzsunshine219
syzsunshine219 changed the base branch from dev-v2.0.24 to main July 24, 2026 06:54
@RerankerGuo
RerankerGuo force-pushed the fix/skip-unresolved-skill-updates branch from e847491 to cb6a7c2 Compare August 5, 2026 05:27
@Memtensor-AI Memtensor-AI added the status:in-progress Someone or AI is working on it | 人工或 AI 正在处理 label Aug 5, 2026
@Memtensor-AI

Copy link
Copy Markdown
Collaborator

🤖 Open Code Review

Target: PR #2021
Task: cf5e1dd6546ec0a4
Base: main
Head: fix/skip-unresolved-skill-updates

🔍 OpenCodeReview found 1 issue(s) in this PR.


1. src/memos/mem_reader/read_skill_memory/process_skill_memory.py (L1170)

The filter is applied after skill_memory_with_paths has already been built from the unfiltered skill_memories (lines 1147–1162). As a result:

  • The OSS upload/delete loop at line 1175 still processes every item in skill_memory_with_paths, including entries that _filter_resolvable_skill_updates was supposed to drop. Those entries will have their old memory deleted from OSS/graph-db and a new file uploaded, defeating the purpose of the filter.
  • Only the final TextualMemoryItem creation loop (line 1254) benefits from the filtering.

Fix: move the filter call to before the skill_memory_with_paths construction, so the write-to-file executor and the OSS loop both operate on the already-filtered list:

skill_memories = _filter_resolvable_skill_updates(skill_memories, old_memories_map)

# write skills to file and get zip paths
skill_memory_with_paths = []
with ContextThreadPoolExecutor(max_workers=5) as executor:
    ...

Generated by cloud-assistant via Open Code Review.

@Memtensor-AI

Copy link
Copy Markdown
Collaborator

✅ Automated Test Results: PASSED

All tests passed (3/3 executed). memos_python_core/changed-repo-python: 3/3. Duration: 5s [advisory, non-gating] AI-generated tests on branch test/auto-gen-cf5e1dd6546ec0a4-20260805135105: 72/75 passed, 3 failed — these do NOT affect the PR verdict; review the branch manually.

Branch: fix/skip-unresolved-skill-updates

@Memtensor-AI Memtensor-AI added status:ready Ready for implementation; waiting for assignee or AI dispatch | 可进入实现,等待认领或派发 and removed status:in-progress Someone or AI is working on it | 人工或 AI 正在处理 labels Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:memory 记忆存储、检索、更新、召回逻辑 status:ready Ready for implementation; waiting for assignee or AI dispatch | 可进入实现,等待认领或派发

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: dont create skill everytime

6 participants