fix: add durable Hermes provider link#2051
Conversation
## Description Please include a summary of the change, the problem it solves, the implementation approach, and relevant context. List any dependencies required for this change. Related Issue (Required): Fixes #issue_number ## 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? Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration - [ ] 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](https://github.com/MemTensor/MemOS-Docs) (if applicable) | 我已在 [MemOS-Docs](https://github.com/MemTensor/MemOS-Docs) 中创建了相关的文档 issue/PR(如果适用) - [ ] I have linked the issue to this PR (if applicable) | 我已将 issue 链接到此 PR(如果适用) - [ ] I have mentioned the person who will review this PR | 我已提及将审查此 PR 的人 ## Reviewer Checklist - [ ] closes #xxxx (Replace xxxx with the GitHub issue number) - [ ] Made sure Checks passed - [ ] Tests have been provided
Translated an untranslated JSON `description` field in `docs/cn/open_source/modules/dream.md` from English to Chinese.
|
This draft is now Ready for review. Cloud test-engine rerun on |
|
Hi @Memtensor-AI / @CarltonXiang — friendly ping on this draft. Quick observation: this PR still has base branch Could a maintainer please change the base branch from Thanks! |
|
Hi @syzsunshine219 — looks like you've merged 35 of the last 50 PRs on this repo. Friendly ping on this one. This draft (and the other 21 OPEN PRs I have here) is small, single-commit, has cloud test-engine When you have a moment, would you mind one of:
Both fix and feature PRs in this batch are independent — each can be reviewed/merged on its own. Happy to rebase / split / drop any that don't fit the direction. Thanks! |
db2deea to
edfe99c
Compare
🤖 Open Code ReviewTarget: PR #2051 🔍 OpenCodeReview found 9 issue(s) in this PR. 1.
|
|
Routing this PR to @syzsunshine219 for review/follow-up. |
✅ Automated Test Results: PASSEDAll tests passed (3/3 executed). memos_local_plugin/unit: 3/3. Duration: 2s [advisory, non-gating] AI-generated tests on branch test/auto-gen-82389cfa2d92b165-20260708212013: 67/67 passed — these do NOT affect the PR verdict; review the branch manually. Branch: |
OCR review on MemTensor#2051 surfaced 9 robustness issues across the PowerShell and Unix Hermes installers. This patch addresses every one of them: PowerShell install.ps1: - Surface junction-creation failures via try/catch + -ErrorAction Stop instead of silently piping to Out-Null. - Log a warning if the plugin.yaml copy may have failed. - Log a message when the user-level plugin dir is auto-created. Unix adapter install.hermes.sh: - Validate HOME is set before using it (avoid writing to filesystem root if HOME is empty). - Remove a pre-existing non-symlink entry at the user-level target before ln -sfn, matching install.sh semantics. - Clean up the legacy 'memos_provider' symlink name so re-running the installer doesn't leave a dangling reference. Unix install.sh: - Move the cp of plugin.yaml BEFORE the symlink loop so the second symlink (user-level) already points at a fully populated provider directory. - Switch the rm + ln -s pattern to atomic ln -sfn (matching the adapter script) so a failed rm no longer aborts the install with 'File exists'. Adds four regression tests that lock the new behaviors in place.
Description
Fixes #1744.
Hermes provider installation now writes two provider links: the checkout-local
plugins/memory/memtensorpath used by the current runtime, plus a user-level~/.hermes/plugins/memory/memtensorlink that survives Hermes checkout replacement during upgrades. The adapter-specific installer and Windows installer use the same durable location, and the provider manifest copy remains unchanged.A small install regression test checks the Unix, adapter, and PowerShell installers so future changes keep both provider paths wired.
Related Issue (Required): Fixes #1744
Type of change
How Has This Been Tested?
Commands run:
Results:
npm test -- --run tests/unit/install/hermes-provider-link.test.ts: 1 file passed, 3 tests passed.npm run lint:tsc -p tsconfig.json --noEmitcompleted successfully.make format: blocked locally becausepoetryis not installed (make: poetry: Command not found).Checklist
Reviewer Checklist