Conversation
split_continuous_references treated any [a, b] block as a reference list, corrupting plain prose like 'the set is [apple, banana]'. The items must now match int:id reference-tag shapes. Fixes MemTensor#2446
🤖 Open Code ReviewTarget: PR #2447 🔍 OpenCodeReview found 1 issue(s) in this PR. 1.
|
✅ Automated Test Results: PASSEDAll tests passed (7/7 executed). memos_python_core/changed-repo-python: 7/7. Duration: 8s [advisory, non-gating] AI-generated tests on branch test/auto-gen-5669ea117d4e38f7-20261001000157: 54/54 passed — these do NOT affect the PR verdict; review the branch manually. Branch: |
Fixes #2446
Summary
split_continuous_referencesinsrc/memos/mem_os/utils/reference_utils.pyconverts any single[...]block containing a comma into split tags, even when the content is not a reference list:Fix
Require every item to match the reference-tag shape
int:idbefore splitting:This tightens the shape guard added in #2418 (which required a comma-separated list but did not check the item shapes).
Regression test
Added
tests/mem_os/test_reference_split_shape.py:ruff check(repo-pinned 0.11.8) passes on both touched filesAI Disclosure