Skip to content

fix: load bridge package version without require#1992

Merged
syzsunshine219 merged 15 commits into
MemTensor:dev-v2.0.23from
RerankerGuo:fix/bridge-package-version-node22
Jul 9, 2026
Merged

fix: load bridge package version without require#1992
syzsunshine219 merged 15 commits into
MemTensor:dev-v2.0.23from
RerankerGuo:fix/bridge-package-version-node22

Conversation

@RerankerGuo

Copy link
Copy Markdown
Contributor

Summary

Fixes #1736.

  • Load package.json via fs.readFileSync + JSON.parse in bridge.cts instead of calling require(...package.json) after dynamic ESM imports.
  • Add a regression test that guards the bridge entrypoint against reintroducing package metadata loading through require().

Validation

  • npm test -- --run tests/unit/bridge/package-version.test.ts
  • npm test -- --run tests/unit/bridge
  • npm run lint

Note: make format could not run in this environment because poetry is not installed: make: poetry: Command not found.

@Memtensor-AI
Memtensor-AI changed the base branch from main to dev-v2.0.22 July 1, 2026 13:14
@Memtensor-AI

Copy link
Copy Markdown
Collaborator

Automated Test Results: FAILED

Cloud test-engine full-audit rerun against dev-v2.0.22 failed after clearing the cloud workspace disk.

  • Run: tr-7c3226bb-da8 on cloud test-engine 10012

  • Verdict: fail_code_bug

  • Summary: Tests failed. Failed cases:

  • No executable phase result recorded.

Do not merge until this is fixed and cloud tests pass.

@Memtensor-AI

Copy link
Copy Markdown
Collaborator

Automated Test Results: ENVIRONMENT RETRY

The previous cloud test-engine run against dev-v2.0.22 did not produce executable test phases because environment preparation failed during npm install (npm install ECONNRESET during env prep). This is being treated as a cloud environment/network failure, not a confirmed code failure.

  • Previous run was superseded by retry: tr-b821581d-0f8 on cloud test-engine 10012
  • Branch tested: refs/pull/1992/head

I will post the final pass/fail result when this retry completes.

@Memtensor-AI

Copy link
Copy Markdown
Collaborator

Automated Test Results: PASSED

Cloud test-engine rerun against dev-v2.0.22 completed successfully.

  • Run: tr-b821581d-0f8 on cloud test-engine 10012
  • memos_local_plugin/unit: 34 passed, 0 failed, 0 skipped

Manual code review is still required before merge.

@CarltonXiang
CarltonXiang deleted the branch MemTensor:dev-v2.0.23 July 3, 2026 07:25
@syzsunshine219 syzsunshine219 reopened this Jul 3, 2026
@syzsunshine219
syzsunshine219 changed the base branch from dev-v2.0.22 to main July 3, 2026 08:21
harvey_xiang and others added 5 commits July 3, 2026 16:34
## 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.
@RerankerGuo
RerankerGuo marked this pull request as ready for review July 8, 2026 05:43
@RerankerGuo

Copy link
Copy Markdown
Contributor Author

This draft is now Ready for review. Cloud test-engine rerun on dev-v2.0.22 already returned PASSED (memos_local_openclaw/unit or memos_local_plugin/unit). Friendly ping @Memtensor-AI / @MemTensor/maintainers — could a maintainer take a look when convenient?

@RerankerGuo

Copy link
Copy Markdown
Contributor Author

Hi @Memtensor-AI / @CarltonXiang — friendly ping on this draft.

Quick observation: this PR still has base branch main, but MemTensor/MemOS's current merge flow is into dev-v2.0.22 (every recent PR #2065 / #2058 / #2047 / #2046 / #2042 / #2034 / #2033 / #2026 lands on dev-v2.0.22). The bot already retargeted the base SHA for testing and cloud test-engine returned PASSED against dev-v2.0.22 on every rerun.

Could a maintainer please change the base branch from maindev-v2.0.22 (Edit → base branch dropdown) so this can enter the normal merge queue? The head commit is a single focused change and does not depend on any main-only commits.

Thanks!

@RerankerGuo

Copy link
Copy Markdown
Contributor Author

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 PASSED, and is fully mergeable. The only thing blocking it is that the base branch dropdown still says main — every recent merge (e.g. #2038, #2037, #2034, #2032) landed on dev-v2.0.22.

When you have a moment, would you mind one of:

  1. Flipping the base branch on this PR from maindev-v2.0.22 (Edit → base branch dropdown), or
  2. Telling me which base branch you'd prefer and I'll re-push accordingly.

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!

@RerankerGuo
RerankerGuo force-pushed the fix/bridge-package-version-node22 branch from c25ce15 to 30de02c Compare July 8, 2026 07:45
@Memtensor-AI
Memtensor-AI changed the base branch from main to dev-v2.0.23 July 8, 2026 11:27
@Memtensor-AI Memtensor-AI added the area:plugin OpenClaw & Hermes label Jul 8, 2026
@Memtensor-AI
Memtensor-AI requested a review from bittergreen July 8, 2026 11:43
@Memtensor-AI Memtensor-AI added the status:in-progress Someone or AI is working on it | 人工或 AI 正在处理 label Jul 8, 2026
@Memtensor-AI

Memtensor-AI commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Routing this PR to @syzsunshine219 for review/follow-up.

@Memtensor-AI

Copy link
Copy Markdown
Collaborator

✅ Automated Test Results: PASSED

All tests passed (34/34 executed). memos_local_plugin/unit: 34/34. Duration: 5s [advisory, non-gating] AI-generated tests on branch test/auto-gen-5167bfe3112e1af6-20260708221821: 12/12 passed — these do NOT affect the PR verdict; review the branch manually.

Branch: fix/bridge-package-version-node22

@syzsunshine219
syzsunshine219 merged commit 98b0372 into MemTensor:dev-v2.0.23 Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:plugin OpenClaw & Hermes status:in-progress Someone or AI is working on it | 人工或 AI 正在处理

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] memos-local-hermes-plugin: bridge fails to start on Node.js v22 (CJS/ESM module resolution error)

6 participants