Skip to content

Fix #2374: [Bug] MemOS 2.0.19 untagged cluster _|_ enters L3 abstraction pipeline and cau - #2579

Open
syzsunshine219 wants to merge 2 commits into
MemTensor:mainfrom
Memtensor-AI:feature/autodev-2374-20260916030702169
Open

syzsunshine219 wants to merge 2 commits into
MemTensor:mainfrom
Memtensor-AI:feature/autodev-2374-20260916030702169

Conversation

@syzsunshine219

@syzsunshine219 syzsunshine219 commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

Restores the change proposed in #2375 for review against main after its former base branch, dev-v2.0.34, was deleted. The source commits and authors are preserved.

Source head: 2a6b22e2c1b9cd7669e91da0d205fe9d6f2d4102

This PR is open for review. Review and CI against the current base are pending; validation claims in the original description below refer to the earlier snapshot. The original discussion and evidence remain in #2375.


Original change description

Description

Fixed issue #2374: MemOS 2.0.19 L3 pipeline no longer feeds the _|_ untagged cluster into abstractDraft. When domainKeyOf returns the catch-all "_|_" key (all TAG_REGEX / TOOL_REGEX matchers missed), the cluster has no shared organising principle and the LLM consistently returns empty title, tripping abstract.ts::validate and 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 after no_centroid, before cooldown/LLM) that: (1) records an AbstractionResult with the new skippedReason: "untagged_cluster" value, (2) emits an info-level "untagged.skipped" log on the abstract channel, and (3) continues without invoking abstractDraft, spending an LLM round-trip, marking cooldown, or emitting l3.failed. domainKeyOf / clusterPolicies / abstractDraft are 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 LLM and still 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 --noEmit clean.

Three files changed under apps/memos-local-plugin/core/memory/l3/ (l3.ts +27, types.ts +1) and tests/unit/memory/l3/l3.integration.test.ts (+175). .ai-tasks/ and openspec/changes/ are gitignored via .git/info/exclude and 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.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (does not change functionality, e.g. code style improvements, linting)
  • Documentation update

How Has This Been Tested?

Automated tests are pending.

  • Unit Test
  • Test Script Or Test Steps (please provide)
  • Pipeline Automated API Test (please provide)

Checklist

  • I have performed a self-review of my own code
  • I have commented my code in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • I have created related documentation issue/PR in MemOS-Docs (if applicable)
  • I have linked the issue to this PR (if applicable)
  • I have mentioned the person who will review this PR

@MatthewZhuang, @CarltonXiang, @syzsunshine219, @World-controller please review this PR.

Reviewer Checklist

MemOS AutoDev and others added 2 commits September 16, 2026 11:24
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>
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.
@syzsunshine219
syzsunshine219 marked this pull request as ready for review November 9, 2026 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] MemOS 2.0.19 untagged cluster _|_ enters L3 abstraction pipeline and causes 100% llm_failed due to missing title

1 participant