You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] hermes adapter broken on main: MemosHttpClient is imported but not defined anywhere #2096
The hermes adapter cannot be imported on current main: memos_provider/__init__.py imports MemosHttpClient from bridge_client, but that class does not exist anywhere in the repository.
Repro
cd apps/memos-local-plugin
python -m unittest tests.python.test_hermes_provider_pipeline
File ".../adapters/hermes/memos_provider/__init__.py", line 68, in <module>
from bridge_client import BridgeError, MemosBridgeClient, MemosHttpClient # noqa: E402
ImportError: cannot import name 'MemosHttpClient' from 'bridge_client'
git grep "class MemosHttpClient" across the repo → zero hits.
Impact
Every plugin test under apps/memos-local-plugin/tests/python/ fails at collection (import error before any test runs).
Any real Hermes host loading memos_provider hits the same ImportError at module load — the adapter is entirely non-functional on main, not just in tests.
CI does not catch this because python-tests.yml runs pytest tests (repo root) only; the plugin's Python tests are not wired into CI.
Where it came from
__init__.py references MemosHttpClient at lines 68, 282, 334, 336 (type union with MemosBridgeClient, plus an http_bridge = MemosHttpClient() construction path). These usages arrived via the pr/may27-fixes merge (0398e0ed, followed by ruff fixup c739e9f2), but the class definition itself was never committed — it looks like the branch was merged with half of an HTTP-client feature.
Suggested fix
Either commit the missing MemosHttpClient implementation in bridge_client.py, or revert the usages in __init__.py until the HTTP client feature is complete. Also worth adding apps/memos-local-plugin/tests/python to CI so import-level breakage like this fails fast.
Found while rebasing #2095 (the plugin tests there pass once this class is stubbed).
Summary: Fixes #2096. The hermes adapter at apps/memos-local-plugin/adapters/hermes/memos_provider/__init__.py was importing MemosHttpClient from bridge_client, but the class was never committed — every plugin python test failed at collection with ImportError and any real Hermes host loading memos_provider hit the same failure at module load. The offending references arrived via the pr/may27-fixes merge (0398e0e) as a half-committed HTTP-bridge feature.
Chose the "revert usages" option from the issue's two suggested fixes because writing a real MemosHttpClient (subprocess lifecycle, keep-alive, viewer probe, host-handler reverse channel) is a feature commit not a bug hotfix, and a stub raising NotImplementedError would spam warning logs on every reconnect since _connect_http_bridge catches all exceptions and falls back to stdio. Removed the MemosHttpClient import, the type union on self._bridge, the _connect_http_bridge helper, and the HTTP-first branches in initialize and _reconnect_bridge. Also removed the now-unused probe_viewer_status / startup_lock_active imports (their definitions in daemon_manager.py are untouched for a future HTTP PR). Net diff: 31 additions / 54 deletions across the adapter plus the new regression test.
Added test_module_imports_cleanly to tests/python/test_hermes_provider_pipeline.py asserting MemTensorProvider / MemosBridgeClient / BridgeError are on the module surface and MemosHttpClient is not — this way a future half-merge fails with a targeted message instead of a cascade of unrelated collection errors.
Verification: python3 -m unittest discover -s apps/memos-local-plugin/tests/python runs 78 tests, all OK (was: collection ImportError). ruff check + ruff format --check clean on both modified files. opsp artifacts (task.md, proposal.md, spec.md, design.md, verification-report.md) archived to memos-autodev-specs main. Reviewers @whipser030 and @hijzy to be added by scheduler.
Base branch:main Branch:bugfix/autodev-2096-20260710041928689 Commit:289eb84 PR:#2097 Assigned to:@CarltonXiang Reviewers:@whipser030, @hijzy
Fixed via #2097 (squashed into dev-v2.0.24 as c0f6c2cc).
The half-merged MemosHttpClient usages introduced by pr/may27-fixes (0398e0ed) have been reverted: the phantom import, the self._bridge type union, the _connect_http_bridge helper, and the HTTP-first branches in initialize / _reconnect_bridge are removed. probe_viewer_status / startup_lock_active definitions in daemon_manager.py are kept for a future complete HTTP-bridge PR. A test_module_imports_cleanly regression test now guards both memos_provider and bridge_client against the class silently re-entering.
Verified by @fancyboi999: 78 plugin tests pass on the branch; CI on the PR is green across ubuntu/windows/macos × py3.10–3.13.
Will follow dev-v2.0.24 into main with the release. Closing this issue.
Two follow-ups tracked separately (not blocking):
Wiring apps/memos-local-plugin/tests/python/ into python-tests.yml so import-level breakage fails fast in CI (called out in the issue body).
Activity
Memtensor-AI commentedon Jul 10, 2026
🤖 AutoDev has picked up this issue and started working on it.
Task ID:
bbe9a1b0b80a6c1fWorking branch:
bugfix/autodev-2096-20260710041928689Target branch:
latest dev* branchWorkflow: opsp (analysis → coding → testing → PR)
I will post the PR link here once done. If I need more information, I will ask in the comments.
fix(memos-local-plugin): revert half-merged MemosHttpClient usages (M…
Memtensor-AI commentedon Jul 10, 2026
✅ AutoDev task
bbe9a1b0b80a6c1fcompleted.Summary: Fixes #2096. The hermes adapter at
apps/memos-local-plugin/adapters/hermes/memos_provider/__init__.pywas importingMemosHttpClientfrombridge_client, but the class was never committed — every plugin python test failed at collection withImportErrorand any real Hermes host loadingmemos_providerhit the same failure at module load. The offending references arrived via thepr/may27-fixesmerge (0398e0e) as a half-committed HTTP-bridge feature.Chose the "revert usages" option from the issue's two suggested fixes because writing a real
MemosHttpClient(subprocess lifecycle, keep-alive, viewer probe, host-handler reverse channel) is a feature commit not a bug hotfix, and a stub raisingNotImplementedErrorwould spam warning logs on every reconnect since_connect_http_bridgecatches all exceptions and falls back to stdio. Removed theMemosHttpClientimport, the type union onself._bridge, the_connect_http_bridgehelper, and the HTTP-first branches ininitializeand_reconnect_bridge. Also removed the now-unusedprobe_viewer_status/startup_lock_activeimports (their definitions indaemon_manager.pyare untouched for a future HTTP PR). Net diff: 31 additions / 54 deletions across the adapter plus the new regression test.Added
test_module_imports_cleanlytotests/python/test_hermes_provider_pipeline.pyassertingMemTensorProvider/MemosBridgeClient/BridgeErrorare on the module surface andMemosHttpClientis not — this way a future half-merge fails with a targeted message instead of a cascade of unrelated collection errors.Verification:
python3 -m unittest discover -s apps/memos-local-plugin/tests/pythonruns 78 tests, all OK (was: collection ImportError).ruff check+ruff format --checkclean on both modified files. opsp artifacts (task.md, proposal.md, spec.md, design.md, verification-report.md) archived tomemos-autodev-specsmain. Reviewers @whipser030 and @hijzy to be added by scheduler.Base branch:
mainBranch:
bugfix/autodev-2096-20260710041928689Commit:
289eb84PR: #2097
Assigned to: @CarltonXiang
Reviewers: @whipser030, @hijzy
test(memos-local-plugin): tighten module-import regression test per OCR
test(memos-local-plugin): also guard MemosHttpClient absence on bridg…
fix(memos-local-plugin): revert half-merged MemosHttpClient usages (#…
shinetata commentedon Jul 16, 2026
Fixed via #2097 (squashed into
dev-v2.0.24asc0f6c2cc).The half-merged
MemosHttpClientusages introduced bypr/may27-fixes(0398e0ed) have been reverted: the phantom import, theself._bridgetype union, the_connect_http_bridgehelper, and the HTTP-first branches ininitialize/_reconnect_bridgeare removed.probe_viewer_status/startup_lock_activedefinitions indaemon_manager.pyare kept for a future complete HTTP-bridge PR. Atest_module_imports_cleanlyregression test now guards bothmemos_providerandbridge_clientagainst the class silently re-entering.Verified by @fancyboi999: 78 plugin tests pass on the branch; CI on the PR is green across ubuntu/windows/macos × py3.10–3.13.
Will follow
dev-v2.0.24intomainwith the release. Closing this issue.Two follow-ups tracked separately (not blocking):
apps/memos-local-plugin/tests/python/intopython-tests.ymlso import-level breakage fails fast in CI (called out in the issue body).shinetata commentedon Jul 16, 2026
Closing as completed — fixed by #2097 (merged into dev-v2.0.24, will reach main with the release).
Merge 2.0.24 into main (#2119)
Merge 2.0.24 into main (MemTensor#2119)