The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
chore(health): waive pre-existing broad excepts in the restored holographic provider
teknium1b9ecc727e983
diff --git a/plugins/memory/holographic/__init__.py b/plugins/memory/holographic/__init__.pyindex 5f5b146771c..921ce6ed1f8 100644--- a/plugins/memory/holographic/__init__.py+++ b/plugins/memory/holographic/__init__.py@@ -82,7 +82,7 @@ def _load_plugin_config() -> dict:try:from hermes_cli.config import load_config_readonly # canonical: managed-scope overlay + ${VAR} expansionreturn cfg_get(load_config_readonly(), "plugins", "hermes-memory-store", default={}) or {}- except Exception:+ except Exception: # health: allow BLE001 -- restored verbatim by the revert of #136424; this provider leaves core on Oct 15return {}@@ -153,7 +153,7 @@ class HolographicMemoryProvider(MemoryProvider):return ""try:total = self._store._conn.execute("SELECT COUNT(*) FROM facts").fetchone()[0]- except Exception:+ except Exception: # health: allow BLE001 -- restored verbatim by the revert of #136424; this provider leaves core on Oct 15total = 0body = ("Active. Empty fact store — proactively add facts the user would expect you to remember.\n""Use fact_store(action='add') to store durable structured facts about people, projects, preferences, decisions.\n"@@ -169,7 +169,7 @@ class HolographicMemoryProvider(MemoryProvider):results = self._retriever.search(query, min_trust=self._min_trust, limit=5)lines = [f"- [{r.get('trust_score', r.get('trust', 0)):.1f}] {r.get('content', '')}" for r in results]return "## Holographic Memory\n" + "\n".join(lines) if results else ""- except Exception as e:+ except Exception as e: # health: allow BLE001 -- restored verbatim by the revert of #136424; this provider leaves core on Oct 15logger.debug("Holographic prefetch failed: %s", e)return ""@@ -183,7 +183,7 @@ class HolographicMemoryProvider(MemoryProvider):return self._TOOL_HANDLERS[tool_name](self, args)except KeyError as exc:return tool_error(f"Missing required argument: {exc}")- except Exception as exc:+ except Exception as exc: # health: allow BLE001 -- restored verbatim by the revert of #136424; this provider leaves core on Oct 15return tool_error(str(exc))def on_session_end(self, messages: list[dict[str, Any]]) -> None:@@ -196,7 +196,7 @@ class HolographicMemoryProvider(MemoryProvider):if action == "add" and self._store and content:try:self._store.add_fact(content, category="user_pref" if target == "user" else "general")- except Exception as e:+ except Exception as e: # health: allow BLE001 -- restored verbatim by the revert of #136424; this provider leaves core on Oct 15logger.debug("Holographic memory_write mirror failed: %s", e)def shutdown(self) -> None:@@ -204,7 +204,7 @@ class HolographicMemoryProvider(MemoryProvider):if self._store is not None:try:self._store.close()- except Exception as e:+ except Exception as e: # health: allow BLE001 -- restored verbatim by the revert of #136424; this provider leaves core on Oct 15logger.debug("Holographic shutdown close() failed: %s", e)self._store = self._retriever = None@@ -257,7 +257,7 @@ class HolographicMemoryProvider(MemoryProvider):try:self._store.add_fact(content[:400], category=category)extracted += 1- except Exception:+ except Exception: # health: allow BLE001 S110 -- restored verbatim by the revert of #136424; this provider leaves core on Oct 15passif extracted:logger.info("Auto-extracted %d facts from conversation", extracted)diff --git a/plugins/memory/holographic/retrieval.py b/plugins/memory/holographic/retrieval.pyindex 236c1580caa..3ef814fcd0f 100644--- a/plugins/memory/holographic/retrieval.py+++ b/plugins/memory/holographic/retrieval.py@@ -174,7 +174,7 @@ class FactRetriever:f"WHERE facts_fts MATCH ? {category_clause}AND f.trust_score >= ? ORDER BY facts_fts.rank LIMIT ?")try:results = [dict(row) for row in self.store._conn.execute(sql, params).fetchall()]- except Exception:+ except Exception: # health: allow BLE001 -- restored verbatim by the revert of #136424; this provider leaves core on Oct 15return [] # FTS5 MATCH can fail on malformed queries# FTS5 rank is negative (lower = better); normalize |rank| / max to [0, 1] (1e-6 floor avoids div by zero)max_rank = max([abs(f["fts_rank_raw"]) for f in results] + [1e-6])diff --git a/plugins/memory/holographic/store.py b/plugins/memory/holographic/store.pyindex daa6cb04912..56a13f58dac 100644--- a/plugins/memory/holographic/store.py+++ b/plugins/memory/holographic/store.py@@ -280,7 +280,7 @@ class MemoryStore:try:with entry["lock"]:entry["conn"].close()- except Exception:+ except Exception: # health: allow BLE001 S110 -- restored verbatim by the revert of #136424; this provider leaves core on Oct 15pass # an already-closed/broken connection must not abort releasing siblingsreturn len(doomed)