Skip to content

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

Open
liuhaibin0528 wants to merge 1 commit intoMemTensor:mainfrom
liuhaibin0528:fix/hermes-bridge-lifecycle
Open

fix(memos-local-plugin): harden hermes bridge lifecycle#1667
liuhaibin0528 wants to merge 1 commit intoMemTensor:mainfrom
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

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