Repository navigation
fix: import Hermes USER.md native memories - #2378
keeponlight wants to merge 1 commit into
Conversation
🤖 Open Code ReviewTarget: PR #2378 🔍 OpenCodeReview found 3 issue(s) in this PR. 1.
|
|
Friendly ping for review! This PR is a clean resubmission of #2360 (which was automatically closed when
Could you please take a look when you have a moment? Thank you! |
✅ Automated Test Results: PASSEDAll tests passed (85/85 executed). memos_local_plugin/unit: 85/85. Duration: 4s Branch: |
9de352d to
cd3237c
Compare
|
Rebased onto the latest
Verification on
cc @Hun-ger @syzsunshine219 @whipser030 — ready for review whenever you have a moment! |
|
cd3237c to
a204c03
Compare
|
Supersedes #2360 (closed automatically due to base branch
dev-v2.0.34deletion).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
main(rebased following the merge and deletion ofdev-v2.0.34).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