diff --git a/CHANGELOG.md b/CHANGELOG.md index c8e06d41..11d34031 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,7 +44,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - **Agno `_AgentScopedStore.upsert_memory` silently swallowed decision recording failures** (#779) - - `upsert_memory()` now logs `logger.warning("[%s] record_decision failed: %s", self._role, exc)` when `record_decision()` fails, matching the error-logging convention used for `store()` in the same method + - `upsert_memory()` now logs `logger.warning("[%s] record_decision failed: %s", self._role, exc, exc_info=True)` when `record_decision()` fails, matching the error-logging convention used for `store()` in the same method with traceback context preserved - Preserves graceful fallback behavior: `record_decision()` remains optional and `upsert_memory()` continues without propagating the exception - Added regression coverage in `tests/integrations/agno/test_shared_context.py` for both `store()` and `record_decision()` warning paths diff --git a/integrations/agno/shared_context.py b/integrations/agno/shared_context.py index 47ad2667..eb0294f7 100644 --- a/integrations/agno/shared_context.py +++ b/integrations/agno/shared_context.py @@ -83,7 +83,7 @@ class _AgentScopedStore(AgnoContextStore): try: self._context.store(mem_text, conversation_id=self.session_id) except Exception as exc: - logger.warning("[%s] store failed: %s", self._role, exc) + logger.warning("[%s] store failed: %s", self._role, exc, exc_info=True) if self.decision_tracking: try: @@ -95,7 +95,7 @@ class _AgentScopedStore(AgnoContextStore): confidence=1.0, ) except Exception as exc: - logger.warning("[%s] record_decision failed: %s", self._role, exc) + logger.warning("[%s] record_decision failed: %s", self._role, exc, exc_info=True) if hasattr(memory, "id"): memory.id = mem_id