Skip to content

fix(memos-local-plugin): harden hermes bridge lifecycle#1667

Open
liuhaibin0528 wants to merge 1 commit into
MemTensor:dev-20260604-v2.0.19from
liuhaibin0528:fix/hermes-bridge-lifecycle
Open

fix(memos-local-plugin): harden hermes bridge lifecycle#1667
liuhaibin0528 wants to merge 1 commit into
MemTensor:dev-20260604-v2.0.19from
liuhaibin0528:fix/hermes-bridge-lifecycle

Conversation

@liuhaibin0528

Copy link
Copy Markdown

Summary

This hardens the Hermes stdio bridge lifecycle for apps/memos-local-plugin.

  • terminate orphaned non-daemon bridge.cts --agent=hermes processes on client close
  • recreate the bridge if the cached Python client points to a dead child process
  • isolate feedback.submit failures so they do not abort sync_turn
  • use a longer timeout for turn.end and a shorter timeout for feedback.submit
  • add Python regression coverage for the new bridge lifecycle behaviors

Why

In long-running Hermes sessions I hit two stability problems repeatedly:

  1. stale stdio bridge children accumulated after reconnects/timeouts
  2. a slow or failed feedback.submit could make the whole turn sync look failed even though turn.end had already completed

This patch keeps the viewer daemon behavior intact while making the short-lived stdio bridge process lifecycle explicit.

Testing

  • python3 -m unittest apps.memos-local-plugin.tests.python.test_bridge_client
  • python3 -m unittest apps.memos-local-plugin.tests.python.test_hermes_provider_pipeline

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

This PR has been automatically marked as stale due to inactivity.

@github-actions github-actions Bot added the stale Inactive issue/PR auto-marked by bot | 长期未更新 label Jun 9, 2026
@Memtensor-AI Memtensor-AI changed the base branch from main to dev-20260604-v2.0.19 June 10, 2026 15:39
@github-actions github-actions Bot removed the stale Inactive issue/PR auto-marked by bot | 长期未更新 label Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant