fix: import Hermes USER.md native memories - #2360
Conversation
🤖 Open Code ReviewTarget: PR #2360 🔍 OpenCodeReview found 2 issue(s) in this PR. 1.
|
✅ Automated Test Results: PASSEDAll tests passed (85/85 executed). memos_local_plugin/unit: 85/85. Duration: 5s [advisory, non-gating] AI-generated tests on branch test/auto-gen-687d961a629c4ba0-20260912001821: 0/60 passed, 60 failed — these do NOT affect the PR verdict; review the branch manually. Branch: |
|
Thanks for the review. I checked both findings against the current head,
Verification against the unchanged PR head:
These two findings appear to be false positives. For the separate advisory report of 60 AI-generated test failures, the named branch is not currently visible in the upstream repository or my fork. Please share the branch URL or failure logs so those failures can be investigated; the reported regular test suite passed 85/85. |
Description
Hermes native scans and paged imports only read
MEMORY.md, silently omitting the user profiles stored in the siblingUSER.md. Both endpoints now include the optional profile file and report the combined entry count and byte size.Imported traces retain their source filename in the existing
tagsfield and use that file's modification time. The cache fingerprints each file separately, so same-size edits to the older file and creation/removal ofUSER.mdinvalidate cached pages. ExistingMEMORY.mdIDs are preserved; profile IDs are distinct and remain stable whenMEMORY.mdgrows. MissingUSER.mdremains valid, while other read errors are reported.No new dependencies or public request/response schema changes.
Related Issue (Required): Fixes #2306
Reviewer: @syzsunshine219
This PR targets the current development branch,
dev-v2.0.34; thedevbranch named in CONTRIBUTING.md does not currently exist upstream.Type of change
How Has This Been Tested?
Tested on Windows with Node.js 24.13.1 and Vitest 2.1.9.
apps/memos-local-plugin:npm test -- tests/unit/server/hermes-native-import.test.ts tests/unit/server/import-export-path.test.ts npm run lint npm run buildResults:
TypeScript lint and build passed. Repository-root
make formatpassed (All checks passed!;629 files left unchanged). The normal pre-commit hook passed for the committed files.The broader
npm test -- tests/unit/serverrun reports 105 passed / 10 failed. Re-running with the original importer from base commit0f747744reports 96 passed / the same 10 failed: six assertions assume POSIX path separators, two Windows lifecycle tests lack a response mock, and two SSE shutdown tests fail their unsubscribe assertions. These existing failures are outside this fix. No FastAPI pipeline/API contract changes are involved.Checklist
Reviewer Checklist