fix(memory): add hindsight_client import check for local_external mode - #32801
Closed
CipherFrame wants to merge 1 commit into
Closed
fix(memory): add hindsight_client import check for local_external mode#32801CipherFrame wants to merge 1 commit into
CipherFrame wants to merge 1 commit into
Conversation
In local_external mode, is_available() returned True unconditionally,
causing hermes memory status to report Hindsight as available even when
the hindsight-client package is not installed. This leads to confusing
runtime failures when hindsight_recall/hindsight_reflect tools are
invoked in the TUI.
Add an importlib.import_module('hindsight_client') guard that returns
False with a warning log if the package is missing, matching the pattern
already used by _check_local_runtime() for local_embedded mode.
Refs: NousResearch#18876
Collaborator
Contributor
|
Thanks for the focused report and minimal patch. The runtime failure described here is already addressed on current
The proposed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
In
local_externalmode,is_available()returnsTrueunconditionally (line 602-603), causinghermes memory statusto report Hindsight as "available ✓" even when thehindsight-clientPython package is not installed in the runtime.This creates a false-positive that only surfaces at runtime when
hindsight_recall/hindsight_reflecttools fail with:This is especially confusing in Docker deployments where:
hermes memory statussays everything is fineThe root cause: #18924 proposed a fix for this but was closed without merging. The
local_externalbranch ofis_available()never got the import guard thatlocal_embeddedhas via_check_local_runtime().Fix
Add an
importlib.import_module("hindsight_client")guard to thelocal_externalbranch. If the package is missing, log a warning and returnFalsesohermes memory statusaccurately reflects reality.This is a minimal, targeted fix — 8 lines, one file, no new dependencies.
Testing
Field-tested in a Docker Compose deployment:
hindsight-client:is_available()returnsFalsewith warning log → status no longer lieshindsight-clientinstalled viauv:is_available()returnsTrue→ tools work correctlyRefs: #18876