Skip to content

fix: load bridge package version without require#1992

Draft
RerankerGuo wants to merge 1 commit into
MemTensor:mainfrom
RerankerGuo:fix/bridge-package-version-node22
Draft

fix: load bridge package version without require#1992
RerankerGuo wants to merge 1 commit into
MemTensor:mainfrom
RerankerGuo:fix/bridge-package-version-node22

Conversation

@RerankerGuo

Copy link
Copy Markdown

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:main July 3, 2026 07:25
@syzsunshine219 syzsunshine219 reopened this Jul 3, 2026
@syzsunshine219 syzsunshine219 added the needs-audit Requires manual audit before merge label Jul 3, 2026
@syzsunshine219 syzsunshine219 changed the base branch from dev-v2.0.22 to main July 3, 2026 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-audit Requires manual audit before merge

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)

4 participants