fixed qodo review

- Added exc_info=True to both store failed and record_decision failed warning logs in _AgentScopedStore.upsert_memory() to preserve full traceback context for debugging

- Updated CHANGELOG.md entry to document traceback preservation
This commit is contained in:
Sameer6305
2026-07-31 18:19:50 +05:30
parent d21e5e9944
commit 633d485045
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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