Fix #2374: [Bug] MemOS 2.0.19 untagged cluster _|_ enters L3 abstraction pipeline and cau - #2375
Closed
Memtensor-AI wants to merge 2 commits into
Closed
Memtensor-AI wants to merge 2 commits into
Memtensor-AI wants to merge 2 commits into
Conversation
Untagged clusters (cluster.key === "_|_") share only "no matching domain regex" and have no organising principle. abstractDraft consistently emits empty titles for them, tripping the schema validator and producing 100% llm_failed. Field data (issue MemTensor#2374) shows 785/785 _|_-cluster abstractions failing, contributing 47% of 1686 total L3 failures over 26.2h with no cooldown. Add a per-cluster guard in runL3 that skips the "_|_" bucket before consulting cooldown or calling the LLM, records an AbstractionResult with the new "untagged_cluster" skip reason, and emits an info-level "untagged.skipped" log. domainKeyOf / clusterPolicies / abstractDraft are unchanged so bucket-count metrics and tagged-cluster behaviour stay intact. Refs: MemTensor#2374 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Collaborator
Author
🤖 Open Code ReviewTarget: PR #2375 ✅ OpenCodeReview: Review complete: 0 finding(s) across 2 selected item(s). Generated by cloud-assistant via Open Code Review. |
Collaborator
Author
🔧 Open Code Review requested Agent fixOpen Code Review found 1 issue(s). I have resumed the development Agent to fix them.
The Agent will push a new commit to this PR branch. OCR will recheck after the commit is pushed. |
The 'untagged.skipped' log entry was missing clusterKey, unlike the sibling 'cooldown.skipped' log which includes it. Add clusterKey so skip logs share a consistent shape, making cluster-level correlation during debugging/metrics uniform across skip reasons. Addresses code review feedback on MemTensor#2375.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixed issue #2374: MemOS 2.0.19 L3 pipeline no longer feeds the
_|_untagged cluster intoabstractDraft. WhendomainKeyOfreturns the catch-all"_|_"key (all TAG_REGEX / TOOL_REGEX matchers missed), the cluster has no shared organising principle and the LLM consistently returns emptytitle, trippingabstract.ts::validateand yielding 100%llm_failed. Field data reported 785/785_|_-cluster abstractions failing, roughly 47% of the 1686 total L3 failures over 26.2h.The fix adds a per-cluster guard in
runL3(positioned afterno_centroid, before cooldown/LLM) that: (1) records anAbstractionResultwith the newskippedReason: "untagged_cluster"value, (2) emits an info-level"untagged.skipped"log on the abstract channel, and (3)continues without invokingabstractDraft, spending an LLM round-trip, marking cooldown, or emittingl3.failed.domainKeyOf/clusterPolicies/abstractDraftare unchanged so cluster-count metrics and tagged-cluster behaviour stay intact.Test evidence — RED phase: the two new integration tests (
skips the '_|_' untagged cluster before calling the LLMandstill processes tagged clusters when mixed with an untagged bucket) initially failed on baseline (expected null to be 'untagged_cluster'). GREEN phase after the fix: 6/6 L3 integration tests, 35/35 L3 unit+integration tests, and the full plugin suite 1559 passed / 2 pre-existing skips / 0 failed.tsc --noEmitclean.Three files changed under
apps/memos-local-plugin/core/memory/l3/(l3.ts +27, types.ts +1) andtests/unit/memory/l3/l3.integration.test.ts(+175)..ai-tasks/andopenspec/changes/are gitignored via.git/info/excludeand stay out of the PR. opsp artifacts also archived and pushed to memos-autodev-specs main.Related Issue (Required): Fixes #2374
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Automated tests are pending.
Checklist
@MatthewZhuang, @CarltonXiang, @syzsunshine219, @World-controller please review this PR.
Reviewer Checklist
_|_enters L3 abstraction pipeline and causes 100%llm_faileddue to missingtitle#2374