fix: defensive hardening — logging, dedup, locks, dead code
Four small fixes: 1. model_tools.py: Tool import failures logged at WARNING instead of DEBUG. If a tool module fails to import (syntax error, missing dep), the user now sees a warning instead of the tool silently vanishing. 2. hermes_cli/config.py: Remove duplicate 'import sys' (lines 19, 21). 3. agent/model_metadata.py: Remove 6 duplicate entries in DEFAULT_CONTEXT_LENGTHS dict. Python keeps the last value, so no functional change, but removes maintenance confusion. 4. hermes_state.py: Add missing self._lock to the LIKE query in resolve_session_id(). The exact-match path used get_session() (which locks internally), but the prefix fallback queried _conn without the lock.
This commit is contained in:
parent
d2b10545db
commit
847ee20390
4 changed files with 8 additions and 13 deletions
|
|
@ -101,7 +101,7 @@ def _discover_tools():
|
|||
try:
|
||||
importlib.import_module(mod_name)
|
||||
except Exception as e:
|
||||
logger.debug("Could not import %s: %s", mod_name, e)
|
||||
logger.warning("Could not import tool module %s: %s", mod_name, e)
|
||||
|
||||
|
||||
_discover_tools()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue